1 2011-08-24 Joseph Myers <joseph@codesourcery.com>
3 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
4 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
9 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
12 (GNATLIBCFLAGS_FOR_C): Replace
13 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
14 (gnatlib-shared-default, gnatlib-shared-dual-win32)
15 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
16 (gnatlib-sjlj, gnatlib-zcx): Likewise.
18 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
20 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
22 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
24 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
26 2011-08-05 Nicolas Roche <roche@adacore.com>
28 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
29 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
31 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
33 2011-08-05 Matthew Heaney <heaney@adacore.com>
35 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
36 subprogram bodies declared out-of-order.
38 2011-08-05 Yannick Moy <moy@adacore.com>
40 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
41 entities directly in package Standard, otherwise skip the standard
44 2011-08-05 Robert Dewar <dewar@adacore.com>
46 * a-cbmutr.adb: Minor reformatting
47 (Allocate_Node): refactor node allocation algorithm
49 2011-08-05 Robert Dewar <dewar@adacore.com>
51 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
52 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
54 (Analyze_Pragma, case Check_Policy): Ditto.
55 * sem_prag.ads (Check_Disabled): New function
56 * snames.ads-tmpl: Add Name_Disable.
58 2011-08-05 Robert Dewar <dewar@adacore.com>
60 * gnat_rm.texi: Document implementation-defined policy DISABLE for
61 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
63 2011-08-05 Ed Schonberg <schonberg@adacore.com>
65 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
66 that appears in a generic formal part and applies to a formal
69 2011-08-05 Robert Dewar <dewar@adacore.com>
71 * a-cbmutr.ads: Minor reformatting.
73 2011-08-05 Matthew Heaney <heaney@adacore.com>
75 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
76 to check count, check sign of value instead.
77 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
78 (Copy_Subtree): allocate copy of source element
79 (Equal_Subtree): compare elements, not access objects
81 2011-08-05 Vincent Celier <celier@adacore.com>
83 * gnat_ugn.texi: Fix VMS alternative.
85 2011-08-05 Thomas Quinot <quinot@adacore.com>
87 * sem_ch11.adb: Add comment.
89 2011-08-05 Robert Dewar <dewar@adacore.com>
91 * exp_util.adb: Minor comment fix.
93 2011-08-05 Robert Dewar <dewar@adacore.com>
95 * scng.adb (Error_Unterminated_String): Improve flag position when
98 2011-08-05 Matthew Heaney <heaney@adacore.com>
100 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
102 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
103 multiway tree containers.
105 2011-08-05 Robert Dewar <dewar@adacore.com>
107 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
108 * stylesw.adb: Implement -gnatyC to control comment spacing
109 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
111 * usage.adb: Add line for -gnatyC.
113 2011-08-05 Robert Dewar <dewar@adacore.com>
115 * gnat_ugn.texi: Document -gnatyC.
116 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
117 synonym for COMMENTS2).
119 2011-08-05 Robert Dewar <dewar@adacore.com>
121 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
122 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
123 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
124 a-comutr.ads, lib-xref.adb: Minor reformatting.
126 2011-08-05 Robert Dewar <dewar@adacore.com>
128 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
129 warning if there is an exception handler present.
131 2011-08-05 Pascal Obry <obry@adacore.com>
133 * a-iteint.ads: Fix copyright year.
135 2011-08-05 Thomas Quinot <quinot@adacore.com>
137 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
138 statement SCO for a USE clause or a representation clause.
140 2011-08-05 Yannick Moy <moy@adacore.com>
142 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
143 between body and spec for stub.
144 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
145 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
146 pragma precondition or postcondition, for which the enclosing
147 subprogram or package in the AST is not the desired one, return empty.
149 2011-08-05 Thomas Quinot <quinot@adacore.com>
151 * g-expect.adb: Minor reformatting.
153 2011-08-05 Bob Duff <duff@adacore.com>
155 * a-fihema.adb: Comment out OS_Lib.
157 2011-08-05 Matthew Heaney <heaney@adacore.com>
159 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
160 (unbounded multiway tree containers) and a-iteint.ads.
161 * a-comutr.ads, a-comutr.adb:
162 This is the new Ada 2012 unit for unbounded multiway tree containers
163 * a-cimutr.ads, a-cimutr.adb
164 This is the new Ada 2012 unit for indefinite multiway tree containers
165 * a-iteint.ads: New file.
167 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
169 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
171 2011-08-05 Bob Duff <duff@adacore.com>
173 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
175 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
177 2011-08-05 Ed Schonberg <schonberg@adacore.com>
179 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
180 general indexing aspects of Ada2012. Called when analyzing indexed
181 components when other interpretations fail.
182 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
183 in an expression context where overloading is meaningful. This excludes
184 the occurrence in an aspect specification (efficiency only).
185 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
186 related to iterators can be set by an attribute specification, but
188 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
189 Constant_Indexing and Variable_Indexing.
190 (Check_Indexing_Functions): New procedure to perform legality checks.
191 Additional semantic checks at end of declarations.
193 2011-08-05 Sergey Rybin <rybin@adacore.com>
195 * tree_io.ads: Update ASIS_Version_Number because of the change of the
196 order of calling Tree_Write/Tree_Read routines made for aspects.
198 2011-08-05 Bob Duff <duff@adacore.com>
200 * a-fihema.adb (Finalize): Fix race condition.
202 2011-08-05 Yannick Moy <moy@adacore.com>
204 * sem_ch12.adb (Analyze_Package_Instantiation,
205 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
208 2011-08-05 Ed Schonberg <schonberg@adacore.com>
210 * sem_type.adb (Specific_Type): in an instance, the type-specific
211 operand of an equality check that involves null may have a private
212 type. Use full view to determine legality of construct.
214 2011-08-05 Vincent Celier <celier@adacore.com>
216 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
217 delete or close the file when the call to gnatmake was successful.
219 2011-08-05 Yannick Moy <moy@adacore.com>
221 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
222 Global_Discard_Names.
224 2011-08-05 Ed Schonberg <schonberg@adacore.com>
226 * sinfo.ads: comments on use of entity field for aspect specifications.
228 2011-08-05 Ed Schonberg <schonberg@adacore.com>
230 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
231 node is not itself an entity but a selected component, it is a
232 rewritten parameterless call to an en enclosing synchronized operation,
233 and this expansion will be performed again in the instance, so there is
234 no global information to preserve.
236 2011-08-05 Javier Miranda <miranda@adacore.com>
238 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
239 for renamings of predefined primitives.
240 (In_Predef_Prims_DT): New subprogram.
242 2011-08-05 Ed Schonberg <schonberg@adacore.com>
244 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
245 possible interpretation of name is a reference type, add an
246 interpretation that is the designated type of the reference
247 discriminant of that type.
248 * sem_res.adb (resolve): If the interpretation imposed by context is an
249 implicit dereference, rewrite the node as the deference of the
250 reference discriminant.
251 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
252 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
253 parent type or base type.
254 * sem_ch4.adb (Process_Indexed_Component,
255 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
256 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
257 Check for implicit dereference.
258 (List_Operand_Interps): Indicate when an implicit dereference is
260 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
262 2011-08-05 Thomas Quinot <quinot@adacore.com>
264 * scos.ads: Update documentation of SCO table. Pragma statements can now
265 be marked as disabled (using 'p' instead of 'P' as the statement kind).
266 * par_sco.ads, par_sco.adb: Implement the above change.
267 (Process_Decisions_Defer): Generate a P decision for the first parameter
268 of a dyadic pragma Debug.
269 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
271 * put_scos.adb: Code simplification based on above change.
273 2011-08-05 Robert Dewar <dewar@adacore.com>
275 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
276 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
277 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
278 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
280 2011-08-05 Bob Duff <duff@adacore.com>
282 * a-stunau.ads, g-spipat.adb: Update comments.
284 2011-08-05 Bob Duff <duff@adacore.com>
286 * a-fihema.ads: Minor comment fix.
287 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
289 (Attach, Detach): Remove some unnecessary code.
290 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
292 2011-08-05 Bob Duff <duff@adacore.com>
294 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
295 allocation for Objects component. This simplifies the code somewhat. It
296 is also a little more efficient in the not-so-unusual case where there
297 are no controlled objects allocated.
298 Make Finalization_Started flag atomic.
299 (Finalize): Avoid unnecessary detachment of items from the list.
300 (pcol): Minor cleanup.
302 2011-08-05 Ed Schonberg <schonberg@adacore.com>
304 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
305 package whose name is the same as that of the generic unit, or its
308 2011-08-05 Bob Duff <duff@adacore.com>
310 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
311 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
314 2011-08-05 Arnaud Charlet <charlet@adacore.com>
316 * make.adb (Linking_Phase): No longer need to set source search path
317 before calling gnatlink in CodePeer mode.
318 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
319 gcc in CodePeer mode, since the binder generated file no longer has a
321 * switch.ads, switch.adb (Is_Language_Switch): Removed.
322 * switch-c.adb: Update comment.
324 2011-08-05 Thomas Quinot <quinot@adacore.com>
326 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
328 2011-08-05 Nicolas Roche <roche@adacore.com>
330 * gnat_ugn.texi: Fix minor syntax error issue.
332 2011-08-05 Vincent Celier <celier@adacore.com>
334 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
335 delete or close the file when the call to gnatmake returns a non
336 successful return code.
338 2011-08-05 Ed Schonberg <schonberg@adacore.com>
340 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
341 check, indicate that the copy of the original node does not come from
342 source, to prevent an infinite recursion of the expansion.
344 2011-08-05 Johannes Kanig <kanig@adacore.com>
346 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
347 VC generation for subprogram bodies.
349 2011-08-05 Yannick Moy <moy@adacore.com>
352 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
353 the base type with the smallest allowed base type.
355 2011-08-05 Sergey Rybin <rybin@adacore.com>
357 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
360 2011-08-05 Ed Schonberg <schonberg@adacore.com>
362 * sem_ch12.ads: minor comment updates.
364 2011-08-05 Ed Schonberg <schonberg@adacore.com>
366 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
367 instantiation and a formal package the compiler generates a package
368 renaming declaration so that the generic name within the declaration
369 is interpreted as a renaming of the instance. At the end of a formal
370 package declaration, this renaming must become invisible.
372 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
374 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
375 comparison and rely on concrete entities instead.
377 2011-08-05 Ed Schonberg <schonberg@adacore.com>
379 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
380 and discriminants, to indicate that the type has an access discriminant
381 that supports implicit dereference.
382 * snames.ads-tmpl: Add names of aspects and attributes related to
383 Ada2012 iterators: constant_indexing, default_iterator,
384 iterator_element, implicit_dereference, variable_indexing.
385 * aspects.ads, aspects.adb: entries for iterator-related aspects.
386 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
387 iterator-related aspects.
388 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
390 2011-08-05 Sergey Rybin <rybin@adacore.com>
392 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
393 metrics in gnatmetric to cover new kinds of coupling mentrics.
395 2011-08-05 Steve Baird <baird@adacore.com>
397 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
398 of calling the user-defined main subprogram.
399 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
400 is set) Call_Main_Subprogram ahead of, as opposed to
402 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
403 generation of a "with" of the user-defined main subprogram.
404 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
405 (which is now called from Gen_Main instead).
407 2011-08-05 Emmanuel Briot <briot@adacore.com>
409 * projects.texi: Added reference to the Makefile package.
411 2011-08-05 Thomas Quinot <quinot@adacore.com>
413 * exp_ch7.adb: Minor comment rewording.
415 2011-08-05 Ed Falis <falis@adacore.com>
417 * env.c: Fix comment.
419 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
421 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
422 character comparison and rely on concrete entities instead.
424 2011-08-05 Ed Schonberg <schonberg@adacore.com>
426 * sem_ch3.adb: (Check_Private_Overriding): better error message,
427 suggested by AI95-0068.
429 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
431 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
432 the two potential initialization calls. This accounts for any
433 access-before-elaboration checks which may precede the initialization
435 (Next_Suitable_Statement): New routine. Returns the next real statement
436 after the input node while skipping generated checks.
437 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
438 with comment on usage.
439 Do not generate Elaborate_All when the trigger is a finalization call
440 coming from a type init proc.
441 (Check_Elab_Call): Propagate the initialization procedure context to
442 subsequent calls to Check_A_Call.
443 (Check_Internal_Call_Continue): Propagate the initialization procedure
444 context to subsequent calls to Check_Elab_Call.
445 (Is_Finalization_Procedure): New routine. Returns True if the input
446 entity denotes a [Deep_]Finalize routine.
447 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
448 along with comment on usage.
450 2011-08-05 Vadim Godunko <godunko@adacore.com>
452 * s-atocou.ads: Add list of supported platforms.
454 2011-08-05 Yannick Moy <moy@adacore.com>
456 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
458 * opt.ads (Disable_ALI_File): new Boolean flag
459 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
461 2011-08-05 Ed Falis <falis@adacore.com>
463 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
464 environ is properly defined.
466 2011-08-05 Vincent Celier <celier@adacore.com>
468 * make.adb (Compilation_Phase): Exit immediately when all objects have
469 been found up to date, to avoid multiple exit messages.
470 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
471 same project for languages with no compiler.
472 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
474 2011-08-05 Robert Dewar <dewar@adacore.com>
476 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
477 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
478 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
479 s-atocou-builtin.adb: Minor reformatting.
481 2011-08-05 Yannick Moy <moy@adacore.com>
483 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
484 if the node to wrap is a pragma check, this node and enclosed
485 expression are not expanded, so do not apply any transformations here.
486 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
487 introducing transient scopes.
489 2011-08-05 Jose Ruiz <ruiz@adacore.com>
491 * adaint.c (__gnat_set_writable, __gnat_set_readable,
492 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
493 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
494 routine is available, so we use the default implementation of these
496 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
497 support for copying attributes on VxWorks 6.
499 2011-08-05 Yannick Moy <moy@adacore.com>
501 * debug.adb: Remove use of -gnatd.D.
502 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
503 * opt.ads: Simplify variables for ALFA mode, to keep one only
504 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
507 2011-08-05 Vincent Celier <celier@adacore.com>
509 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
510 Builder'Default_Switches.
512 2011-08-05 Vincent Celier <celier@adacore.com>
514 * makeusg.adb: Add lines for --create-map-file switches.
516 2011-08-05 Ed Schonberg <schonberg@adacore.com>
518 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
519 profile is incomplete and the full view is available, replace it with
521 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
522 incomplete, freezing the subprogram is delayed until the full view is
524 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
525 fixed-point multiplication operator and the predefined operator is
526 resolved in favor of the user-defined one.
528 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
530 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
533 2011-08-04 Ed Schonberg <schonberg@adacore.com>
535 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
536 whether a type lacks user-defined Read or Write operations, or has a
537 component that lacks them.
538 * sem_attr.adb (Check_Stream_Attribute): if restriction
539 No_Default_Stream_Attributes is active, verify that all subcomponent
540 types of the target have user-defined stream operations, and report
542 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
543 * exp_strm.adb: Build_Elementary_Input_Call,
544 Build_Elementary_Write_Call): remove checks for restriction
545 No_Default_Stream_Attributes, now checked in semantics.
547 2011-08-04 Vincent Celier <celier@adacore.com>
549 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
550 switches on the command line, look for all valid --RTS switches in the
551 Builder switches and for each language use the first runtime name found
553 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
554 command line and there is no auto-configuration.
555 (Runtime_Name_Set_For): New function.
557 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
559 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
560 elaborate initialization expression for variable Abort when processing
561 a package body or a declaration.
562 (Create_Finalizer): Propagate the package context when creating the
563 exception-related variables.
564 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
565 For_Package along with usage comment.
567 2011-08-04 Arnaud Charlet <charlet@adacore.com>
569 * gcc-interface/Makefile.in: Clean up targets.
570 Enable new package for atomic counters and copy-on-write implementation
571 of unbounded strings on x86 platforms.
572 * gcc-interface/Make-lang.in: Update dependencies.
574 2011-08-04 Robert Dewar <dewar@adacore.com>
576 * exp_ch7.adb: Minor reformatting.
578 2011-08-04 Robert Dewar <dewar@adacore.com>
580 * exp_strm.adb: Minor reformatting.
582 2011-08-04 Vadim Godunko <godunko@adacore.com>
584 * s-atocou.adb: Replace by dummy version and use on targets where atomic
585 operations are not supported.
586 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
587 * s-atocou-x86.adb: New file.
588 * Makefile.rtl: Add s-atocou.o file
590 2011-08-04 Arnaud Charlet <charlet@adacore.com>
592 * make.adb (Compile): Move setting of CodePeer_Mode to ...
593 (Compilation_Phase): ... here.
594 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
596 2011-08-04 Thomas Quinot <quinot@adacore.com>
598 * Make-generated.in: Fix minor typo in comment.
600 2011-08-04 Thomas Quinot <quinot@adacore.com>
602 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
605 2011-08-04 Robert Dewar <dewar@adacore.com>
607 * a-coinho.adb: Minor reformatting.
609 2011-08-04 Robert Dewar <dewar@adacore.com>
611 * a-coinho.ads: Minor reformatting.
613 2011-08-04 Vadim Godunko <godunko@adacore.com>
615 * s-atocou.ads, s-atocou.adb: New files.
616 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
617 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
618 direct use of GCC's atomic builtins and replace them by use of new
619 atomic counter package.
621 2011-08-04 Ed Schonberg <schonberg@adacore.com>
623 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
625 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
627 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
628 with a call to Get_External_Tag.
629 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
630 subprogram usage. Remove the guard against package declarations and
631 bodies since Build_Cleanup_Statements is no longer invoked in that
633 (Build_Components): Initialize Tagged_Type_Stmts when the context
634 contains at least one library-level tagged type.
635 (Build_Finalizer): New local variables Has_Tagged_Types and
636 Tagged_Type_Stmts along with associated comments on usage. Update the
637 logic to include tagged type processing.
638 (Create_Finalizer): Insert all library-level tagged type unregistration
639 code before the jump block circuitry.
640 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
641 (Expand_N_Package_Declaration): Remove the call to
642 Build_Cleanup_Statements.
643 (Process_Tagged_Type_Declaration): New routine. Generate a call to
644 unregister the external tag of a tagged type.
645 (Processing_Actions): Reimplemented to handle tagged types.
646 (Process_Declarations): Detect the declaration of a library-level
647 tagged type and carry out the appropriate actions.
648 (Unregister_Tagged_Types): Removed. The machinery has been directly
649 merged with Build_Finalizer.
651 2011-08-04 Robert Dewar <dewar@adacore.com>
653 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
654 gnatls.adb, exp_ch3.adb: Minor reformatting.
656 2011-08-04 Marc Sango <sango@adacore.com>
658 * sem_attr.adb (Analyze_Attribute): Replace the message
659 "invisible attribute of}" of the spark restriction violation in
660 attribute reference by the simple message "invisible attribute of type".
661 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
662 two insertion characters: '&' and '}'.
664 2011-08-04 Vadim Godunko <godunko@adacore.com>
666 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
667 * a-coinho.ads, a-coinho.adb: New file.
668 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
670 2011-08-04 Nicolas Roche <roche@adacore.com>
672 * alfa_test.adb: Not all ali files are containing alfa information even
673 if compiled with -gnatd.F. So suppress warning about missing ALFA
676 2011-08-04 Yannick Moy <moy@adacore.com>
678 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
680 * put_alfa.adb: Check that scope name is not empty.
682 2011-08-04 Ed Schonberg <schonberg@adacore.com>
684 * exp_ch3.adb (Stream_Operation_Ok): new predicate
685 Needs_Elementary_Stream_Operation, to determine whether user-defined
686 Read and Write attributes are available for the elementary components
687 of the given type. If only the predefined attributes are available,
688 then when restriction No_Default_Stream_Attributes is active the
689 predefined stream attributes for the composite type cannot be created.
691 2011-08-04 Robert Dewar <dewar@adacore.com>
693 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
694 Put routines in alpha order
696 2011-08-04 Jose Ruiz <ruiz@adacore.com>
698 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
699 * gcc-interface/Make-lang.in: Update dependencies.
701 2011-08-04 Arnaud Charlet <charlet@adacore.com>
703 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
704 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
707 2011-08-04 Robert Dewar <dewar@adacore.com>
709 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
710 lib-xref-alfa.adb: Minor reformatting.
712 2011-08-04 Marc Sango <sango@adacore.com>
714 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
715 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
716 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
719 2011-08-04 Tristan Gingold <gingold@adacore.com>
721 * bindgen.adb (Gen_Adainit_C): Remove.
722 (Gen_Adafinal_C): Ditto.
723 (Gen_Elab_Externals_C): Ditto.
724 (Gen_Elab_Calls_C): Ditto.
725 (Gen_Elab_Order_C): Ditto.
726 (Gen_Elab_Defs_C): Ditto.
727 (Gen_Finalize_Library_C): Ditto.
728 (Gen_Finalize_Library_Defs_C): Ditto.
730 (Gen_Output_File_C): Ditto.
731 (Gen_Restrictions_C): Ditto.
732 (Gen_Versions_C): Ditto.
733 (Write_Info_Ada_C): Ditto.
734 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
735 (Gen_Output_File): Do not force Ada_Bind_File anymore.
736 Always call Gen_Output_File_Ada.
737 * gnatlink.adb (Begin_Info): Now a constant.
739 (Ada_Bind_File): Remove
740 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
741 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
742 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
743 * opt.ads (Ada_Bind_File): Remove.
745 2011-08-04 Thomas Quinot <quinot@adacore.com>
747 * projects.texi: Document target-specific directory in default project
750 2011-08-04 Thomas Quinot <quinot@adacore.com>
752 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
755 2011-08-04 Yannick Moy <moy@adacore.com>
757 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
758 opt.ads, lib-xref.ads: Code clean up.
760 2011-08-04 Yannick Moy <moy@adacore.com>
762 * gnat_rm.texi: Update description of Test_Case
763 * gnat_ugn.texi: Typo.
765 2011-08-04 Ed Falis <falis@adacore.com>
767 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
769 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
771 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
772 it is of type Root_Controlled. This action eliminates fields Prev and
773 Next from type equality.
775 2011-08-04 Yannick Moy <moy@adacore.com>
777 * lib-xref-alfa.adb: Correct typo.
779 2011-08-04 Matthew Heaney <heaney@adacore.com>
781 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
784 2011-08-04 Yannick Moy <moy@adacore.com>
786 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
787 (Analyze_Pragma): allow static string expression for name of Test_Case,
788 instead of simply string literals.
789 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
792 2011-08-04 Vincent Celier <celier@adacore.com>
794 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
795 case suffixes to find truncated main sources.
797 2011-08-04 Tristan Gingold <gingold@adacore.com>
799 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
800 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
801 (Compute_Current_Task): Ditto.
803 2011-08-04 Tristan Gingold <gingold@adacore.com>
805 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
807 2011-08-04 Yannick Moy <moy@adacore.com>
809 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
810 library-level constant.
811 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
812 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
813 used as selector of parameter association, in ALFA mode.
815 2011-08-04 Robert Dewar <dewar@adacore.com>
817 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
818 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
821 2011-08-04 Arnaud Charlet <charlet@adacore.com>
823 * make.adb (Linking_Phase): Set source search path before calling
824 gnatlink in CodePeer mode.
826 2011-08-04 Javier Miranda <miranda@adacore.com>
828 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
829 Remove code which takes care of building TSDs.
830 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
831 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
832 the accessibility check in VM targets.
833 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
834 (Building_Static_DT): Now returns false for VM targets.
835 (Build_VM_TSDs): Removed.
836 (Expand_Interface_Conversion): Generate missing runtime check for
837 conversions to interface types whose target type is unknown at compile
839 (Make_VM_TSD): Add missing code to disable the generation of calls to
840 Check_TSD if the tagged type is not defined at library level, or not
841 has a representation clause specifying its external tag, or -gnatdQ is
843 * exp_disp.ads (Build_VM_TSDs): Removed.
844 (Make_VM_TSDs): Spec relocated from exp_disp.adb
845 * sem_disp.adb (Check_Dispatching_Operation): No code required to
846 register primitives in the dispatch tables in VM targets.
847 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
848 initialization of class-wide interface objects in VM targets.
849 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
852 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
854 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
855 when dotnet-ld cannot be found.
857 2011-08-04 Arnaud Charlet <charlet@adacore.com>
859 * bindgen.adb: Simplify significantly generation of binder body file in
861 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
862 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
865 2011-08-04 Yannick Moy <moy@adacore.com>
867 * sem_prag.adb, sem.ads: Code cleanup.
869 2011-08-04 Tristan Gingold <gingold@adacore.com>
871 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
872 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
874 * s-stusta.adb (Print): Adjust after changes in s-stausa.
875 * gnat_ugn.texi: Update dynamic stack usage section.
877 2011-08-04 Steve Baird <baird@adacore.com>
879 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
880 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
881 contains only a call to the user-defined main subprogram.
882 (Gen_Main_Ada) - If CodePeer_Mode is set, then
883 call the "wrapper" subprogram instead of directly
884 calling the user-defined main subprogram.
886 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
888 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
889 alternatives of a case statement for controlled objects. Rename local
890 variable A to Dead_Alt.
891 (Expand_N_If_Statement): Check the then and else statements of an if
892 statement for controlled objects. Check the then statements of all
893 elsif parts of an if statement for controlled objects.
894 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
896 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
897 detects a loop associated with the expansion of an array object.
898 Augment the processing of the loop statements to account for a possible
899 wrap done by Process_Statements_For_Controlled_Objects.
900 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
901 statements and abortable part of an asynchronous select for controlled
903 (Expand_N_Conditional_Entry_Call): Check the else statements of a
904 conditional entry call for controlled objects.
905 (Expand_N_Selective_Accept): Check the alternatives of a selective
906 accept for controlled objects.
907 (Expand_N_Timed_Entry_Call): Check the entry call and delay
908 alternatives of a timed entry call for controlled objects.
909 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
910 exception handler for controlled objects.
911 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
912 Add formal parameter Nested_Constructs along with its associated
914 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
915 Requires_Cleanup_Actions.
916 (Process_Statements_For_Controlled_Objects): New routine.
917 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
918 routine. Inspect a node which contains a non-handled sequence of
919 statements for controlled objects. If such an object is found, the
920 statements are wrapped in a block.
922 2011-08-04 Bob Duff <duff@adacore.com>
924 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
925 need to compare with Class_Wide_Type (T2), in order to get at the
926 original class-wide type node.
927 * sem_type.ads (Covers): Improve the comment.
928 * einfo.ads (Class_Wide_Type): Improve the comment.
929 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
930 the type of the Deref.
932 2011-08-04 Yannick Moy <moy@adacore.com>
934 * gnat_rm.texi: Document that Test_Case pragma can only appear on
935 separate declarations.
936 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
937 check identifier of pragma argument.
938 (Chain_TC): check that no other test case associated to the same entity
940 (Check_Test_Case): disallow test case inside subprogram body
941 (Analyze_Pragma): correct call to check identifier and not argument
942 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
943 function gets name from test case pragma.
945 2011-08-04 Yannick Moy <moy@adacore.com>
947 * gnat_rm.texi: Document new pragma and aspect.
948 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
949 (No_Duplicates_Allowed): new constant array defining whether duplicates
950 aspects of each kind can appear on the same declaration.
951 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
952 field, which points to a node holding the previous Spec_PPC_List.
953 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
954 through the indirection with Contract.
955 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
956 * par-prag.adb (Prag): do nothing on Test_Case pragma
957 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
959 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
960 component Ensures of Test_Case.
961 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
962 (Analyze_Generic_Subprogram_Declaration,
963 Analyze_Subprogram_Instantiation,
964 Analyze_Abstract_Subprogram_Declaration,
965 Analyze_Subprogram_Body_Helper,
966 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
967 insert contract in subprogram node at point of definition
969 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
970 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
972 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
973 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
974 similar to the analysis of pre/post
975 (Derive_Subprogram): insert contract in subprogram node at point of
977 * sem_prag.adb, sem_prag.ads
978 (Check_Arg_Is_String_Literal, Check_Identifier):
979 new checking procedures to be called in treatment of pragmas
980 (Check_Test_Case): new procedure to check that a Test_Case aspect or
981 pragma is well-formed. This does not check currently that 'Result is
982 used only in the Ensures component of a Test_Case.
983 (Analyze_Pragma): add case for Test_Case
984 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
985 components of a Test_Case.
986 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
987 expressions in the 3rd (and 4th if present) arguments of a Test_Case
988 pragma, treated as spec expressions.
989 (Sig_Flags): add value -1 for Test_Case.
990 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
991 Get_Requires_From_Test_Case_Pragma): getters for both expression
992 components of a Test_Case.
993 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
994 indirection between an entry or [generic] subprogram entity and its
995 pre/post + test-cases.
996 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
997 get/set for fields of an N_Contract node.
998 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
999 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1000 names and pragma for Test_Case.
1001 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1003 2011-08-04 Vincent Celier <celier@adacore.com>
1005 * gnat_ugn.texi: Improve documentation of gnatmake switch
1006 --source-info-file=.
1008 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1010 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1011 type). Initialize Atyp to the appropriate type which is later checked
1012 for completion. Rewrite the assertion associated with private type
1015 2011-08-04 Ed Falis <falis@adacore.com>
1017 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1018 initialize the number of CPUs.
1020 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1022 * sem_type.adb (Disambiguate): New subsidiary routine
1023 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1024 equality on an anonymous access type whose designated type is private
1025 does not lead to an ambiguity with the universal access equality
1026 operator in the body or child units of the defining package. The same
1027 is true for a multiplication operator on a private type completed with
1030 2011-08-04 Javier Miranda <miranda@adacore.com>
1032 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1033 (Normalize_Scalars_Config): Removed.
1035 (Register_Opt_Config_Switches): Remove registering config values of
1036 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1037 (Restore_Opt_Config_Switches): Remove code which restores the values of
1038 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1039 Init_Or_Norm_Scalars.
1040 (Save_Opt_Config_Switches): Remove code which saves values of
1041 Init_Or_Norm_Scalars and Normalize_Scalars.
1042 (Set_Opt_Config_Switches): Remove code which restores config values of
1043 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1044 Init_Or_Norm_Scalars.
1046 2011-08-04 Yannick Moy <moy@adacore.com>
1048 * frontend.adb (Frontend): remove previous patch to avoid full
1049 qualification in ALFA mode.
1050 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1051 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1052 unique name for an entity, which could be used to identify the entity
1053 across compilation units.
1055 2011-08-04 Thomas Quinot <quinot@adacore.com>
1058 (Initialize_Default_Project_Path): Add target specific directory
1059 ($prefix/$target/lib/gnat) in front of project path in all cases
1060 (making gnatmake's behaviour consistent with gprbuild).
1061 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1062 Pass target name from Sdefault to project subsystem.
1063 * gnatls.adb: Show new target specific default project directory.
1065 2011-08-04 Johannes Kanig <kanig@adacore.com>
1067 * cstand.adb: Add Information to Identifier in Standard
1068 (Identifer_For): Set Entity to the corresponding entity
1070 2011-08-04 Sergey Rybin <rybin@adacore.com>
1072 * gnat_ugn.texi: Update doc on gnatcheck.
1074 2011-08-04 Yannick Moy <moy@adacore.com>
1076 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1079 2011-08-04 Yannick Moy <moy@adacore.com>
1081 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1082 performing expansion.
1083 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1084 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1085 it is not called in ALFA mode.
1087 2011-08-04 Emmanuel Briot <briot@adacore.com>
1089 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1090 after all, so removed.
1092 2011-08-04 Sergey Rybin <rybin@adacore.com>
1094 * vms_data.ads: Add missing VMS qualifiers.
1096 2011-08-04 Emmanuel Briot <briot@adacore.com>
1098 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1099 the list of files on the command line after processing it through
1102 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1104 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1105 processing for .NET/JVM. These targets can now benefit from
1106 Raise_From_Controlled_Operation and they share the same processing with
1108 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1109 These targets need transient scopes in order to properly finalize short
1110 lived controlled objects.
1111 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1112 NET/JVM. These targets can now benefit from
1113 Raise_From_Controlled_Operation and they share the same processing with
1116 2011-08-04 Geert Bosch <bosch@adacore.com>
1118 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1120 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1122 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1123 Expand_Record_Aggregate, to determine whether aggregate must be
1124 expanded into assignments. This is the case if the ancestor part is
1125 private, regarless of the setting of the flag Has_Private_Ancestor.
1127 2011-08-04 Ed Falis <falis@adacore.com>
1129 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1131 2011-08-04 Bob Duff <duff@adacore.com>
1133 * sinfo.ads: Fix comment.
1135 2011-08-04 Steve Baird <baird@adacore.com>
1137 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1138 choose a package name in much the same way as is
1139 done for JGNAT when VM_Target /= No_VM, except that
1140 a slightly more distinctive prefix string is used.
1142 2011-08-04 Emmanuel Briot <briot@adacore.com>
1144 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1145 gnatmake command line.
1146 This behavior was never documented (and was supported only because of
1147 an early bug in the code). This case might lead to ambiguous cases
1148 (between unit names and truncated base names without suffixes).
1150 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1152 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1153 Remove the external tag of a tagged type from the internal hash table.
1154 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1155 expanded usage of the routine. Strenghten the check for Is_Master. Add
1156 processing for tagged types.
1157 (Build_Finalizer): Create all the necessary lists used in finalizer
1158 creation when the processed context is a package that may contain
1160 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1161 Requires_Cleanup_Actions.
1162 (Expand_N_Package_Body): Package bodies may need clean up code
1163 depending on whether they contain tagged types.
1164 (Expand_N_Package_Declaration): Package declarations may need clean up
1165 code depending on whether they contain tagged types.
1166 (Unregister_Tagged_Types): New routine. Search through a list of
1167 declarations or statements, looking for non-abstract Ada tagged types.
1168 For each such type, generate code to unregister the external tag.
1169 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1170 Requires_Cleanup_Actions.
1171 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1172 through a list of declarations or statements looking for non-abstract
1173 Ada tagged types or controlled objects.
1174 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1175 Requires_Cleanup_Actions.
1176 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1177 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1180 2011-08-04 Vincent Celier <celier@adacore.com>
1182 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1183 has Ada sources, not project Project, because if the root project
1184 Project has no sources of its own, all projects will be deemed without
1187 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1189 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1190 of the No_Param_Proc acc-to-subp type used for initialization of
1191 __gnat_finalize_library_objects so that it's declared at library level
1192 rather than nested inside of the adainit routine.
1194 2011-08-04 Javier Miranda <miranda@adacore.com>
1196 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1197 if the tagged type has a representation clause which specifies its
1200 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1202 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1203 Remove previous procedure with that name.
1204 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1206 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1207 subtype mark, the ancestor cannot have unknown discriminants.
1208 (Resolve_Record_Aggregate): if the type has invisible components
1209 because of a private ancestor, the aggregate is illegal.
1211 2011-08-04 Vincent Celier <celier@adacore.com>
1213 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1214 account switches -gnat2005, -gnat12 and -gnat2012.
1216 2011-08-04 Bob Duff <duff@adacore.com>
1218 * s-tasdeb.ads: Minor comment fix.
1220 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1222 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1224 * switch.ads, switch.adb (Is_Language_Switch): New function.
1226 2011-08-04 Vincent Celier <celier@adacore.com>
1228 * switch-c.adb: Minor comment addition.
1230 2011-08-04 Vincent Celier <celier@adacore.com>
1232 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1233 ending with '=' is followed by a space (missing file name).
1235 2011-08-04 Pascal Obry <obry@adacore.com>
1237 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1239 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1241 * sem_ch12.adb (Analyze_Associations): New routine
1242 Check_Overloaded_Formal_Subprogram to reject a formal package when
1243 there is a named association or a box initialisation for an overloaded
1244 formal subprogram of the corresponding generic.
1246 2011-08-04 Yannick Moy <moy@adacore.com>
1248 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1249 * get_alfa.adb, put_alfa.adb: Read and write new component of
1251 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1253 2011-08-04 Pascal Obry <obry@adacore.com>
1255 * urealp.adb: Minor reformatting.
1257 2011-08-04 Tristan Gingold <gingold@adacore.com>
1259 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1260 Handle the case when Cleanup_Protected_Object returns Empty.
1262 2011-08-04 Yannick Moy <moy@adacore.com>
1264 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1266 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1268 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1269 call, ignore functions.
1271 2011-08-04 Geert Bosch <bosch@adacore.com>
1273 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1276 2011-08-04 Emmanuel Briot <briot@adacore.com>
1278 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1279 as an index for Builder'Switches. This conforms to the documentation.
1280 * make.adb (Insert_Project_Sources): avoid duplicate code
1282 2011-08-04 Emmanuel Briot <briot@adacore.com>
1284 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1285 name on the command line (for instance "../dummy"), never assume it can
1288 2011-08-04 Tristan Gingold <gingold@adacore.com>
1290 * bindgen.adb: Remove code the reference or create the
1291 Break_Start/__gnat_break_start procedure.
1292 * s-stalib.adb (Break_Start): Removed.
1294 2011-08-04 Emmanuel Briot <briot@adacore.com>
1296 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1297 shared with gprbuild.
1299 2011-08-04 Yannick Moy <moy@adacore.com>
1301 * par-ch4.adb (P_Primary): preferentially issue an error message about
1302 a missing parenthesis arount a conditional or case expression in Ada
1303 2012 mode, if we detect that the alignment is not correct for a
1306 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1308 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1309 tag-to-class-wide conversion as needing finalization actions.
1310 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1311 a tag-to-class-wide conversion as needing finalization actions.
1312 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1313 conversion does not need finalization actions.
1314 (Is_Tag_To_CW_Conversion): New routine.
1315 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1316 whether an object is the result of a tag-to-class-wide conversion.
1318 2011-08-04 Yannick Moy <moy@adacore.com>
1320 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1321 the left-hand-side and right-hand-side of a conjunct are inserted when
1322 translating a pre- or postcondition
1323 * sem_ch6.adb: Correct typo in comment
1325 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1327 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1328 Unchecked_Conversion and Unchecked_Deallocation.
1330 2011-08-04 Thomas Quinot <quinot@adacore.com>
1332 * make.adb: Minor reformatting.
1334 2011-08-04 Emmanuel Briot <briot@adacore.com>
1336 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1337 sources in the project and its imported projects, but not in the whole
1340 2011-08-04 Emmanuel Briot <briot@adacore.com>
1342 * make.adb: Remove debug trace.
1344 2011-08-04 Vincent Celier <celier@adacore.com>
1346 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1347 path in canonical form, to be able to compare path names on platforms
1348 such as Windows or Darwin.
1350 2011-08-04 Thomas Quinot <quinot@adacore.com>
1352 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1353 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1354 * scos.ads: Update documentation accordingly.
1355 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1358 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1360 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1361 attribute only if prefix type is scalar.
1363 2011-08-04 Emmanuel Briot <briot@adacore.com>
1365 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1366 in gnatmake for specifying mains on the command line that do not belong
1367 to the main project. These mains must currently all belong to the same
1369 (Ultimate_Extension_Of): removed, since duplicated
1370 Ultimate_Extending_Project.
1372 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1374 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1376 (CodePeer_Mode_String): New.
1377 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1379 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1380 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1381 mode, since no useful elaboration subprogram is needed by CodePeer.
1382 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1383 In this mode, compile binder file with -gnatC and do stop after this
1386 2011-08-04 Vincent Celier <celier@adacore.com>
1388 * exp_ch7.adb: Minor comment fix.
1390 2011-08-04 Robert Dewar <dewar@adacore.com>
1392 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1393 exp_ch4.adb, makeutl.adb: Minor reformatting.
1395 2011-08-04 Emmanuel Briot <briot@adacore.com>
1397 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1398 Create several new subprograms to move code out of Make. This makes the
1399 code more readable, removes code duplication, and is a preparation work
1400 for adding support for aggregate projects.
1402 2011-08-04 Tristan Gingold <gingold@adacore.com>
1404 * s-po32gl.ads, s-po32gl.adb: New files.
1405 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1406 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1407 (Build_Finalization_Collection): Use it.
1408 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1409 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1411 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1412 * gcc-interface/Make-lang.in: Update dependencies.
1414 2011-08-04 Emmanuel Briot <briot@adacore.com>
1416 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1419 2011-08-04 Emmanuel Briot <briot@adacore.com>
1421 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1422 command line is not a file name, also check whether it could be a unit
1425 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1427 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1428 the header of the finalization routine.
1429 If the unit has no finalizer but is a body whose spec has one, then
1430 generate the decrement of the elaboration entity only.
1431 If the unit has a finalizer and is a spec, then do not generate the
1432 decrement of the elaboration entity.
1433 (Gen_Finalize_Library_C): Likewise.
1435 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1437 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1438 (Bounds_Size_Expression): Removed.
1439 (Double_Alignment_Of): New subsidiary routine.
1440 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1441 for a hole in the dope vector of unconstrained arrays due to different
1442 index and element alignments.
1444 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1446 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1447 raise program_error because body has not been seen yet.
1449 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1451 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1454 2011-08-04 Vincent Celier <celier@adacore.com>
1456 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1458 2011-08-04 Yannick Moy <moy@adacore.com>
1460 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1461 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1463 2011-08-04 Thomas Quinot <quinot@adacore.com>
1465 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1466 instantiation in RCI.
1468 2011-08-04 Emmanuel Briot <briot@adacore.com>
1470 * make.adb: Share more code with gprbuild
1472 2011-08-04 Emmanuel Briot <briot@adacore.com>
1474 * projects.texi: Added documentation for the IDE'Gnat project file
1477 2011-08-04 Nicolas Roche <roche@adacore.com>
1479 * gnat_rm.texi: Minor editing.
1481 2011-08-04 Javier Miranda <miranda@adacore.com>
1483 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1484 and the library case for VM targets.
1485 (Gen_Adainit_Ada): Likewise.
1487 2011-08-04 Robert Dewar <dewar@adacore.com>
1489 * g-altive.ads: Minor comment updates.
1490 * prj-nmsc.adb: Minor reformatting.
1492 2011-08-04 Javier Miranda <miranda@adacore.com>
1495 (Normalize_Scalars_Config): Value of the configuration switch set by
1496 pragma Normalize_Scalars when it appears in the gnat.adc file.
1497 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1498 to save and restore settings of this pragma.
1500 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1501 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1503 2011-08-04 Vincent Celier <celier@adacore.com>
1505 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1507 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1509 * makeutl.adb: Minor reformatting.
1511 2011-08-04 Olivier Hainque <hainque@adacore.com>
1513 * g-altive.ads: Update comments to reflect that only the soft
1514 binding is available today.
1516 2011-08-04 Robert Dewar <dewar@adacore.com>
1518 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1519 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1520 * gcc-interface/Make-lang.in: Update dependencies.
1522 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1524 * prj-env.adb: Remove local debug traces.
1526 2011-08-04 Yannick Moy <moy@adacore.com>
1528 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1529 was used instead of Hi_OK, which could cause a read of an uninitialized
1530 value later on. Detected while working on the new warning.
1531 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1533 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1534 in more cases, in order to detect more unreferenced values.
1535 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1536 object for expression, if any.
1538 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1540 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1541 the operand types instead of the Esize.
1543 2011-08-04 Steve Baird <baird@adacore.com>
1545 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1546 enable CodePeer_Mode.
1547 * bindusg.adb (Display): Add help message describing -P binder switch.
1548 * gnat_ugn.texi: Document -P binder switch.
1549 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1550 user-defined main program directly.
1551 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1552 user-defined main program in the context clause of the package body.
1554 2011-08-04 Yannick Moy <moy@adacore.com>
1556 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1557 duplicate of Defining_Entity
1558 (Get_Unique_Entity_For_Decl): rename function into
1559 Unique_Defining_Entity
1560 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1561 (Formal_Proof_On): remove synthesized flag
1562 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1563 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1564 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1565 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1566 Annotate (Formal_Proof)
1568 2011-08-04 Emmanuel Briot <briot@adacore.com>
1570 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1571 source files with non-standard naming schemes, in imported projects
1573 2011-08-04 Emmanuel Briot <briot@adacore.com>
1575 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1576 specified on the gprbuild command line, we need to compile all units
1577 within that file, not just the first one we find
1578 Fix error message for mains that are not found.
1580 2011-08-04 Thomas Quinot <quinot@adacore.com>
1582 * sem_ch6.adb: Update comment.
1583 * sem_ch12.adb: Minor reformatting.
1585 2011-08-04 Bob Duff <duff@adacore.com>
1587 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1588 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1589 race condition whose symptom is to fail to lock Parent. That, in turn,
1590 causes Parent.Awake_Count to be accessed without locking Parent, which
1591 causes another race condition whose symptom is that Parent.Awake_Count
1592 can be off by 1 (either too high or too low). The solution is to lock
1593 Parent unconditionally, and then lock Acceptor, before reading
1594 Acceptor.Terminate_Alternative.
1596 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1598 * debug.adb: Update comment.
1600 2011-08-04 Robert Dewar <dewar@adacore.com>
1602 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1603 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1604 exp_ch6.adb: Minor reformatting.
1606 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1608 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1611 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1613 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1615 2011-08-04 Thomas Quinot <quinot@adacore.com>
1617 * sinfo.ads: Minor reformatting.
1619 2011-08-04 Emmanuel Briot <briot@adacore.com>
1621 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1622 even if there is no location.
1624 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1626 * sem_res.adb, sem_ch4.adb: move check for restriction
1627 No_Task_Hierarchy to resolve_allocator.
1629 2011-08-04 Thomas Quinot <quinot@adacore.com>
1631 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1632 This flag of N_Pragma nodes is not used, remove it as well as all of
1633 the associated circuitry.
1635 2011-08-04 Javier Miranda <miranda@adacore.com>
1637 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1638 runtime check on duplicated externa tags
1639 * debug.adb Document switch -gnatdQ.
1641 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1643 * a-fihema.ads: Minor typo fix.
1645 2011-08-04 Yannick Moy <moy@adacore.com>
1647 * sem_ch10.adb: Minor comment update.
1649 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1651 * einfo.adb: Update the node field usage to reflect the renaming of
1652 Return_Flag to Return_ Flag_Or_Transient_Decl.
1653 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1654 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1655 (Write_Field15_Name): Change Return_Flag to
1656 Return_Flag_Or_Transient_Decl.
1657 * einfo.ads: Rename node field Return_Flag to
1658 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1659 occurrences in entities.
1660 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1661 associated Inline pragma.
1662 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1663 associated Inline pragma.
1664 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1666 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1667 Return_Flag and Set_Return_Flag.
1668 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1669 objects generated for controlled transients declared inside an
1670 Exception_With_Actions. Update the calls to Return_Flag.
1671 (Process_Object_Declaration): Add code to add a null guard for hook
1672 objects generated for controlled transients declared inside an
1673 Exception_With_Actions. Update related comment.
1674 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1675 objects generated for controlled transients declared inside an
1676 Exception_With_Actions. Update the calls to Return_Flag.
1677 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1679 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1681 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1682 positional aggregate.
1684 2011-08-04 Vincent Celier <celier@adacore.com>
1686 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1687 SLOC only for pragmas.
1689 2011-08-04 Emmanuel Briot <briot@adacore.com>
1691 * projects.texi: Minor typo fix.
1693 2011-08-04 Emmanuel Briot <briot@adacore.com>
1695 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1696 on case-sensitive file systems.
1698 2011-08-04 Thomas Quinot <quinot@adacore.com>
1700 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1701 nested in a disabled pragma.
1702 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1703 enclosing pragma, if any, for X decisions.
1705 2011-08-04 Thomas Quinot <quinot@adacore.com>
1707 * sem_prag.adb: Minor reformatting.
1709 2011-08-04 Vincent Celier <celier@adacore.com>
1711 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1712 allowed in no run time mode.
1714 2011-08-04 Vincent Celier <celier@adacore.com>
1716 * make.adb (Check): When -gnatc is used, check for the source file
1717 inside the ALI file with a canonical case file name.
1719 2011-08-04 Emmanuel Briot <briot@adacore.com>
1721 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1722 overriding the separator.
1724 2011-08-04 Robert Dewar <dewar@adacore.com>
1726 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1727 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1729 2011-08-04 Robert Dewar <dewar@adacore.com>
1731 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1733 2011-08-04 Yannick Moy <moy@adacore.com>
1735 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1736 'Result only appears in postcondition of function.
1738 2011-08-04 Thomas Quinot <quinot@adacore.com>
1740 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1741 external tag, include the value of the external tag in the exception
1744 2011-08-04 Yannick Moy <moy@adacore.com>
1746 * sem_attr.adb (Result): modify error message for misplaced 'Result
1748 2011-08-04 Sergey Rybin <rybin@adacore.com>
1750 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1751 clear that the second argument must be an identifier.
1753 2011-08-04 Thomas Quinot <quinot@adacore.com>
1755 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1756 -fpreserve-control-flow, insert an IF statement on the barrier
1757 condition to ensure that a conditional branch instruction is generated.
1759 2011-08-04 Emmanuel Briot <briot@adacore.com>
1761 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1762 (Processing_Flags.Ignore_Missing_With): new flag.
1764 2011-08-04 Emmanuel Briot <briot@adacore.com>
1766 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1767 Source_List_File on case-insensitive systems where the file is actually
1768 on a case-sensitive file system (NFS,...).
1770 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1772 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1773 function return contains a controlled [extension] aggregate and the
1774 return statement is not part of a handled sequence of statements, wrap
1775 the return in a block. This ensures that all controlled temporaries
1776 generated during aggregate resolution will be picked up by the
1777 finalization machinery.
1779 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1781 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1782 components, freeze type before resolution, to ensure that default
1783 initializations are present for all components.
1784 * sem_res.adb (Resolve_Actuals): the designated object of an
1785 accces-to-constant type is a legal actual in a call to an
1786 initialization procedure.
1788 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1790 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1791 N_Unchecked_Type_Conversion to the possible containers of a renamed
1794 2011-08-04 Yannick Moy <moy@adacore.com>
1796 * par-ch13.adb (Aspect_Specifications_Present): recognize
1797 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1798 is issued in Strict mode.
1799 * par.adb: Fix typos in comments.
1801 2011-08-04 Yannick Moy <moy@adacore.com>
1803 * sem_attr.adb (Result): modify error message to take into account Post
1804 aspect when compiling Ada 2012 (or newer) code.
1806 2011-08-04 Nicolas Roche <roche@adacore.com>
1808 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1809 remove need for GCC exceptions.
1811 2011-08-04 Vincent Celier <celier@adacore.com>
1813 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1814 project, not the source file name.
1815 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1816 excluded, continue looking. This excluded source will only be returned
1817 if there is no other source with the same base name that is not locally
1820 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1822 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1823 private and one of the operands is a real literal, use a qualified
1824 expression rather than a conversion which is not meaningful to the
1827 2011-08-04 Yannick Moy <moy@adacore.com>
1829 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1830 corresponding aspect X'Class are allowed, proceed with analysis of the
1831 aspect instead of skipping it.
1833 2011-08-04 Tristan Gingold <gingold@adacore.com>
1835 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1836 This will allow to have an Ada implementation for the subprogram.
1838 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1840 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1841 completion and aspects are present, apply them to the entity for the
1842 type which is currently the partial view, but which is the one that
1844 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1845 applies to a partial view, indicate that the full view has predicates
1846 and delayed aspects.
1847 (Replace_Type_Reference): Handle properly predicates that apply to the
1848 full view of a private completion.
1850 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1852 * layout.adb (Layout_Type): For composite types, do not set Esize.
1853 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1855 (Size_Known): Look at the RM size of components instead of the Esize.
1856 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1857 issue warning and activate Implicit_Packing.
1858 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1859 if the Esize is not known.
1860 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1861 for elementary types only.
1862 (Analyze_Record_Representation_Clause): Look at the RM size instead
1863 of the Esize to issue errors.
1864 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1866 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1868 Look at the RM size instead of the Esize for types if the latter is
1870 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1872 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1874 * sem_type.adb: proper handling of equality not involving anonymous
1877 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1879 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1880 Vis_Decls. When creating a library-level finalizer for a package spec,
1881 both the declaration and body of the finalizer are inserted either in
1882 the visible or private declarations of the package spec.
1884 2011-08-04 Javier Miranda <miranda@adacore.com>
1886 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1887 use of the full-view of a type when invoking Is_Ancestor.
1888 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1889 the full-view of private parents is requested, then use also the
1890 full-view of the parent of the first derivation.
1892 2011-08-04 Tristan Gingold <gingold@adacore.com>
1894 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1895 instead of the locally imported procedure.
1896 * s-taprop-mingw.adb (Enter_Task): Ditto.
1897 * s-valrea.adb (Scan_Real): Ditto.
1898 * s-imgrea.adb (Set_Image_Real): Ditto.
1899 * s-flocon.ads: Make the package pure.
1901 2011-08-04 Thomas Quinot <quinot@adacore.com>
1903 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1904 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1905 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1906 New subprogram, moved here from...
1907 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1908 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1909 rewriting of the last argument into a procedure call statement here...
1910 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1913 2011-08-04 Thomas Quinot <quinot@adacore.com>
1915 * par_sco.adb: Minor reformatting.
1917 2011-08-04 Robert Dewar <dewar@adacore.com>
1919 * erroutc.adb: Minor reformatting.
1921 2011-08-04 Thomas Quinot <quinot@adacore.com>
1923 * par_sco.adb: Comment update.
1925 2011-08-04 Tristan Gingold <gingold@adacore.com>
1927 * s-flocon.ads: New file.
1928 * g-flocon.ads: Now a renaming of s-flocon.
1929 * Makefile.rtl: Add s-flocon.o
1931 2011-08-04 Javier Miranda <miranda@adacore.com>
1933 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1934 constrained, do not attempt to build a subtype of it.
1936 2011-08-04 Yannick Moy <moy@adacore.com>
1938 * errout.ads Change comments: remove 'R'M as an example where quotes
1939 are needed; add ALFA as another case where quotes are not needed
1940 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1941 case where quotes are not needed.
1942 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1943 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1944 Remove all occurrences of 'A'L'F'A
1946 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1948 * sem_ch13.adb: check legality of invariant pragma.
1950 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1952 * bindgen.adb: Add comments.
1954 2011-08-04 Yannick Moy <moy@adacore.com>
1956 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1958 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1959 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1961 2011-08-04 Robert Dewar <dewar@adacore.com>
1963 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1964 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1965 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1967 2011-08-04 Thomas Quinot <quinot@adacore.com>
1969 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1971 2011-08-04 Thomas Quinot <quinot@adacore.com>
1974 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1977 2011-08-04 Robert Dewar <dewar@adacore.com>
1979 * einfo.ads, exp_ch4.adb: Minor reformatting.
1981 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1983 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1985 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1987 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1988 type in all cases to compute list of primitive operations, because full
1989 view may be an itype that is not attached to the list of declarations.
1991 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1993 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1994 library has already been finalized.
1995 (Gen_Adafinal_C): Likewise.
1996 (Gen_Adainit_Ada): Generate an early return if the library has
1997 already been elaborated.
1998 (Gen_Adainit_C): Likewise.
1999 (Gen_Output_File_Ada): Generate an elaboration flag.
2000 (Gen_Output_File_C): Likewise.
2002 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2004 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2005 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2006 built in the first place.
2007 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2008 for CodePeer because Finalize_Address was not built to begin with.
2009 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2011 2011-08-04 Pascal Obry <obry@adacore.com>
2013 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2014 filenames, this ensures unicity of filenames across processes.
2016 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2018 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2019 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2020 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2021 Add False as the actual to From_Abort in the generated call to
2022 Raise_From_Controlled_Operation.
2024 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2026 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2027 so that the ali file name can be retrieved from outside of this package.
2028 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2029 doing nothing in the general case, but used to update the object file
2030 timestamp if directly generated by the backend.
2031 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2032 to a later time than the ali file one.
2034 2011-08-04 Yannick Moy <moy@adacore.com>
2036 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2037 entities whose body contains an Annotate pragma which forces formal
2039 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2040 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2041 Mark_Non_ALFA_Subprogram to pass in a message and node.
2042 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2043 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2044 surrounding subprogram.
2045 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2046 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2047 as not in ALFA is annotated with Formal_Proof being On, then an error
2048 is issued based on the additional parameters for message and node.
2049 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2050 * gcc-interface/Make-lang.in: Update dependencies.
2052 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2054 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2055 Finalize_Address when CodePeer is enabled.
2057 2011-08-04 Pascal Obry <obry@adacore.com>
2059 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2060 the latter returns a pointer to a static buffer which is deallocated
2061 at the end of the routine.
2063 2011-08-04 Yannick Moy <moy@adacore.com>
2065 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2066 after index creation; mark unconstrained base array type generated as
2067 being in/not in ALFA as well
2068 (Make_Index): mark subtype created as in/not in ALFA
2069 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2070 over a loop as in/not in ALFA, depending on its type and form of loop
2073 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2075 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2076 directly to False on .NET and JVM.
2078 2011-08-04 Yannick Moy <moy@adacore.com>
2080 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2081 constraint that subtype must come from source code to be in ALFA, so
2082 that anonymous subtypes can be in ALFA too.
2084 2011-08-04 Yannick Moy <moy@adacore.com>
2086 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2087 reference for ALFA mode.
2088 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2089 procedure public so as to use it from formal verification back-end.
2091 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2093 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2094 invalid checks of the Parameter, making Remove_Switch not working
2097 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2099 * targparm.ads: Update header: no run-time exception is needed on this
2102 2011-08-04 Vincent Celier <celier@adacore.com>
2104 * a-fihema.adb: Use System.IO instead of GNAT.IO
2106 2011-08-04 Thomas Quinot <quinot@adacore.com>
2108 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2109 are forbidden in Compiler_Unit mode.
2111 2011-08-04 Robert Dewar <dewar@adacore.com>
2113 * sem_util.adb: Minor reformatting.
2115 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2117 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2118 library-level finalizers.
2119 (Gen_Finalize_Library_C): Update the import string for library-level
2121 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2122 library-level finalizer.
2123 * exp_ch7.adb: Remove with and use clauses for Stringt.
2124 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2125 Spec_Decl. Add local variable Body_Id. The names of library-level
2126 finalizers are now manually fully qualified and are no longer external.
2127 A single name is now capable of servicing .NET, JVM and non-VM targets.
2128 Pragma Export is no longer required to provide visibility for the name.
2129 (Create_Finalizer_String): Removed.
2130 (New_Finalizer_Name): New routine which mimics New_..._Name.
2132 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2134 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2135 elaboration counter to Standard_Short_Integer.
2136 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2137 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2138 (Gen_Elab_Externals_C): Likewise.
2140 2011-08-04 Ed Falis <falis@adacore.com>
2142 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2143 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2144 system-vxworks-mips.ads, system-vxworks-x86.ads
2145 (Always_Compatible_Rep): set to False for all VxWorks targets.
2147 2011-08-04 Robert Dewar <dewar@adacore.com>
2149 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2150 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2151 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2152 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2153 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2154 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2155 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2156 Minor reformatting and code reorganization.
2158 2011-08-04 Emmanuel Briot <briot@adacore.com>
2160 * projects.texi: Added doc for aggregate projects.
2162 2011-08-04 Emmanuel Briot <briot@adacore.com>
2164 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2165 Add support for overriding the Project_Path in aggregate projects.
2167 2011-08-04 Robert Dewar <dewar@adacore.com>
2169 * a-cofove.ads: Minor reformatting.
2171 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2173 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2174 on the generated code.
2175 (Build_Finalize_Statements): Update the comment on the generated code.
2176 (Build_Initialize_Statements): Update the comment on the generated code.
2177 (Build_Object_Declarations): Add local variable Result. The object
2178 declarations are now built in sequence.
2179 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2182 2011-08-04 Robert Dewar <dewar@adacore.com>
2184 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2186 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2188 * einfo.ads (Elaboration_Entity): Document new definition and use.
2189 (Elaboration_Entity_Required): Adjust to above change.
2190 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2191 * exp_ch12.adb: And with and use for Snames.
2192 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2193 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2194 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2195 <Check_Unit_Name>: Deal with N_Expanded_Name.
2196 <Attribute_Elaborated>: Extend to all unit names.
2197 * sem_elab.adb: And with and use for Uintp.
2198 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2199 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2200 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2201 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2202 from Gen_Adainit_Ada.
2203 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2204 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2205 case, do not call System.Standard_Library.Adafinal; instead call
2206 finalize_library if needed.
2207 (Gen_Adafinal_C): Likewise.
2208 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2209 non-main program case.
2210 (Gen_Adainit_C): Generate a couple of external declarations here.
2211 In the main program case, set SSL.Finalize_Library_Objects.
2212 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2213 (Gen_Elab_Calls_C): Likewise.
2214 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2215 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2216 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2218 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2219 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2221 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2222 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2223 of external declarations. Call Gen_Finalize_Library_C.
2225 2011-08-04 Emmanuel Briot <briot@adacore.com>
2227 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2228 Compute_Compilation_Phases): new subprogram.
2229 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2230 The number of mains as well as the various compilation phases that
2231 need to be run are now project tree specific, since various
2232 aggregated trees might have different requirements. In particular,
2233 they do not all require bind or link phases.
2235 2011-08-04 Emmanuel Briot <briot@adacore.com>
2237 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2238 (Project_Tree_Appdata): New type.
2239 It is now possible to associate application-specific data to a project
2240 tree. In particular, this is used in the gprbuild builder to avoid a
2241 number of global tables and htables, especially now that there can be
2242 several project trees loaded at once because of aggregate projects.
2243 (Debug_Name): new procedure.
2244 * projects.texi: Clarify syntax of "**" for Source_Dirs
2246 2011-08-03 Emmanuel Briot <briot@adacore.com>
2248 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2249 the "roots" for a main.
2250 (Fill_From_Project): add support for aggregate projects. Main units
2251 in aggregated projects are now automatically added in the list of
2252 files to build (although this fails later on in gprbuild, because
2253 these files are not using the root proejct tree, so this needs
2255 * gcc-interface/Make-lang.in: Update dependencies.
2257 2011-08-03 Yannick Moy <moy@adacore.com>
2259 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2260 conditional expression in ALFA.
2261 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2262 expressions as not in ALFA.
2264 2011-08-03 Robert Dewar <dewar@adacore.com>
2266 * a-cofove.adb: Minor reformatting.
2268 2011-08-03 Emmanuel Briot <briot@adacore.com>
2270 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2271 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2273 These packages are more logically placed in the Queue package, since
2274 they manipulate the queue. It is also likely that they can be adapted
2275 for gnatmake, thus sharing more code.
2276 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2277 that we could move the above.
2279 2011-08-03 Emmanuel Briot <briot@adacore.com>
2281 * errutil.adb (Finalize): clean up the list of error messages on exit.
2282 Calling this subprogram multiple times will no longer show duplicate
2283 error messages on stderr.
2285 2011-08-03 Emmanuel Briot <briot@adacore.com>
2287 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2288 Getopt_Switches when we have already define a command line
2291 2011-08-03 Yannick Moy <moy@adacore.com>
2293 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2294 in ALFA. Instead, they are considered as assertions to prove.
2295 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2296 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2297 if they have no ELSE part, or if they occur in pre- and postconditions,
2298 where the Condition cannot have side-effects in ALFA
2299 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2300 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2301 Instead, include type conversion between scalar types in ALFA.
2302 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2303 if-and-only-if its type is in ALFA.
2305 2011-08-03 Thomas Quinot <quinot@adacore.com>
2307 * scos.adb, get_scos.adb, put_scos.adb
2308 New code letter for decisions: G (entry guard)
2310 (Traverse_Subprogram_Body): Rename to...
2311 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2312 (Traverse_Protected_Body): New subprogram
2313 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2314 protected bodies and entry bodies.
2316 2011-08-03 Yannick Moy <moy@adacore.com>
2318 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2319 entities with get/set subprograms, which is set on procedure entities
2320 generated by the compiler for a postcondition.
2321 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2322 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2323 entity for a declaration
2324 (Get_Unique_Entity_For_Decl): new function returning an entity which
2325 represents a declaration, so that matching spec and body have the same
2328 2011-08-03 Robert Dewar <dewar@adacore.com>
2330 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2331 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2333 2011-08-03 Yannick Moy <moy@adacore.com>
2335 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2336 library-level because retriction No_Implicit_Dynamic_Code in the
2337 front-end prevents its definition as a local subprogram
2338 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2339 for reuse in other contexts
2340 (Traverse_Declarations_Or_Statements,
2341 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2342 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2343 procedures take a callback parameter to be called on all declarations
2345 (Traverse_All_Compilation_Units): new generic function to traverse a
2346 compilation unit and call a callback parameter on all declarations
2348 2011-08-03 Javier Miranda <miranda@adacore.com>
2350 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2351 in Java since they are always enclosed in a namespace that
2352 differentiates them, and overloaded entities are supported by the VM.
2354 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2356 * checks.adb (Determine_Range): If a computed bound of an operation is
2357 outside the range of the base type of the expression, and overflow
2358 checks are enabled, the result is unknown and cannot be used for any
2359 subsequent constant folding.
2360 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2361 unknown, so is the result of the comparison.
2363 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2365 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2366 From_Abort. When finalization was triggered by an abort, propagate
2367 Standard'Abort_Signal rather than Program_Error.
2368 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2370 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2371 From_Abort. When finalization was triggered by an abort, propagate
2372 Standard'Abort_Signal rather than Program_Error.
2373 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2375 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2376 Abort_Id. Update the calls to Build_Object_Declarations and
2377 Build_Raise_Statement to include Abort_Id.
2378 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2379 calls to Build_Object_Declarations and Build_Raise_Statement to include
2381 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2382 calls to Build_Object_Declarations and Build_Raise_Statement to include
2384 (Build_Components): Create an entity for Abort_Id when exceptions are
2385 allowed on the target.
2386 (Build_Finalizer): New local variable Abort_Id.
2387 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2388 calls to Build_Object_Declarations and Build_Raise_Statement to include
2390 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2391 declaration of flag Abort_Id to preserve the original abort status
2392 before finalization code is executed.
2393 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2394 runtime routine Raise_From_Controlled_Operation.
2395 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2396 Abort_Id. Update the call to Build_Object_Declarations to include
2397 Abort_Id. Update the layout of the finalizer body.
2398 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2399 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2400 clunky code to create all flags and objects related to
2401 exception propagation and replace it with a call to
2402 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2404 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2405 Add new formal Abort_Id and associated comment on its use.
2406 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2408 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2409 Remove the clunky code to create all flags and objects related to
2410 exception propagation and replace it with a call to
2411 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2413 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2415 * s-tassta.adb: Fix minor typos.
2417 2011-08-03 Robert Dewar <dewar@adacore.com>
2419 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2420 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2422 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2424 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2425 to packages. This ensures that the finalizer body will not end up
2426 inside the freeze node.
2427 (Process_Declarations): Add code to detect whether a freeze node has a
2428 nested finalization collection.
2430 2011-08-03 Pascal Obry <obry@adacore.com>
2432 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2433 (Current_Session): Return a not null access to Session_Type.
2434 (Default_Session): Likewise.
2436 2011-08-03 Robert Dewar <dewar@adacore.com>
2438 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2439 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2441 2011-08-03 Pascal Obry <obry@adacore.com>
2443 * g-awk.ads: Minor comment fix.
2445 2011-08-03 Sergey Rybin <rybin@adacore.com>
2447 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2448 the tree structure related to discriminant constraints.
2449 Original_Discriminant cannot be used any more for computing the
2450 defining name for the reference to a discriminant.
2452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2454 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2455 function is not visibly tagged, this is not a dispatching call and
2456 therfore is not Tag_Indeterminate, even if the function is marked as
2457 dispatching on result.
2459 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2461 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2462 (Expand_N_Free_Statement): Add a guard to protect against run-times
2463 which do not support controlled types.
2464 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2465 against run-times which do not support controlled types.
2466 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2467 against run-times which do not support controlled types.
2468 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2469 against run-times which do not support controlled types.
2470 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2471 protect against run-times which do not support controlled types.
2473 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2475 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2476 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2478 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2480 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2481 modified in the source, to prevent spurious warnings when compiling
2484 2011-08-03 Thomas Quinot <quinot@adacore.com>
2486 * a-except-2005.adb: Minor reformatting.
2488 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2490 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2491 is a renaming declaration in the private part of a package, do not emit
2492 a warning that the with_clause could be moved because the renaming may
2493 be used in the body or in a child unit.
2495 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2497 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2498 Propagate the Comes_From_Source attribute from the original return
2499 object to the renaming.
2501 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2503 * exp_ch7.adb (Build_Raise_Statement): Do not call
2504 Raise_From_Controlled_Operation when this routine is not present in
2505 the run-time library.
2506 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2507 libraries (Ravenscar), tasks are non-terminating, and protected objects
2508 and tasks can only appear at library level, so we do not want
2509 finalization of protected objects nor tasks.
2510 * exp_intr.adb: Minor clarification in comment.
2511 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2512 Gen_Output_File_C): Remove references to finalization of library-level
2513 objects when using restricted run-time libraries.
2515 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2517 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2518 Original_Discriminant only if the parent type is a generic formal.
2520 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2522 * exp_ch13.adb: Add with and use clause for Targparm;
2523 (Expand_N_Free_Statement): Prevent the generation of a custom
2524 Deallocate on .NET/JVM targets since this requires pools and address
2526 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2527 .NET/JVM targets, attach the newly allocated object to the access
2528 type's finalization collection. Do not generate a call to
2529 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2530 exist in the runtime.
2531 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2532 create a custom Allocate for object that do not require initialization.
2533 Attach a newly allocated object to the access type's finalization
2534 collection on .NET/JVM.
2535 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2536 assignment of controlled types on .NET/JVM. The two hidden pointers
2537 Prev and Next and stored and later restored after the assignment takes
2539 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2540 kludge for .NET/JVM to recognize a particular piece of code coming from
2541 Heap_Management and change the call to Finalize into Deep_Finalize.
2542 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2543 finalization collections on .NET/JVM only for types derived from
2544 Controlled. Separate the association of storage pools with a collection
2545 and only allow it on non-.NET/JVM targets.
2546 (Make_Attach_Call): New routine.
2547 (Make_Detach_Call): New routine.
2548 (Process_Object_Declarations): Suppress the generation of
2549 build-in-place return object clean up code on .NET/JVM since it uses
2551 * exp_ch7.ads (Make_Attach_Call): New routine.
2552 (Make_Detach_Call): New routine.
2553 * exp_intr.adb Add with and use clause for Targparm.
2554 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2555 on .NET/JVM targets.
2556 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2557 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2558 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2559 names used in finalization.
2561 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2563 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2564 (Attach, Detach): Lock the current task when chaining an object onto a
2567 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2569 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2570 Rewritten to create the message strings when the exception is not
2571 raised by an abort during finalization.
2572 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2573 Raise_From_Controlled_Operation and update its associated comment.
2574 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2575 Ada.Finalization.Heap_Management provides key functionality
2576 associated with controlled objects on the heap, their creation,
2577 finalization and reclamation. Type Finalization_Collection is
2578 effectively a wrapper which sits ontop of a storage pool and performs
2579 all necessary bookkeeping for all the objects it contains. Each
2580 access-to-controlled or access-to-class-wide type receives a collection
2581 as part of its expansion. The compiler generates buffer code and
2582 invokes Allocate / Deallocate to create and destroy allocated
2584 * a-finali.adb ("="): Removed.
2585 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2586 fields Prev and Next.
2587 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2588 A library unit with at least one controlled object on the library level
2589 has a special finalizer which is invoked by the binder. To signal this,
2590 ali files carry field PF.
2591 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2592 associated comment on field usage.
2593 * a-tags.adb (Get_RC_Offset): Removed.
2594 (Needs_Finalization): New routine.
2595 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2596 Dispatch tables now carry field Needs_Finalization which provides
2597 runtime indication whether a type is controlled or has controlled
2598 components or both. Remove field RC_Offset.
2599 (Get_RC_Offset): Removed along with its associated pragma Export.
2600 Since tagged types with controlled components no longer carry hidden
2601 field _controller, the special mechanism to retrieve its location is no
2603 (Needs_Finalization): New routine.
2604 * atree.ads, atree.adb (Elist24): New routine.
2605 (Set_Elist24): New routine.
2606 * atree.h: Add a define clause for Elist24.
2607 * bindgen.adb New library-level variable Lib_Final_Built.
2608 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2609 presence of a VM target, the routine generates calls to the proper
2610 library finalization routine.
2611 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2612 targets. Set the correct library finalization routine depending on
2613 whether the library has controlled objects or this is a VM compilation.
2614 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2615 to library-level finalizers of compiled units in reverse order of
2616 elaboration. It also produces exception management code and reraises a
2617 potential exception after all units have been finalized.
2618 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2619 library-level finalizers of compiled units in reverse order of
2621 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2622 definitions of all library-level finalizers available to the compilation
2623 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2625 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2626 System.Standard_Library.Adafinal directly. If the library needs
2627 finalization actions, create the sequence of finalization calls.
2628 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2629 Generate a with clause for System.Soft_Links when compiling for a VM.
2630 Remove the code which imports System.Standard_Library.Adafinal as
2631 Do_Finalize. Generate the library finalization routine.
2632 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2633 If the library needs finalization actions, create all the definitions
2634 of library- level finalizers.
2635 (Has_Finalizer): New routine. Determines whether at least one compiled
2636 unit has a library-level finalizer.
2637 Add type Qualification_Mode.
2638 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2639 * einfo.adb: New usage of field 15 as Return_Flag.
2640 Remove Finalization_Chain_Entity from the usages of field 19.
2641 Remove Associated_Final_Chain from the usages of field 23.
2642 New usage of field 23 as Associated_Collection.
2643 New usage of field 24 as Finalizer.
2644 New usage of flag 252 as Is_Processed_Transient.
2645 (Associated_Final_Chain): Removed.
2646 (Associated_Collection): New routine.
2647 (Finalization_Chain_Entity): Removed.
2648 (Finalizer): New routine.
2649 (Is_Finalizer): New routine.
2650 (Is_Processed_Transient): New routine.
2651 (Return_Flag): New routine.
2652 (Set_Associated_Final_Chain): Removed.
2653 (Set_Associated_Collection): New routine.
2654 (Set_Finalization_Chain_Entity): Removed.
2655 (Set_Finalizer): New routine.
2656 (Set_Is_Processed_Transient): New routine.
2657 (Set_Return_Flag): New routine.
2658 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2660 (Write_Field8_Name): Alphabetize the output.
2661 (Write_Field11_Name): Alphabetize the output.
2662 (Write_Field12_Name): Alphabetize the output.
2663 (Write_Field13_Name): Alphabetize the output.
2664 (Write_Field14_Name): Alphabetize the output.
2665 (Write_Field15_Name): Alphabetize the output.
2666 (Write_Field16_Name): Alphabetize the output.
2667 (Write_Field17_Name): Alphabetize the output.
2668 (Write_Field18_Name): Alphabetize the output.
2669 (Write_Field19_Name): Alphabetize the output. Remove the output of
2670 Finalization_Chain_Entity.
2671 (Write_Field20_Name): Alphabetize the output.
2672 (Write_Field21_Name): Alphabetize the output.
2673 (Write_Field22_Name): Alphabetize the output.
2674 (Write_Field23_Name): Alphabetize the output. Remove the output of
2675 Associated_Final_Chain. Add output for Associated_Collection.
2676 (Write_Field24_Name): Alphabetize the output.
2677 (Write_Field25_Name): Add output for Finalizer.
2678 (Write_Field26_Name): Alphabetize the output.
2679 (Write_Field27_Name): Alphabetize the output.
2680 (Write_Field28_Name): Alphabetize the output.
2681 * einfo.ads: Add new field description for Associated_Collection and
2683 Remove Associated_Final_Chain and its uses in nodes.
2684 Remove Finalization_Chain_Entity and its uses in nodes.
2685 Add new field description for Finalizer and its uses in nodes.
2686 Add new synthesized attribute Is_Finalizer.
2687 Add new flag description for Is_Processed_Transient and its uses in
2689 Add new field description for Return_Flag and its uses in nodes.
2690 (Associated_Final_Chain): Removed along with its pragma Inline.
2691 (Associated_Collection): New routine and pragma Inline.
2692 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2693 (Finalizer): New routine and pragma Inline.
2694 (Is_Finalizer): New routine and pragma Inline.
2695 (Is_Processed_Transient): New routine and pragma Inline.
2696 (Return_Flag): New routine and pragma Inline.
2697 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2698 (Set_Associated_Collection): New routine and pragma Inline.
2699 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2700 (Set_Finalizer): New routine and pragma Inline.
2701 (Set_Is_Processed_Transient): New routine and pragma Inline.
2702 (Set_Return_Flag): New routine and pragma Inline.
2703 * exp_aggr.adb: Alphabetize subprograms.
2704 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2705 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2706 associated comments. Remove local variables External_Final_List and
2708 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2709 Ancestor. Remove the retrieval of finalization lists. Update the call to
2711 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2712 lists. Update the call to Late_Expansion.
2713 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2714 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2715 (Gen_Assign): Remove the retrieval of the finalization list used to
2716 build the assignment. Update the calls to Make_Init_Call and
2718 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2719 Remove the mechanism to determine attachment levels and finalization
2720 list retrieval. Remove the processing for coextensions.
2721 (Init_Controller): Removed. Controllers no longer exist.
2722 (Late_Expansion): Remove formals Flist and Obj along with their
2723 associated comments. Update the calls to Build_Record_Aggr_Code and
2724 Build_Array_Aggr_Code.
2725 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2726 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2727 appear in entry bodies, protected subprograms and task bodies.
2728 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2729 * exp_ch3.adb (Add_Final_Chain): Removed.
2730 (Build_Array_Init_Proc): Alphabetize local variables.
2731 (Build_Assignment): Alphabetize local variables. Update the call to
2733 (Build_Class_Wide_Master): Rename local variables to better reflect
2735 (Build_Discriminant_Assignments): Code reformatting.
2736 (Build_Init_Call_Thru): Code reformatting.
2737 (Build_Init_Procedure): Code reformatting. Generate a special version
2738 of Deep_Finalize which is capable of finalizing all initialized
2739 components and ignore the rest.
2740 (Build_Init_Statements): Rename local variables to better reflect their
2742 Reimplement the mechanism to include the creation and update of an index
2743 variable called a "counter". It is used as a bookmark for tracing
2744 initialized and non-initialized components.
2745 (Build_Initialization_Call): Remove local variable Controller_Typ.
2746 Alphabetize all local variables. Remove the initialization of the
2747 record controller and update the call to Make_Init_Call.
2748 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2749 New local variable Counter.
2750 (Constrain_Array): Alphabetize.
2751 (Expand_Freeze_Array_Type): Create a collection instead of a
2753 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2754 Finalize_Address which is used in conjunction with allocated controlled
2756 (Expand_N_Object_Declaration): Remove the creation of a finalization
2757 list for anonymous access types. Update the calls to Make_Init_Call and
2759 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2760 retrieval of finalization lists. Remove the expansion of the record
2761 controller. Create TSS primitive Finalize_Address used in conjunction
2762 with controlled objects on the heap. Create finalization collections
2763 for access-to-controlled record components.
2764 (Expand_Record_Controller): Removed.
2765 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2766 class-wide types now requires additional processing. Create
2767 finalization collections for access-to-controlled types.
2768 (Increment_Counter): New routine.
2769 (Make_Counter): New routine.
2770 (Make_Eq_If): Remove the mention of Name_uController.
2771 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2772 types coming from System.Finalization_Root.
2773 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2774 (Predefined_Primitive_Bodies): There is no longer need to skip types
2775 coming from System.Finalization_Root.
2776 (Stream_Operation_OK): Do not generate stream routines for
2777 type Ada.Finalization.Heap_Management.Finalization_Collection.
2778 * exp_ch3.ads: Alphabetize subprograms.
2779 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2780 Add with and use clause for Lib.
2781 (Complete_Coextension_Finalization): Removed.
2782 (Complete_Controlled_Allocation): New routine. Create a finalization
2783 collection for anonymous access-to-controlled types. Create a custom
2784 Allocate which interfaces with the back end and the machinery in
2786 (Expand_Allocator_Expression): Add necessary calls to
2787 Complete_Controlled_Allocation. Remove the retrieval of finalization
2788 lists. Update the calls to Make_Adjust_Call. Generate a call to
2789 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2790 the associated collection.
2791 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2792 Code clean up. Remove the retrieval of finalization lists and
2794 Update the call to Make_Init_Call. Generate a call to
2795 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2796 the associated collection.
2797 (Get_Allocator_Final_List): Removed. Finalization lists are not
2799 (Suitable_Element): Remove the mention of Name_uController.
2800 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2801 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2802 the left hand side, carry out the assignment and adjust the left hand
2804 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2805 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2806 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2807 BIP_Collection and BIPcollection.
2808 (Build_Heap_Allocator): New routine used to allocate the return object
2809 of a build-in-place function onto a collection.
2810 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2811 (Expand_Call): Do not replace direct calls to Deep routines with their
2813 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2814 and update their occurrences. Add a special return flag to monitor the
2815 [ab]normal execution of the function. The flag is set right before the
2817 Rewrite the mechanism used to allocate a build-in-place return object
2818 on the heap or on a storage pool.
2819 (Is_Direct_Deep_Call): New routine.
2820 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2821 build-in-place function call instead of a final list. Build a call to
2822 Set_Finalize_Address_Ptr to decorate the associated collection.
2823 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2824 order to name the build-in-place function call's result for later
2825 finalization. Add a collection to a build-in-place function call
2826 instead of a final list.
2827 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2828 build-in-place function call instead of a final list. Remove the code
2829 which moves one final list and transforms it into the actual in a
2830 nested build-in-place call.
2831 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2832 build-in-place function call instead of a final list.
2833 (Move_Final_List): Removed.
2834 (Needs_BIP_Collection): New routine.
2835 (Needs_BIP_Final_List): Removed.
2836 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2837 enumeration type BIP_Formal_Kind.
2838 Update the related comment.
2839 (Needs_BIP_Collection): New routine.
2840 (Needs_BIP_Final_List): Removed.
2841 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2842 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2843 majority of subprograms in this unit. Add Name_Finalize_Address to
2844 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2845 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2846 statements for an array type.
2847 (Build_Adjust_Statements): Create the adjust statements for a record
2849 (Build_Cleanup_Statements): New routine. A procedure which given any
2850 construct containing asynchronous calls, references to _master, or is a
2851 task body, a task allocation or a protected body produces the necessary
2852 runtime calls to clean up these constructs.
2853 (Build_Exception_Handler): New routine.
2854 (Build_Final_List): Removed.
2855 (Build_Finalization_Collection): New routine. A core procedure which
2856 creates a collection to service heap allocated controlled objects
2857 associated with an access-to-controlled type.
2858 (Build_Finalize_Statements): Create the finalization statements for a
2860 (Build_Finalizer): New routine. A core procedure which given any
2861 construct with declarations and/or statements detects all objects which
2862 need any type of clean up (controlled objects, protected objects) and
2863 generates all necessary code to clean up the said objects in the proper
2865 (Build_Finalizer_Call): New routine.
2866 (Build_Initialize_Statements): Create the initialization statements for
2867 an array type. The generated routine contains code to finalize partially
2869 (Build_Object_Declarations): New routine.
2870 (Build_Raise_Statement): New routine.
2871 (Clean_Simple_Protected_Objects): Removed.
2872 (Controller_Component): Removed.
2873 (Enclosing_Function): New routine.
2874 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2875 either declarations or statements or both.
2876 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2877 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2879 (Find_Final_List): Removed.
2880 (Global_Flist_Ref): Removed.
2881 (In_Finalization_Root): Removed.
2882 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2883 scope in terms of tree nodes. Process all transient variables within
2885 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2886 generated after the adjust.
2887 (Make_Attach_Call): Removed.
2888 (Make_Call): New routine.
2889 (Make_Clean): Removed.
2890 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2892 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2894 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2896 (Make_Final_Call): Modified to simply create a call to either
2897 Deep_Finalize or Finalize.
2898 (Make_Finalize_Address_Body): New routine.
2899 (Make_Finalize_Address_Stmts): New routine. A function which produces
2900 TSS primitive Finalize_Address used in conjunction with heap allocated
2902 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2903 (Make_Init_Call): Rewritten. There is no longer an attach call
2904 generated after initialization.
2905 (Make_Local_Deep_Finalize): New routine.
2906 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2907 (Make_Transient_Block): Remove the finalization list retrieval and
2909 (Needs_Finalization): Moved to Exp_Util.
2910 (Parent_Field_Type): New routine.
2911 (Preprocess_Components): New routine.
2912 (Process_Transient_Objects): New routine.
2913 (Wrap_HSS_In_Block): New routine.
2914 (Wrap_Transient_Declaration): Remove finalization list management and
2915 controller insertion.
2916 (Wrap_Transient_Expression): Code reformatting.
2917 (Wrap_Transient_Statement): Code reformatting.
2918 * exp_ch7.ads (Build_Final_List): Removed.
2919 (Build_Finalization_Collection): New routine.
2920 (Build_Raise_Statement): New routine.
2921 (Controller_Component): Removed.
2922 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2923 (Find_Final_List): Removed.
2924 (In_Finalization_Root): Removed.
2925 (Is_Simple_Protected_Type): Update related comment.
2926 (Make_Adjust_Call): New parameter profile and associated comments.
2927 (Make_Attach_Call): Removed.
2928 (Make_Final_Call): New parameter profile and associated comments.
2929 (Make_Finalize_Address_Body): New routine.
2930 (Make_Init_Call): New parameter profile and associated comments.
2931 (Make_Local_Deep_Finalize): New routine.
2932 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2933 (Needs_Finalization): Moved to Exp_Util.
2934 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2935 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2936 (Find_Protection_Type): Moved to Exp_Util.
2937 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2938 (Make_DT): Update sequence of dispatch table initialization. Remove the
2939 initialization of field RC_Offset. Add initialization of field Needs_
2941 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2942 Reimplement how an object is first finalized, then deallocated.
2943 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2945 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2946 Register TSS_Finalize_Address with type TSS_Names.
2947 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2948 procedure provides the interface between an allocation / deallocation
2949 and the support machinery in Ada.Finalization.Heap_Management.
2950 (Find_Init_Call): Code reformatting.
2951 (Find_Init_Call_In_List): Code reformatting.
2952 (Find_Protection_Type): Moved from Exp_Ch9.
2953 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2954 (Has_Controlled_Coextensions): Removed.
2955 (Has_Controlled_Objects): New routine.
2956 (In_Library_Level_Package_Body): New routine.
2957 (Insert_Action_After): New routine.
2958 (Is_Finalizable_Transient): New routine. This predicate determines
2959 whether an object declaration is one of the many variants of controlled
2961 (Is_Null_Access_BIP_Func_Call): New routine.
2962 (Is_Non_BIP_Func_Call): New routine.
2963 (Is_Related_To_Func_Return): New routine.
2964 (Needs_Finalization): Moved from Exp_Ch7.
2965 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2966 (Find_Protection_Type): Moved from Exp_Ch9.
2967 (Has_Controlled_Coextensions): Removed.
2968 (Has_Controlled_Objects): New routine.
2969 (In_Library_Level_Package_Body): New routine.
2970 (Insert_Action_After): New routine.
2971 (Is_Finalizable_Transient): New routine.
2972 (Is_Null_Access_BIP_Func_Call): New routine.
2973 (Is_Non_BIP_Func_Call): New routine.
2974 (Is_Related_To_Func_Return): New routine.
2975 (Needs_Finalization): Moved from Exp_ch7.
2976 * expander.adb (Expand): Add a case for N_Free_Statement.
2977 * freeze.adb (Freeze_All): Replace the generation of a finalization
2978 list with a collection for access-to-controlled types.
2979 (Freeze_Entity): Code reformatting.
2980 (Freeze_Record_Type): Remove the freezing of a record controller
2982 (Freeze_Subprogram): Code reformatting.
2983 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2985 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2986 has a library-level finalizer.
2987 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2988 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2989 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2990 files. Add a-fihema to the list of object files.
2992 Alphabetize the associations in type Is_Parameterless_Attribute.
2993 * rtsfind.ads: Ada.Finalization_List.Controller and
2994 System.Finalization_Implementation are no longer a GNAT unit.
2995 Update the range of type Ada_Finalization_Child. Remove the following
2996 recoverable entities:
2998 RE_Attach_To_Final_List
3002 RE_Finalizable_Ptr_Ptr
3003 RE_Global_Final_List
3004 RE_Limited_Record_Controller
3007 RE_Record_Controller
3008 RE_Simple_List_Controller
3010 Add the following recoverable entities:
3012 RE_Add_Offset_To_Address
3016 RE_Exception_Identity
3017 RE_Finalization_Collection
3018 RE_Finalization_Collection_Ptr
3019 RE_Needs_Finalization
3020 RE_Save_Library_Occurrence
3021 RE_Set_Finalize_Address_Ptr
3022 RE_Set_Storage_Pool_Ptr
3024 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3026 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3027 (First_Stored_Discriminant): Remove the mention of Name_uController.
3028 * sem_aux.ads: Comment reformatting.
3029 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3030 to redecorate an already existing class-wide type.
3031 (Decorate_Tagged_Type): New parameter profile and associated comment.
3032 Create a "shadow class-wide type" for a shadow entity.
3033 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3034 of the final chain along with the associated comment.
3035 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3036 Full_Desig and set it to the full view of the designated type.
3037 Initialize the finalization collection to empty.
3038 (Build_Derived_Record_Type): Alphabetize local variables. Code
3040 (Collect_Fixed_Components): Remove the mention of Name_uController.
3041 (Create_Constrained_Components): Remove the mention of Name_uController.
3042 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3043 class-wide type of a shadow entity.
3044 (Process_Full_View): Update the machinery which marks type
3045 Limited_Controlled's entity as limited.
3046 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3047 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3048 list, instead make a collection build-in-place formal.
3049 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3050 a designated type in order to establish a match between the renaming
3051 and the renamed entity.
3052 (Find_Selected_Component): Add guard to prevent spurious exceptions
3053 from being raised on .NET/JVM.
3054 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3055 to the list of primitive that need special processing. Update arrays
3056 C_Names and D_Names.
3057 (Replace_Types): Handle class-wide types.
3058 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3059 different parameter profile, look at the first formal.
3060 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3061 use clauses for Exp_Util.
3062 * sem_res.adb: Remove with and use clauses for Elists.
3063 (Propagate_Coextensions): Removed.
3064 (Resolve_Allocator): Do not propagate the list of coextensions from one
3065 allocator to another.
3066 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3067 Deaccessed_T to Desig_Typ.
3068 (Enter_Name): Remove the mention of Name_uController.
3069 (Gather_Components): Remove the mention of Name_uController.
3070 (Incomplete_Or_Private_View): New routine.
3071 (Is_Coextension_Root): Removed.
3072 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3073 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3074 (Is_Coextension_Root): Removed.
3075 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3076 Controlled types are now derived from a null tagged record. Remove
3077 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3078 * sinfo.adb (Coextensions): Removed.
3079 (Set_Coextensions): Removed.
3080 * sinfo.ads: Remove Coextensions from the explanation of node fields
3081 and its uses in nodes.
3082 Update the field usage of N_Allocator.
3083 (Coextensions): Removed along with its pragma Inline.
3084 (Set_Coextensions): Removed along with its pragma Inline.
3085 * snames.ads-tmpl: Remove names
3090 Name_uLocal_Final_List
3091 Name_Finalization_Root
3098 Name_Finalize_Address
3099 * s-pooglo.adb (Allocate): Add overriding indicator.
3100 (Deallocate): Add overriding indicator.
3101 (Storage_Size): Add overriding indicator.
3102 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3103 than Finalize_Global_List.
3104 (Null_Finalize_Global_List): Removed.
3105 (Save_Library_Occurrence): New routine.
3106 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3107 initialization. Add variable Finalize_Library_Objects along with its
3108 pragma Export. Add variables Library_Exception and
3109 Library_Exception_Set along with their pragma Export.
3110 (Null_Finalize_Global_List): Removed.
3111 (Save_Library_Occurrence): New routine.
3112 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3113 rather than Finalize_Global_List.
3114 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3115 of the constructed node.
3117 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3119 * link.c: Include "auto-host.h" before system headers.
3121 2011-08-03 Vincent Celier <celier@adacore.com>
3123 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3124 that are not extended. Do not check if a library project that is
3125 extended should be regenerated. Do not add to table Library_Paths the
3126 libraries that are in extended projects. Link only with libraries that
3127 are in libray projects that are not extended.
3128 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3129 for a library project that is extended.
3131 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3133 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3134 conforming subprogram renamings that appear to be completions if they
3135 are not fully conformant.
3136 Such renamings are homographs but not completions.
3137 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3138 names in a subprogram renaming that appears in an instance.
3140 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3142 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3143 not immutably limited, build actual subtype from expression to provide
3144 proper bounds to caller.
3146 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3148 * sem_ch8.adb: Minor comment correction.
3150 2011-08-03 Thomas Quinot <quinot@adacore.com>
3152 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3153 returning a limited array, use an extended return statement.
3155 2011-08-03 Vincent Celier <celier@adacore.com>
3157 * make.adb (Initialize): If --subdirs= is used, but no project file is
3158 specified, attempt to create the specify subdir if it does not already
3159 exist and use it as the object directory as if -D had been specified.
3161 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3163 * s-tpopsp-vms.adb: New file.
3164 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3165 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3167 2011-08-03 Emmanuel Briot <briot@adacore.com>
3169 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3172 2011-08-03 Yannick Moy <moy@adacore.com>
3174 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3175 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3176 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3177 detect that an array has static bounds.
3179 2011-08-03 Thomas Quinot <quinot@adacore.com>
3181 * exp_dist.adb: Minor reformatting.
3183 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3185 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3186 (ATCB_Key): Removed, not always used.
3188 2011-08-03 Emmanuel Briot <briot@adacore.com>
3190 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3191 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3192 most remaining global variables.
3194 2011-08-03 Robert Dewar <dewar@adacore.com>
3196 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3197 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3200 2011-08-03 Javier Miranda <miranda@adacore.com>
3202 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3203 that must be passed by copy in VM targets.
3205 2011-08-03 Emmanuel Briot <briot@adacore.com>
3207 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3208 duplicates a similar htable now in the project tree.
3210 2011-08-03 Claire Dross <dross@adacore.com>
3212 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3213 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3214 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3215 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3216 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3217 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3218 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3221 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3223 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3224 (ATCB_Key): Removed, not always used.
3225 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3227 * s-tpopsp-tls.adb: New file.
3228 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3229 x86/x64/ia64/powerpc/sparc Linux.
3231 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3233 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3234 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3236 2011-08-03 Thomas Quinot <quinot@adacore.com>
3238 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3239 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3240 Fix type selection for mapping integer types to PolyORB types.
3242 2011-08-03 Bob Duff <duff@adacore.com>
3244 * sem_ch7.adb: Minor comment clarification.
3246 2011-08-03 Bob Duff <duff@adacore.com>
3248 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3249 an error analyzing a choice, skip further processing. Further
3250 processing could cause a crash or cascade errors.
3252 2011-08-03 Emmanuel Briot <briot@adacore.com>
3254 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3255 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3256 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3257 prj-env.ads (Shared_Project_Tree_Data): new type
3258 An aggregate project and its aggregated trees need to share the common
3259 data structures used for lists of strings, packages,... This makes the
3260 code simpler since otherwise we have to pass the root tree (also used
3261 for the configuration file data) in addition to the current project
3262 tree. This also avoids ambiguities as to which tree should be used.
3263 And finally this saves a bit of memory.
3264 (For_Every_Project_Imported): new parameter Tree.
3265 Since aggregated projects are using a different tree, we need to let
3266 the caller know which tree to use to manipulate the returned project.
3268 2011-08-03 Robert Dewar <dewar@adacore.com>
3270 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3271 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3272 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3273 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3275 2011-08-03 Javier Miranda <miranda@adacore.com>
3277 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3278 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3280 2011-08-03 Bob Duff <duff@adacore.com>
3282 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3285 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3287 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3288 g-sehash.ads: Fix typo. Update header.
3290 2011-08-03 Thomas Quinot <quinot@adacore.com>
3292 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3295 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3297 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3298 prefixes of private types along with records, since the selector may be
3300 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3301 private types along with records, since the selector may be a
3304 2011-08-03 Emmanuel Briot <briot@adacore.com>
3306 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
3308 2011-08-03 Javier Miranda <miranda@adacore.com>
3310 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3311 Tagged_Type_Expansion.
3313 2011-08-03 Yannick Moy <moy@adacore.com>
3315 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3316 violation when the argument of concatenation is the name of a
3319 2011-08-03 Emmanuel Briot <briot@adacore.com>
3321 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3322 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3323 (Process_Declarative_Items): new parameter Child_Env.
3325 2011-08-03 Yannick Moy <moy@adacore.com>
3327 * alfa.ads: Update format of ALFA section in ALI file in order to
3328 add a mapping from bodies to specs when both are present.
3329 (ALFA_Scope_Record): Add components for spec file/scope.
3330 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3332 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3333 collected, fill in the spec information when relevant.
3334 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
3337 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3339 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3340 code unit to decide whether to add internally generated subprograms.
3342 2011-08-03 Javier Miranda <miranda@adacore.com>
3344 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3345 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
3346 be handled by copy in VM targets.
3348 2011-08-03 Emmanuel Briot <briot@adacore.com>
3350 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
3351 code with Makeutl.Get_Switches.
3352 * prj-tree.adb: Update comment.
3354 2011-08-03 Thomas Quinot <quinot@adacore.com>
3356 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3357 subprogram with a limited formal that does not support external
3360 2011-08-03 Yannick Moy <moy@adacore.com>
3362 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3364 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3365 not from current unit in two phases, because it is not possible to
3366 change the table while iterating over its content.
3367 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3369 2011-08-03 Sergey Rybin <rybin@adacore.com>
3371 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3372 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3374 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3376 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3377 and the component type is composite, this is ambiguous for predefined
3378 concatenation, but if the node is not overloaded and the entity is a use
3379 -defined function its profile can be used to resolve that aggregate.
3381 2011-08-03 Robert Dewar <dewar@adacore.com>
3383 * exp_ch4.adb: Minor code cleanup.
3385 2011-08-03 Thomas Quinot <quinot@adacore.com>
3387 * exp_dist.adb: Do not generate distribution stubs if serious errors
3388 have been diagnosed.
3390 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3392 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3393 the first formal of a primitive operation, go to the base type to
3394 handle properly an access to a derived type with constrained
3396 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3397 user-defined function that is only use-visible.
3399 2011-08-03 Robert Dewar <dewar@adacore.com>
3401 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3402 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3403 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3404 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3405 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3406 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3407 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3408 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3410 2011-08-03 Robert Dewar <dewar@adacore.com>
3412 * repinfo.adb (List_Mechanism): Add handling of
3413 Convention_Ada_Pass_By_XXX.
3414 * sem_mech.adb (Set_Mechanism): Ditto.
3415 * sem_prag.adb (Process_Convention): Add entries for
3416 Convention_Ada_Pass_By_XXX.
3417 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3419 2011-08-03 Pascal Obry <obry@adacore.com>
3421 * makeutl.adb: Minor reformatting.
3423 2011-08-03 Vincent Celier <celier@adacore.com>
3426 (Get_File_Name) If the file cannot be found when there are no config
3427 pragmas file and May_Fail is True, return No_File instead of the file
3428 name, to be consistent.
3430 2011-08-03 Pascal Obry <obry@adacore.com>
3432 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3435 2011-08-03 Javier Miranda <miranda@adacore.com>
3438 (Same_Representation): In VM targets the representation of arrays with
3439 aliased components differs from arrays with non-aliased components.
3441 2011-08-03 Emmanuel Briot <briot@adacore.com>
3443 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3444 not systematically lower case attribute indexes that contain no "."
3445 Fix definition of several Naming attributes, which take
3446 a unit name as index and therefore should be case insensitive.
3447 Minor refactoring (reduce length of variable names).
3449 2011-08-03 Emmanuel Briot <briot@adacore.com>
3451 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3453 2011-08-03 Emmanuel Briot <briot@adacore.com>
3455 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3456 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3457 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3458 prj-tree.ads (Prj.Tree.Environment): new type.
3460 2011-08-03 Emmanuel Briot <briot@adacore.com>
3462 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3463 prj-tree.adb, prj-tree.ads (Environment): new type.
3465 2011-08-03 Emmanuel Briot <briot@adacore.com>
3467 * prj-tree.ads: Remove unused variable.
3469 2011-08-03 Yannick Moy <moy@adacore.com>
3471 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3472 issuing messages related to SPARK restriction violation.
3474 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3476 * sem_ch6.adb: guard against error nodes in return statements.
3478 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3480 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3481 a warning can only appear on a configuration file, so emit warning
3482 without further checks.
3484 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3486 * s-interr.ads: add overriding keyword.
3488 2011-08-03 Geert Bosch <bosch@adacore.com>
3490 * exp_attr.adb: Fix minor typo.
3492 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3494 * par-ch4.adb: improve error recovery.
3496 2011-08-03 Emmanuel Briot <briot@adacore.com>
3498 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3499 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3502 2011-08-03 Emmanuel Briot <briot@adacore.com>
3504 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3505 "external" as an attribute name in aggregate projects.
3507 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3509 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3510 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3511 from 0, so we need to adjust.
3513 2011-08-03 Emmanuel Briot <briot@adacore.com>
3515 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3516 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3518 2011-08-03 Yannick Moy <moy@adacore.com>
3520 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3521 restriction on overloaded entity if the entity is not an operator.
3523 2011-08-03 Yannick Moy <moy@adacore.com>
3525 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3526 restrict.ads: Rename remaining Check_Formal_Restriction* into
3527 Check_SPARK_Restriction*.
3529 2011-08-03 Emmanuel Briot <briot@adacore.com>
3531 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3532 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3534 (Project_Empty): removed
3535 (Empty_Project): new parameter Qualifier
3536 This is used to have fields specific to aggregate projects, cleaner
3537 New field to store the list of aggregated projects.
3538 (Check_Aggregate_Project): removed
3539 (Process_Aggregated_Projects, Free): new subprograms.
3541 2011-08-03 Olivier Hainque <hainque@adacore.com>
3543 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3545 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3547 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3548 explicit dereference of an unconstrained type, create a constrained
3549 subtype for it, as is done for function calls that return an
3552 2011-08-03 Thomas Quinot <quinot@adacore.com>
3554 * g-pehage.adb (Finalize): Avoid possible double-free.
3556 2011-08-03 Steve Baird <baird@adacore.com>
3558 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3559 Elab_Spec/Body attrs in CodePeer_Mode.
3561 2011-08-03 Javier Miranda <miranda@adacore.com>
3563 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3564 low bound is not known at compile time but they have no others choice.
3565 Done because in this case the bounds can be obtained directly from the
3568 2011-08-03 Ed Falis <falis@adacore.com>
3570 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3571 on VxWorks SMP. Remove unusable constant ANY_CPU.
3573 2011-08-03 Emmanuel Briot <briot@adacore.com>
3575 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3576 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3577 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3578 Prj.Env.Initialize_Empty): new subprograms
3579 (Get_Env, Find_Project): remove parameter Target_Name.
3581 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3583 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3584 as a condition for the delayed call to Derived_Subprograms done for the
3585 case of the rewriting of a derived type that constrains the
3586 discriminants of its parent type.
3587 Avoids redundant subprogram derivations for private subtype derivations.
3589 2011-08-03 Javier Miranda <miranda@adacore.com>
3591 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3592 Build_Record_Aggr_Code.
3593 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3594 discriminants in extension aggregates.
3596 2011-08-03 Emmanuel Briot <briot@adacore.com>
3598 * prj-pp.adb (Print): also output project qualifiers, since in
3599 particular "aggregate" is mandatory in an aggregate project.
3601 2011-08-03 Emmanuel Briot <briot@adacore.com>
3603 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3604 (Debug_Output): new function.
3606 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3608 * gnat_ugn.texi: Document -Wstack-usage.
3609 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3611 2011-08-03 Thomas Quinot <quinot@adacore.com>
3613 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3614 have keyword LIMITED.
3616 2011-08-03 Yannick Moy <moy@adacore.com>
3618 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3619 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3620 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3621 section (does not happen in compiler, only if code directly calls
3623 * get_alfa.adb, get_alfa.ads: New files.
3624 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3626 * lib-xref-alfa.adb: New file.
3627 * lib-xref.adb, lib-xref.ads
3628 (Xref_Entry): redefine information needed in cross-references for ALFA.
3629 Push ALFA treatments in separated local package.
3630 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3631 identifiers. Return entity of package body instead of spec. Return
3632 Empty for a scope with no location.
3633 (Generate_Reference): adapt to new components for ALFA information.
3634 Remove the need for D references on definitions.
3635 (Is_Local_Reference): moved to ALFA local package
3636 (Output_References): extract subfunction as Extract_Source_Name
3637 (Output_Local_References): remove procedure, replaced by filtering of
3638 cross-references in package ALFA and printing in Put_ALFA.
3639 (Write_Entity_Name): remove procedure
3640 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3641 print exact name of entity as it appears in source file
3642 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3643 * put_alfa.adb, put_alfa.ads: New files.
3644 * xref_lib.adb (Search_Xref): protect read of cross-references against
3645 reading other sections of the ALI file, in gnatxref
3646 (Search): protect read of cross-references against reading other
3647 sections of the ALI file, in gnatfind.
3648 * gcc-interface/Make-lang.in: Update dependencies.
3650 2011-08-03 Thomas Quinot <quinot@adacore.com>
3652 * sem_ch3.adb: Minor reformatting.
3654 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3656 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3657 raising an exception.
3659 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3661 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3662 type, always use 1 as the lower bound or string, even if lower bound of
3663 context is not static, to handle properly null strings in a non-static
3666 2011-08-03 Bob Duff <duff@adacore.com>
3668 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3669 always legal on the right-hand side of an assignment statement; there
3670 is always an applicable index constraint in this case. Therefore, the
3671 check for Pkind = N_Assignment_Statement is now unconditional -- it
3672 doesn't depend on whether Is_Constrained (Typ).
3674 2011-08-03 Robert Dewar <dewar@adacore.com>
3676 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3678 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3680 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3681 for an itype created within a generic unit.
3683 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3685 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3686 suppresses all inlining.
3688 2011-08-03 Robert Dewar <dewar@adacore.com>
3690 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3691 exp_aggr.adb: Minor reformatting.
3693 2011-08-03 Thomas Quinot <quinot@adacore.com>
3695 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3696 tagged assignment when discriminant checks are suppressed. This is
3697 useless and extremely costly in terms of static stack usage.
3699 2011-08-03 Bob Duff <duff@adacore.com>
3701 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3702 of generics, because this leads to the wrong entity in the wrong scope,
3703 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3705 (Process_Interface_Name): Follow Alias for instances of generics, to
3706 correct for the above change.
3708 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3710 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3711 is an integer literal it is always safe to replace the reference. In
3712 addition, if the reference appears in the generated code for an object
3713 declaration it is necessary to copy because otherwise the reference
3714 might be to the uninitilized value of the discriminant of the object
3717 2011-08-03 Pascal Obry <obry@adacore.com>
3719 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3720 ACL used, in this case we want to check for ending .exe, not .exe
3721 anywhere in the path.
3723 2011-08-03 Sergey Rybin <rybin@adacore.com>
3725 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3726 the tree structure (semantic decoration of references to record
3729 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3731 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3732 choices of a named array aggregate, bail out when any choices are
3733 marked as Errors_Posted.
3735 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3737 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3738 in which entity is frozen, to handle properly loop variables in
3741 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3743 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3744 subtype is not static, compute the upper bound using attributes, to
3745 handle properly index types that are not integer types.
3747 2011-08-03 Bob Duff <duff@adacore.com>
3749 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3750 Update copyright notice.
3752 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3754 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3755 Original_Discriminant if within an instance.
3756 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3758 2011-08-03 Thomas Quinot <quinot@adacore.com>
3760 * einfo.ads: Minor reformatting.
3762 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3764 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3765 composite type with an unfrozen subcomponent, in the profile of a
3766 primitive operation.
3768 2011-08-03 Robert Dewar <dewar@adacore.com>
3770 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3772 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3774 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3775 unconstrained type with discriminants is initialized with an aggregate,
3776 use the constrained subtype of the aggregate as the type of the object,
3777 because it is immutable, and this allows the back-end to generate no
3778 code for the object declaration.
3780 2011-08-03 Robert Dewar <dewar@adacore.com>
3782 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3783 comparison operand is variable, and turns out to be zero or negative.
3785 2011-08-03 Javier Miranda <miranda@adacore.com>
3788 (Expand_Dispatching_Constructor_Call): Disable expansion of
3789 code required for native targets. Done to avoid generating
3790 references to unavailable runtime entities in VM targets.
3792 (Expand_N_Object_Declaration): Add missing support to handle
3793 the explicit initialization of class-wide interface objects.
3796 2011-08-03 Matthew Heaney <heaney@adacore.com>
3798 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3800 2011-08-03 Matthew Heaney <heaney@adacore.com>
3802 * a-cbdlli.adb (Splice): move source items from first to last
3804 2011-08-03 Yannick Moy <moy@adacore.com>
3806 * sem_util.ads: comment added.
3808 2011-08-03 Javier Miranda <miranda@adacore.com>
3811 (Expand_Record_Aggregate): In VM targets disable the expansion into
3812 assignments of aggregates whose type is not known at compile time.
3814 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3816 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3817 protected entries and task entries, to build the proper renaming
3818 declaration for entry formals, used in debugging.
3819 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3820 parameters in the same way.
3822 2011-08-02 Robert Dewar <dewar@adacore.com>
3824 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3825 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3826 code reorganization.
3828 2011-08-02 Robert Dewar <dewar@adacore.com>
3830 * debug.adb: Debug flag d.P to suppress length comparison optimization
3831 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3832 comparison of Length by comparing First/Last instead.
3834 2011-08-02 Matthew Heaney <heaney@adacore.com>
3836 * a-cobove.ads: Code clean up.
3838 2011-08-02 Vincent Celier <celier@adacore.com>
3840 * adaint.c (file_names_case_sensitive_cache): New static int.
3841 (__gnat_get_file_names_case_sensitive): Cache the return value in
3842 file_names_case_sensitive_cache at the first invocation, to avoid
3843 multiple calls to getenv.
3845 2011-08-02 Bob Duff <duff@adacore.com>
3847 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3849 2011-08-02 Yannick Moy <moy@adacore.com>
3851 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3852 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3853 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3854 indicate that we are in a precondition or postcondition. This is used in
3855 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3856 decide whether to flag the spec or body of the current subprogram as
3859 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3861 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3863 * a-extiin.ads: New file.
3865 2011-08-02 Bob Duff <duff@adacore.com>
3867 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3868 now raises Name_Error instead of Use_Error in certain cases. The other
3869 parts of this AI were already implemented properly.
3871 2011-08-02 Vincent Celier <celier@adacore.com>
3873 * link.c: Only import "auto-host.h" when building the gnattools.
3875 2011-08-02 Yannick Moy <moy@adacore.com>
3877 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3878 which calls a local subprogram, so extract subprogram
3879 from Mark_Non_ALFA_Subprogram_Body.
3881 2011-08-02 Javier Miranda <miranda@adacore.com>
3884 (Extract_Dispatching_Call): If the type of the dispatching object is an
3885 access type then return an explicit dereference in the Object out-mode
3888 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3890 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3891 compatibility checks for all indexes of an array subtype, not just the
3892 first. Reset Has_Dynamic_Range_Check on the subtype before each
3893 potential check to ensure that Insert_Range_Checks will not elide any
3894 of the dynamic checks.
3896 2011-08-02 Yannick Moy <moy@adacore.com>
3898 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3899 SPARK restriction at parsing time.
3900 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3901 directive only if the SPARK restriction is set for this unit.
3903 2011-08-02 Yannick Moy <moy@adacore.com>
3905 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3906 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3907 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3908 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3909 Mark_Non_ALFA_Subprogram_Body.
3910 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3913 2011-08-02 Yannick Moy <moy@adacore.com>
3915 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3918 2011-08-02 Robert Dewar <dewar@adacore.com>
3920 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3921 exp_ch3.adb: Minor reformatting.
3923 2011-08-02 Emmanuel Briot <briot@adacore.com>
3925 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3926 files, not any regular file.
3927 (__gnat_locate_file_with_predicate): new subprogram.
3929 2011-08-02 Yannick Moy <moy@adacore.com>
3931 * sinfo.adb, sinfo.ads: Restrict the use of flags
3932 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3933 nodes, plus N_Subtype_Declaration for the 2nd one.
3935 2011-08-02 Sergey Rybin <rybin@adacore.com>
3937 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3938 - fix bugs in the description of Source_Trace;
3939 - get rid of UNIT_NAME;
3941 2011-08-02 Javier Miranda <miranda@adacore.com>
3944 (Build_Dispatching_Requeue): Adding support for VM targets
3945 since we cannot directly reference the Tag entity.
3946 * exp_sel.adb (Build_K): Adding support for VM targets.
3947 (Build_S_Assignment): Adding support for VM targets.
3949 (Default_Prim_Op_Position): In VM targets do not restrict availability
3950 of predefined interface primitives to compiling in Ada 2005 mode.
3951 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3952 restricted to compiling in Ada 2005 mode.
3953 (Make_VM_TSD): Generate code that declares and initializes the OSD
3954 record. Needed to support dispatching calls through synchronized
3957 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3958 primitives associated with synchronized interfaces.
3959 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3960 primitives associated with synchronized interfaces.
3962 2011-08-02 Yannick Moy <moy@adacore.com>
3964 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3965 statements hidden in SPARK if preceded by the HIDE directive
3966 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3967 exception handlers as hidden in SPARK if preceded by the HIDE directive
3968 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3969 if starting with the HIDE directive
3970 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3971 starting with the HIDE directive; mark the declarations in a private
3972 part as hidden in SPARK if the private part starts with the HIDE
3974 * restrict.adb, restrict.ads
3975 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3976 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3977 argument node belongs to a part which is hidden in SPARK
3978 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3979 parts in SPARK; protect the possibly costly call to
3980 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3981 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3982 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3983 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3985 (Scan): recognize special comment starting with '#' and followed by
3986 SPARK keyword "hide" as a HIDE directive.
3988 2011-08-02 Yannick Moy <moy@adacore.com>
3990 * types.ads, erroutc.ads: Minor reformatting.
3992 2011-08-02 Vincent Celier <celier@adacore.com>
3994 * link.c: Add response file support for cross platforms.
3996 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3998 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3999 in an association, set parent field of copy before partial analysis.
4000 * sem_res.adb (Resolve_Slice): create reference to itype only when
4001 expansion is enabled.
4003 2011-08-02 Yannick Moy <moy@adacore.com>
4005 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4006 for new flag denoting which subprogram bodies are in ALFA
4007 * restrict.adb, sem_ch7.adb: Update comment
4008 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4009 sem_ch9.adb, sem_res.adb: Add calls to
4010 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4011 * sem_ch6.adb (Analyze_Function_Return): add calls to
4012 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4013 middle of the body, and extended return.
4014 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4015 False when missing return.
4016 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4017 to True for subprograms whose spec is in ALFA. Remove later on the flag
4018 on the entity used for a subprogram body when there exists a separate
4020 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4021 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4022 False, otherwise do nothing.
4024 2011-08-02 Robert Dewar <dewar@adacore.com>
4026 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4028 2011-08-02 Yannick Moy <moy@adacore.com>
4030 * sem_ch4.ads: minor formatting.
4032 2011-08-02 Yannick Moy <moy@adacore.com>
4034 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4035 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4036 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4037 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4038 opt.ads: cleanup of SPARK mode
4040 2011-08-02 Yannick Moy <moy@adacore.com>
4042 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4044 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4045 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4047 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4048 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4049 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4050 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4052 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4054 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4055 functions whose return type is not in ALFA.
4056 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4058 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4059 parameter's type is not in ALFA.
4060 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4063 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4065 * sem_ch6 (Analyze_Expression_Function): treat the function as
4066 Inline_Always, and introduce a subprogram declaration for it when it is
4068 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4069 expression functions, so that the back-end can determine whether they
4070 can in fact be inlined.
4071 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4072 a function body comes from an expression function.
4074 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4076 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4077 null exclusions to test Can_Never_Be_Null on the anonymous access types
4078 of the formals rather than testing the formals themselves. Exclude this
4079 check in cases where the Old_Formal is marked as a controlling formal,
4080 to avoid issuing spurious errors for bodies completing dispatching
4081 operations (due to the flag not getting set on controlling access
4082 formals in body specs).
4083 (Find_Corresponding_Spec): When checking full and subtype conformance of
4084 subprogram bodies in instances, pass Designated and E in that order, for
4085 consistency with the expected order of the formals (New_Id followed by
4088 2011-08-02 Robert Dewar <dewar@adacore.com>
4090 * sem_ch8.adb: Minor reformatting.
4092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4094 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4095 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4096 primitive operations of class-wide actuals.
4098 2011-08-02 Javier Miranda <miranda@adacore.com>
4100 * exp_atag.ads, exp_atag.adb
4101 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4102 since its value is implicitly passed in argument Typ.
4103 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4104 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4105 Build_Common_Dispatching_Select_Statements.
4107 2011-08-02 Robert Dewar <dewar@adacore.com>
4109 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4110 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4113 2011-08-02 Robert Dewar <dewar@adacore.com>
4115 * sem_res.adb: Minor reformatting.
4116 * sem_prag.adb: Minor reformatting.
4118 2011-08-02 Javier Miranda <miranda@adacore.com>
4120 * exp_atag.adb, exp_atags.ads
4121 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4122 by the tagged type Entity. Required to use this routine in the VM
4123 targets since we do not have available the Tag entity in the VM
4126 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4127 Ada.Tags has not been previously loaded.
4129 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4130 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4132 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4133 view of enclosing scopes. Required to handle enclosing scopes that
4134 are synchronized types whose full view is a task type.
4136 (Build_VM_TSDs): Minor code improvement to avoid generating and
4137 analyzing lists with empty nodes.
4138 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4139 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4140 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4141 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4142 (Make_Select_Specific_Data_Table): Add support for VM targets.
4143 (Make_VM_TSD): Generate code to initialize the SSD structure of
4146 2011-08-02 Yannick Moy <moy@adacore.com>
4148 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4149 cross-references section in ALI.
4150 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4151 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4153 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4154 subprogram or package entity of a node
4155 (Is_Local_Reference_Type): new function returns True for references
4156 selected in local cross-references.
4157 (Lt): function extracted from Lt in Output_References
4158 (Write_Entity_Name): function extracted from Output_References
4159 (Generate_Definition): generate reference with type 'D' for definition
4160 of objects (object declaration and parameter specification), with
4161 appropriate locations and units, for use in local cross-references.
4162 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4163 references of type 'I' for initialization in object definition.
4164 (Output_References): move part of function Lt and procedure
4165 Write_Entity_Name outside of the body. Ignore references of types 'D'
4166 and 'I' introduced for local cross-references.
4167 (Output_Local_References): new procedure to output the local
4168 cross-references sections.
4169 (Lref_Entity_Status): new array defining whether an entity is a local
4170 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4171 with 'I' type when initialization expression is present.
4172 * get_scos.adb, get_scos.ads: Correct comments and typos
4174 2011-08-02 Javier Miranda <miranda@adacore.com>
4176 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4178 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4180 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4183 2011-08-02 Vincent Celier <celier@adacore.com>
4185 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4186 (No_Space_Img): New function
4187 (Find_Excluded_Sources): When reading from a file, record the file name
4188 and the line number for each excluded source.
4189 (Mark_Excluded_Sources): When reporting an error, if the excluded
4190 sources were read from a file, include file name and line number in
4193 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4195 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4197 2011-08-02 Robert Dewar <dewar@adacore.com>
4199 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4201 2011-08-02 Javier Miranda <miranda@adacore.com>
4203 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4204 generation of TSDs to the DOTNET compiler.
4205 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4206 generation of TSDs to the DOTNET compiler.
4208 2011-08-02 Javier Miranda <miranda@adacore.com>
4210 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4211 record of all the tagged types declared inside library level package
4212 declarations, library level package bodies or library level subprograms.
4213 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4214 associated with a given tagged type.
4215 (Build_VM_TSDs): New subprogram.
4216 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4217 compilation units that are subprograms.
4218 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4219 compilation units that are package bodies.
4220 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4221 units that are a package declaration or a package instantiation.
4222 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4223 reorganization to improve the error generated by the frontend when the
4224 function Ada.Tags.Secondary_Tag is not available.
4225 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4226 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4228 2011-08-02 Javier Miranda <miranda@adacore.com>
4230 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4232 2011-08-02 Robert Dewar <dewar@adacore.com>
4234 * s-imenne.ads: Minor reformatting.
4236 2011-08-02 Robert Dewar <dewar@adacore.com>
4238 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4239 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4240 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4242 2011-08-02 Robert Dewar <dewar@adacore.com>
4244 * einfo.ads (Materialize_Entity): Document this is only for renamings
4245 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4246 required debug information in the case where we transform the object
4247 declaration into a renaming declaration.
4248 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4250 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4253 2011-08-02 Robert Dewar <dewar@adacore.com>
4255 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4256 Suppress_Init_Procs.
4257 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4258 Suppress_Initialization/Initialization_Suppressed.
4259 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4260 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4261 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4262 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4264 2011-08-02 Robert Dewar <dewar@adacore.com>
4266 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4269 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4271 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4272 only have inheritable classwide pre/postconditions.
4274 2011-08-02 Javier Miranda <miranda@adacore.com>
4276 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4277 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4278 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4279 checks if the external tag of a type is the same as the external tag
4280 of some other declaration.
4282 2011-08-02 Thomas Quinot <quinot@adacore.com>
4284 * s-taskin.ads: Minor reformatting.
4286 2011-08-02 Emmanuel Briot <briot@adacore.com>
4288 * g-comlin.adb (Display_Help): swap the order in which it prints the
4289 short help and the general usage.
4291 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4293 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4294 the aspect declarations and attach them to the generic copy for
4295 subsequent analysis.
4296 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4297 declarations of the generic tree to the new subprogram declarations.
4298 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4299 conditions that apply to a subprogram instance.
4301 2011-08-02 Robert Dewar <dewar@adacore.com>
4303 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4305 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4307 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4308 private type with a tagged full view is not derived in the immediate
4309 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4311 2011-08-02 Robert Dewar <dewar@adacore.com>
4313 * exp_ch4.adb: Minor reformatting.
4315 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4317 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4318 Ada2012 iterator, the loop will be rewritten during expansion into a
4319 while loop with a cursor and an element declaration. Do not analyze the
4320 body in this case, because if the container is for indefinite types the
4321 actual subtype of the elements will only be determined when the cursor
4322 declaration is analyzed.
4324 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4326 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4327 size/alignment related attributes in CodePeer_Mode.
4329 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4331 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4332 Prepend_Element, since this can result in the operation getting the
4333 wrong slot in the full type's dispatch table if the full type has
4334 inherited operations. The incomplete type's operation will get added
4335 to the proper position in the full type's primitives
4336 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4337 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4338 dispatching operations, since there are cases where nonprimitive
4339 subprograms can get added to the list of incomplete dependents (such
4340 as subprograms in nested packages).
4341 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4342 private part when determining whether to add a primitive with a
4343 parameter of a tagged incomplete type to the Private_Dependents list.
4344 Such primitives can also occur in the visible part, and should not have
4345 been excluded from being private dependents.
4346 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4347 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4348 list of a Taft-amendment incomplete type is a primitive before issuing
4349 an error that the full type must appear in the same unit. There are
4350 cases where nonprimitives can be in the list (such as subprograms in
4352 * sem_disp.adb (Derives_From): Use correct condition for checking that
4353 a formal's type is derived from the type of the corresponding formal in
4354 the parent subprogram (the condition was completely wrong). Add
4355 checking that was missing for controlling result types being derived
4356 from the result type of the parent operation.
4358 2011-08-02 Yannick Moy <moy@adacore.com>
4360 * errout.adb (First_Node): minor renaming
4361 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4364 2011-08-02 Yannick Moy <moy@adacore.com>
4366 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4367 before accessing operands.
4368 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4369 decide whether an initialization expression respects SPARK rules, as
4370 the plain node is the expanded one. This allows for more valid warnings
4372 * gnat_rm.texi: Minor update.
4374 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4376 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4379 2011-08-02 Robert Dewar <dewar@adacore.com>
4381 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4383 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4385 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4386 loop statements and the element renaming declaration with a block when
4387 the element type is controlled.
4389 2011-08-02 Yannick Moy <moy@adacore.com>
4391 * sinfo.ads: Minor formatting.
4393 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4395 * sem_aggr.adb (Add_Association): if the association has a box and no
4396 expression, use the Sloc of the aggregate itself for the new
4398 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4401 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4403 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4404 When a container is provided via a function call, generate a renaming
4405 of the function result. This avoids the creation of a transient scope
4406 and the premature finalization of the container.
4407 * exp_ch7.adb (Is_Container_Cursor): Removed.
4408 (Wrap_Transient_Declaration): Remove the supression of the finalization
4409 of the list controller when the declaration denotes a container cursor,
4412 2011-08-02 Yannick Moy <moy@adacore.com>
4414 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4415 node is from source, instead of the original node being from source.
4417 (Resolve_Array_Aggregate): refine the check for a static expression, to
4418 recognize also static ranges
4419 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4420 Array_Type_Declaration): postpone the test for the type being a subtype
4421 mark after the type has been resolved, so that component-selection and
4422 expanded-name are discriminated.
4423 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4424 to distinguish the case of an iteration scheme, so that an error is
4425 issed on a non-static range in SPARK except in an iteration scheme.
4426 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4427 In_Iter_Schm = True.
4428 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4429 user-defined operators so that they are allowed in renaming
4431 (Find_Selected_Component): refine the check for prefixing of operators
4432 so that they are allowed in renaming. Move the checks for restrictions
4433 on selector name after analysis discriminated between
4434 component-selection and expanded-name.
4435 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4436 concatenation argument of string type if it is static.
4437 * sem_util.adb, sem_util.ads
4438 (Check_Later_Vs_Basic_Declarations): add a new function
4439 Is_Later_Declarative_Item to decice which declarations are allowed as
4440 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4441 mode, add that renamings are considered as later items.
4442 (Enclosing_Package): new function to return the enclosing package
4443 (Enter_Name): correct the rule for homonyms in SPARK
4444 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4445 from source (result of expansion) to avoid issuing wrong warnings.
4447 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4449 * errout.adb: On anything but an expression First_Node returns its
4452 2011-08-02 Pascal Obry <obry@adacore.com>
4454 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4456 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4458 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4459 Set the associated loop as the related expression of internally
4461 * exp_ch7.adb (Is_Container_Cursor): New routine.
4462 (Wrap_Transient_Declaration): Supress the finalization of the list
4463 controller when the declaration denotes a container cursor.
4465 2011-08-02 Yannick Moy <moy@adacore.com>
4467 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4469 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4470 expression is a simple expression. This check cannot be performed in
4471 the semantics, so just drop it.
4472 (P_Index_Or_Discriminant_Constraint): move check that the index or
4473 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4474 semantics. Other cases were previously checked in the semantics.
4475 * par-ch4.adb (P_Name): move checks that a selector name is not
4476 character literal or an operator symbol to Find_Selected_Component in
4478 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4479 declarations are not placed after later declarations in a separate
4480 procedure in Sem_Util (possibly not the best choice?), to be used both
4481 during parsing, for Ada 83 mode, and during semantic analysis, for
4483 * par-endh.adb (Check_End): move check that end label is not missing
4484 to Process_End_Label in the semantics
4485 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4486 the special case for SPARK restriction
4487 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4488 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4489 parameter Force to issue the error message even on internal node (used
4490 for generated end label). Call Check_Restriction to check when an error
4491 must be issued. In SPARK mode, issue an error message even if the
4492 restriction is not set.
4493 (Check_Restriction): new procedure with an additional out parameter to
4494 inform the caller that a message has been issued
4495 * sem_aggr.adb: Minor modification of message
4496 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4497 instead of issuing an error message directly
4498 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4499 declarations are not placed after later declarations, by calling
4500 Check_Later_Vs_Basic_Declarations
4501 (Analyze_Subtype_Declaration): move here the check that an index or
4502 discriminant constraint must be a subtype mark. Change the check that
4503 a subtype of String must start at one so that it works on subtype marks.
4504 * sem_ch4.adb (Analyze_Call): move here the check that a named
4505 association cannot follow a positional one in a call
4506 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4507 instead of issuing an error message directly
4508 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4509 selector name is not a character literal or an operator symbol. Move
4510 here the check that the prefix of an expanded name cannot be a
4511 subprogram or a loop statement.
4512 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4513 procedure called from parsing and semantics to check that basic
4514 declarations are not placed after later declarations
4515 (Process_End_Label): move here the check that end label is not missing
4517 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4519 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4520 representation clause in codepeer mode, since it confuses CodePeer and
4521 does not bring useful info.
4523 2011-08-02 Ed Falis <falis@adacore.com>
4525 * init.c: initialize fp hw on MILS.
4527 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4529 * errout.adb (First_Node): for bodies, return the node itself (small
4530 optimization). For other nodes, do not check source_unit if the node
4531 comes from Standard.
4533 2011-08-02 Robert Dewar <dewar@adacore.com>
4535 * exp_ch3.adb: Minor comment additions.
4536 * sem_ch13.adb: Minor reformatting.
4538 2011-08-02 Pascal Obry <obry@adacore.com>
4540 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4542 2011-08-02 Robert Dewar <dewar@adacore.com>
4544 * sem_attr.adb: Minor reformatting.
4546 2011-08-02 Robert Dewar <dewar@adacore.com>
4548 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4549 (Has_Default_Component_Value): Removed
4550 * einfo.ads Comment updates
4551 (Has_Default_Aspect): Replaces Has_Default_Value
4552 (Has_Default_Component_Value): Removed
4554 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4556 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4557 (Get_Simple_Init_Val): Handle Default_Value aspect
4558 (Needs_Simple_Initialization): Handle Default_Value aspect
4559 * exp_ch3.ads: Needs_Simple_Initialization
4560 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4561 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4563 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4564 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4565 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4567 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4569 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4570 package containing iteration primitives.
4571 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4573 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4575 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4576 "of", pre-analyze expression in case it is a function call with
4577 finalization actions that must be placed ahead of the loop.
4578 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4579 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4581 2011-08-02 Geert Bosch <bosch@adacore.com>
4583 * cstand.adb (Create_Float_Types): Only consider C's long double for
4584 Long_Long_Float, in addition to double.
4586 2011-08-02 Robert Dewar <dewar@adacore.com>
4588 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4589 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4590 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4593 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4595 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4598 2011-08-02 Javier Miranda <miranda@adacore.com>
4600 * einfo.ads, einfo.adb
4601 (Original_Access_Type): Move this attribute to Node26 since there was
4602 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4603 which causes conflicts and breaks the generation of the .NET compiler.
4604 (Interface_Name): Add missing documentation on JGNAT only uses of
4607 2011-08-02 Geert Bosch <bosch@adacore.com>
4609 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4610 (Find_Back_End_Float_Type): Likewise
4611 (Create_Back_End_Float_Types): Likewise
4612 (Create_Float_Types): Likewise
4613 (Register_Float_Type): Likewise
4614 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4615 Nlist and split out type selection in new local Find_Base_Type function.
4616 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4618 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4620 2011-08-02 Robert Dewar <dewar@adacore.com>
4622 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4624 * opt.ads: Minor comment change.
4625 * sem_ch12.adb: Minor code reorganization.
4627 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4629 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4630 subtype's list of rep items to the list on the full subtype in the case
4631 where the lists are the same.
4633 2011-08-02 Geert Bosch <bosch@adacore.com>
4635 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4636 using the one from System.Strings, which also deallocates all strings.
4638 2011-08-02 Geert Bosch <bosch@adacore.com>
4640 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4642 * gcc-interface/Make-lang.in: Update dependencies.
4644 2011-08-02 Olivier Hainque <hainque@adacore.com>
4646 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4649 2011-08-02 Javier Miranda <miranda@adacore.com>
4651 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4652 associated with anonymous access to subprograms.
4654 2011-08-02 Geert Bosch <bosch@adacore.com>
4657 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4658 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4659 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4660 (Add_Symbol_Definition): Move to switch-c.adb
4661 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4662 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4663 (Add_Symbol_Definition): Move to switch-c.adb.
4664 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4666 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4668 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4669 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4671 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4672 (Add_Symbol_Definition): Moved from Prepcomp.
4673 * switch-c.ads: Update copyright notice. Use String_List instead of
4674 Argument_List, removing dependency on System.OS_Lib.
4676 2011-08-02 Yannick Moy <moy@adacore.com>
4678 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4679 mode on initialization expression which does not respect SPARK
4681 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4682 if the tree referenced by its argument represents an initialization
4683 expression in SPARK, suitable for initializing an object in an object
4686 2011-08-02 Javier Miranda <miranda@adacore.com>
4688 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4689 internally generated access to subprogram with its associated protected
4691 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4693 2011-08-02 Geert Bosch <bosch@adacore.com>
4695 * cstand.adb (Register_Float_Type): Print information about type to
4696 register, if the Debug_Flag_Dot_B is set.
4697 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4698 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4699 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4700 with a requested precision of more than Max_Digits digits and no more
4701 than Max_Base_Digits digits, if a range specification is present and the
4702 Predefined_Float_Types list has a suitable type to derive from.
4703 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4704 case of type completion with pragma Import
4706 (Process_Import_Predefined_Type): Processing to complete a type
4707 with pragma Import. Currently supports floating point types only.
4708 (Set_Convention_From_Pragma): Do nothing without underlying type.
4709 (Process_Convention): Guard against absence of underlying type,
4710 which may happen when importing incomplete types.
4711 (Process_Import_Or_Interface): Handle case of importing predefined
4712 types. Tweak error message.
4714 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4716 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4717 functions to previous change. Reorganize code slightly.
4719 2011-08-02 Geert Bosch <bosch@adacore.com>
4721 * back_end.ads (Register_Type_Proc): New call back procedure type for
4722 allowing the back end to provide information about available types.
4723 (Register_Back_End_Types): New procedure to register back end types.
4724 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4726 * cstand.adb (Back_End_Float_Types): New list for floating point types
4727 supported by the back end.
4728 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4729 (Copy_Float_Type): New procedure to make new copies of predefined types.
4730 (Register_Float_Type): New call back procedure to populate the BEFT list
4731 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4732 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4733 (Create_Float_Types): New procedure to create entities for floating
4734 point types predefined in Standard, and put these and any remaining
4735 BEFTs on the Predefined_Float_Types list.
4736 * stand.ads (Predefined_Float_Types): New list for predefined floating
4737 point types that do not have declarations in package Standard.
4739 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4741 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4742 entity node for the unit containing the parameter.
4743 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4744 (Add_Inlined_Subprogram): Likewise.
4745 * gcc-interface/Make-lang.in: Update dependencies.
4747 2011-08-02 Thomas Quinot <quinot@adacore.com>
4749 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4752 2011-08-02 Geert Bosch <bosch@adacore.com>
4754 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4756 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4758 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4759 computed value of Base_Type.
4761 2011-08-02 Yannick Moy <moy@adacore.com>
4763 * restrict.adb (Check_Restriction): issue an error for any use of
4764 class-wide, even if the No_Dispatch restriction is not set.
4765 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4766 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4767 when completing a private extension, the type named in the private part
4768 is not the same as that named in the visible part.
4769 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4770 of an inherited primitive operations of a tagged type or type extension
4771 that returns the tagged type.
4772 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4773 function which returns True for an implicit operation inherited by the
4774 derived type declaration for the argument type.
4775 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4778 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4780 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4781 Process_Bounds, to perform analysis with expansion of a range or an
4782 expression that is the iteration scheme for a loop.
4783 (Analyze_Iterator_Specification): If domain of iteration is given by a
4784 function call with a controlled result, as is the case if call returns
4785 a predefined container, ensure that finalization actions are properly
4787 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4789 2011-08-02 Javier Miranda <miranda@adacore.com>
4791 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4792 * gcc-interface/Make-lang.in: Update dependencies.
4794 2011-08-02 Javier Miranda <miranda@adacore.com>
4796 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4797 determine if the analysis is performed using N or Original_Node (N).
4798 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4799 functionality of routine Is_Variable avoids code duplication.
4800 * checks.adb (Determine_Range): Handle temporaries generated by
4801 Remove_Side_Effects.
4803 2011-08-02 Javier Miranda <miranda@adacore.com>
4805 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4806 expansion of the condition. Required since the previous analysis was
4807 done with expansion disabled (see Resolve_Quantified_Expression) and
4808 hence checks were not inserted and record comparisons have not been
4811 2011-08-02 Ed Falis <falis@adacore.com>
4813 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4816 2011-08-02 Bob Duff <duff@adacore.com>
4818 * opt.ads: Minor comment fix.
4820 2011-08-02 Bob Duff <duff@adacore.com>
4822 * sem_ch12.adb (Analyze_Package_Instantiation,
4823 Analyze_Subprogram_Instantiation): Turn off style checking while
4824 analyzing an instance. Whatever style checks that apply to the generic
4825 unit should apply, so it makes no sense to apply them in an instance.
4826 This was causing trouble when compiling an instance of a runtime
4827 unit that violates the -gnatyO switch.
4828 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4829 one of the two case statements, causing spurious errors.
4831 2011-08-02 Robert Dewar <dewar@adacore.com>
4833 * uname.adb: Minor reformatting.
4834 * gnatcmd.adb: Minor reformatting.
4835 * exp_attr.adb: Minor reformatting.
4837 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4839 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4840 No_Dispatching_Calls, do not look for the Assign primitive, because
4841 predefined primitives are not created in this case.
4843 2011-08-02 Bob Duff <duff@adacore.com>
4845 * stylesw.ads: Minor comment fixes.
4847 2011-08-02 Robert Dewar <dewar@adacore.com>
4849 * freeze.adb (Add_To_Result): New procedure.
4851 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4853 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4854 time, if the specific run-time routines for handling streams of strings
4855 are not available, use the default mechanism.
4857 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4859 * s-regpat.ads: Fix typo.
4861 2011-08-02 Vincent Celier <celier@adacore.com>
4863 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4864 not null, call it to create the in memory config project file without
4865 parsing an existing default config project file.
4867 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4869 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4871 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4873 * sem_elim.adb: an abstract subprogram does not need an eliminate
4874 pragma for its descendant to be eliminable.
4876 2011-08-02 Ed Falis <falis@adacore.com>
4878 * init.c: revert to handling before previous checkin for VxWorks
4879 * s-intman-vxworks.adb: delete unnecessary declarations related to
4880 using Ada interrupt facilities for handling signals.
4881 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4882 * s-intman-vxworks.ads: Import __gnat_install_handler as
4883 Initialize_Interrupts.
4884 * s-taprop-vxworks.adb: Delete Signal_Mask.
4885 (Abort_Handler): change construction of mask to unblock exception
4888 2011-08-02 Jerome Guitton <guitton@adacore.com>
4890 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4891 Debug_Raise_Exception before propagation starts.
4893 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4895 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4896 to Restriction_Check_Required.
4897 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4898 * sem_res.adb (Resolve_Call): Likewise.
4899 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4901 2011-08-02 Bob Duff <duff@adacore.com>
4903 * stylesw.ads: Update comment.
4904 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4905 * errout.ads: Remove obsolete comment.
4907 2011-08-02 Javier Miranda <miranda@adacore.com>
4909 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4910 (Set_Is_Safe_To_Reevaluate): new procedure.
4911 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4912 assignment is allowed on safe-to-reevaluate variables.
4913 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4914 temporary created to remove side effects in expressions that use
4915 the secondary stack as safe-to-reevaluate.
4916 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4917 variables that are not true constants.
4919 2011-08-02 Robert Dewar <dewar@adacore.com>
4921 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4922 sem_res.adb, sem_ch6.adb: Minor reformatting.
4924 2011-08-02 Jerome Guitton <guitton@adacore.com>
4926 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4928 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4930 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4931 not set Overridden_Operation if subprogram is an initialization
4934 2011-08-02 Yannick Moy <moy@adacore.com>
4936 * par-ch6.adb: Correct obsolete name in comments
4937 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4938 which takes two message arguments (existing function takes one), with
4939 second message used for continuation.
4940 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4941 block statements that originate from a source block statement, not
4942 generated block statements
4943 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4944 symmetry with procedure case
4945 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4946 function to issue an error in formal mode if a package specification
4947 contains more than one tagged type or type extension.
4948 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4949 parameters matching formals of tagged types are objects (or ancestor
4950 type conversions of objects), not general expressions. Issue an error
4951 on view conversions that are not involving ancestor conversion of an
4953 (Resolve_Type_Conversion): in formal mode, issue an error on the
4954 operand of an ancestor type conversion which is not an object
4955 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4956 procedure so that it works also for actuals of function calls
4957 (Is_Actual_Tagged_Parameter): new function which determines if its
4958 argument is an actual parameter of a formal of tagged type in a
4960 (Is_SPARK_Object_Reference): new function which determines if the tree
4961 referenced by its argument represents an object in SPARK
4963 2011-08-02 Robert Dewar <dewar@adacore.com>
4965 * sem_ch3.adb: Minor reformatting
4966 Minor comment addition
4967 Minor error msg text change
4969 2011-08-02 Javier Miranda <miranda@adacore.com>
4971 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4972 function. Used to be more precise when we generate a variable plus one
4973 assignment to remove side effects in the evaluation of the Bound
4975 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4976 of the bound expression to force its re-analysis and thus expand the
4977 associated transient scope (if required). Code cleanup replacing the
4978 previous code that declared the constant entity by an invocation to
4979 routine Force_Evaluation which centralizes this work in the frontend.
4981 2011-08-02 Robert Dewar <dewar@adacore.com>
4983 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4984 (Base_Type): Now uses improved Is_Base_Type function
4985 * einfo.ads (Base_Type): Inline this function
4987 2011-08-02 Robert Dewar <dewar@adacore.com>
4989 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4990 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4992 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4994 * gcc-interface/Make-lang.in: Update dependencies.
4995 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4998 2011-08-02 Yannick Moy <moy@adacore.com>
5000 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5001 non-simple expression used in delta constraint
5002 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5003 index constraint which is not a subtype mark
5004 * par.adb: With and use Restrict
5005 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5006 mode on component type which is not a subtype mark and default
5007 expression on component
5008 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5009 of string which does not have a lower index bound equal to 1
5010 (Array_Type_Declaration): issue an error in formal mode on index or
5011 component type which is not a subtype mark, and on aliased keyword on
5013 (Derived_Type_Declaration): issue an error in formal mode on interface,
5014 limited or abstract type
5015 (Record_Type_Declaration): issue an error in formal mode on interface
5016 (Record_Type_Definition): issue an error in formal mode on tagged types
5017 and type extensions not declared in the specification of a library unit
5018 package; on null non-tagged record; on variant part
5020 2011-08-02 Vincent Celier <celier@adacore.com>
5022 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5023 not declared for qualified library project when Library_Name is not
5024 declared, but Library_Dir is.
5026 2011-08-02 Robert Dewar <dewar@adacore.com>
5028 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5029 pragmas (affects aspects [Component_]Default_Value
5030 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5031 component type for the resolution
5033 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5035 * einfo.adb (Base_Type): Tune implementation for speed.
5037 2011-08-02 Robert Dewar <dewar@adacore.com>
5039 * freeze.adb: Minor reformatting.
5041 2011-08-02 Thomas Quinot <quinot@adacore.com>
5043 * scos.ads: Update comments.
5045 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5047 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5048 base type, because the parent may be a subtype of a private type whose
5049 convention is established in a private part.
5051 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5053 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5054 statement in a block when the expansion of the return expression has
5055 created a finalization chain.
5056 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5057 with the parent node.
5058 Add N_Extended_Return_Statement to handle the case where a transient
5059 object declaration appears in the Return_Object_Declarations list of
5060 an extended return statement.
5062 2011-08-02 Matthew Gingell <gingell@adacore.com>
5064 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5065 unused parameter 'name'.
5067 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5069 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5070 inherited operation, check whether its alias, which is the source
5071 operastion that it renames, has been marked eliminated.
5073 2011-08-02 Javier Miranda <miranda@adacore.com>
5075 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5076 in-mode parameter whose type is an access type since it can be used to
5077 modify its designated object. Enforce code that handles as safe an
5078 access type that is not access-to-constant but it is the result of a
5079 previous removal of side-effects.
5080 (Remove_Side_Effects): Minor code reorganization of cases which require
5081 no action. Done to incorporate documentation on new cases uncovered
5082 working in this ticket: no action needed if this routine was invoked
5083 too early and the nodes are not yet decorated.
5084 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5085 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5086 were issued with actuals that are implicitly provided by
5089 2011-08-02 Robert Dewar <dewar@adacore.com>
5091 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5093 2011-08-02 Yannick Moy <moy@adacore.com>
5095 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5096 to issue an error in formal mode on attribute not supported in this mode
5097 (Analyze_Attribute): issue errors on standard attributes not supported
5099 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5100 comment, and issue error in formal mode on modulus which is not a power
5102 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5104 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5106 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5107 operator on modular type (except 'not').
5109 2011-08-02 Robert Dewar <dewar@adacore.com>
5111 * gnat_rm.texi: Minor reformatting.
5113 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5115 * s-osinte-linux.ads: Minor comment update and reformatting.
5116 * i-cexten.ads: Make this unit pure, as for its parent.
5117 Will allow its usage in more contexts if needed.
5119 2011-08-02 Robert Dewar <dewar@adacore.com>
5121 * s-utf_32.ads: Minor comment fix.
5123 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5125 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5126 operation of a tagged synchronized type, handle the case where the
5127 controlling argument is overloaded.
5129 2011-08-02 Yannick Moy <moy@adacore.com>
5131 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5132 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5133 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5134 SPARK mode and formal verification mode on processing SPARK restriction
5135 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5136 requiring consistency checking.
5138 2011-08-02 Robert Dewar <dewar@adacore.com>
5140 * sem_res.adb: Minor reformatting.
5142 2011-08-02 Robert Dewar <dewar@adacore.com>
5144 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5145 a-cforse.ads: Remove unneeded with of Ada.Containers
5146 Remove commented out pragma Inline's
5147 Move specifications of new subprograms to the actual specs
5149 2011-08-02 Yannick Moy <moy@adacore.com>
5151 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5152 a-cforse.ads: Update comments.
5154 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5156 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5158 2011-08-02 Robert Dewar <dewar@adacore.com>
5160 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5161 a-cforse.ads, a-cofove.ads: Minor reformatting.
5163 2011-08-02 Claire Dross <dross@adacore.com>
5165 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5166 a-cofove.ads: Add comments.
5168 2011-08-02 Yannick Moy <moy@adacore.com>
5170 * gnat_rm.texi: Document formal containers.
5172 2011-08-02 Emmanuel Briot <briot@adacore.com>
5174 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5177 2011-08-02 Robert Dewar <dewar@adacore.com>
5179 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5182 2011-08-02 Robert Dewar <dewar@adacore.com>
5184 * aspects.adb: New aspects Default_Value and Default_Component_Value
5185 New format of Aspect_Names table checks for omitted entries
5186 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5187 handling of boolean aspects for derived types.
5188 New aspects Default_Value and Default_Component_Value
5189 New format of Aspect_Names table checks for omitted entries
5190 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5191 (Has_Default_Value): New flag
5192 (Has_Default_Component_Value): New flag
5193 (Has_Default_Value): New flag
5194 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5196 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5197 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5198 Default_Value and Default_Component_Value
5199 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5200 New aspects Default_Value and Default_Component_Value
5201 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5202 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5204 2011-08-02 Vincent Celier <celier@adacore.com>
5206 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5207 inherit library kind.
5209 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5211 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5214 2011-08-02 Robert Dewar <dewar@adacore.com>
5216 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5218 2011-08-02 Yannick Moy <moy@adacore.com>
5220 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5222 2011-08-02 Robert Dewar <dewar@adacore.com>
5224 * impunit.adb: Add comment.
5226 2011-08-02 Yannick Moy <moy@adacore.com>
5228 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5229 qualification of aggregates in formal mode
5230 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5232 (Resolve_Aggregate): complete the test that an aggregate is adequately
5233 qualified in formal mode
5235 2011-08-02 Pascal Obry <obry@adacore.com>
5237 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5238 * mlib-prj.adb: Supress warning when compiling binder generated file.
5239 (Build_Library): Supress all warnings when compiling the binder
5242 2011-08-02 Yannick Moy <moy@adacore.com>
5244 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5246 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5247 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5248 Add with/use clauses to make Check_Formal_Restriction visible
5250 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5252 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5253 in-parameters when type of the generic formal is private in the generic
5254 spec and non-private in the body.
5256 2011-08-02 Claire Dross <dross@adacore.com>
5258 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5259 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5260 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5261 * impunit.adb, Makefile.rtl: Take new files into account.
5263 2011-08-02 Robert Dewar <dewar@adacore.com>
5265 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5266 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5268 2011-08-02 Yannick Moy <moy@adacore.com>
5270 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5272 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5273 matching static array bounds, taking into account the special case of
5275 * sem_ch3.adb: Typo in comment.
5277 2011-08-02 Yannick Moy <moy@adacore.com>
5279 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5280 which issues an error in formal mode if its argument node is originally
5282 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5283 has a discriminant specification so that it does not include the case
5285 (Derived_Type_Declaration): move here the test that a derived type has a
5286 discriminant specification
5287 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5288 first element of a component association before accessing its choices
5289 (presence of component association is not enough)
5290 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5291 declaration is a library item before accessing the next element in a
5292 list, as library items are not member of lists
5293 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5294 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5295 Check_Formal_Restriction whenever possible.
5297 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5299 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5300 reference when needed.
5302 2011-08-02 Bob Duff <duff@adacore.com>
5304 * gnat_ugn.texi: Fix typo.
5306 2011-08-02 Vincent Celier <celier@adacore.com>
5308 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5309 archive file name. Do not use the full path name of archives for Open
5312 2011-08-02 Robert Dewar <dewar@adacore.com>
5314 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5315 Analyze_Aspect_Specifications
5317 (Analyze_Aspect_Specifications): New handling for boolean aspects
5318 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5319 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5320 sequence for Analyze_Aspect_Specifications
5321 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5322 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5324 2011-08-02 Robert Dewar <dewar@adacore.com>
5326 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5327 aspects, since these no longer exist.
5329 2011-08-02 Robert Dewar <dewar@adacore.com>
5331 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5332 semicolon, do not try to see if there are aspects following it.
5333 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5336 2011-08-02 Robert Dewar <dewar@adacore.com>
5338 * sem_ch8.adb, aspects.ads: Minor reformatting.
5340 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5342 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5343 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5345 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5347 2011-08-02 Yannick Moy <moy@adacore.com>
5349 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5350 mode on subprogram declaration outside of package specification, unless
5351 it is followed by a pragma Import
5352 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5353 Access_Type_Declaration): issue error in formal mode on access type
5354 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5356 (Analyze_Object_Declaration): issue error in formal mode on object
5357 declaration which does not respect SPARK restrictions
5358 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5359 declaration which does not respect SPARK restrictions
5360 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5361 error in formal mode on digits or delta constraint
5362 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5363 decimal fixed point type
5364 (Derived_Type_Declaration): issue error in formal mode on derived type
5365 other than type extensions of tagged record types
5366 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5367 with check on access definition
5368 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5369 mode on protected definition.
5370 (Analyze_Task_Definition): issue error in formal mode on task definition
5372 2011-08-02 Robert Dewar <dewar@adacore.com>
5374 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5376 2011-08-02 Javier Miranda <miranda@adacore.com>
5378 * sem_ch6.adb (Can_Override_Operator): New function.
5379 (Verify_Overriding_Indicator): Add missing code to check overriding
5380 indicator in operators. Fixes regression.
5381 (Check_Overriding_Indicator): Minor reformating after replacing the
5382 code that evaluates if the subprogram can override an operator by
5383 invocations to the above new function.
5385 (Write_Field26_Name): Add missing code to ensure that, following
5386 the documentation in einfo.ads, this field is not shown as attribute
5387 "Static_Initialization" on non-dispatching functions.
5389 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5391 * sem_res.adb (Resolve_Call): A call to
5392 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5393 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5394 i.e., when the second parameter is of type Time_Span.
5396 2011-08-02 Vincent Celier <celier@adacore.com>
5398 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5399 with an archive instead of -L<library dir> -l<library name>.
5401 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5403 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5404 mark the base types In_Use in addition to making the operations
5407 2011-08-02 Ed Falis <falis@adacore.com>
5409 * init.c: add and setup __gnat_signal_mask for the exception signals
5410 * s-inmaop-vxworks.adb: new file.
5411 * s-intman-vxworks.adb: remove unnecessary initializations and
5413 * s-intman-vxworks.ads: remove unnecessary variable
5414 * s-taprop-vxworks.adb: simplify signal initialization
5416 2011-08-02 Robert Dewar <dewar@adacore.com>
5418 * sem_ch8.adb: Minor code reorganization, comment updates.
5420 2011-08-02 Robert Dewar <dewar@adacore.com>
5422 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5423 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5425 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5426 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5428 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5430 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5431 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5432 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5433 use_type_clauses, to handle more efficiently use_type and use_all_type
5435 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5436 Ada2012 Use_All_Type clause.
5437 (Use_Class_Wide_Operations): new procedure.
5439 2011-08-02 Robert Dewar <dewar@adacore.com>
5441 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5442 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5443 expression to expression function.
5445 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5447 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5448 if types are compatible.
5450 2011-08-02 Yannick Moy <moy@adacore.com>
5452 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5453 returns True if its argument array types have same dimension and same
5454 static bounds at each index.
5455 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5456 OUT or IN OUT paramaters which are not view conversions in SPARK.
5457 (Resolve_Arithmetic_Op): issue an error in formal mode on
5458 multiplication or division with operands of fixed point types which are
5459 not qualified or explicitly converted.
5460 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5461 Boolean or array type (except String) operands.
5462 (Resolve_Equality_Op): issue an error in formal mode on equality
5463 operators for array types other than String with non-matching static
5465 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5466 for array types with non-matching static bounds. Factorize the code in
5467 Matching_Static_Array_Bounds.
5468 (Resolve_Qualified_Expression): issue an error in formal mode on
5469 qualified expressions for array types with non-matching static bounds.
5470 (Resolve_Type_Conversion): issue an error in formal mode on type
5471 conversion for array types with non-matching static bounds
5473 2011-08-02 Robert Dewar <dewar@adacore.com>
5475 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5477 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5479 * par-ch9.adb: save location of entry for proper error message.
5481 2011-08-02 Javier Miranda <miranda@adacore.com>
5483 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5484 (Use_Full_View) which permits this routine to climb through the
5485 ancestors using the full-view of private parents.
5486 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5487 Use_Full_View to true in calls to Is_Ancestor.
5488 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5489 true in call to Is_Ancestor.
5490 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5491 Use_Full_View to true in call to Is_Ancestor.
5492 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5493 call to Is_Ancestor.
5494 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5495 Use_Full_View to true in calls to Is_Ancestor.
5496 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5497 Make_Select_Specific_Data_Table, Register_Primitive,
5498 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5499 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5500 to true in call to Is_Ancestor.
5501 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5502 Use_Full_View to true in calls to Is_Ancestor.
5504 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5505 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5507 2011-08-02 Robert Dewar <dewar@adacore.com>
5509 * gnat_rm.texi: Minor reformatting.
5510 * sem_prag.adb: Minor reformatting.
5512 2011-08-02 Tristan Gingold <gingold@adacore.com>
5514 * vms_data.ads: Add VMS qualifier for -gnateP.
5516 2011-08-02 Robert Dewar <dewar@adacore.com>
5518 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5519 * par-ch7.adb (P_Package): Proper placement of aspects for package
5521 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5522 (End_Statements): Add Is_Sloc parameterr
5523 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5524 (Check_End): Ad Is_Sloc parameter
5525 (End_Statements): Add Is_Sloc parameterr
5527 2011-08-02 Vincent Celier <celier@adacore.com>
5529 * ug_words: Add VMS qualifier equivalent to -gnateP:
5530 /SYMBOL_PREPROCESSING.
5532 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5534 * gnat-style.texi: For hexadecimal numeric literals the typical
5535 grouping of digits is 4 to represent 2 bytes.
5536 A procedure spec which is split into several lines is indented two
5539 2011-08-02 Yannick Moy <moy@adacore.com>
5541 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5542 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5543 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5545 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5546 choice in array aggregate
5547 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5549 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5550 positional and named aggregate for record, or others in record
5551 aggregate, or multiple choice in record aggregate
5552 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5553 array operands to logical operations AND, OR and XOR do not have the
5554 same static lower and higher bounds
5555 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5557 2011-08-01 Robert Dewar <dewar@adacore.com>
5559 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5560 Replaces Last_Source_Node_In_Sequence.
5561 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5562 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5563 parens and blank in string (this was inconsistently implemented).
5565 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5566 blank in string (this was inconsistently implemented).
5568 (Set_Global_Switches): Set formal mode switches appropriately
5569 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5571 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5572 call Set_Error_Msg_Lang to set "spark" as language name.
5573 * par.adb: Remove unnecessary call to set formal language for errout
5574 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5575 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5577 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5578 calls to it, moved after resolution so that types are known
5579 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5580 result of concatenation is not of type String
5581 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5582 concatenation is not properly restricted
5583 * gnat_rm.texi: Add doc on pragma Spark_95.
5584 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5585 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5586 * gcc-interface/Make-lang.in: Update dependencies.
5588 2011-08-01 Javier Miranda <miranda@adacore.com>
5590 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5591 condition that detects if the overridden operation must replace an
5594 2011-08-01 Javier Miranda <miranda@adacore.com>
5596 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5597 code declarations inserted by Insert_Actions in each alternative of the
5598 N_Case_Expression node.
5600 2011-08-01 Robert Dewar <dewar@adacore.com>
5602 * sem_ch6.adb: Minor code reorganization.
5603 * sem_util.adb: Minor reformatting.
5605 2011-08-01 Pascal Obry <obry@adacore.com>
5607 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5608 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5610 2011-08-01 Yannick Moy <moy@adacore.com>
5612 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5613 literal or operator symbol which is prefixed
5614 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5615 mode on access attributes.
5616 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5617 that concatenation operands are properly restricted in formal mode
5618 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5619 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5620 result of the concatenation has a type different from String.
5621 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5622 Analyze_Quantified_Expression, Analyze_Slice,
5623 Analyze_Null): issue an error in formal mode on unsupported constructs
5625 (Analyze_Block_Statement): only issue error on source block statement
5626 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5627 function which returns the last node in a list of nodes for which
5628 Comes_From_Source returns True, if any
5629 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5630 Last_Source_Node_In_Sequence
5631 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5632 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5633 mode on unsupported constructs
5634 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5635 rest of the actions may be needed later on since the error is marked as
5637 * sinfo.ads: Typos in comments.
5639 2011-08-01 Pascal Obry <obry@adacore.com>
5641 * projects.texi: Minor editing.
5643 2011-08-01 Yannick Moy <moy@adacore.com>
5645 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5646 insertion character ~~
5647 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5648 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5649 with insertion character ~~
5650 (Set_Msg_Text): treat insertion character ~~
5651 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5652 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5653 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5654 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5655 errors related to the formal language restriction not serious
5656 (insertion character |).
5657 * par.adb (Par): set formal language for error messages if needed
5658 * sem_ch6.adb (Check_Missing_Return): take into account possible
5659 generated statements at the end of the function
5660 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5661 enumeration value to define a new pragma SPARK_95
5662 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5663 SPARK_Version): new type and variables to store the SPARK version
5665 (SPARK_Mode): return True when SPARK_Version is set
5666 * par-prag.adb: Correct indentation
5667 (Prag): take Pragma_SPARK_95 into account
5668 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5671 2011-08-01 Robert Dewar <dewar@adacore.com>
5673 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5674 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5675 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5677 2011-08-01 Pascal Obry <obry@adacore.com>
5679 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5680 Target_Name to Get_Path call.
5681 (Parse_Single_Project): Likewise.
5682 (Post_Parse_Context_Clause): Likewise.
5683 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5684 Call Initialise_Project_Path with the proper Target_Name.
5685 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5687 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5688 with the proper Target_Name.
5689 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5691 (Parse_Project_And_Apply_Config): Likewise.
5692 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5693 This is fine as this part of the code is supporting only native
5695 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5696 is fine as this part of the code is supporting only native compilation.
5698 2011-08-01 Yannick Moy <moy@adacore.com>
5700 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5701 of homonym, unless the homonym is one of the cases allowed in SPARK
5702 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5703 package declaration occurring after a body.
5705 2011-08-01 Robert Dewar <dewar@adacore.com>
5707 * checks.adb, exp_ch4.adb: Minor reformatting.
5709 2011-08-01 Javier Miranda <miranda@adacore.com>
5711 * einfo.ads (Access_Disp_Table): Fix documentation.
5712 (Dispatch_Table_Wrappers): Fix documentation.
5714 2011-08-01 Pascal Obry <obry@adacore.com>
5716 * prj-env.adb, prj-env.ads: Minor reformatting.
5718 2011-08-01 Yannick Moy <moy@adacore.com>
5720 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5721 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5722 procedures out of these packages.
5723 * errout.ads, errout.adb
5724 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5725 procedures in of this package
5726 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5727 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5728 on misplaced later vs initial declarations, like in Ada 83
5729 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5730 formal mode on attribute of private type whose full type declaration
5732 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5733 package declaration inside a package specification
5734 (Analyze_Full_Type_Declaration): issue error in formal mode on
5735 controlled type or discriminant type
5736 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5737 user-defined operator means that it should come from the source
5738 (New_Overloaded_Entity): issue error in formal mode on overloaded
5740 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5742 2011-08-01 Thomas Quinot <quinot@adacore.com>
5744 * atree.adb: Minor reformatting.
5745 * checks.adb: Minor reformatting.
5747 2011-08-01 Vincent Celier <celier@adacore.com>
5749 * s-parame-vms-ia64.ads: Fix typo in comment
5751 * s-parame-vms-restrict.ads: Removed, unused.
5753 2011-08-01 Javier Miranda <miranda@adacore.com>
5756 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5758 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5759 * sem_ch3.ads, sem_ch3.adb
5760 (Is_Constant_Bound): New extended version of the subprogram that was
5761 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5762 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5763 * sem_aux.ads (Constant_Value): Fix typo in comment.
5764 * checks.adb (Generate_Index_Checks): New implementation which, for
5765 array objects with constant bounds, generates the runtime check
5766 referencing the bounds of the array type. For other cases this routine
5767 provides its previous behavior obtaining such values from the array
5769 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5771 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5772 we cannot have semantic interpretations of the new node.
5774 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5776 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5779 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5781 * sem_ch8.adb: Minor code editing.
5782 * s-vxwext.adb: Remove trailing space.
5783 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5784 consistency with other files.
5786 2011-08-01 Thomas Quinot <quinot@adacore.com>
5788 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5790 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5792 * par-ch10.adb: reject parameterized expressions as compilation unit.
5793 * sem_ch4.adb: handle properly conditional expression with overloaded
5794 then_clause and no else_clause.
5796 2011-08-01 Tristan Gingold <gingold@adacore.com>
5798 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5799 like done by System.Aux_DEC.
5800 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5802 2011-08-01 Yannick Moy <moy@adacore.com>
5804 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5805 missing label at end of declaration (subprogram or package)
5806 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5807 of positional and named parameter association
5808 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5809 Error_Msg_SP which adds a prefix to the error message giving the name
5810 of the formal language analyzed
5811 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5812 access result type in subprogram, unconstrained array as result type,.
5813 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5815 * sem_ch8.adb: Code clean up.
5817 2011-08-01 Javier Miranda <miranda@adacore.com>
5819 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5820 * einfo.ads (Access_Disp_Table): Fix documentation.
5821 (Dispatch_Table_Wrappers): Fix documentation.
5822 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5823 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5824 to enforce the documentation of this attribute.
5825 (Set_Is_Interface): Cleanup the assertion.
5826 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5827 the Underlying_Type entity before reading attribute Access_Disp_Table.
5828 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5829 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5830 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5831 the Underlying_Type entity before reading attribute Access_Disp_Table.
5832 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5833 Locate the Underlying_Type entity before reading attribute
5836 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5838 * s-poosiz.ads: Additional overriding indicators.
5840 2011-08-01 Yannick Moy <moy@adacore.com>
5842 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5844 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5845 parameter specification does not include a subtype mark.
5846 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5847 formal mode on abstract subprogram.
5848 (Analyze_Subprogram_Specification): issue error in formal mode on
5849 user-defined operator.
5850 (Process_Formals): issue error in formal mode on access parameter and
5852 * sem_ch9.adb (Analyze_Abort_Statement,
5853 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5854 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5855 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5856 Analyze_Requeue, Analyze_Selective_Accept,
5857 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5858 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5859 issue error in formal mode on user-defined raise statement.
5861 2011-08-01 Thomas Quinot <quinot@adacore.com>
5863 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5864 declaration being hidden when overriding an implicit inherited
5866 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5867 (-gnats), do not complain about a source file that contains only a
5870 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5872 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5873 variable if already set.
5875 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5877 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5878 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5879 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5880 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5881 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5882 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5883 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5884 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5885 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5886 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5887 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5888 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5889 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5890 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5891 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5892 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5893 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5894 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5895 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5896 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5897 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5898 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5899 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5900 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5901 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5902 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5903 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5904 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5905 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5906 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5907 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5908 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5909 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5910 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5911 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5912 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5913 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5914 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5915 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5916 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5917 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5918 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5919 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5920 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5921 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5922 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5923 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5924 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5925 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5926 Use GNAT instead of GNARL.
5928 2011-08-01 Bob Duff <duff@adacore.com>
5930 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5931 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5932 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5935 2011-08-01 Yannick Moy <moy@adacore.com>
5937 * debug.adb (d.D) reverve flag for the SPARK mode
5938 (d.E) reverve flag for SPARK generation mode
5939 (d.F) reverve flag for Why generation mode
5940 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5941 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5942 functions which return True when the corresponding modes are set
5943 (Formal_Language): return "spark" or "alfa" when in formal verification
5945 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5946 Error_Msg to prefix the error message with a tag giving the formal
5948 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5949 message with a tag giving the formal language
5950 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5952 (Analyze_Case_Statement): issue error in formal mode on case statement
5953 with a single "others" case alternative
5954 (Analyze_Exit_Statement): issue errors in formal mode on exit
5955 statements which do not respect SPARK restrictions
5956 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5957 (Check_Unreachable_Code): always issue an error (not a warning) in
5958 formal mode on unreachable code (concerns both code after an infinite
5959 loop and after an unconditional jump, both not allowed in SPARK)
5960 * sem_ch6.adb (Analyze_Return_Statement): add call to
5961 Set_Return_Present for a procedure containing a return statement
5962 (already done for functions in Analyze_Function_Return)
5963 (Analyze_Function_Return): issue error in formal mode on extended
5964 return or if return is not last statement in function
5965 (Check_Missing_Return): issue error in formal mode if function does
5966 not end with return or if procedure contains a return
5967 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5968 function to detect if there is an inner scope of its parameter S which
5971 2011-08-01 Thomas Quinot <quinot@adacore.com>
5973 * sem_ch6.ads: Minor reformatting.
5975 2011-08-01 Javier Miranda <miranda@adacore.com>
5977 * sem_util.adb (Abstract_Interface_List): Complete condition when
5978 processing private type declarations to avoid reading unavailable
5980 (Is_Synchronized_Tagged_Type): Complete condition when processing
5981 private extension declaration nodes to avoid reading unavailable
5984 2011-08-01 Thomas Quinot <quinot@adacore.com>
5986 * sem_ch3.adb: Minor reformatting.
5988 2011-08-01 Thomas Quinot <quinot@adacore.com>
5990 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5991 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5992 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5993 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5994 for VMS, instead parametrize the common implementation with
5995 System.Parameters declarations.
5997 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5999 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6001 2011-08-01 Tristan Gingold <gingold@adacore.com>
6003 * seh_init.c: Fix SEH handler installation on win64.
6005 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6007 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6008 double analysis of an anonymous access to subprogram, because it can
6009 lead to improper sharing of profiles and a back-end crash.
6011 2011-08-01 Robert Dewar <dewar@adacore.com>
6013 * make.adb, sem_ch4.adb: Minor reformatting.
6014 * gcc-interface/Make-lang.in: Update dependencies.
6015 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6017 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6019 * gnat_rm.texi: Fix definition of Long_Integer.
6021 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6023 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6024 to prevent storage exhaustion.
6025 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6026 finalized is a function body, insert the cleanup code before the final
6027 return statement, to prevent spurious warnings.
6028 * s-pooglo.ads: add overriding indicator.
6030 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6032 * sem_ch4.adb (Operator_Check): improve error message when both a
6033 with_clause and a use_clause are needed to make operator usage legal.
6034 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6035 determine whether a compilation unit is visible within an other,
6036 either through a with_clause in the current unit, or a with_clause in
6037 its library unit or one one of its parents.
6039 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6041 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6042 over an arbitrary expression of an array or container type.
6043 * lib-xref.adb: clarify comment.
6045 2011-08-01 Bob Duff <duff@adacore.com>
6047 * einfo.ads: Minor reformatting.
6048 * debug.adb: Minor comment improvement.
6050 2011-08-01 Javier Miranda <miranda@adacore.com>
6052 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6053 consider hidden subprograms as valid candidates.
6055 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6057 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6059 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6061 * gnat_ugn.texi: Fix typo.
6063 2011-08-01 Robert Dewar <dewar@adacore.com>
6065 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6066 lib-xref.adb: Minor reformatting
6068 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6070 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6071 when to generate a call to Move_Final_List.
6072 (Has_Controlled_Parts): Remove this function.
6074 2011-08-01 Geert Bosch <bosch@adacore.com>
6076 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6079 2011-08-01 Thomas Quinot <quinot@adacore.com>
6081 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6082 explicit raise of a predefined exception as Comes_From_Source if the
6083 original N_Raise_Statement comes from source.
6085 2011-08-01 Robert Dewar <dewar@adacore.com>
6087 * sinfo.ads: Add comment.
6088 * sem_ch6.adb: Minor reformatting.
6090 2011-08-01 Robert Dewar <dewar@adacore.com>
6092 * freeze.adb (Freeze_Entity): Refine check for bad component size
6093 clause to avoid rejecting confirming clause when atomic/aliased present.
6095 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6097 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6098 better determine whether an entity reference is a write.
6099 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6101 * lib-xref.adb (Output_References): Do no suppress a read reference at
6102 the same location as an immediately preceeding modify-reference, to
6103 handle properly in-out actuals.
6105 2011-08-01 Tristan Gingold <gingold@adacore.com>
6107 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6109 2011-08-01 Quentin Ochem <ochem@adacore.com>
6111 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6112 heap to compute the result.
6114 2011-08-01 Robert Dewar <dewar@adacore.com>
6116 * atree.ads: Minor reformatting.
6118 2011-08-01 Emmanuel Briot <briot@adacore.com>
6120 * g-expect.adb (Get_Command_Output): Fix memory leak.
6122 2011-08-01 Geert Bosch <bosch@adacore.com>
6124 * cstand.adb (P_Float_Type): New procedure to print the definition of
6125 predefined fpt types.
6126 (P_Mixed_Name): New procedure to print a name using mixed case
6127 (Print_Standard): Use P_Float_Type for printing floating point types
6128 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6129 precision IEEE float.
6131 2011-08-01 Thomas Quinot <quinot@adacore.com>
6133 * sem_ch3.adb: Minor reformatting.
6135 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6137 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6138 the completion of a generic function, insert the new body rather than
6139 rewriting the original.
6141 2011-08-01 Yannick Moy <moy@adacore.com>
6143 * sinfo.ads, errout.ads: Typos in comments.
6145 2011-08-01 Robert Dewar <dewar@adacore.com>
6147 * par-endh.adb: Minor reformatting.
6149 2011-08-01 Robert Dewar <dewar@adacore.com>
6151 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6152 (Pre_Post_Aspects): New subtype.
6153 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6154 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6155 * par-ch7.adb (P_Package): Remove Decl parameter
6156 (P_Package): Handle new syntax for aspects (before IS)
6157 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6159 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6160 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6161 (P_Package): Remove Decl parameter
6162 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6164 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6166 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6167 * sinfo.ads: Document new syntax for aspects in packages etc.
6168 * sprint.adb: Handle new syntax of aspects before IS in package
6170 2011-08-01 Thomas Quinot <quinot@adacore.com>
6172 * atree.ads: Minor reformatting.
6173 * sem_prag.adb: Minor reformatting.
6175 2011-08-01 Robert Dewar <dewar@adacore.com>
6177 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6178 case expr alternative.
6180 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6182 * sem_ch12.adb: Fix typo.
6184 2011-08-01 Geert Bosch <bosch@adacore.com>
6186 * sem_prag.adb (Check_No_Link_Name): New procedure.
6187 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6188 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6189 instead of Standard_Long_Long_Float_Size global. Preparation for
6190 eventual removal of per type constants.
6191 * exp_util.ads (Get_Stream_Size): New function returning the stream
6192 size value of subtype E.
6193 * exp_util.adb (Get_Stream_Size): Implement new function.
6194 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6196 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6198 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6200 2011-08-01 Geert Bosch <bosch@adacore.com>
6202 * cstand.adb: Fix comments.
6203 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6206 2011-08-01 Robert Dewar <dewar@adacore.com>
6208 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6210 2011-08-01 Geert Bosch <bosch@adacore.com>
6212 * atree.ads: Fix comment.
6214 2011-08-01 Robert Dewar <dewar@adacore.com>
6216 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6217 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6218 * par.adb: Add with for Namet.Sp.
6219 * par-tchk.adb: Minor reformatting.
6221 2011-08-01 Vincent Celier <celier@adacore.com>
6223 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6224 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6225 of the init procedure of a SAL.
6226 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6229 2011-08-01 Thomas Quinot <quinot@adacore.com>
6231 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6234 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6236 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6238 2011-08-01 Thomas Quinot <quinot@adacore.com>
6240 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6241 conformant with its spec (return True only for types that have
6242 an overriding Initialize primitive operation that prevents them from
6243 having preelaborable initialization).
6244 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6245 initialization for controlled types in Ada 2005 or later mode.
6247 2011-08-01 Robert Dewar <dewar@adacore.com>
6249 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6251 (Same_Aspect): New function.
6252 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6253 Type_Invariant, Precondition, Postcondition.
6254 * snames.ads-tmpl: Add Name_Type_Invariant.
6256 2011-08-01 Robert Dewar <dewar@adacore.com>
6258 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6260 (Freeze_All_Ent): Fix error in handling inherited aspects.
6261 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6262 already analyzed, but don't skip entire processing of a declaration,
6263 that's wrong in some cases of declarations being rewritten.
6264 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6265 Don't delay for integer, string literals
6266 Treat predicates in usual manner for delay, remove special case code,
6268 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6269 (Build_Predicate_Function): Update saved expression in aspect
6270 (Build_Invariant_Procedure): Update saved expression in aspect
6271 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6272 of replacement of discriminant references if the reference is simple.
6274 2011-08-01 Robert Dewar <dewar@adacore.com>
6276 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6277 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6278 Static_Predicate and Dynamic_Predicate.
6279 (Build_Predicate_Function): Add processing for Static_Predicate
6280 and Dynamic_Predicate.
6281 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6282 (From_Static_Predicate): New flag
6283 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6285 2011-08-01 Robert Dewar <dewar@adacore.com>
6287 * usage.adb: Documentation cleanup for Ada version modes in usage.
6288 * expander.adb: Minor reformatting.
6290 2011-08-01 Robert Dewar <dewar@adacore.com>
6292 * atree.ads: Minor comment fix.
6293 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6294 a-witeio.ads, sem_prag.adb: Minor reformatting.
6296 2011-08-01 Doug Rupp <rupp@adacore.com>
6298 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6299 pointers. Use descrip.h header file for convenience. Add some
6302 2011-08-01 Robert Dewar <dewar@adacore.com>
6304 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6305 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6306 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6308 (Check_Aspect_At_End_Of_Declarations): New procedure
6309 (Analye_Aspect_Specification): Minor changes for above procedures
6310 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6311 specification node as well.
6313 2011-08-01 Pascal Obry <obry@adacore.com>
6315 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6316 Windows files. Use GetFilesAttributes() in this case to check for file
6317 existence instead of returning with an error code.
6319 2011-08-01 Vincent Celier <celier@adacore.com>
6321 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6322 High is above Source length.
6324 2011-08-01 Robert Dewar <dewar@adacore.com>
6326 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6328 2011-08-01 Robert Dewar <dewar@adacore.com>
6330 * aspects.ads (Boolean_Aspects): New subtype.
6331 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6332 for derived types in cases where the parent type and derived type have
6334 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6335 with aspects when parent type also has aspects.
6336 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6337 boolean expression at this point).
6338 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6339 accordance with final decision on the Ada 2012 feature.
6340 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6342 2011-08-01 Matthew Heaney <heaney@adacore.com>
6344 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6346 2011-08-01 Pascal Obry <obry@adacore.com>
6348 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6349 Fix Replace_Slice when High is above current string size.
6350 (Replace_Slice): Fix DL computation when High is above current
6353 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6355 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6357 2011-08-01 Matthew Heaney <heaney@adacore.com>
6359 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6362 2011-08-01 Pascal Obry <obry@adacore.com>
6364 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6367 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6369 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6370 access to protected subprograms in generic bodies.
6371 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6372 protected type, indicate that the convention of the subprogram is
6373 Convention_Protected, because it may be used in subsequent declarations
6374 within the protected declaration.
6376 2011-08-01 Vincent Celier <celier@adacore.com>
6378 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6379 and "final" procedures when the name of the library is "ada", to avoid
6380 duplicate symbols "adainit" and "adafinal" in executables.
6382 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6384 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6385 quantified expression that appears within a postcondition and uses the
6386 Ada2012 'Result attribute.
6388 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6390 * init.c (__gnat_error_handler): Cast reason to int.
6391 (__gnat_install_handler): Explain sa_sigaction use.
6393 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6395 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6396 subprogram has copy-in copy-out parameters, try to promote the mode of
6397 the return type if it is passed in registers.
6399 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6401 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6402 left operand as addressable.
6404 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6406 * gcc-interface/gigi.h (build_function_stub): Remove.
6407 (build_return_expr): Likewise.
6408 (convert_vms_descriptor): Declare.
6409 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6410 (build_function_stub): Move to...
6411 * gcc-interface/utils2.c (build_return_expr): Move to...
6412 * gcc-interface/trans.c (build_function_stub): ...here.
6413 (build_return_expr): ...here.
6414 (Subprogram_Body_to_gnu): Add local variable for language_function.
6415 Disconnect the parameter attributes cache, if any, once done with it.
6416 Call end_subprog_body only after setting the end_locus.
6417 Build the stub associated with the function, if any, at the very end.
6418 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6419 variables and streamline control flow.
6421 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6424 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6427 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6430 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6431 Assign to act.sa_sigaction.
6432 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6433 current->return_address to char * before arithmetic.
6435 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6437 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6438 Correct argument types.
6439 Extract code from reason.
6440 (__gnat_install_handler): Assign to act.sa_sigaction.
6442 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6444 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6445 (GNAT1_OBJS): ...here.
6447 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6450 * g-socthi-mingw.adb (Fill): Fix formatting.
6452 * gcc-interface/gigi.h: Move around comment.
6454 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6457 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6459 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6462 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6464 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6466 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6467 range comparison if Pmode is SImode.
6469 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6470 Eric Botcazou <ebotcazou@adacore.com>
6472 * adadecode.c: Wrap up in extern "C" block.
6473 * adadecode.h: Likewise.
6474 * adaint.c: Likewise. Remove 'const' keyword.
6475 * adaint.h: Likewise.
6477 * atree.h: Likewise.
6479 * cstreams.c: Likewise.
6483 * final.c: Likewise.
6485 * initialize.c: Likewise.
6487 * namet.h: Likewise.
6488 * nlists.h: Likewise.
6489 * raise.c: Likewise.
6490 * raise.h: Likewise.
6491 * repinfo.h: Likewise.
6492 * seh_init.c: Likewise.
6493 * targext.c: Likewise.
6494 * tracebak.c: Likewise.
6495 * uintp.h: Likewise.
6496 * urealp.h: Likewise.
6497 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6498 * xsinfo.adb: Likewise.
6499 * xsnamest.adb: Likewise.
6500 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6501 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6502 * gcc-interface/misc.c: Likewise.
6503 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6504 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6505 ada/targext.o here...
6506 (GNAT_ADA_OBJS): ...and not here.
6507 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6508 (GNATBIND_OBJS): Reorder.
6510 2011-07-07 Richard Henderson <rth@redhat.com>
6512 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6513 dwarf2out_frame_init.
6515 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6517 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6519 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6522 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6524 2011-07-06 Richard Guenther <rguenther@suse.de>
6526 * gcc-interface/misc.c (gnat_init): Merge calls to
6527 build_common_tree_nodes and build_common_tree_nodes_2.
6528 Re-initialize boolean_false_node.
6530 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6531 Olivier Hainque <hainque@adacore.com>
6532 Nicolas Setton <setton@adacore.com>
6534 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6535 the type according to the ARTIFICIAL_P parameter.
6536 (create_type_decl): Likewise.
6537 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6539 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6541 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6542 (gnatbind): Likewise.
6544 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6546 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6548 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6550 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6551 local variable throughout. Remove useless call to Base_Type.
6552 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6553 Take it also into account for the volatileness of the field. Set the
6554 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6556 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6558 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6559 on a dereference built for a by-ref object if it has an address clause.
6561 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6563 * einfo.ads (Address_Taken): Document use for the second argument of
6564 Asm_Input and Asm_Output attributes.
6565 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6566 argument is an entity name, then set Address_Taken on it.
6567 <Attribute_Asm_Output>: Likewise.
6568 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6569 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6570 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6571 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6573 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6576 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6578 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6580 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6581 (ada/utils.o): Update dependencies.
6582 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6583 ../../../libcpp/libcpp.a.
6584 * gcc-interface/utils.c: Include common/common-target.h.
6585 (process_attributes): Use targetm_common.have_named_sections.
6587 2011-06-07 Richard Guenther <rguenther@suse.de>
6589 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6592 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6594 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6595 TREE_THIS_NOTRAP flag.
6597 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6599 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6602 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6604 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6605 constants whose full view has discriminants specially.
6607 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6609 * gcc-interface/utils.c: Include diagnostic.h.
6610 (gnat_write_global_declarations): Output debug information for all
6611 global type declarations before finalizing the compilation unit.
6612 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6614 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6616 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6618 2011-05-25 Kai Tietz <ktietz@redhat.com>
6620 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6621 initialization instead of const/none-const pointer assignment.
6623 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6625 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6626 $(EXTRA_GNAT1_OBJS).
6627 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6628 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6629 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6630 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6631 libcommon-target.a instead of prefix.o.
6633 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6636 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6638 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6640 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6641 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6642 instead of version.o.
6644 2011-05-18 Kai Tietz <ktietz@redhat.com>
6646 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6647 boolean_false_node instead of integer_zero_node.
6648 (convert_with_check): Likewise.
6649 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6651 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6653 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6654 type of the parameter is an unconstrained array, convert the actual to
6655 the type of the formal in the In Out and Out cases as well.
6657 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6659 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6660 call build_function_type_array or build_varargs_function_type_array
6662 (create_subprog_type): Don't call build_function_type; call
6663 build_function_type_vec instead.
6665 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6667 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6668 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6669 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6671 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6673 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6675 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6676 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6678 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6680 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6682 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6684 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6685 instead of accessing TYPE_ARG_TYPES directly.
6686 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6688 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6691 * gcc-interface/gigi.h (get_variant_part): Declare.
6692 * gcc-interface/decl.c (get_variant_part): Make global.
6693 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6694 types have the same constant size, are record types and T1 has a
6695 variant part while T2 doesn't.
6697 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6699 * gcc-interface/utils.c (begin_subprog_body): Do not call
6701 (end_subprog_body): Likewise.
6703 2011-05-04 Richard Guenther <rguenther@suse.de>
6705 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6707 (pos_to_constructor): Likewise.
6709 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6710 Eric Botcazou <ebotcazou@adacore.com>
6712 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6713 of build_function_type. Adjust calls to...
6714 (build_raise_check): ...this. Do not take a void_tree parameter.
6715 Call build_function_type_list instead of build_function_type.
6716 Fix head comment and swap couple of conditional blocks.
6718 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6720 * gnatvsn.ads (Library_Version): Bump to 4.7.
6721 (Current_Year): Bump to 2011.
6723 2011-04-29 Michael Matz <matz@suse.de>
6725 * gcc-interface/misc.c (gnat_handle_option): Set
6726 warn_maybe_uninitialized.
6728 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6730 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6731 the Watson/McCabe paper.
6733 2011-04-23 Jim Meyering <meyering@redhat.com>
6735 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6737 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6739 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6742 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6744 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6746 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6747 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6748 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6749 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6750 <all>: Do not set flags on the reused DECL node coming from an alias.
6751 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6752 don't need debug info here...
6753 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6754 (gigi): Adjust calls to create_subprog_decl.
6755 (build_raise_check): Likewise.
6756 (establish_gnat_vms_condition_handler): Likewise.
6757 (Compilation_Unit_to_gnu): Likewise.
6758 (gnat_to_gnu): Likewise.
6760 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6762 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6763 (NO_REORDER_ADAFLAGS): New variable.
6764 (EXTRA_GNATTOOLS): Always define.
6765 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6766 Clean up and adjust list of files compiled with special options.
6767 * gcc-interface/Make-lang.in: Likewise.
6768 (ada/decl.o): Cosmetical change.
6769 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6771 2011-04-20 Jim Meyering <meyering@redhat.com>
6773 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6775 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6777 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6778 $(CFLAGS) on the link line.
6780 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6782 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6783 padded type built for the return type if it is unconstrained.
6785 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6787 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6789 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6791 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6792 before calling TREE_CHAIN.
6793 * gcc-interface/misc.c (gnat_init_ts): New function.
6794 (LANG_HOOKS_INIT_TS): Define.
6796 2011-04-12 Martin Jambor <mjambor@suse.cz>
6798 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6799 instead of cgraph_node.
6801 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6803 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6804 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6807 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6809 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6810 of aggregate types that contain a placeholder.
6812 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6814 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6816 (handle_type_generic_attribute): Likewise.
6818 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6821 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6823 2011-04-04 Kai Tietz <ktietz@redhat.com>
6826 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6829 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6831 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6832 type case, do not strip a padding type around the array type.
6834 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6836 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6839 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6841 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6842 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6843 code for -feliminate-unused-debug-types.
6844 (gnat_post_options): Likewise.
6846 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6848 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6849 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6852 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6854 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6855 DECL_ARTIFICIAL flag on enumeration types.
6857 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6859 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6860 fat pointer types artificial unconditionally.
6861 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6864 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6866 * gcc-interface/gigi.h (get_dummy_type): Declare.
6867 (build_dummy_unc_pointer_types): Likewise.
6868 (finish_fat_pointer_type): Likewise.
6869 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6870 fat pointer type has been built, complete it in place.
6871 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6872 and thin pointers. Remove useless variable.
6873 (finish_fat_pointer_type): Make global and move to...
6874 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6875 (get_dummy_type): New function.
6876 (build_dummy_unc_pointer_types): Likewise.
6877 (gnat_pushdecl): Propage the name to the anonymous variants only.
6878 (update_pointer_to): Only adjust the pointer types in the unconstrained
6881 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6883 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6884 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6885 if this is a Taft amendment type and the full declaration is available.
6886 * gcc-interface/trans.c (process_type): Likewise.
6887 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6888 (process_freeze_entity): Likewise.
6889 * gcc-interface/utils.c (dummy_global): New static variable.
6890 (gnat_write_global_declarations): If there are types declared as used
6891 at the global level, insert them in the global hash table.
6893 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6895 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6896 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6897 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6899 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6900 flag of the type accordingly.
6901 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6903 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6905 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6906 finalizing types when updating the pointers to the designated type.
6907 <all>: Finalize the deferred types even if we didn't defer processing
6908 of incomplete types in this invocation.
6910 2011-04-01 Olivier Hainque <hainque@adacore.com>
6911 Nicolas Setton <setton@adacore.com>
6912 Eric Botcazou <ebotcazou@adacore.com>
6914 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6915 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6917 2011-03-28 Kai Tietz <ktietz@redhat.com>
6919 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6921 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6922 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6924 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6926 2011-03-28 Tristan Gingold <gingold@adacore.com>
6929 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6930 Use ada output of gnatbind.
6931 (ada/b_gnatb.adb): Ditto.
6932 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6933 (ada.mostlyclean, ada.stage1)
6934 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6935 (ada.stagefeedback): Adjust.
6936 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6937 Use ada output of gnatbind.
6938 (b_gnatm.adb): Ditto.
6939 (b_gnatl.o, b_gnatm.o): New rules.
6941 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6943 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6944 for the padded type built to support a specified size or alignment.
6946 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6948 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6949 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6950 unconditionally to the end of the unit when the designated type is
6952 <all>: Rename local variable. Attempt to un-defer types only and do it
6953 for limited_with'ed types as well.
6954 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6955 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6956 consistently and remove redundant call to finalize_from_with_types.
6958 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6960 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6961 subprograms without a previous spec declared in the same unit.
6962 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6963 subprograms at the end of the unit instead of at the beginning.
6964 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6965 isn't public for the special handling of non-inline functions nested
6966 inside inline external functions.
6968 2011-03-25 Jeff Law <law@redhat.com>
6970 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6972 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6974 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6975 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6976 to compute Set_Size_Depends_On_Discriminant.
6977 (Layout_Type): Call it on array types in back-end layout mode.
6978 * sem_util.adb (Requires_Transient_Scope): Return true for array
6979 types only if the size depends on the value of discriminants.
6980 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6981 type if the RHS is a call to a function that returns an unconstrained
6982 type with default discriminant.
6984 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6986 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6987 non-conversion to the nominal result type at the end.
6989 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6991 * gcc-interface/trans.c (create_temporary): New function taken from...
6992 (create_init_temporary): ...here. Call it.
6993 (call_to_gnu): Create the temporary for the return value early, if any.
6994 Create it for a function with copy-in/copy-out parameters if there is
6995 no target; in other cases of copy-in/copy-out, use another temporary.
6996 Push the new binding level lazily. Add and rename local variables.
6998 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7000 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7002 (set_rm_size): Likewise.
7004 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7006 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7007 for the padded type built in order to support a specified alignment.
7008 Fix incorrect formatting.
7010 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7013 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7015 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7017 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7018 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7019 to the end of the list. Adjust recursive call. Rename local variable.
7020 If REORDER is true, reorder components of the record type.
7021 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7022 components_to_record and adjust the parameter list.
7024 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7026 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7027 disabled, use the variable for bounds of loop iteration scheme.
7029 2011-03-21 Kai Tietz <ktietz@redhat.com>
7032 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7034 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7036 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7037 out whether the expression is read-only. Short-circuit placeholder
7038 case and rename a couple of local variables.
7040 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7042 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7043 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7044 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7045 (convert): Deal with conversions from a smaller form type specially.
7047 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7049 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7050 its argument, except for the special -I- switch.
7052 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7054 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7057 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7059 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7061 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7063 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7065 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7066 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7067 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7068 Do not generate the check directly, instead instantiate the template
7069 check present in the descriptor.
7070 (make_descriptor_field): Move around.
7071 (build_vms_descriptor32): Build a template check in the POINTER field.
7072 (build_vms_descriptor): Remove useless suffixes.
7073 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7075 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7078 * targext.c: Include target files if IN_RTS is defined.
7080 2011-01-26 Richard Guenther <rguenther@suse.de>
7083 * targext.c: Include config.h.
7084 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7087 2011-01-04 Pascal Obry <obry@adacore.com>
7088 Eric Botcazou <ebotcazou@adacore.com>
7090 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7092 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7094 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7095 end-of-case on the end label and its associated gotos, if any.
7097 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7099 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7100 expressions of the parameter cache within the statement group of
7103 2011-01-04 Olivier Hainque <hainque@adacore.com>
7104 Eric Botcazou <ebotcazou@adacore.com>
7106 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7107 (set_end_locus_from_node): New function.
7108 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7109 make and the function end_locus.
7110 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7111 for the elaboration subprogram.
7112 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7113 set the end_locus of the expression as well.
7115 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7118 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7119 variables that are referenced in exception handlers volatile.
7123 Copyright (C) 2011 Free Software Foundation, Inc.
7125 Copying and distribution of this file, with or without modification,
7126 are permitted in any medium without royalty provided the copyright
7127 notice and this notice are preserved.
7129 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7130 - fix bugs in the description of Source_Trace;
7131 - get rid of UNIT_NAME;
7133 2011-08-02 Javier Miranda <miranda@adacore.com>
7136 (Build_Dispatching_Requeue): Adding support for VM targets
7137 since we cannot directly reference the Tag entity.
7138 * exp_sel.adb (Build_K): Adding support for VM targets.
7139 (Build_S_Assignment): Adding support for VM targets.
7141 (Default_Prim_Op_Position): In VM targets do not restrict availability
7142 of predefined interface primitives to compiling in Ada 2005 mode.
7143 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7144 restricted to compiling in Ada 2005 mode.
7145 (Make_VM_TSD): Generate code that declares and initializes the OSD
7146 record. Needed to support dispatching calls through synchronized
7149 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7150 primitives associated with synchronized interfaces.
7151 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7152 primitives associated with synchronized interfaces.
7154 2011-08-02 Yannick Moy <moy@adacore.com>
7156 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7157 statements hidden in SPARK if preceded by the HIDE directive
7158 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7159 exception handlers as hidden in SPARK if preceded by the HIDE directive
7160 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7161 if starting with the HIDE directive
7162 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7163 starting with the HIDE directive; mark the declarations in a private
7164 part as hidden in SPARK if the private part starts with the HIDE
7166 * restrict.adb, restrict.ads
7167 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7168 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7169 argument node belongs to a part which is hidden in SPARK
7170 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7171 parts in SPARK; protect the possibly costly call to
7172 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7173 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7174 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7175 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7177 (Scan): recognize special comment starting with '#' and followed by
7178 SPARK keyword "hide" as a HIDE directive.
7180 2011-08-02 Yannick Moy <moy@adacore.com>
7182 * types.ads, erroutc.ads: Minor reformatting.
7184 2011-08-02 Vincent Celier <celier@adacore.com>
7186 * link.c: Add response file support for cross platforms.
7188 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7190 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7191 in an association, set parent field of copy before partial analysis.
7192 * sem_res.adb (Resolve_Slice): create reference to itype only when
7193 expansion is enabled.
7195 2011-08-02 Yannick Moy <moy@adacore.com>
7197 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7198 for new flag denoting which subprogram bodies are in ALFA
7199 * restrict.adb, sem_ch7.adb: Update comment
7200 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7201 sem_ch9.adb, sem_res.adb: Add calls to
7202 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7203 * sem_ch6.adb (Analyze_Function_Return): add calls to
7204 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7205 middle of the body, and extended return.
7206 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7207 False when missing return.
7208 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7209 to True for subprograms whose spec is in ALFA. Remove later on the flag
7210 on the entity used for a subprogram body when there exists a separate
7212 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7213 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7214 False, otherwise do nothing.
7216 2011-08-02 Robert Dewar <dewar@adacore.com>
7218 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7220 2011-08-02 Yannick Moy <moy@adacore.com>
7222 * sem_ch4.ads: minor formatting.
7224 2011-08-02 Yannick Moy <moy@adacore.com>
7226 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7227 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7228 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7229 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7230 opt.ads: cleanup of SPARK mode
7232 2011-08-02 Yannick Moy <moy@adacore.com>
7234 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7236 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7237 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7239 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7240 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7241 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7242 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7244 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7246 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7247 functions whose return type is not in ALFA.
7248 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7250 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7251 parameter's type is not in ALFA.
7252 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7255 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7257 * sem_ch6 (Analyze_Expression_Function): treat the function as
7258 Inline_Always, and introduce a subprogram declaration for it when it is
7260 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7261 expression functions, so that the back-end can determine whether they
7262 can in fact be inlined.
7263 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7264 a function body comes from an expression function.
7266 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7268 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7269 null exclusions to test Can_Never_Be_Null on the anonymous access types
7270 of the formals rather than testing the formals themselves. Exclude this
7271 check in cases where the Old_Formal is marked as a controlling formal,
7272 to avoid issuing spurious errors for bodies completing dispatching
7273 operations (due to the flag not getting set on controlling access
7274 formals in body specs).
7275 (Find_Corresponding_Spec): When checking full and subtype conformance of
7276 subprogram bodies in instances, pass Designated and E in that order, for
7277 consistency with the expected order of the formals (New_Id followed by
7280 2011-08-02 Robert Dewar <dewar@adacore.com>
7282 * sem_ch8.adb: Minor reformatting.
7284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7286 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7287 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7288 primitive operations of class-wide actuals.
7290 2011-08-02 Javier Miranda <miranda@adacore.com>
7292 * exp_atag.ads, exp_atag.adb
7293 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7294 since its value is implicitly passed in argument Typ.
7295 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7296 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7297 Build_Common_Dispatching_Select_Statements.
7299 2011-08-02 Robert Dewar <dewar@adacore.com>
7301 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7302 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7305 2011-08-02 Robert Dewar <dewar@adacore.com>
7307 * sem_res.adb: Minor reformatting.
7308 * sem_prag.adb: Minor reformatting.
7310 2011-08-02 Javier Miranda <miranda@adacore.com>
7312 * exp_atag.adb, exp_atags.ads
7313 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7314 by the tagged type Entity. Required to use this routine in the VM
7315 targets since we do not have available the Tag entity in the VM
7318 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7319 Ada.Tags has not been previously loaded.
7321 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7322 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7324 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7325 view of enclosing scopes. Required to handle enclosing scopes that
7326 are synchronized types whose full view is a task type.
7328 (Build_VM_TSDs): Minor code improvement to avoid generating and
7329 analyzing lists with empty nodes.
7330 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7331 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7332 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7333 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7334 (Make_Select_Specific_Data_Table): Add support for VM targets.
7335 (Make_VM_TSD): Generate code to initialize the SSD structure of
7338 2011-08-02 Yannick Moy <moy@adacore.com>
7340 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7341 cross-references section in ALI.
7342 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7343 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7345 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7346 subprogram or package entity of a node
7347 (Is_Local_Reference_Type): new function returns True for references
7348 selected in local cross-references.
7349 (Lt): function extracted from Lt in Output_References
7350 (Write_Entity_Name): function extracted from Output_References
7351 (Generate_Definition): generate reference with type 'D' for definition
7352 of objects (object declaration and parameter specification), with
7353 appropriate locations and units, for use in local cross-references.
7354 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7355 references of type 'I' for initialization in object definition.
7356 (Output_References): move part of function Lt and procedure
7357 Write_Entity_Name outside of the body. Ignore references of types 'D'
7358 and 'I' introduced for local cross-references.
7359 (Output_Local_References): new procedure to output the local
7360 cross-references sections.
7361 (Lref_Entity_Status): new array defining whether an entity is a local
7362 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7363 with 'I' type when initialization expression is present.
7364 * get_scos.adb, get_scos.ads: Correct comments and typos
7366 2011-08-02 Javier Miranda <miranda@adacore.com>
7368 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7370 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7372 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7375 2011-08-02 Vincent Celier <celier@adacore.com>
7377 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7378 (No_Space_Img): New function
7379 (Find_Excluded_Sources): When reading from a file, record the file name
7380 and the line number for each excluded source.
7381 (Mark_Excluded_Sources): When reporting an error, if the excluded
7382 sources were read from a file, include file name and line number in
7385 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7387 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7389 2011-08-02 Robert Dewar <dewar@adacore.com>
7391 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7393 2011-08-02 Javier Miranda <miranda@adacore.com>
7395 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7396 generation of TSDs to the DOTNET compiler.
7397 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7398 generation of TSDs to the DOTNET compiler.
7400 2011-08-02 Javier Miranda <miranda@adacore.com>
7402 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7403 record of all the tagged types declared inside library level package
7404 declarations, library level package bodies or library level subprograms.
7405 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7406 associated with a given tagged type.
7407 (Build_VM_TSDs): New subprogram.
7408 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7409 compilation units that are subprograms.
7410 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7411 compilation units that are package bodies.
7412 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7413 units that are a package declaration or a package instantiation.
7414 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7415 reorganization to improve the error generated by the frontend when the
7416 function Ada.Tags.Secondary_Tag is not available.
7417 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7418 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7420 2011-08-02 Javier Miranda <miranda@adacore.com>
7422 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7424 2011-08-02 Robert Dewar <dewar@adacore.com>
7426 * s-imenne.ads: Minor reformatting.
7428 2011-08-02 Robert Dewar <dewar@adacore.com>
7430 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7431 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7432 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7434 2011-08-02 Robert Dewar <dewar@adacore.com>
7436 * einfo.ads (Materialize_Entity): Document this is only for renamings
7437 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7438 required debug information in the case where we transform the object
7439 declaration into a renaming declaration.
7440 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7442 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7445 2011-08-02 Robert Dewar <dewar@adacore.com>
7447 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7448 Suppress_Init_Procs.
7449 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7450 Suppress_Initialization/Initialization_Suppressed.
7451 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7452 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7453 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7454 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7456 2011-08-02 Robert Dewar <dewar@adacore.com>
7458 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7461 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7463 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7464 only have inheritable classwide pre/postconditions.
7466 2011-08-02 Javier Miranda <miranda@adacore.com>
7468 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7469 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7470 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7471 checks if the external tag of a type is the same as the external tag
7472 of some other declaration.
7474 2011-08-02 Thomas Quinot <quinot@adacore.com>
7476 * s-taskin.ads: Minor reformatting.
7478 2011-08-02 Emmanuel Briot <briot@adacore.com>
7480 * g-comlin.adb (Display_Help): swap the order in which it prints the
7481 short help and the general usage.
7483 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7485 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7486 the aspect declarations and attach them to the generic copy for
7487 subsequent analysis.
7488 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7489 declarations of the generic tree to the new subprogram declarations.
7490 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7491 conditions that apply to a subprogram instance.
7493 2011-08-02 Robert Dewar <dewar@adacore.com>
7495 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7497 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7499 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7500 private type with a tagged full view is not derived in the immediate
7501 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7503 2011-08-02 Robert Dewar <dewar@adacore.com>
7505 * exp_ch4.adb: Minor reformatting.
7507 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7509 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7510 Ada2012 iterator, the loop will be rewritten during expansion into a
7511 while loop with a cursor and an element declaration. Do not analyze the
7512 body in this case, because if the container is for indefinite types the
7513 actual subtype of the elements will only be determined when the cursor
7514 declaration is analyzed.
7516 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7518 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7519 size/alignment related attributes in CodePeer_Mode.
7521 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7523 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7524 Prepend_Element, since this can result in the operation getting the
7525 wrong slot in the full type's dispatch table if the full type has
7526 inherited operations. The incomplete type's operation will get added
7527 to the proper position in the full type's primitives
7528 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7529 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7530 dispatching operations, since there are cases where nonprimitive
7531 subprograms can get added to the list of incomplete dependents (such
7532 as subprograms in nested packages).
7533 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7534 private part when determining whether to add a primitive with a
7535 parameter of a tagged incomplete type to the Private_Dependents list.
7536 Such primitives can also occur in the visible part, and should not have
7537 been excluded from being private dependents.
7538 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7539 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7540 list of a Taft-amendment incomplete type is a primitive before issuing
7541 an error that the full type must appear in the same unit. There are
7542 cases where nonprimitives can be in the list (such as subprograms in
7544 * sem_disp.adb (Derives_From): Use correct condition for checking that
7545 a formal's type is derived from the type of the corresponding formal in
7546 the parent subprogram (the condition was completely wrong). Add
7547 checking that was missing for controlling result types being derived
7548 from the result type of the parent operation.
7550 2011-08-02 Yannick Moy <moy@adacore.com>
7552 * errout.adb (First_Node): minor renaming
7553 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7556 2011-08-02 Yannick Moy <moy@adacore.com>
7558 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7559 before accessing operands.
7560 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7561 decide whether an initialization expression respects SPARK rules, as
7562 the plain node is the expanded one. This allows for more valid warnings
7564 * gnat_rm.texi: Minor update.
7566 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7568 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7571 2011-08-02 Robert Dewar <dewar@adacore.com>
7573 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7575 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7577 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7578 loop statements and the element renaming declaration with a block when
7579 the element type is controlled.
7581 2011-08-02 Yannick Moy <moy@adacore.com>
7583 * sinfo.ads: Minor formatting.
7585 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7587 * sem_aggr.adb (Add_Association): if the association has a box and no
7588 expression, use the Sloc of the aggregate itself for the new
7590 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7593 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7595 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7596 When a container is provided via a function call, generate a renaming
7597 of the function result. This avoids the creation of a transient scope
7598 and the premature finalization of the container.
7599 * exp_ch7.adb (Is_Container_Cursor): Removed.
7600 (Wrap_Transient_Declaration): Remove the supression of the finalization
7601 of the list controller when the declaration denotes a container cursor,
7604 2011-08-02 Yannick Moy <moy@adacore.com>
7606 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7607 node is from source, instead of the original node being from source.
7609 (Resolve_Array_Aggregate): refine the check for a static expression, to
7610 recognize also static ranges
7611 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7612 Array_Type_Declaration): postpone the test for the type being a subtype
7613 mark after the type has been resolved, so that component-selection and
7614 expanded-name are discriminated.
7615 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7616 to distinguish the case of an iteration scheme, so that an error is
7617 issed on a non-static range in SPARK except in an iteration scheme.
7618 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7619 In_Iter_Schm = True.
7620 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7621 user-defined operators so that they are allowed in renaming
7623 (Find_Selected_Component): refine the check for prefixing of operators
7624 so that they are allowed in renaming. Move the checks for restrictions
7625 on selector name after analysis discriminated between
7626 component-selection and expanded-name.
7627 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7628 concatenation argument of string type if it is static.
7629 * sem_util.adb, sem_util.ads
7630 (Check_Later_Vs_Basic_Declarations): add a new function
7631 Is_Later_Declarative_Item to decice which declarations are allowed as
7632 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7633 mode, add that renamings are considered as later items.
7634 (Enclosing_Package): new function to return the enclosing package
7635 (Enter_Name): correct the rule for homonyms in SPARK
7636 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7637 from source (result of expansion) to avoid issuing wrong warnings.
7639 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7641 * errout.adb: On anything but an expression First_Node returns its
7644 2011-08-02 Pascal Obry <obry@adacore.com>
7646 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7648 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7650 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7651 Set the associated loop as the related expression of internally
7653 * exp_ch7.adb (Is_Container_Cursor): New routine.
7654 (Wrap_Transient_Declaration): Supress the finalization of the list
7655 controller when the declaration denotes a container cursor.
7657 2011-08-02 Yannick Moy <moy@adacore.com>
7659 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7661 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7662 expression is a simple expression. This check cannot be performed in
7663 the semantics, so just drop it.
7664 (P_Index_Or_Discriminant_Constraint): move check that the index or
7665 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7666 semantics. Other cases were previously checked in the semantics.
7667 * par-ch4.adb (P_Name): move checks that a selector name is not
7668 character literal or an operator symbol to Find_Selected_Component in
7670 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7671 declarations are not placed after later declarations in a separate
7672 procedure in Sem_Util (possibly not the best choice?), to be used both
7673 during parsing, for Ada 83 mode, and during semantic analysis, for
7675 * par-endh.adb (Check_End): move check that end label is not missing
7676 to Process_End_Label in the semantics
7677 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7678 the special case for SPARK restriction
7679 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7680 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7681 parameter Force to issue the error message even on internal node (used
7682 for generated end label). Call Check_Restriction to check when an error
7683 must be issued. In SPARK mode, issue an error message even if the
7684 restriction is not set.
7685 (Check_Restriction): new procedure with an additional out parameter to
7686 inform the caller that a message has been issued
7687 * sem_aggr.adb: Minor modification of message
7688 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7689 instead of issuing an error message directly
7690 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7691 declarations are not placed after later declarations, by calling
7692 Check_Later_Vs_Basic_Declarations
7693 (Analyze_Subtype_Declaration): move here the check that an index or
7694 discriminant constraint must be a subtype mark. Change the check that
7695 a subtype of String must start at one so that it works on subtype marks.
7696 * sem_ch4.adb (Analyze_Call): move here the check that a named
7697 association cannot follow a positional one in a call
7698 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7699 instead of issuing an error message directly
7700 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7701 selector name is not a character literal or an operator symbol. Move
7702 here the check that the prefix of an expanded name cannot be a
7703 subprogram or a loop statement.
7704 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7705 procedure called from parsing and semantics to check that basic
7706 declarations are not placed after later declarations
7707 (Process_End_Label): move here the check that end label is not missing
7709 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7711 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7712 representation clause in codepeer mode, since it confuses CodePeer and
7713 does not bring useful info.
7715 2011-08-02 Ed Falis <falis@adacore.com>
7717 * init.c: initialize fp hw on MILS.
7719 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7721 * errout.adb (First_Node): for bodies, return the node itself (small
7722 optimization). For other nodes, do not check source_unit if the node
7723 comes from Standard.
7725 2011-08-02 Robert Dewar <dewar@adacore.com>
7727 * exp_ch3.adb: Minor comment additions.
7728 * sem_ch13.adb: Minor reformatting.
7730 2011-08-02 Pascal Obry <obry@adacore.com>
7732 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7734 2011-08-02 Robert Dewar <dewar@adacore.com>
7736 * sem_attr.adb: Minor reformatting.
7738 2011-08-02 Robert Dewar <dewar@adacore.com>
7740 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7741 (Has_Default_Component_Value): Removed
7742 * einfo.ads Comment updates
7743 (Has_Default_Aspect): Replaces Has_Default_Value
7744 (Has_Default_Component_Value): Removed
7746 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7748 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7749 (Get_Simple_Init_Val): Handle Default_Value aspect
7750 (Needs_Simple_Initialization): Handle Default_Value aspect
7751 * exp_ch3.ads: Needs_Simple_Initialization
7752 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7753 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7755 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7756 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7757 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7759 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7761 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7762 package containing iteration primitives.
7763 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7765 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7767 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7768 "of", pre-analyze expression in case it is a function call with
7769 finalization actions that must be placed ahead of the loop.
7770 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7771 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7773 2011-08-02 Geert Bosch <bosch@adacore.com>
7775 * cstand.adb (Create_Float_Types): Only consider C's long double for
7776 Long_Long_Float, in addition to double.
7778 2011-08-02 Robert Dewar <dewar@adacore.com>
7780 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7781 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7782 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7785 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7787 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7790 2011-08-02 Javier Miranda <miranda@adacore.com>
7792 * einfo.ads, einfo.adb
7793 (Original_Access_Type): Move this attribute to Node26 since there was
7794 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7795 which causes conflicts and breaks the generation of the .NET compiler.
7796 (Interface_Name): Add missing documentation on JGNAT only uses of
7799 2011-08-02 Geert Bosch <bosch@adacore.com>
7801 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7802 (Find_Back_End_Float_Type): Likewise
7803 (Create_Back_End_Float_Types): Likewise
7804 (Create_Float_Types): Likewise
7805 (Register_Float_Type): Likewise
7806 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7807 Nlist and split out type selection in new local Find_Base_Type function.
7808 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7810 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7812 2011-08-02 Robert Dewar <dewar@adacore.com>
7814 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7816 * opt.ads: Minor comment change.
7817 * sem_ch12.adb: Minor code reorganization.
7819 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7821 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7822 subtype's list of rep items to the list on the full subtype in the case
7823 where the lists are the same.
7825 2011-08-02 Geert Bosch <bosch@adacore.com>
7827 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7828 using the one from System.Strings, which also deallocates all strings.
7830 2011-08-02 Geert Bosch <bosch@adacore.com>
7832 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7834 * gcc-interface/Make-lang.in: Update dependencies.
7836 2011-08-02 Olivier Hainque <hainque@adacore.com>
7838 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7841 2011-08-02 Javier Miranda <miranda@adacore.com>
7843 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7844 associated with anonymous access to subprograms.
7846 2011-08-02 Geert Bosch <bosch@adacore.com>
7849 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7850 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7851 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7852 (Add_Symbol_Definition): Move to switch-c.adb
7853 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7854 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7855 (Add_Symbol_Definition): Move to switch-c.adb.
7856 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7858 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7860 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7861 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7863 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7864 (Add_Symbol_Definition): Moved from Prepcomp.
7865 * switch-c.ads: Update copyright notice. Use String_List instead of
7866 Argument_List, removing dependency on System.OS_Lib.
7868 2011-08-02 Yannick Moy <moy@adacore.com>
7870 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7871 mode on initialization expression which does not respect SPARK
7873 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7874 if the tree referenced by its argument represents an initialization
7875 expression in SPARK, suitable for initializing an object in an object
7878 2011-08-02 Javier Miranda <miranda@adacore.com>
7880 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7881 internally generated access to subprogram with its associated protected
7883 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7885 2011-08-02 Geert Bosch <bosch@adacore.com>
7887 * cstand.adb (Register_Float_Type): Print information about type to
7888 register, if the Debug_Flag_Dot_B is set.
7889 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7890 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7891 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7892 with a requested precision of more than Max_Digits digits and no more
7893 than Max_Base_Digits digits, if a range specification is present and the
7894 Predefined_Float_Types list has a suitable type to derive from.
7895 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7896 case of type completion with pragma Import
7898 (Process_Import_Predefined_Type): Processing to complete a type
7899 with pragma Import. Currently supports floating point types only.
7900 (Set_Convention_From_Pragma): Do nothing without underlying type.
7901 (Process_Convention): Guard against absence of underlying type,
7902 which may happen when importing incomplete types.
7903 (Process_Import_Or_Interface): Handle case of importing predefined
7904 types. Tweak error message.
7906 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7908 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7909 functions to previous change. Reorganize code slightly.
7911 2011-08-02 Geert Bosch <bosch@adacore.com>
7913 * back_end.ads (Register_Type_Proc): New call back procedure type for
7914 allowing the back end to provide information about available types.
7915 (Register_Back_End_Types): New procedure to register back end types.
7916 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7918 * cstand.adb (Back_End_Float_Types): New list for floating point types
7919 supported by the back end.
7920 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7921 (Copy_Float_Type): New procedure to make new copies of predefined types.
7922 (Register_Float_Type): New call back procedure to populate the BEFT list
7923 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7924 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7925 (Create_Float_Types): New procedure to create entities for floating
7926 point types predefined in Standard, and put these and any remaining
7927 BEFTs on the Predefined_Float_Types list.
7928 * stand.ads (Predefined_Float_Types): New list for predefined floating
7929 point types that do not have declarations in package Standard.
7931 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7933 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7934 entity node for the unit containing the parameter.
7935 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7936 (Add_Inlined_Subprogram): Likewise.
7937 * gcc-interface/Make-lang.in: Update dependencies.
7939 2011-08-02 Thomas Quinot <quinot@adacore.com>
7941 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7944 2011-08-02 Geert Bosch <bosch@adacore.com>
7946 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7948 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7950 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7951 computed value of Base_Type.
7953 2011-08-02 Yannick Moy <moy@adacore.com>
7955 * restrict.adb (Check_Restriction): issue an error for any use of
7956 class-wide, even if the No_Dispatch restriction is not set.
7957 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7958 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7959 when completing a private extension, the type named in the private part
7960 is not the same as that named in the visible part.
7961 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7962 of an inherited primitive operations of a tagged type or type extension
7963 that returns the tagged type.
7964 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7965 function which returns True for an implicit operation inherited by the
7966 derived type declaration for the argument type.
7967 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7972 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7973 Process_Bounds, to perform analysis with expansion of a range or an
7974 expression that is the iteration scheme for a loop.
7975 (Analyze_Iterator_Specification): If domain of iteration is given by a
7976 function call with a controlled result, as is the case if call returns
7977 a predefined container, ensure that finalization actions are properly
7979 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7981 2011-08-02 Javier Miranda <miranda@adacore.com>
7983 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7984 * gcc-interface/Make-lang.in: Update dependencies.
7986 2011-08-02 Javier Miranda <miranda@adacore.com>
7988 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7989 determine if the analysis is performed using N or Original_Node (N).
7990 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7991 functionality of routine Is_Variable avoids code duplication.
7992 * checks.adb (Determine_Range): Handle temporaries generated by
7993 Remove_Side_Effects.
7995 2011-08-02 Javier Miranda <miranda@adacore.com>
7997 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7998 expansion of the condition. Required since the previous analysis was
7999 done with expansion disabled (see Resolve_Quantified_Expression) and
8000 hence checks were not inserted and record comparisons have not been
8003 2011-08-02 Ed Falis <falis@adacore.com>
8005 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8008 2011-08-02 Bob Duff <duff@adacore.com>
8010 * opt.ads: Minor comment fix.
8012 2011-08-02 Bob Duff <duff@adacore.com>
8014 * sem_ch12.adb (Analyze_Package_Instantiation,
8015 Analyze_Subprogram_Instantiation): Turn off style checking while
8016 analyzing an instance. Whatever style checks that apply to the generic
8017 unit should apply, so it makes no sense to apply them in an instance.
8018 This was causing trouble when compiling an instance of a runtime
8019 unit that violates the -gnatyO switch.
8020 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8021 one of the two case statements, causing spurious errors.
8023 2011-08-02 Robert Dewar <dewar@adacore.com>
8025 * uname.adb: Minor reformatting.
8026 * gnatcmd.adb: Minor reformatting.
8027 * exp_attr.adb: Minor reformatting.
8029 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8031 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8032 No_Dispatching_Calls, do not look for the Assign primitive, because
8033 predefined primitives are not created in this case.
8035 2011-08-02 Bob Duff <duff@adacore.com>
8037 * stylesw.ads: Minor comment fixes.
8039 2011-08-02 Robert Dewar <dewar@adacore.com>
8041 * freeze.adb (Add_To_Result): New procedure.
8043 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8045 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8046 time, if the specific run-time routines for handling streams of strings
8047 are not available, use the default mechanism.
8049 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8051 * s-regpat.ads: Fix typo.
8053 2011-08-02 Vincent Celier <celier@adacore.com>
8055 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8056 not null, call it to create the in memory config project file without
8057 parsing an existing default config project file.
8059 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8061 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8063 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8065 * sem_elim.adb: an abstract subprogram does not need an eliminate
8066 pragma for its descendant to be eliminable.
8068 2011-08-02 Ed Falis <falis@adacore.com>
8070 * init.c: revert to handling before previous checkin for VxWorks
8071 * s-intman-vxworks.adb: delete unnecessary declarations related to
8072 using Ada interrupt facilities for handling signals.
8073 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8074 * s-intman-vxworks.ads: Import __gnat_install_handler as
8075 Initialize_Interrupts.
8076 * s-taprop-vxworks.adb: Delete Signal_Mask.
8077 (Abort_Handler): change construction of mask to unblock exception
8080 2011-08-02 Jerome Guitton <guitton@adacore.com>
8082 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8083 Debug_Raise_Exception before propagation starts.
8085 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8087 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8088 to Restriction_Check_Required.
8089 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8090 * sem_res.adb (Resolve_Call): Likewise.
8091 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8093 2011-08-02 Bob Duff <duff@adacore.com>
8095 * stylesw.ads: Update comment.
8096 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8097 * errout.ads: Remove obsolete comment.
8099 2011-08-02 Javier Miranda <miranda@adacore.com>
8101 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8102 (Set_Is_Safe_To_Reevaluate): new procedure.
8103 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8104 assignment is allowed on safe-to-reevaluate variables.
8105 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8106 temporary created to remove side effects in expressions that use
8107 the secondary stack as safe-to-reevaluate.
8108 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8109 variables that are not true constants.
8111 2011-08-02 Robert Dewar <dewar@adacore.com>
8113 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8114 sem_res.adb, sem_ch6.adb: Minor reformatting.
8116 2011-08-02 Jerome Guitton <guitton@adacore.com>
8118 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8120 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8122 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8123 not set Overridden_Operation if subprogram is an initialization
8126 2011-08-02 Yannick Moy <moy@adacore.com>
8128 * par-ch6.adb: Correct obsolete name in comments
8129 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8130 which takes two message arguments (existing function takes one), with
8131 second message used for continuation.
8132 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8133 block statements that originate from a source block statement, not
8134 generated block statements
8135 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8136 symmetry with procedure case
8137 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8138 function to issue an error in formal mode if a package specification
8139 contains more than one tagged type or type extension.
8140 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8141 parameters matching formals of tagged types are objects (or ancestor
8142 type conversions of objects), not general expressions. Issue an error
8143 on view conversions that are not involving ancestor conversion of an
8145 (Resolve_Type_Conversion): in formal mode, issue an error on the
8146 operand of an ancestor type conversion which is not an object
8147 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8148 procedure so that it works also for actuals of function calls
8149 (Is_Actual_Tagged_Parameter): new function which determines if its
8150 argument is an actual parameter of a formal of tagged type in a
8152 (Is_SPARK_Object_Reference): new function which determines if the tree
8153 referenced by its argument represents an object in SPARK
8155 2011-08-02 Robert Dewar <dewar@adacore.com>
8157 * sem_ch3.adb: Minor reformatting
8158 Minor comment addition
8159 Minor error msg text change
8161 2011-08-02 Javier Miranda <miranda@adacore.com>
8163 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8164 function. Used to be more precise when we generate a variable plus one
8165 assignment to remove side effects in the evaluation of the Bound
8167 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8168 of the bound expression to force its re-analysis and thus expand the
8169 associated transient scope (if required). Code cleanup replacing the
8170 previous code that declared the constant entity by an invocation to
8171 routine Force_Evaluation which centralizes this work in the frontend.
8173 2011-08-02 Robert Dewar <dewar@adacore.com>
8175 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8176 (Base_Type): Now uses improved Is_Base_Type function
8177 * einfo.ads (Base_Type): Inline this function
8179 2011-08-02 Robert Dewar <dewar@adacore.com>
8181 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8182 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8184 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8186 * gcc-interface/Make-lang.in: Update dependencies.
8187 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8190 2011-08-02 Yannick Moy <moy@adacore.com>
8192 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8193 non-simple expression used in delta constraint
8194 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8195 index constraint which is not a subtype mark
8196 * par.adb: With and use Restrict
8197 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8198 mode on component type which is not a subtype mark and default
8199 expression on component
8200 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8201 of string which does not have a lower index bound equal to 1
8202 (Array_Type_Declaration): issue an error in formal mode on index or
8203 component type which is not a subtype mark, and on aliased keyword on
8205 (Derived_Type_Declaration): issue an error in formal mode on interface,
8206 limited or abstract type
8207 (Record_Type_Declaration): issue an error in formal mode on interface
8208 (Record_Type_Definition): issue an error in formal mode on tagged types
8209 and type extensions not declared in the specification of a library unit
8210 package; on null non-tagged record; on variant part
8212 2011-08-02 Vincent Celier <celier@adacore.com>
8214 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8215 not declared for qualified library project when Library_Name is not
8216 declared, but Library_Dir is.
8218 2011-08-02 Robert Dewar <dewar@adacore.com>
8220 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8221 pragmas (affects aspects [Component_]Default_Value
8222 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8223 component type for the resolution
8225 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8227 * einfo.adb (Base_Type): Tune implementation for speed.
8229 2011-08-02 Robert Dewar <dewar@adacore.com>
8231 * freeze.adb: Minor reformatting.
8233 2011-08-02 Thomas Quinot <quinot@adacore.com>
8235 * scos.ads: Update comments.
8237 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8239 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8240 base type, because the parent may be a subtype of a private type whose
8241 convention is established in a private part.
8243 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8245 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8246 statement in a block when the expansion of the return expression has
8247 created a finalization chain.
8248 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8249 with the parent node.
8250 Add N_Extended_Return_Statement to handle the case where a transient
8251 object declaration appears in the Return_Object_Declarations list of
8252 an extended return statement.
8254 2011-08-02 Matthew Gingell <gingell@adacore.com>
8256 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8257 unused parameter 'name'.
8259 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8261 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8262 inherited operation, check whether its alias, which is the source
8263 operastion that it renames, has been marked eliminated.
8265 2011-08-02 Javier Miranda <miranda@adacore.com>
8267 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8268 in-mode parameter whose type is an access type since it can be used to
8269 modify its designated object. Enforce code that handles as safe an
8270 access type that is not access-to-constant but it is the result of a
8271 previous removal of side-effects.
8272 (Remove_Side_Effects): Minor code reorganization of cases which require
8273 no action. Done to incorporate documentation on new cases uncovered
8274 working in this ticket: no action needed if this routine was invoked
8275 too early and the nodes are not yet decorated.
8276 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8277 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8278 were issued with actuals that are implicitly provided by
8281 2011-08-02 Robert Dewar <dewar@adacore.com>
8283 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8285 2011-08-02 Yannick Moy <moy@adacore.com>
8287 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8288 to issue an error in formal mode on attribute not supported in this mode
8289 (Analyze_Attribute): issue errors on standard attributes not supported
8291 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8292 comment, and issue error in formal mode on modulus which is not a power
8294 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8296 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8298 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8299 operator on modular type (except 'not').
8301 2011-08-02 Robert Dewar <dewar@adacore.com>
8303 * gnat_rm.texi: Minor reformatting.
8305 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8307 * s-osinte-linux.ads: Minor comment update and reformatting.
8308 * i-cexten.ads: Make this unit pure, as for its parent.
8309 Will allow its usage in more contexts if needed.
8311 2011-08-02 Robert Dewar <dewar@adacore.com>
8313 * s-utf_32.ads: Minor comment fix.
8315 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8317 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8318 operation of a tagged synchronized type, handle the case where the
8319 controlling argument is overloaded.
8321 2011-08-02 Yannick Moy <moy@adacore.com>
8323 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8324 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8325 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8326 SPARK mode and formal verification mode on processing SPARK restriction
8327 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8328 requiring consistency checking.
8330 2011-08-02 Robert Dewar <dewar@adacore.com>
8332 * sem_res.adb: Minor reformatting.
8334 2011-08-02 Robert Dewar <dewar@adacore.com>
8336 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8337 a-cforse.ads: Remove unneeded with of Ada.Containers
8338 Remove commented out pragma Inline's
8339 Move specifications of new subprograms to the actual specs
8341 2011-08-02 Yannick Moy <moy@adacore.com>
8343 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8344 a-cforse.ads: Update comments.
8346 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8348 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8350 2011-08-02 Robert Dewar <dewar@adacore.com>
8352 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8353 a-cforse.ads, a-cofove.ads: Minor reformatting.
8355 2011-08-02 Claire Dross <dross@adacore.com>
8357 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8358 a-cofove.ads: Add comments.
8360 2011-08-02 Yannick Moy <moy@adacore.com>
8362 * gnat_rm.texi: Document formal containers.
8364 2011-08-02 Emmanuel Briot <briot@adacore.com>
8366 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8369 2011-08-02 Robert Dewar <dewar@adacore.com>
8371 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8374 2011-08-02 Robert Dewar <dewar@adacore.com>
8376 * aspects.adb: New aspects Default_Value and Default_Component_Value
8377 New format of Aspect_Names table checks for omitted entries
8378 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8379 handling of boolean aspects for derived types.
8380 New aspects Default_Value and Default_Component_Value
8381 New format of Aspect_Names table checks for omitted entries
8382 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8383 (Has_Default_Value): New flag
8384 (Has_Default_Component_Value): New flag
8385 (Has_Default_Value): New flag
8386 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8388 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8389 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8390 Default_Value and Default_Component_Value
8391 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8392 New aspects Default_Value and Default_Component_Value
8393 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8394 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8396 2011-08-02 Vincent Celier <celier@adacore.com>
8398 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8399 inherit library kind.
8401 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8403 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8406 2011-08-02 Robert Dewar <dewar@adacore.com>
8408 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8410 2011-08-02 Yannick Moy <moy@adacore.com>
8412 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8414 2011-08-02 Robert Dewar <dewar@adacore.com>
8416 * impunit.adb: Add comment.
8418 2011-08-02 Yannick Moy <moy@adacore.com>
8420 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8421 qualification of aggregates in formal mode
8422 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8424 (Resolve_Aggregate): complete the test that an aggregate is adequately
8425 qualified in formal mode
8427 2011-08-02 Pascal Obry <obry@adacore.com>
8429 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8430 * mlib-prj.adb: Supress warning when compiling binder generated file.
8431 (Build_Library): Supress all warnings when compiling the binder
8434 2011-08-02 Yannick Moy <moy@adacore.com>
8436 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8438 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8439 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8440 Add with/use clauses to make Check_Formal_Restriction visible
8442 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8444 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8445 in-parameters when type of the generic formal is private in the generic
8446 spec and non-private in the body.
8448 2011-08-02 Claire Dross <dross@adacore.com>
8450 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8451 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8452 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8453 * impunit.adb, Makefile.rtl: Take new files into account.
8455 2011-08-02 Robert Dewar <dewar@adacore.com>
8457 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8458 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8460 2011-08-02 Yannick Moy <moy@adacore.com>
8462 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8464 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8465 matching static array bounds, taking into account the special case of
8467 * sem_ch3.adb: Typo in comment.
8469 2011-08-02 Yannick Moy <moy@adacore.com>
8471 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8472 which issues an error in formal mode if its argument node is originally
8474 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8475 has a discriminant specification so that it does not include the case
8477 (Derived_Type_Declaration): move here the test that a derived type has a
8478 discriminant specification
8479 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8480 first element of a component association before accessing its choices
8481 (presence of component association is not enough)
8482 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8483 declaration is a library item before accessing the next element in a
8484 list, as library items are not member of lists
8485 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8486 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8487 Check_Formal_Restriction whenever possible.
8489 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8491 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8492 reference when needed.
8494 2011-08-02 Bob Duff <duff@adacore.com>
8496 * gnat_ugn.texi: Fix typo.
8498 2011-08-02 Vincent Celier <celier@adacore.com>
8500 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8501 archive file name. Do not use the full path name of archives for Open
8504 2011-08-02 Robert Dewar <dewar@adacore.com>
8506 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8507 Analyze_Aspect_Specifications
8509 (Analyze_Aspect_Specifications): New handling for boolean aspects
8510 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8511 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8512 sequence for Analyze_Aspect_Specifications
8513 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8514 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8516 2011-08-02 Robert Dewar <dewar@adacore.com>
8518 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8519 aspects, since these no longer exist.
8521 2011-08-02 Robert Dewar <dewar@adacore.com>
8523 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8524 semicolon, do not try to see if there are aspects following it.
8525 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8528 2011-08-02 Robert Dewar <dewar@adacore.com>
8530 * sem_ch8.adb, aspects.ads: Minor reformatting.
8532 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8534 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8535 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8537 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8539 2011-08-02 Yannick Moy <moy@adacore.com>
8541 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8542 mode on subprogram declaration outside of package specification, unless
8543 it is followed by a pragma Import
8544 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8545 Access_Type_Declaration): issue error in formal mode on access type
8546 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8548 (Analyze_Object_Declaration): issue error in formal mode on object
8549 declaration which does not respect SPARK restrictions
8550 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8551 declaration which does not respect SPARK restrictions
8552 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8553 error in formal mode on digits or delta constraint
8554 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8555 decimal fixed point type
8556 (Derived_Type_Declaration): issue error in formal mode on derived type
8557 other than type extensions of tagged record types
8558 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8559 with check on access definition
8560 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8561 mode on protected definition.
8562 (Analyze_Task_Definition): issue error in formal mode on task definition
8564 2011-08-02 Robert Dewar <dewar@adacore.com>
8566 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8568 2011-08-02 Javier Miranda <miranda@adacore.com>
8570 * sem_ch6.adb (Can_Override_Operator): New function.
8571 (Verify_Overriding_Indicator): Add missing code to check overriding
8572 indicator in operators. Fixes regression.
8573 (Check_Overriding_Indicator): Minor reformating after replacing the
8574 code that evaluates if the subprogram can override an operator by
8575 invocations to the above new function.
8577 (Write_Field26_Name): Add missing code to ensure that, following
8578 the documentation in einfo.ads, this field is not shown as attribute
8579 "Static_Initialization" on non-dispatching functions.
8581 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8583 * sem_res.adb (Resolve_Call): A call to
8584 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8585 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8586 i.e., when the second parameter is of type Time_Span.
8588 2011-08-02 Vincent Celier <celier@adacore.com>
8590 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8591 with an archive instead of -L<library dir> -l<library name>.
8593 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8595 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8596 mark the base types In_Use in addition to making the operations
8599 2011-08-02 Ed Falis <falis@adacore.com>
8601 * init.c: add and setup __gnat_signal_mask for the exception signals
8602 * s-inmaop-vxworks.adb: new file.
8603 * s-intman-vxworks.adb: remove unnecessary initializations and
8605 * s-intman-vxworks.ads: remove unnecessary variable
8606 * s-taprop-vxworks.adb: simplify signal initialization
8608 2011-08-02 Robert Dewar <dewar@adacore.com>
8610 * sem_ch8.adb: Minor code reorganization, comment updates.
8612 2011-08-02 Robert Dewar <dewar@adacore.com>
8614 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8615 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8617 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8618 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8620 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8622 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8623 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8624 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8625 use_type_clauses, to handle more efficiently use_type and use_all_type
8627 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8628 Ada2012 Use_All_Type clause.
8629 (Use_Class_Wide_Operations): new procedure.
8631 2011-08-02 Robert Dewar <dewar@adacore.com>
8633 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8634 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8635 expression to expression function.
8637 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8639 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8640 if types are compatible.
8642 2011-08-02 Yannick Moy <moy@adacore.com>
8644 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8645 returns True if its argument array types have same dimension and same
8646 static bounds at each index.
8647 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8648 OUT or IN OUT paramaters which are not view conversions in SPARK.
8649 (Resolve_Arithmetic_Op): issue an error in formal mode on
8650 multiplication or division with operands of fixed point types which are
8651 not qualified or explicitly converted.
8652 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8653 Boolean or array type (except String) operands.
8654 (Resolve_Equality_Op): issue an error in formal mode on equality
8655 operators for array types other than String with non-matching static
8657 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8658 for array types with non-matching static bounds. Factorize the code in
8659 Matching_Static_Array_Bounds.
8660 (Resolve_Qualified_Expression): issue an error in formal mode on
8661 qualified expressions for array types with non-matching static bounds.
8662 (Resolve_Type_Conversion): issue an error in formal mode on type
8663 conversion for array types with non-matching static bounds
8665 2011-08-02 Robert Dewar <dewar@adacore.com>
8667 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8669 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8671 * par-ch9.adb: save location of entry for proper error message.
8673 2011-08-02 Javier Miranda <miranda@adacore.com>
8675 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8676 (Use_Full_View) which permits this routine to climb through the
8677 ancestors using the full-view of private parents.
8678 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8679 Use_Full_View to true in calls to Is_Ancestor.
8680 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8681 true in call to Is_Ancestor.
8682 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8683 Use_Full_View to true in call to Is_Ancestor.
8684 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8685 call to Is_Ancestor.
8686 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8687 Use_Full_View to true in calls to Is_Ancestor.
8688 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8689 Make_Select_Specific_Data_Table, Register_Primitive,
8690 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8691 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8692 to true in call to Is_Ancestor.
8693 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8694 Use_Full_View to true in calls to Is_Ancestor.
8696 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8697 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8699 2011-08-02 Robert Dewar <dewar@adacore.com>
8701 * gnat_rm.texi: Minor reformatting.
8702 * sem_prag.adb: Minor reformatting.
8704 2011-08-02 Tristan Gingold <gingold@adacore.com>
8706 * vms_data.ads: Add VMS qualifier for -gnateP.
8708 2011-08-02 Robert Dewar <dewar@adacore.com>
8710 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8711 * par-ch7.adb (P_Package): Proper placement of aspects for package
8713 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8714 (End_Statements): Add Is_Sloc parameterr
8715 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8716 (Check_End): Ad Is_Sloc parameter
8717 (End_Statements): Add Is_Sloc parameterr
8719 2011-08-02 Vincent Celier <celier@adacore.com>
8721 * ug_words: Add VMS qualifier equivalent to -gnateP:
8722 /SYMBOL_PREPROCESSING.
8724 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8726 * gnat-style.texi: For hexadecimal numeric literals the typical
8727 grouping of digits is 4 to represent 2 bytes.
8728 A procedure spec which is split into several lines is indented two
8731 2011-08-02 Yannick Moy <moy@adacore.com>
8733 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8734 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8735 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8737 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8738 choice in array aggregate
8739 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8741 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8742 positional and named aggregate for record, or others in record
8743 aggregate, or multiple choice in record aggregate
8744 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8745 array operands to logical operations AND, OR and XOR do not have the
8746 same static lower and higher bounds
8747 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8749 2011-08-01 Robert Dewar <dewar@adacore.com>
8751 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8752 Replaces Last_Source_Node_In_Sequence.
8753 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8754 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8755 parens and blank in string (this was inconsistently implemented).
8757 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8758 blank in string (this was inconsistently implemented).
8760 (Set_Global_Switches): Set formal mode switches appropriately
8761 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8763 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8764 call Set_Error_Msg_Lang to set "spark" as language name.
8765 * par.adb: Remove unnecessary call to set formal language for errout
8766 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8767 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8769 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8770 calls to it, moved after resolution so that types are known
8771 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8772 result of concatenation is not of type String
8773 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8774 concatenation is not properly restricted
8775 * gnat_rm.texi: Add doc on pragma Spark_95.
8776 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8777 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8778 * gcc-interface/Make-lang.in: Update dependencies.
8780 2011-08-01 Javier Miranda <miranda@adacore.com>
8782 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8783 condition that detects if the overridden operation must replace an
8786 2011-08-01 Javier Miranda <miranda@adacore.com>
8788 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8789 code declarations inserted by Insert_Actions in each alternative of the
8790 N_Case_Expression node.
8792 2011-08-01 Robert Dewar <dewar@adacore.com>
8794 * sem_ch6.adb: Minor code reorganization.
8795 * sem_util.adb: Minor reformatting.
8797 2011-08-01 Pascal Obry <obry@adacore.com>
8799 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8800 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8802 2011-08-01 Yannick Moy <moy@adacore.com>
8804 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8805 literal or operator symbol which is prefixed
8806 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8807 mode on access attributes.
8808 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8809 that concatenation operands are properly restricted in formal mode
8810 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8811 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8812 result of the concatenation has a type different from String.
8813 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8814 Analyze_Quantified_Expression, Analyze_Slice,
8815 Analyze_Null): issue an error in formal mode on unsupported constructs
8817 (Analyze_Block_Statement): only issue error on source block statement
8818 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8819 function which returns the last node in a list of nodes for which
8820 Comes_From_Source returns True, if any
8821 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8822 Last_Source_Node_In_Sequence
8823 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8824 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8825 mode on unsupported constructs
8826 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8827 rest of the actions may be needed later on since the error is marked as
8829 * sinfo.ads: Typos in comments.
8831 2011-08-01 Pascal Obry <obry@adacore.com>
8833 * projects.texi: Minor editing.
8835 2011-08-01 Yannick Moy <moy@adacore.com>
8837 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8838 insertion character ~~
8839 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8840 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8841 with insertion character ~~
8842 (Set_Msg_Text): treat insertion character ~~
8843 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8844 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8845 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8846 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8847 errors related to the formal language restriction not serious
8848 (insertion character |).
8849 * par.adb (Par): set formal language for error messages if needed
8850 * sem_ch6.adb (Check_Missing_Return): take into account possible
8851 generated statements at the end of the function
8852 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8853 enumeration value to define a new pragma SPARK_95
8854 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8855 SPARK_Version): new type and variables to store the SPARK version
8857 (SPARK_Mode): return True when SPARK_Version is set
8858 * par-prag.adb: Correct indentation
8859 (Prag): take Pragma_SPARK_95 into account
8860 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8863 2011-08-01 Robert Dewar <dewar@adacore.com>
8865 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8866 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8867 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8869 2011-08-01 Pascal Obry <obry@adacore.com>
8871 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8872 Target_Name to Get_Path call.
8873 (Parse_Single_Project): Likewise.
8874 (Post_Parse_Context_Clause): Likewise.
8875 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8876 Call Initialise_Project_Path with the proper Target_Name.
8877 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8879 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8880 with the proper Target_Name.
8881 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8883 (Parse_Project_And_Apply_Config): Likewise.
8884 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8885 This is fine as this part of the code is supporting only native
8887 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8888 is fine as this part of the code is supporting only native compilation.
8890 2011-08-01 Yannick Moy <moy@adacore.com>
8892 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8893 of homonym, unless the homonym is one of the cases allowed in SPARK
8894 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8895 package declaration occurring after a body.
8897 2011-08-01 Robert Dewar <dewar@adacore.com>
8899 * checks.adb, exp_ch4.adb: Minor reformatting.
8901 2011-08-01 Javier Miranda <miranda@adacore.com>
8903 * einfo.ads (Access_Disp_Table): Fix documentation.
8904 (Dispatch_Table_Wrappers): Fix documentation.
8906 2011-08-01 Pascal Obry <obry@adacore.com>
8908 * prj-env.adb, prj-env.ads: Minor reformatting.
8910 2011-08-01 Yannick Moy <moy@adacore.com>
8912 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8913 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8914 procedures out of these packages.
8915 * errout.ads, errout.adb
8916 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8917 procedures in of this package
8918 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8919 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8920 on misplaced later vs initial declarations, like in Ada 83
8921 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8922 formal mode on attribute of private type whose full type declaration
8924 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8925 package declaration inside a package specification
8926 (Analyze_Full_Type_Declaration): issue error in formal mode on
8927 controlled type or discriminant type
8928 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8929 user-defined operator means that it should come from the source
8930 (New_Overloaded_Entity): issue error in formal mode on overloaded
8932 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8934 2011-08-01 Thomas Quinot <quinot@adacore.com>
8936 * atree.adb: Minor reformatting.
8937 * checks.adb: Minor reformatting.
8939 2011-08-01 Vincent Celier <celier@adacore.com>
8941 * s-parame-vms-ia64.ads: Fix typo in comment
8943 * s-parame-vms-restrict.ads: Removed, unused.
8945 2011-08-01 Javier Miranda <miranda@adacore.com>
8948 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8950 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8951 * sem_ch3.ads, sem_ch3.adb
8952 (Is_Constant_Bound): New extended version of the subprogram that was
8953 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8954 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8955 * sem_aux.ads (Constant_Value): Fix typo in comment.
8956 * checks.adb (Generate_Index_Checks): New implementation which, for
8957 array objects with constant bounds, generates the runtime check
8958 referencing the bounds of the array type. For other cases this routine
8959 provides its previous behavior obtaining such values from the array
8961 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8963 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8964 we cannot have semantic interpretations of the new node.
8966 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8968 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8971 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8973 * sem_ch8.adb: Minor code editing.
8974 * s-vxwext.adb: Remove trailing space.
8975 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8976 consistency with other files.
8978 2011-08-01 Thomas Quinot <quinot@adacore.com>
8980 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8982 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8984 * par-ch10.adb: reject parameterized expressions as compilation unit.
8985 * sem_ch4.adb: handle properly conditional expression with overloaded
8986 then_clause and no else_clause.
8988 2011-08-01 Tristan Gingold <gingold@adacore.com>
8990 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8991 like done by System.Aux_DEC.
8992 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8994 2011-08-01 Yannick Moy <moy@adacore.com>
8996 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8997 missing label at end of declaration (subprogram or package)
8998 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8999 of positional and named parameter association
9000 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9001 Error_Msg_SP which adds a prefix to the error message giving the name
9002 of the formal language analyzed
9003 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9004 access result type in subprogram, unconstrained array as result type,.
9005 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9007 * sem_ch8.adb: Code clean up.
9009 2011-08-01 Javier Miranda <miranda@adacore.com>
9011 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9012 * einfo.ads (Access_Disp_Table): Fix documentation.
9013 (Dispatch_Table_Wrappers): Fix documentation.
9014 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9015 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9016 to enforce the documentation of this attribute.
9017 (Set_Is_Interface): Cleanup the assertion.
9018 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9019 the Underlying_Type entity before reading attribute Access_Disp_Table.
9020 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9021 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9022 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9023 the Underlying_Type entity before reading attribute Access_Disp_Table.
9024 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9025 Locate the Underlying_Type entity before reading attribute
9028 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9030 * s-poosiz.ads: Additional overriding indicators.
9032 2011-08-01 Yannick Moy <moy@adacore.com>
9034 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9036 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9037 parameter specification does not include a subtype mark.
9038 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9039 formal mode on abstract subprogram.
9040 (Analyze_Subprogram_Specification): issue error in formal mode on
9041 user-defined operator.
9042 (Process_Formals): issue error in formal mode on access parameter and
9044 * sem_ch9.adb (Analyze_Abort_Statement,
9045 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9046 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9047 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9048 Analyze_Requeue, Analyze_Selective_Accept,
9049 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9050 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9051 issue error in formal mode on user-defined raise statement.
9053 2011-08-01 Thomas Quinot <quinot@adacore.com>
9055 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9056 declaration being hidden when overriding an implicit inherited
9058 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9059 (-gnats), do not complain about a source file that contains only a
9062 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9064 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9065 variable if already set.
9067 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9069 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9070 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9071 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9072 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9073 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9074 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9075 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9076 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9077 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9078 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9079 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9080 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9081 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9082 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9083 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9084 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9085 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9086 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9087 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9088 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9089 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9090 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9091 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9092 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9093 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9094 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9095 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9096 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9097 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9098 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9099 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9100 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9101 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9102 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9103 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9104 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9105 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9106 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9107 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9108 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9109 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9110 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9111 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9112 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9113 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9114 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9115 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9116 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9117 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9118 Use GNAT instead of GNARL.
9120 2011-08-01 Bob Duff <duff@adacore.com>
9122 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9123 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9124 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9127 2011-08-01 Yannick Moy <moy@adacore.com>
9129 * debug.adb (d.D) reverve flag for the SPARK mode
9130 (d.E) reverve flag for SPARK generation mode
9131 (d.F) reverve flag for Why generation mode
9132 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9133 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9134 functions which return True when the corresponding modes are set
9135 (Formal_Language): return "spark" or "alfa" when in formal verification
9137 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9138 Error_Msg to prefix the error message with a tag giving the formal
9140 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9141 message with a tag giving the formal language
9142 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9144 (Analyze_Case_Statement): issue error in formal mode on case statement
9145 with a single "others" case alternative
9146 (Analyze_Exit_Statement): issue errors in formal mode on exit
9147 statements which do not respect SPARK restrictions
9148 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9149 (Check_Unreachable_Code): always issue an error (not a warning) in
9150 formal mode on unreachable code (concerns both code after an infinite
9151 loop and after an unconditional jump, both not allowed in SPARK)
9152 * sem_ch6.adb (Analyze_Return_Statement): add call to
9153 Set_Return_Present for a procedure containing a return statement
9154 (already done for functions in Analyze_Function_Return)
9155 (Analyze_Function_Return): issue error in formal mode on extended
9156 return or if return is not last statement in function
9157 (Check_Missing_Return): issue error in formal mode if function does
9158 not end with return or if procedure contains a return
9159 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9160 function to detect if there is an inner scope of its parameter S which
9163 2011-08-01 Thomas Quinot <quinot@adacore.com>
9165 * sem_ch6.ads: Minor reformatting.
9167 2011-08-01 Javier Miranda <miranda@adacore.com>
9169 * sem_util.adb (Abstract_Interface_List): Complete condition when
9170 processing private type declarations to avoid reading unavailable
9172 (Is_Synchronized_Tagged_Type): Complete condition when processing
9173 private extension declaration nodes to avoid reading unavailable
9176 2011-08-01 Thomas Quinot <quinot@adacore.com>
9178 * sem_ch3.adb: Minor reformatting.
9180 2011-08-01 Thomas Quinot <quinot@adacore.com>
9182 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9183 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9184 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9185 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9186 for VMS, instead parametrize the common implementation with
9187 System.Parameters declarations.
9189 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9191 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9193 2011-08-01 Tristan Gingold <gingold@adacore.com>
9195 * seh_init.c: Fix SEH handler installation on win64.
9197 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9199 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9200 double analysis of an anonymous access to subprogram, because it can
9201 lead to improper sharing of profiles and a back-end crash.
9203 2011-08-01 Robert Dewar <dewar@adacore.com>
9205 * make.adb, sem_ch4.adb: Minor reformatting.
9206 * gcc-interface/Make-lang.in: Update dependencies.
9207 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9209 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9211 * gnat_rm.texi: Fix definition of Long_Integer.
9213 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9215 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9216 to prevent storage exhaustion.
9217 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9218 finalized is a function body, insert the cleanup code before the final
9219 return statement, to prevent spurious warnings.
9220 * s-pooglo.ads: add overriding indicator.
9222 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9224 * sem_ch4.adb (Operator_Check): improve error message when both a
9225 with_clause and a use_clause are needed to make operator usage legal.
9226 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9227 determine whether a compilation unit is visible within an other,
9228 either through a with_clause in the current unit, or a with_clause in
9229 its library unit or one one of its parents.
9231 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9233 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9234 over an arbitrary expression of an array or container type.
9235 * lib-xref.adb: clarify comment.
9237 2011-08-01 Bob Duff <duff@adacore.com>
9239 * einfo.ads: Minor reformatting.
9240 * debug.adb: Minor comment improvement.
9242 2011-08-01 Javier Miranda <miranda@adacore.com>
9244 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9245 consider hidden subprograms as valid candidates.
9247 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9249 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9251 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9253 * gnat_ugn.texi: Fix typo.
9255 2011-08-01 Robert Dewar <dewar@adacore.com>
9257 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9258 lib-xref.adb: Minor reformatting
9260 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9262 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9263 when to generate a call to Move_Final_List.
9264 (Has_Controlled_Parts): Remove this function.
9266 2011-08-01 Geert Bosch <bosch@adacore.com>
9268 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9271 2011-08-01 Thomas Quinot <quinot@adacore.com>
9273 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9274 explicit raise of a predefined exception as Comes_From_Source if the
9275 original N_Raise_Statement comes from source.
9277 2011-08-01 Robert Dewar <dewar@adacore.com>
9279 * sinfo.ads: Add comment.
9280 * sem_ch6.adb: Minor reformatting.
9282 2011-08-01 Robert Dewar <dewar@adacore.com>
9284 * freeze.adb (Freeze_Entity): Refine check for bad component size
9285 clause to avoid rejecting confirming clause when atomic/aliased present.
9287 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9289 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9290 better determine whether an entity reference is a write.
9291 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9293 * lib-xref.adb (Output_References): Do no suppress a read reference at
9294 the same location as an immediately preceeding modify-reference, to
9295 handle properly in-out actuals.
9297 2011-08-01 Tristan Gingold <gingold@adacore.com>
9299 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9301 2011-08-01 Quentin Ochem <ochem@adacore.com>
9303 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9304 heap to compute the result.
9306 2011-08-01 Robert Dewar <dewar@adacore.com>
9308 * atree.ads: Minor reformatting.
9310 2011-08-01 Emmanuel Briot <briot@adacore.com>
9312 * g-expect.adb (Get_Command_Output): Fix memory leak.
9314 2011-08-01 Geert Bosch <bosch@adacore.com>
9316 * cstand.adb (P_Float_Type): New procedure to print the definition of
9317 predefined fpt types.
9318 (P_Mixed_Name): New procedure to print a name using mixed case
9319 (Print_Standard): Use P_Float_Type for printing floating point types
9320 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9321 precision IEEE float.
9323 2011-08-01 Thomas Quinot <quinot@adacore.com>
9325 * sem_ch3.adb: Minor reformatting.
9327 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9329 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9330 the completion of a generic function, insert the new body rather than
9331 rewriting the original.
9333 2011-08-01 Yannick Moy <moy@adacore.com>
9335 * sinfo.ads, errout.ads: Typos in comments.
9337 2011-08-01 Robert Dewar <dewar@adacore.com>
9339 * par-endh.adb: Minor reformatting.
9341 2011-08-01 Robert Dewar <dewar@adacore.com>
9343 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9344 (Pre_Post_Aspects): New subtype.
9345 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9346 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9347 * par-ch7.adb (P_Package): Remove Decl parameter
9348 (P_Package): Handle new syntax for aspects (before IS)
9349 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9351 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9352 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9353 (P_Package): Remove Decl parameter
9354 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9356 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9358 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9359 * sinfo.ads: Document new syntax for aspects in packages etc.
9360 * sprint.adb: Handle new syntax of aspects before IS in package
9362 2011-08-01 Thomas Quinot <quinot@adacore.com>
9364 * atree.ads: Minor reformatting.
9365 * sem_prag.adb: Minor reformatting.
9367 2011-08-01 Robert Dewar <dewar@adacore.com>
9369 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9370 case expr alternative.
9372 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9374 * sem_ch12.adb: Fix typo.
9376 2011-08-01 Geert Bosch <bosch@adacore.com>
9378 * sem_prag.adb (Check_No_Link_Name): New procedure.
9379 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9380 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9381 instead of Standard_Long_Long_Float_Size global. Preparation for
9382 eventual removal of per type constants.
9383 * exp_util.ads (Get_Stream_Size): New function returning the stream
9384 size value of subtype E.
9385 * exp_util.adb (Get_Stream_Size): Implement new function.
9386 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9388 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9390 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9392 2011-08-01 Geert Bosch <bosch@adacore.com>
9394 * cstand.adb: Fix comments.
9395 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9398 2011-08-01 Robert Dewar <dewar@adacore.com>
9400 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9402 2011-08-01 Geert Bosch <bosch@adacore.com>
9404 * atree.ads: Fix comment.
9406 2011-08-01 Robert Dewar <dewar@adacore.com>
9408 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9409 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9410 * par.adb: Add with for Namet.Sp.
9411 * par-tchk.adb: Minor reformatting.
9413 2011-08-01 Vincent Celier <celier@adacore.com>
9415 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9416 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9417 of the init procedure of a SAL.
9418 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9421 2011-08-01 Thomas Quinot <quinot@adacore.com>
9423 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9426 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9428 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9430 2011-08-01 Thomas Quinot <quinot@adacore.com>
9432 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9433 conformant with its spec (return True only for types that have
9434 an overriding Initialize primitive operation that prevents them from
9435 having preelaborable initialization).
9436 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9437 initialization for controlled types in Ada 2005 or later mode.
9439 2011-08-01 Robert Dewar <dewar@adacore.com>
9441 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9443 (Same_Aspect): New function.
9444 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9445 Type_Invariant, Precondition, Postcondition.
9446 * snames.ads-tmpl: Add Name_Type_Invariant.
9448 2011-08-01 Robert Dewar <dewar@adacore.com>
9450 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9452 (Freeze_All_Ent): Fix error in handling inherited aspects.
9453 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9454 already analyzed, but don't skip entire processing of a declaration,
9455 that's wrong in some cases of declarations being rewritten.
9456 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9457 Don't delay for integer, string literals
9458 Treat predicates in usual manner for delay, remove special case code,
9460 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9461 (Build_Predicate_Function): Update saved expression in aspect
9462 (Build_Invariant_Procedure): Update saved expression in aspect
9463 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9464 of replacement of discriminant references if the reference is simple.
9466 2011-08-01 Robert Dewar <dewar@adacore.com>
9468 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9469 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9470 Static_Predicate and Dynamic_Predicate.
9471 (Build_Predicate_Function): Add processing for Static_Predicate
9472 and Dynamic_Predicate.
9473 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9474 (From_Static_Predicate): New flag
9475 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9477 2011-08-01 Robert Dewar <dewar@adacore.com>
9479 * usage.adb: Documentation cleanup for Ada version modes in usage.
9480 * expander.adb: Minor reformatting.
9482 2011-08-01 Robert Dewar <dewar@adacore.com>
9484 * atree.ads: Minor comment fix.
9485 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9486 a-witeio.ads, sem_prag.adb: Minor reformatting.
9488 2011-08-01 Doug Rupp <rupp@adacore.com>
9490 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9491 pointers. Use descrip.h header file for convenience. Add some
9494 2011-08-01 Robert Dewar <dewar@adacore.com>
9496 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9497 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9498 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9500 (Check_Aspect_At_End_Of_Declarations): New procedure
9501 (Analye_Aspect_Specification): Minor changes for above procedures
9502 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9503 specification node as well.
9505 2011-08-01 Pascal Obry <obry@adacore.com>
9507 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9508 Windows files. Use GetFilesAttributes() in this case to check for file
9509 existence instead of returning with an error code.
9511 2011-08-01 Vincent Celier <celier@adacore.com>
9513 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9514 High is above Source length.
9516 2011-08-01 Robert Dewar <dewar@adacore.com>
9518 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9520 2011-08-01 Robert Dewar <dewar@adacore.com>
9522 * aspects.ads (Boolean_Aspects): New subtype.
9523 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9524 for derived types in cases where the parent type and derived type have
9526 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9527 with aspects when parent type also has aspects.
9528 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9529 boolean expression at this point).
9530 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9531 accordance with final decision on the Ada 2012 feature.
9532 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9534 2011-08-01 Matthew Heaney <heaney@adacore.com>
9536 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9538 2011-08-01 Pascal Obry <obry@adacore.com>
9540 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9541 Fix Replace_Slice when High is above current string size.
9542 (Replace_Slice): Fix DL computation when High is above current
9545 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9547 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9549 2011-08-01 Matthew Heaney <heaney@adacore.com>
9551 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9554 2011-08-01 Pascal Obry <obry@adacore.com>
9556 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9559 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9561 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9562 access to protected subprograms in generic bodies.
9563 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9564 protected type, indicate that the convention of the subprogram is
9565 Convention_Protected, because it may be used in subsequent declarations
9566 within the protected declaration.
9568 2011-08-01 Vincent Celier <celier@adacore.com>
9570 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9571 and "final" procedures when the name of the library is "ada", to avoid
9572 duplicate symbols "adainit" and "adafinal" in executables.
9574 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9576 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9577 quantified expression that appears within a postcondition and uses the
9578 Ada2012 'Result attribute.
9580 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9582 * init.c (__gnat_error_handler): Cast reason to int.
9583 (__gnat_install_handler): Explain sa_sigaction use.
9585 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9587 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9588 subprogram has copy-in copy-out parameters, try to promote the mode of
9589 the return type if it is passed in registers.
9591 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9593 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9594 left operand as addressable.
9596 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9598 * gcc-interface/gigi.h (build_function_stub): Remove.
9599 (build_return_expr): Likewise.
9600 (convert_vms_descriptor): Declare.
9601 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9602 (build_function_stub): Move to...
9603 * gcc-interface/utils2.c (build_return_expr): Move to...
9604 * gcc-interface/trans.c (build_function_stub): ...here.
9605 (build_return_expr): ...here.
9606 (Subprogram_Body_to_gnu): Add local variable for language_function.
9607 Disconnect the parameter attributes cache, if any, once done with it.
9608 Call end_subprog_body only after setting the end_locus.
9609 Build the stub associated with the function, if any, at the very end.
9610 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9611 variables and streamline control flow.
9613 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9616 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9619 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9622 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9623 Assign to act.sa_sigaction.
9624 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9625 current->return_address to char * before arithmetic.
9627 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9629 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9630 Correct argument types.
9631 Extract code from reason.
9632 (__gnat_install_handler): Assign to act.sa_sigaction.
9634 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9636 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9637 (GNAT1_OBJS): ...here.
9639 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9642 * g-socthi-mingw.adb (Fill): Fix formatting.
9644 * gcc-interface/gigi.h: Move around comment.
9646 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9649 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9651 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9654 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9656 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9658 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9659 range comparison if Pmode is SImode.
9661 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9662 Eric Botcazou <ebotcazou@adacore.com>
9664 * adadecode.c: Wrap up in extern "C" block.
9665 * adadecode.h: Likewise.
9666 * adaint.c: Likewise. Remove 'const' keyword.
9667 * adaint.h: Likewise.
9669 * atree.h: Likewise.
9671 * cstreams.c: Likewise.
9675 * final.c: Likewise.
9677 * initialize.c: Likewise.
9679 * namet.h: Likewise.
9680 * nlists.h: Likewise.
9681 * raise.c: Likewise.
9682 * raise.h: Likewise.
9683 * repinfo.h: Likewise.
9684 * seh_init.c: Likewise.
9685 * targext.c: Likewise.
9686 * tracebak.c: Likewise.
9687 * uintp.h: Likewise.
9688 * urealp.h: Likewise.
9689 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9690 * xsinfo.adb: Likewise.
9691 * xsnamest.adb: Likewise.
9692 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9693 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9694 * gcc-interface/misc.c: Likewise.
9695 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9696 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9697 ada/targext.o here...
9698 (GNAT_ADA_OBJS): ...and not here.
9699 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9700 (GNATBIND_OBJS): Reorder.
9702 2011-07-07 Richard Henderson <rth@redhat.com>
9704 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9705 dwarf2out_frame_init.
9707 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9709 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9711 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9714 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9716 2011-07-06 Richard Guenther <rguenther@suse.de>
9718 * gcc-interface/misc.c (gnat_init): Merge calls to
9719 build_common_tree_nodes and build_common_tree_nodes_2.
9720 Re-initialize boolean_false_node.
9722 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9723 Olivier Hainque <hainque@adacore.com>
9724 Nicolas Setton <setton@adacore.com>
9726 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9727 the type according to the ARTIFICIAL_P parameter.
9728 (create_type_decl): Likewise.
9729 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9731 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9733 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9734 (gnatbind): Likewise.
9736 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9738 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9740 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9742 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9743 local variable throughout. Remove useless call to Base_Type.
9744 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9745 Take it also into account for the volatileness of the field. Set the
9746 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9748 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9750 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9751 on a dereference built for a by-ref object if it has an address clause.
9753 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9755 * einfo.ads (Address_Taken): Document use for the second argument of
9756 Asm_Input and Asm_Output attributes.
9757 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9758 argument is an entity name, then set Address_Taken on it.
9759 <Attribute_Asm_Output>: Likewise.
9760 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9761 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9762 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9763 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9765 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9768 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9770 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9772 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9773 (ada/utils.o): Update dependencies.
9774 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9775 ../../../libcpp/libcpp.a.
9776 * gcc-interface/utils.c: Include common/common-target.h.
9777 (process_attributes): Use targetm_common.have_named_sections.
9779 2011-06-07 Richard Guenther <rguenther@suse.de>
9781 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9784 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9786 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9787 TREE_THIS_NOTRAP flag.
9789 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9791 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9794 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9796 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9797 constants whose full view has discriminants specially.
9799 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9801 * gcc-interface/utils.c: Include diagnostic.h.
9802 (gnat_write_global_declarations): Output debug information for all
9803 global type declarations before finalizing the compilation unit.
9804 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9806 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9808 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9810 2011-05-25 Kai Tietz <ktietz@redhat.com>
9812 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9813 initialization instead of const/none-const pointer assignment.
9815 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9817 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9818 $(EXTRA_GNAT1_OBJS).
9819 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9820 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9821 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9822 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9823 libcommon-target.a instead of prefix.o.
9825 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9828 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9830 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9832 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9833 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9834 instead of version.o.
9836 2011-05-18 Kai Tietz <ktietz@redhat.com>
9838 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9839 boolean_false_node instead of integer_zero_node.
9840 (convert_with_check): Likewise.
9841 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9843 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9845 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9846 type of the parameter is an unconstrained array, convert the actual to
9847 the type of the formal in the In Out and Out cases as well.
9849 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9851 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9852 call build_function_type_array or build_varargs_function_type_array
9854 (create_subprog_type): Don't call build_function_type; call
9855 build_function_type_vec instead.
9857 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9859 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9860 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9861 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9863 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9865 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9867 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9868 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9870 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9872 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9874 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9876 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9877 instead of accessing TYPE_ARG_TYPES directly.
9878 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9880 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9883 * gcc-interface/gigi.h (get_variant_part): Declare.
9884 * gcc-interface/decl.c (get_variant_part): Make global.
9885 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9886 types have the same constant size, are record types and T1 has a
9887 variant part while T2 doesn't.
9889 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9891 * gcc-interface/utils.c (begin_subprog_body): Do not call
9893 (end_subprog_body): Likewise.
9895 2011-05-04 Richard Guenther <rguenther@suse.de>
9897 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9899 (pos_to_constructor): Likewise.
9901 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9902 Eric Botcazou <ebotcazou@adacore.com>
9904 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9905 of build_function_type. Adjust calls to...
9906 (build_raise_check): ...this. Do not take a void_tree parameter.
9907 Call build_function_type_list instead of build_function_type.
9908 Fix head comment and swap couple of conditional blocks.
9910 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9912 * gnatvsn.ads (Library_Version): Bump to 4.7.
9913 (Current_Year): Bump to 2011.
9915 2011-04-29 Michael Matz <matz@suse.de>
9917 * gcc-interface/misc.c (gnat_handle_option): Set
9918 warn_maybe_uninitialized.
9920 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9922 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9923 the Watson/McCabe paper.
9925 2011-04-23 Jim Meyering <meyering@redhat.com>
9927 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9929 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9931 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9934 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9936 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9938 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9939 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9940 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9941 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9942 <all>: Do not set flags on the reused DECL node coming from an alias.
9943 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9944 don't need debug info here...
9945 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9946 (gigi): Adjust calls to create_subprog_decl.
9947 (build_raise_check): Likewise.
9948 (establish_gnat_vms_condition_handler): Likewise.
9949 (Compilation_Unit_to_gnu): Likewise.
9950 (gnat_to_gnu): Likewise.
9952 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9954 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9955 (NO_REORDER_ADAFLAGS): New variable.
9956 (EXTRA_GNATTOOLS): Always define.
9957 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9958 Clean up and adjust list of files compiled with special options.
9959 * gcc-interface/Make-lang.in: Likewise.
9960 (ada/decl.o): Cosmetical change.
9961 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9963 2011-04-20 Jim Meyering <meyering@redhat.com>
9965 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9967 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9969 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9970 $(CFLAGS) on the link line.
9972 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9974 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9975 padded type built for the return type if it is unconstrained.
9977 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9979 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9981 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9983 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9984 before calling TREE_CHAIN.
9985 * gcc-interface/misc.c (gnat_init_ts): New function.
9986 (LANG_HOOKS_INIT_TS): Define.
9988 2011-04-12 Martin Jambor <mjambor@suse.cz>
9990 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9991 instead of cgraph_node.
9993 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9995 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9996 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9999 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10001 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10002 of aggregate types that contain a placeholder.
10004 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10006 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10008 (handle_type_generic_attribute): Likewise.
10010 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10013 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10015 2011-04-04 Kai Tietz <ktietz@redhat.com>
10018 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10021 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10023 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10024 type case, do not strip a padding type around the array type.
10026 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10028 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10031 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10033 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10034 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10035 code for -feliminate-unused-debug-types.
10036 (gnat_post_options): Likewise.
10038 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10040 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10041 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10044 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10046 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10047 DECL_ARTIFICIAL flag on enumeration types.
10049 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10051 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10052 fat pointer types artificial unconditionally.
10053 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10056 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10058 * gcc-interface/gigi.h (get_dummy_type): Declare.
10059 (build_dummy_unc_pointer_types): Likewise.
10060 (finish_fat_pointer_type): Likewise.
10061 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10062 fat pointer type has been built, complete it in place.
10063 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10064 and thin pointers. Remove useless variable.
10065 (finish_fat_pointer_type): Make global and move to...
10066 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10067 (get_dummy_type): New function.
10068 (build_dummy_unc_pointer_types): Likewise.
10069 (gnat_pushdecl): Propage the name to the anonymous variants only.
10070 (update_pointer_to): Only adjust the pointer types in the unconstrained
10073 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10075 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10076 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10077 if this is a Taft amendment type and the full declaration is available.
10078 * gcc-interface/trans.c (process_type): Likewise.
10079 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10080 (process_freeze_entity): Likewise.
10081 * gcc-interface/utils.c (dummy_global): New static variable.
10082 (gnat_write_global_declarations): If there are types declared as used
10083 at the global level, insert them in the global hash table.
10085 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10087 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10088 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10089 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10091 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10092 flag of the type accordingly.
10093 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10095 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10097 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10098 finalizing types when updating the pointers to the designated type.
10099 <all>: Finalize the deferred types even if we didn't defer processing
10100 of incomplete types in this invocation.
10102 2011-04-01 Olivier Hainque <hainque@adacore.com>
10103 Nicolas Setton <setton@adacore.com>
10104 Eric Botcazou <ebotcazou@adacore.com>
10106 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10107 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10109 2011-03-28 Kai Tietz <ktietz@redhat.com>
10111 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10113 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10114 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10116 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10118 2011-03-28 Tristan Gingold <gingold@adacore.com>
10121 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10122 Use ada output of gnatbind.
10123 (ada/b_gnatb.adb): Ditto.
10124 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10125 (ada.mostlyclean, ada.stage1)
10126 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10127 (ada.stagefeedback): Adjust.
10128 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10129 Use ada output of gnatbind.
10130 (b_gnatm.adb): Ditto.
10131 (b_gnatl.o, b_gnatm.o): New rules.
10133 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10135 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10136 for the padded type built to support a specified size or alignment.
10138 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10140 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10141 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10142 unconditionally to the end of the unit when the designated type is
10144 <all>: Rename local variable. Attempt to un-defer types only and do it
10145 for limited_with'ed types as well.
10146 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10147 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10148 consistently and remove redundant call to finalize_from_with_types.
10150 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10152 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10153 subprograms without a previous spec declared in the same unit.
10154 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10155 subprograms at the end of the unit instead of at the beginning.
10156 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10157 isn't public for the special handling of non-inline functions nested
10158 inside inline external functions.
10160 2011-03-25 Jeff Law <law@redhat.com>
10162 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10164 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10166 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10167 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10168 to compute Set_Size_Depends_On_Discriminant.
10169 (Layout_Type): Call it on array types in back-end layout mode.
10170 * sem_util.adb (Requires_Transient_Scope): Return true for array
10171 types only if the size depends on the value of discriminants.
10172 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10173 type if the RHS is a call to a function that returns an unconstrained
10174 type with default discriminant.
10176 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10178 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10179 non-conversion to the nominal result type at the end.
10181 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10183 * gcc-interface/trans.c (create_temporary): New function taken from...
10184 (create_init_temporary): ...here. Call it.
10185 (call_to_gnu): Create the temporary for the return value early, if any.
10186 Create it for a function with copy-in/copy-out parameters if there is
10187 no target; in other cases of copy-in/copy-out, use another temporary.
10188 Push the new binding level lazily. Add and rename local variables.
10190 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10192 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10194 (set_rm_size): Likewise.
10196 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10198 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10199 for the padded type built in order to support a specified alignment.
10200 Fix incorrect formatting.
10202 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10205 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10207 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10209 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10210 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10211 to the end of the list. Adjust recursive call. Rename local variable.
10212 If REORDER is true, reorder components of the record type.
10213 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10214 components_to_record and adjust the parameter list.
10216 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10218 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10219 disabled, use the variable for bounds of loop iteration scheme.
10221 2011-03-21 Kai Tietz <ktietz@redhat.com>
10224 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10226 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10228 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10229 out whether the expression is read-only. Short-circuit placeholder
10230 case and rename a couple of local variables.
10232 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10234 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10235 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10236 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10237 (convert): Deal with conversions from a smaller form type specially.
10239 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10241 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10242 its argument, except for the special -I- switch.
10244 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10246 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10249 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10251 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10253 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10255 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10257 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10258 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10259 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10260 Do not generate the check directly, instead instantiate the template
10261 check present in the descriptor.
10262 (make_descriptor_field): Move around.
10263 (build_vms_descriptor32): Build a template check in the POINTER field.
10264 (build_vms_descriptor): Remove useless suffixes.
10265 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10267 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10270 * targext.c: Include target files if IN_RTS is defined.
10272 2011-01-26 Richard Guenther <rguenther@suse.de>
10275 * targext.c: Include config.h.
10276 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10279 2011-01-04 Pascal Obry <obry@adacore.com>
10280 Eric Botcazou <ebotcazou@adacore.com>
10282 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10284 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10286 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10287 end-of-case on the end label and its associated gotos, if any.
10289 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10291 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10292 expressions of the parameter cache within the statement group of
10293 the CICO mechanism.
10295 2011-01-04 Olivier Hainque <hainque@adacore.com>
10296 Eric Botcazou <ebotcazou@adacore.com>
10298 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10299 (set_end_locus_from_node): New function.
10300 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10301 make and the function end_locus.
10302 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10303 for the elaboration subprogram.
10304 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10305 set the end_locus of the expression as well.
10307 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10310 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10311 variables that are referenced in exception handlers volatile.
10315 Copyright (C) 2011 Free Software Foundation, Inc.
10317 Copying and distribution of this file, with or without modification,
10318 are permitted in any medium without royalty provided the copyright
10319 notice and this notice are preserved.