]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
par_sco.adb, [...]: Minor reformatting.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2011-08-05 Robert Dewar <dewar@adacore.com>
2
3 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
4 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6 a-comutr.ads, lib-xref.adb: Minor reformatting.
7
8 2011-08-05 Robert Dewar <dewar@adacore.com>
9
10 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
11 warning if there is an exception handler present.
12
13 2011-08-05 Pascal Obry <obry@adacore.com>
14
15 * a-iteint.ads: Fix copyright year.
16
17 2011-08-05 Thomas Quinot <quinot@adacore.com>
18
19 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
20 statement SCO for a USE clause or a representation clause.
21
22 2011-08-05 Yannick Moy <moy@adacore.com>
23
24 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
25 between body and spec for stub.
26 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
27 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
28 pragma precondition or postcondition, for which the enclosing
29 subprogram or package in the AST is not the desired one, return empty.
30
31 2011-08-05 Thomas Quinot <quinot@adacore.com>
32
33 * g-expect.adb: Minor reformatting.
34
35 2011-08-05 Bob Duff <duff@adacore.com>
36
37 * a-fihema.adb: Comment out OS_Lib.
38
39 2011-08-05 Matthew Heaney <heaney@adacore.com>
40
41 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
42 (unbounded multiway tree containers) and a-iteint.ads.
43 * a-comutr.ads, a-comutr.adb:
44 This is the new Ada 2012 unit for unbounded multiway tree containers
45 * a-cimutr.ads, a-cimutr.adb
46 This is the new Ada 2012 unit for indefinite multiway tree containers
47 * a-iteint.ads: New file.
48
49 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
50
51 * gcc-interface/Makefile.in (raise-gcc.o): Search
52 $(srcdir)/../libgcc.
53
54 2011-08-05 Bob Duff <duff@adacore.com>
55
56 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
57 subpools.
58 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
59
60 2011-08-05 Ed Schonberg <schonberg@adacore.com>
61
62 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
63 general indexing aspects of Ada2012. Called when analyzing indexed
64 components when other interpretations fail.
65 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
66 in an expression context where overloading is meaningful. This excludes
67 the occurrence in an aspect specification (efficiency only).
68 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
69 related to iterators can be set by an attribute specification, but
70 cannot be queried.
71 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
72 Constant_Indexing and Variable_Indexing.
73 (Check_Indexing_Functions): New procedure to perform legality checks.
74 Additional semantic checks at end of declarations.
75
76 2011-08-05 Sergey Rybin <rybin@adacore.com>
77
78 * tree_io.ads: Update ASIS_Version_Number because of the change of the
79 order of calling Tree_Write/Tree_Read routines made for aspects.
80
81 2011-08-05 Bob Duff <duff@adacore.com>
82
83 * a-fihema.adb (Finalize): Fix race condition.
84
85 2011-08-05 Yannick Moy <moy@adacore.com>
86
87 * sem_ch12.adb (Analyze_Package_Instantiation,
88 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
89 mode.
90
91 2011-08-05 Ed Schonberg <schonberg@adacore.com>
92
93 * sem_type.adb (Specific_Type): in an instance, the type-specific
94 operand of an equality check that involves null may have a private
95 type. Use full view to determine legality of construct.
96
97 2011-08-05 Vincent Celier <celier@adacore.com>
98
99 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
100 delete or close the file when the call to gnatmake was successful.
101
102 2011-08-05 Yannick Moy <moy@adacore.com>
103
104 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
105 Global_Discard_Names.
106
107 2011-08-05 Ed Schonberg <schonberg@adacore.com>
108
109 * sinfo.ads: comments on use of entity field for aspect specifications.
110
111 2011-08-05 Ed Schonberg <schonberg@adacore.com>
112
113 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
114 node is not itself an entity but a selected component, it is a
115 rewritten parameterless call to an en enclosing synchronized operation,
116 and this expansion will be performed again in the instance, so there is
117 no global information to preserve.
118
119 2011-08-05 Javier Miranda <miranda@adacore.com>
120
121 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
122 for renamings of predefined primitives.
123 (In_Predef_Prims_DT): New subprogram.
124
125 2011-08-05 Ed Schonberg <schonberg@adacore.com>
126
127 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
128 possible interpretation of name is a reference type, add an
129 interpretation that is the designated type of the reference
130 discriminant of that type.
131 * sem_res.adb (resolve): If the interpretation imposed by context is an
132 implicit dereference, rewrite the node as the deference of the
133 reference discriminant.
134 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
135 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
136 parent type or base type.
137 * sem_ch4.adb (Process_Indexed_Component,
138 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
139 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
140 Check for implicit dereference.
141 (List_Operand_Interps): Indicate when an implicit dereference is
142 ambiguous.
143 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
144
145 2011-08-05 Thomas Quinot <quinot@adacore.com>
146
147 * scos.ads: Update documentation of SCO table. Pragma statements can now
148 be marked as disabled (using 'p' instead of 'P' as the statement kind).
149 * par_sco.ads, par_sco.adb: Implement the above change.
150 (Process_Decisions_Defer): Generate a P decision for the first parameter
151 of a dyadic pragma Debug.
152 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
153 necessary.
154 * put_scos.adb: Code simplification based on above change.
155
156 >>>>>>> .r177446
157 2011-08-05 Robert Dewar <dewar@adacore.com>
158
159 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
160 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
161 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
162 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
163
164 2011-08-05 Bob Duff <duff@adacore.com>
165
166 * a-stunau.ads, g-spipat.adb: Update comments.
167
168 2011-08-05 Bob Duff <duff@adacore.com>
169
170 * a-fihema.ads: Minor comment fix.
171 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
172 correct.
173 (Attach, Detach): Remove some unnecessary code.
174 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
175
176 2011-08-05 Bob Duff <duff@adacore.com>
177
178 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
179 allocation for Objects component. This simplifies the code somewhat. It
180 is also a little more efficient in the not-so-unusual case where there
181 are no controlled objects allocated.
182 Make Finalization_Started flag atomic.
183 (Finalize): Avoid unnecessary detachment of items from the list.
184 (pcol): Minor cleanup.
185
186 2011-08-05 Ed Schonberg <schonberg@adacore.com>
187
188 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
189 package whose name is the same as that of the generic unit, or its
190 ultimate prefix.
191
192 2011-08-05 Bob Duff <duff@adacore.com>
193
194 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
195 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
196 Minor comment fixes.
197
198 2011-08-05 Arnaud Charlet <charlet@adacore.com>
199
200 * make.adb (Linking_Phase): No longer need to set source search path
201 before calling gnatlink in CodePeer mode.
202 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
203 gcc in CodePeer mode, since the binder generated file no longer has a
204 'with Main'.
205 * switch.ads, switch.adb (Is_Language_Switch): Removed.
206 * switch-c.adb: Update comment.
207
208 2011-08-05 Thomas Quinot <quinot@adacore.com>
209
210 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
211
212 2011-08-05 Nicolas Roche <roche@adacore.com>
213
214 * gnat_ugn.texi: Fix minor syntax error issue.
215
216 2011-08-05 Vincent Celier <celier@adacore.com>
217
218 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
219 delete or close the file when the call to gnatmake returns a non
220 successful return code.
221
222 2011-08-05 Ed Schonberg <schonberg@adacore.com>
223
224 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
225 check, indicate that the copy of the original node does not come from
226 source, to prevent an infinite recursion of the expansion.
227
228 2011-08-05 Johannes Kanig <kanig@adacore.com>
229
230 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
231 VC generation for subprogram bodies.
232
233 2011-08-05 Yannick Moy <moy@adacore.com>
234
235 * einfo.ads: Typo.
236 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
237 the base type with the smallest allowed base type.
238
239 2011-08-05 Sergey Rybin <rybin@adacore.com>
240
241 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
242 aspects.
243
244 2011-08-05 Ed Schonberg <schonberg@adacore.com>
245
246 * sem_ch12.ads: minor comment updates.
247
248 2011-08-05 Ed Schonberg <schonberg@adacore.com>
249
250 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
251 instantiation and a formal package the compiler generates a package
252 renaming declaration so that the generic name within the declaration
253 is interpreted as a renaming of the instance. At the end of a formal
254 package declaration, this renaming must become invisible.
255
256 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
257
258 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
259 comparison and rely on concrete entities instead.
260
261 2011-08-05 Ed Schonberg <schonberg@adacore.com>
262
263 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
264 and discriminants, to indicate that the type has an access discriminant
265 that supports implicit dereference.
266 * snames.ads-tmpl: Add names of aspects and attributes related to
267 Ada2012 iterators: constant_indexing, default_iterator,
268 iterator_element, implicit_dereference, variable_indexing.
269 * aspects.ads, aspects.adb: entries for iterator-related aspects.
270 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
271 iterator-related aspects.
272 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
273
274 2011-08-05 Sergey Rybin <rybin@adacore.com>
275
276 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
277 metrics in gnatmetric to cover new kinds of coupling mentrics.
278
279 2011-08-05 Steve Baird <baird@adacore.com>
280
281 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
282 of calling the user-defined main subprogram.
283 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
284 is set) Call_Main_Subprogram ahead of, as opposed to
285 inside of, Main.
286 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
287 generation of a "with" of the user-defined main subprogram.
288 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
289 (which is now called from Gen_Main instead).
290
291 2011-08-05 Emmanuel Briot <briot@adacore.com>
292
293 * projects.texi: Added reference to the Makefile package.
294
295 2011-08-05 Thomas Quinot <quinot@adacore.com>
296
297 * exp_ch7.adb: Minor comment rewording.
298
299 2011-08-05 Ed Falis <falis@adacore.com>
300
301 * env.c: Fix comment.
302
303 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
304
305 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
306 character comparison and rely on concrete entities instead.
307
308 2011-08-05 Ed Schonberg <schonberg@adacore.com>
309
310 * sem_ch3.adb: (Check_Private_Overriding): better error message,
311 suggested by AI95-0068.
312
313 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
314
315 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
316 the two potential initialization calls. This accounts for any
317 access-before-elaboration checks which may precede the initialization
318 calls.
319 (Next_Suitable_Statement): New routine. Returns the next real statement
320 after the input node while skipping generated checks.
321 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
322 with comment on usage.
323 Do not generate Elaborate_All when the trigger is a finalization call
324 coming from a type init proc.
325 (Check_Elab_Call): Propagate the initialization procedure context to
326 subsequent calls to Check_A_Call.
327 (Check_Internal_Call_Continue): Propagate the initialization procedure
328 context to subsequent calls to Check_Elab_Call.
329 (Is_Finalization_Procedure): New routine. Returns True if the input
330 entity denotes a [Deep_]Finalize routine.
331 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
332 along with comment on usage.
333
334 2011-08-05 Vadim Godunko <godunko@adacore.com>
335
336 * s-atocou.ads: Add list of supported platforms.
337
338 2011-08-05 Yannick Moy <moy@adacore.com>
339
340 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
341
342 * opt.ads (Disable_ALI_File): new Boolean flag
343 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
344
345 2011-08-05 Ed Falis <falis@adacore.com>
346
347 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
348 environ is properly defined.
349
350 2011-08-05 Vincent Celier <celier@adacore.com>
351
352 * make.adb (Compilation_Phase): Exit immediately when all objects have
353 been found up to date, to avoid multiple exit messages.
354 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
355 same project for languages with no compiler.
356 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
357 -eI.
358 2011-08-05 Robert Dewar <dewar@adacore.com>
359
360 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
361 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
362 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
363 s-atocou-builtin.adb: Minor reformatting.
364
365 2011-08-05 Yannick Moy <moy@adacore.com>
366
367 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
368 if the node to wrap is a pragma check, this node and enclosed
369 expression are not expanded, so do not apply any transformations here.
370 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
371 introducing transient scopes.
372
373 2011-08-05 Jose Ruiz <ruiz@adacore.com>
374
375 * adaint.c (__gnat_set_writable, __gnat_set_readable,
376 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
377 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
378 routine is available, so we use the default implementation of these
379 functions.
380 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
381 support for copying attributes on VxWorks 6.
382
383 2011-08-05 Yannick Moy <moy@adacore.com>
384
385 * debug.adb: Remove use of -gnatd.D.
386 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
387 * opt.ads: Simplify variables for ALFA mode, to keep one only
388 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
389 to ALFA mode.
390
391 2011-08-05 Vincent Celier <celier@adacore.com>
392
393 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
394 Builder'Default_Switches.
395
396 2011-08-05 Vincent Celier <celier@adacore.com>
397
398 * makeusg.adb: Add lines for --create-map-file switches.
399
400 2011-08-05 Ed Schonberg <schonberg@adacore.com>
401
402 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
403 profile is incomplete and the full view is available, replace it with
404 the full view.
405 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
406 incomplete, freezing the subprogram is delayed until the full view is
407 frozen.
408 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
409 fixed-point multiplication operator and the predefined operator is
410 resolved in favor of the user-defined one.
411
412 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
413
414 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
415 CONST_CAST.
416
417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
418
419 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
420 whether a type lacks user-defined Read or Write operations, or has a
421 component that lacks them.
422 * sem_attr.adb (Check_Stream_Attribute): if restriction
423 No_Default_Stream_Attributes is active, verify that all subcomponent
424 types of the target have user-defined stream operations, and report
425 error otherwise.
426 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
427 * exp_strm.adb: Build_Elementary_Input_Call,
428 Build_Elementary_Write_Call): remove checks for restriction
429 No_Default_Stream_Attributes, now checked in semantics.
430
431 2011-08-04 Vincent Celier <celier@adacore.com>
432
433 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
434 switches on the command line, look for all valid --RTS switches in the
435 Builder switches and for each language use the first runtime name found
436 to invoke gprconfig.
437 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
438 command line and there is no auto-configuration.
439 (Runtime_Name_Set_For): New function.
440
441 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
442
443 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
444 elaborate initialization expression for variable Abort when processing
445 a package body or a declaration.
446 (Create_Finalizer): Propagate the package context when creating the
447 exception-related variables.
448 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
449 For_Package along with usage comment.
450
451 2011-08-04 Arnaud Charlet <charlet@adacore.com>
452
453 * gcc-interface/Makefile.in: Clean up targets.
454 Enable new package for atomic counters and copy-on-write implementation
455 of unbounded strings on x86 platforms.
456 * gcc-interface/Make-lang.in: Update dependencies.
457
458 2011-08-04 Robert Dewar <dewar@adacore.com>
459
460 * exp_ch7.adb: Minor reformatting.
461
462 2011-08-04 Robert Dewar <dewar@adacore.com>
463
464 * exp_strm.adb: Minor reformatting.
465
466 2011-08-04 Vadim Godunko <godunko@adacore.com>
467
468 * s-atocou.adb: Replace by dummy version and use on targets where atomic
469 operations are not supported.
470 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
471 * s-atocou-x86.adb: New file.
472 * Makefile.rtl: Add s-atocou.o file
473
474 2011-08-04 Arnaud Charlet <charlet@adacore.com>
475
476 * make.adb (Compile): Move setting of CodePeer_Mode to ...
477 (Compilation_Phase): ... here.
478 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
479
480 2011-08-04 Thomas Quinot <quinot@adacore.com>
481
482 * Make-generated.in: Fix minor typo in comment.
483
484 2011-08-04 Thomas Quinot <quinot@adacore.com>
485
486 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
487 the project path.
488
489 2011-08-04 Robert Dewar <dewar@adacore.com>
490
491 * a-coinho.adb: Minor reformatting.
492
493 2011-08-04 Robert Dewar <dewar@adacore.com>
494
495 * a-coinho.ads: Minor reformatting.
496
497 2011-08-04 Vadim Godunko <godunko@adacore.com>
498
499 * s-atocou.ads, s-atocou.adb: New files.
500 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
501 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
502 direct use of GCC's atomic builtins and replace them by use of new
503 atomic counter package.
504
505 2011-08-04 Ed Schonberg <schonberg@adacore.com>
506
507 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
508
509 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
510
511 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
512 with a call to Get_External_Tag.
513 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
514 subprogram usage. Remove the guard against package declarations and
515 bodies since Build_Cleanup_Statements is no longer invoked in that
516 context.
517 (Build_Components): Initialize Tagged_Type_Stmts when the context
518 contains at least one library-level tagged type.
519 (Build_Finalizer): New local variables Has_Tagged_Types and
520 Tagged_Type_Stmts along with associated comments on usage. Update the
521 logic to include tagged type processing.
522 (Create_Finalizer): Insert all library-level tagged type unregistration
523 code before the jump block circuitry.
524 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
525 (Expand_N_Package_Declaration): Remove the call to
526 Build_Cleanup_Statements.
527 (Process_Tagged_Type_Declaration): New routine. Generate a call to
528 unregister the external tag of a tagged type.
529 (Processing_Actions): Reimplemented to handle tagged types.
530 (Process_Declarations): Detect the declaration of a library-level
531 tagged type and carry out the appropriate actions.
532 (Unregister_Tagged_Types): Removed. The machinery has been directly
533 merged with Build_Finalizer.
534
535 2011-08-04 Robert Dewar <dewar@adacore.com>
536
537 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
538 gnatls.adb, exp_ch3.adb: Minor reformatting.
539
540 2011-08-04 Marc Sango <sango@adacore.com>
541
542 * sem_attr.adb (Analyze_Attribute): Replace the message
543 "invisible attribute of}" of the spark restriction violation in
544 attribute reference by the simple message "invisible attribute of type".
545 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
546 two insertion characters: '&' and '}'.
547
548 2011-08-04 Vadim Godunko <godunko@adacore.com>
549
550 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
551 * a-coinho.ads, a-coinho.adb: New file.
552 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
553
554 2011-08-04 Nicolas Roche <roche@adacore.com>
555
556 * alfa_test.adb: Not all ali files are containing alfa information even
557 if compiled with -gnatd.F. So suppress warning about missing ALFA
558 information.
559
560 2011-08-04 Yannick Moy <moy@adacore.com>
561
562 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
563 scope.
564 * put_alfa.adb: Check that scope name is not empty.
565
566 2011-08-04 Ed Schonberg <schonberg@adacore.com>
567
568 * exp_ch3.adb (Stream_Operation_Ok): new predicate
569 Needs_Elementary_Stream_Operation, to determine whether user-defined
570 Read and Write attributes are available for the elementary components
571 of the given type. If only the predefined attributes are available,
572 then when restriction No_Default_Stream_Attributes is active the
573 predefined stream attributes for the composite type cannot be created.
574
575 2011-08-04 Robert Dewar <dewar@adacore.com>
576
577 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
578 Put routines in alpha order
579
580 2011-08-04 Jose Ruiz <ruiz@adacore.com>
581
582 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
583 * gcc-interface/Make-lang.in: Update dependencies.
584
585 2011-08-04 Arnaud Charlet <charlet@adacore.com>
586
587 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
588 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
589 gnat1why).
590
591 2011-08-04 Robert Dewar <dewar@adacore.com>
592
593 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
594 lib-xref-alfa.adb: Minor reformatting.
595
596 2011-08-04 Marc Sango <sango@adacore.com>
597
598 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
599 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
600 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
601 mode.
602
603 2011-08-04 Tristan Gingold <gingold@adacore.com>
604
605 * bindgen.adb (Gen_Adainit_C): Remove.
606 (Gen_Adafinal_C): Ditto.
607 (Gen_Elab_Externals_C): Ditto.
608 (Gen_Elab_Calls_C): Ditto.
609 (Gen_Elab_Order_C): Ditto.
610 (Gen_Elab_Defs_C): Ditto.
611 (Gen_Finalize_Library_C): Ditto.
612 (Gen_Finalize_Library_Defs_C): Ditto.
613 (Gen_Main_C): Ditto.
614 (Gen_Output_File_C): Ditto.
615 (Gen_Restrictions_C): Ditto.
616 (Gen_Versions_C): Ditto.
617 (Write_Info_Ada_C): Ditto.
618 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
619 (Gen_Output_File): Do not force Ada_Bind_File anymore.
620 Always call Gen_Output_File_Ada.
621 * gnatlink.adb (Begin_Info): Now a constant.
622 (End_Info): Ditto.
623 (Ada_Bind_File): Remove
624 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
625 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
626 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
627 * opt.ads (Ada_Bind_File): Remove.
628
629 2011-08-04 Thomas Quinot <quinot@adacore.com>
630
631 * projects.texi: Document target-specific directory in default project
632 path for gnatmake.
633
634 2011-08-04 Thomas Quinot <quinot@adacore.com>
635
636 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
637 path in all cases .
638
639 2011-08-04 Yannick Moy <moy@adacore.com>
640
641 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
642 opt.ads, lib-xref.ads: Code clean up.
643
644 2011-08-04 Yannick Moy <moy@adacore.com>
645
646 * gnat_rm.texi: Update description of Test_Case
647 * gnat_ugn.texi: Typo.
648
649 2011-08-04 Ed Falis <falis@adacore.com>
650
651 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
652
653 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
654
655 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
656 it is of type Root_Controlled. This action eliminates fields Prev and
657 Next from type equality.
658
659 2011-08-04 Yannick Moy <moy@adacore.com>
660
661 * lib-xref-alfa.adb: Correct typo.
662
663 2011-08-04 Matthew Heaney <heaney@adacore.com>
664
665 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
666 component.
667
668 2011-08-04 Yannick Moy <moy@adacore.com>
669
670 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
671 (Analyze_Pragma): allow static string expression for name of Test_Case,
672 instead of simply string literals.
673 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
674 expressions.
675
676 2011-08-04 Vincent Celier <celier@adacore.com>
677
678 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
679 case suffixes to find truncated main sources.
680
681 2011-08-04 Tristan Gingold <gingold@adacore.com>
682
683 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
684 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
685 (Compute_Current_Task): Ditto.
686
687 2011-08-04 Tristan Gingold <gingold@adacore.com>
688
689 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
690
691 2011-08-04 Yannick Moy <moy@adacore.com>
692
693 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
694 library-level constant.
695 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
696 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
697 used as selector of parameter association, in ALFA mode.
698
699 2011-08-04 Robert Dewar <dewar@adacore.com>
700
701 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
702 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
703 reformatting.
704
705 2011-08-04 Arnaud Charlet <charlet@adacore.com>
706
707 * make.adb (Linking_Phase): Set source search path before calling
708 gnatlink in CodePeer mode.
709
710 2011-08-04 Javier Miranda <miranda@adacore.com>
711
712 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
713 Remove code which takes care of building TSDs.
714 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
715 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
716 the accessibility check in VM targets.
717 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
718 (Building_Static_DT): Now returns false for VM targets.
719 (Build_VM_TSDs): Removed.
720 (Expand_Interface_Conversion): Generate missing runtime check for
721 conversions to interface types whose target type is unknown at compile
722 time.
723 (Make_VM_TSD): Add missing code to disable the generation of calls to
724 Check_TSD if the tagged type is not defined at library level, or not
725 has a representation clause specifying its external tag, or -gnatdQ is
726 active.
727 * exp_disp.ads (Build_VM_TSDs): Removed.
728 (Make_VM_TSDs): Spec relocated from exp_disp.adb
729 * sem_disp.adb (Check_Dispatching_Operation): No code required to
730 register primitives in the dispatch tables in VM targets.
731 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
732 initialization of class-wide interface objects in VM targets.
733 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
734 of Make_DT).
735
736 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
737
738 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
739 when dotnet-ld cannot be found.
740
741 2011-08-04 Arnaud Charlet <charlet@adacore.com>
742
743 * bindgen.adb: Simplify significantly generation of binder body file in
744 CodePeer mode.
745 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
746 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
747 not expanded).
748
749 2011-08-04 Yannick Moy <moy@adacore.com>
750
751 * sem_prag.adb, sem.ads: Code cleanup.
752
753 2011-08-04 Tristan Gingold <gingold@adacore.com>
754
755 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
756 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
757 results if possible.
758 * s-stusta.adb (Print): Adjust after changes in s-stausa.
759 * gnat_ugn.texi: Update dynamic stack usage section.
760
761 2011-08-04 Steve Baird <baird@adacore.com>
762
763 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
764 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
765 contains only a call to the user-defined main subprogram.
766 (Gen_Main_Ada) - If CodePeer_Mode is set, then
767 call the "wrapper" subprogram instead of directly
768 calling the user-defined main subprogram.
769
770 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
771
772 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
773 alternatives of a case statement for controlled objects. Rename local
774 variable A to Dead_Alt.
775 (Expand_N_If_Statement): Check the then and else statements of an if
776 statement for controlled objects. Check the then statements of all
777 elsif parts of an if statement for controlled objects.
778 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
779 objects.
780 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
781 detects a loop associated with the expansion of an array object.
782 Augment the processing of the loop statements to account for a possible
783 wrap done by Process_Statements_For_Controlled_Objects.
784 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
785 statements and abortable part of an asynchronous select for controlled
786 objects.
787 (Expand_N_Conditional_Entry_Call): Check the else statements of a
788 conditional entry call for controlled objects.
789 (Expand_N_Selective_Accept): Check the alternatives of a selective
790 accept for controlled objects.
791 (Expand_N_Timed_Entry_Call): Check the entry call and delay
792 alternatives of a timed entry call for controlled objects.
793 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
794 exception handler for controlled objects.
795 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
796 Add formal parameter Nested_Constructs along with its associated
797 comment.
798 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
799 Requires_Cleanup_Actions.
800 (Process_Statements_For_Controlled_Objects): New routine.
801 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
802 routine. Inspect a node which contains a non-handled sequence of
803 statements for controlled objects. If such an object is found, the
804 statements are wrapped in a block.
805
806 2011-08-04 Bob Duff <duff@adacore.com>
807
808 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
809 need to compare with Class_Wide_Type (T2), in order to get at the
810 original class-wide type node.
811 * sem_type.ads (Covers): Improve the comment.
812 * einfo.ads (Class_Wide_Type): Improve the comment.
813 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
814 the type of the Deref.
815
816 2011-08-04 Yannick Moy <moy@adacore.com>
817
818 * gnat_rm.texi: Document that Test_Case pragma can only appear on
819 separate declarations.
820 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
821 check identifier of pragma argument.
822 (Chain_TC): check that no other test case associated to the same entity
823 share the same name.
824 (Check_Test_Case): disallow test case inside subprogram body
825 (Analyze_Pragma): correct call to check identifier and not argument
826 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
827 function gets name from test case pragma.
828
829 2011-08-04 Yannick Moy <moy@adacore.com>
830
831 * gnat_rm.texi: Document new pragma and aspect.
832 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
833 (No_Duplicates_Allowed): new constant array defining whether duplicates
834 aspects of each kind can appear on the same declaration.
835 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
836 field, which points to a node holding the previous Spec_PPC_List.
837 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
838 through the indirection with Contract.
839 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
840 * par-prag.adb (Prag): do nothing on Test_Case pragma
841 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
842 be called directly.
843 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
844 component Ensures of Test_Case.
845 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
846 (Analyze_Generic_Subprogram_Declaration,
847 Analyze_Subprogram_Instantiation,
848 Analyze_Abstract_Subprogram_Declaration,
849 Analyze_Subprogram_Body_Helper,
850 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
851 insert contract in subprogram node at point of definition
852 * sem_ch13.adb
853 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
854 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
855 corresponding pragma
856 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
857 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
858 similar to the analysis of pre/post
859 (Derive_Subprogram): insert contract in subprogram node at point of
860 derivation.
861 * sem_prag.adb, sem_prag.ads
862 (Check_Arg_Is_String_Literal, Check_Identifier):
863 new checking procedures to be called in treatment of pragmas
864 (Check_Test_Case): new procedure to check that a Test_Case aspect or
865 pragma is well-formed. This does not check currently that 'Result is
866 used only in the Ensures component of a Test_Case.
867 (Analyze_Pragma): add case for Test_Case
868 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
869 components of a Test_Case.
870 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
871 expressions in the 3rd (and 4th if present) arguments of a Test_Case
872 pragma, treated as spec expressions.
873 (Sig_Flags): add value -1 for Test_Case.
874 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
875 Get_Requires_From_Test_Case_Pragma): getters for both expression
876 components of a Test_Case.
877 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
878 indirection between an entry or [generic] subprogram entity and its
879 pre/post + test-cases.
880 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
881 get/set for fields of an N_Contract node.
882 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
883 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
884 names and pragma for Test_Case.
885 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
886
887 2011-08-04 Vincent Celier <celier@adacore.com>
888
889 * gnat_ugn.texi: Improve documentation of gnatmake switch
890 --source-info-file=.
891
892 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
893
894 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
895 type). Initialize Atyp to the appropriate type which is later checked
896 for completion. Rewrite the assertion associated with private type
897 completion.
898
899 2011-08-04 Ed Falis <falis@adacore.com>
900
901 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
902 initialize the number of CPUs.
903
904 2011-08-04 Ed Schonberg <schonberg@adacore.com>
905
906 * sem_type.adb (Disambiguate): New subsidiary routine
907 In_Same_Declaration_List, to implement AI05-0020: a user-defined
908 equality on an anonymous access type whose designated type is private
909 does not lead to an ambiguity with the universal access equality
910 operator in the body or child units of the defining package. The same
911 is true for a multiplication operator on a private type completed with
912 a fixed-point-type.
913
914 2011-08-04 Javier Miranda <miranda@adacore.com>
915
916 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
917 (Normalize_Scalars_Config): Removed.
918 * opt.adb
919 (Register_Opt_Config_Switches): Remove registering config values of
920 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
921 (Restore_Opt_Config_Switches): Remove code which restores the values of
922 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
923 Init_Or_Norm_Scalars.
924 (Save_Opt_Config_Switches): Remove code which saves values of
925 Init_Or_Norm_Scalars and Normalize_Scalars.
926 (Set_Opt_Config_Switches): Remove code which restores config values of
927 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
928 Init_Or_Norm_Scalars.
929
930 2011-08-04 Yannick Moy <moy@adacore.com>
931
932 * frontend.adb (Frontend): remove previous patch to avoid full
933 qualification in ALFA mode.
934 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
935 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
936 unique name for an entity, which could be used to identify the entity
937 across compilation units.
938
939 2011-08-04 Thomas Quinot <quinot@adacore.com>
940
941 * prj-env.adb
942 (Initialize_Default_Project_Path): Add target specific directory
943 ($prefix/$target/lib/gnat) in front of project path in all cases
944 (making gnatmake's behaviour consistent with gprbuild).
945 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
946 Pass target name from Sdefault to project subsystem.
947 * gnatls.adb: Show new target specific default project directory.
948
949 2011-08-04 Johannes Kanig <kanig@adacore.com>
950
951 * cstand.adb: Add Information to Identifier in Standard
952 (Identifer_For): Set Entity to the corresponding entity
953
954 2011-08-04 Sergey Rybin <rybin@adacore.com>
955
956 * gnat_ugn.texi: Update doc on gnatcheck.
957
958 2011-08-04 Yannick Moy <moy@adacore.com>
959
960 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
961 xrefs in a scope.
962
963 2011-08-04 Yannick Moy <moy@adacore.com>
964
965 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
966 performing expansion.
967 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
968 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
969 it is not called in ALFA mode.
970
971 2011-08-04 Emmanuel Briot <briot@adacore.com>
972
973 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
974 after all, so removed.
975
976 2011-08-04 Sergey Rybin <rybin@adacore.com>
977
978 * vms_data.ads: Add missing VMS qualifiers.
979
980 2011-08-04 Emmanuel Briot <briot@adacore.com>
981
982 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
983 the list of files on the command line after processing it through
984 Complete_Mains.
985
986 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
987
988 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
989 processing for .NET/JVM. These targets can now benefit from
990 Raise_From_Controlled_Operation and they share the same processing with
991 standard targets.
992 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
993 These targets need transient scopes in order to properly finalize short
994 lived controlled objects.
995 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
996 NET/JVM. These targets can now benefit from
997 Raise_From_Controlled_Operation and they share the same processing with
998 standard targets.
999
1000 2011-08-04 Geert Bosch <bosch@adacore.com>
1001
1002 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1003
1004 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1005
1006 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1007 Expand_Record_Aggregate, to determine whether aggregate must be
1008 expanded into assignments. This is the case if the ancestor part is
1009 private, regarless of the setting of the flag Has_Private_Ancestor.
1010
1011 2011-08-04 Ed Falis <falis@adacore.com>
1012
1013 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1014
1015 2011-08-04 Bob Duff <duff@adacore.com>
1016
1017 * sinfo.ads: Fix comment.
1018
1019 2011-08-04 Steve Baird <baird@adacore.com>
1020
1021 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1022 choose a package name in much the same way as is
1023 done for JGNAT when VM_Target /= No_VM, except that
1024 a slightly more distinctive prefix string is used.
1025
1026 2011-08-04 Emmanuel Briot <briot@adacore.com>
1027
1028 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1029 gnatmake command line.
1030 This behavior was never documented (and was supported only because of
1031 an early bug in the code). This case might lead to ambiguous cases
1032 (between unit names and truncated base names without suffixes).
1033
1034 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1035
1036 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1037 Remove the external tag of a tagged type from the internal hash table.
1038 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1039 expanded usage of the routine. Strenghten the check for Is_Master. Add
1040 processing for tagged types.
1041 (Build_Finalizer): Create all the necessary lists used in finalizer
1042 creation when the processed context is a package that may contain
1043 tagged types.
1044 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1045 Requires_Cleanup_Actions.
1046 (Expand_N_Package_Body): Package bodies may need clean up code
1047 depending on whether they contain tagged types.
1048 (Expand_N_Package_Declaration): Package declarations may need clean up
1049 code depending on whether they contain tagged types.
1050 (Unregister_Tagged_Types): New routine. Search through a list of
1051 declarations or statements, looking for non-abstract Ada tagged types.
1052 For each such type, generate code to unregister the external tag.
1053 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1054 Requires_Cleanup_Actions.
1055 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1056 through a list of declarations or statements looking for non-abstract
1057 Ada tagged types or controlled objects.
1058 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1059 Requires_Cleanup_Actions.
1060 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1061 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1062 RE_Unit_Table.
1063
1064 2011-08-04 Vincent Celier <celier@adacore.com>
1065
1066 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1067 has Ada sources, not project Project, because if the root project
1068 Project has no sources of its own, all projects will be deemed without
1069 sources.
1070
1071 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1072
1073 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1074 of the No_Param_Proc acc-to-subp type used for initialization of
1075 __gnat_finalize_library_objects so that it's declared at library level
1076 rather than nested inside of the adainit routine.
1077
1078 2011-08-04 Javier Miranda <miranda@adacore.com>
1079
1080 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1081 if the tagged type has a representation clause which specifies its
1082 external tag.
1083
1084 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1085
1086 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1087 Remove previous procedure with that name.
1088 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1089 when appropriate.
1090 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1091 subtype mark, the ancestor cannot have unknown discriminants.
1092 (Resolve_Record_Aggregate): if the type has invisible components
1093 because of a private ancestor, the aggregate is illegal.
1094
1095 2011-08-04 Vincent Celier <celier@adacore.com>
1096
1097 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1098 account switches -gnat2005, -gnat12 and -gnat2012.
1099
1100 2011-08-04 Bob Duff <duff@adacore.com>
1101
1102 * s-tasdeb.ads: Minor comment fix.
1103
1104 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1105
1106 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1107 CodePeer mode.
1108 * switch.ads, switch.adb (Is_Language_Switch): New function.
1109
1110 2011-08-04 Vincent Celier <celier@adacore.com>
1111
1112 * switch-c.adb: Minor comment addition.
1113
1114 2011-08-04 Vincent Celier <celier@adacore.com>
1115
1116 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1117 ending with '=' is followed by a space (missing file name).
1118
1119 2011-08-04 Pascal Obry <obry@adacore.com>
1120
1121 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1122
1123 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1124
1125 * sem_ch12.adb (Analyze_Associations): New routine
1126 Check_Overloaded_Formal_Subprogram to reject a formal package when
1127 there is a named association or a box initialisation for an overloaded
1128 formal subprogram of the corresponding generic.
1129
1130 2011-08-04 Yannick Moy <moy@adacore.com>
1131
1132 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1133 * get_alfa.adb, put_alfa.adb: Read and write new component of
1134 cross-reference.
1135 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1136
1137 2011-08-04 Pascal Obry <obry@adacore.com>
1138
1139 * urealp.adb: Minor reformatting.
1140
1141 2011-08-04 Tristan Gingold <gingold@adacore.com>
1142
1143 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1144 Handle the case when Cleanup_Protected_Object returns Empty.
1145
1146 2011-08-04 Yannick Moy <moy@adacore.com>
1147
1148 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1149
1150 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1151
1152 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1153 call, ignore functions.
1154
1155 2011-08-04 Geert Bosch <bosch@adacore.com>
1156
1157 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1158 point.
1159
1160 2011-08-04 Emmanuel Briot <briot@adacore.com>
1161
1162 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1163 as an index for Builder'Switches. This conforms to the documentation.
1164 * make.adb (Insert_Project_Sources): avoid duplicate code
1165
1166 2011-08-04 Emmanuel Briot <briot@adacore.com>
1167
1168 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1169 name on the command line (for instance "../dummy"), never assume it can
1170 be a unit name.
1171
1172 2011-08-04 Tristan Gingold <gingold@adacore.com>
1173
1174 * bindgen.adb: Remove code the reference or create the
1175 Break_Start/__gnat_break_start procedure.
1176 * s-stalib.adb (Break_Start): Removed.
1177
1178 2011-08-04 Emmanuel Briot <briot@adacore.com>
1179
1180 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1181 shared with gprbuild.
1182
1183 2011-08-04 Yannick Moy <moy@adacore.com>
1184
1185 * par-ch4.adb (P_Primary): preferentially issue an error message about
1186 a missing parenthesis arount a conditional or case expression in Ada
1187 2012 mode, if we detect that the alignment is not correct for a
1188 statement.
1189
1190 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1191
1192 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1193 tag-to-class-wide conversion as needing finalization actions.
1194 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1195 a tag-to-class-wide conversion as needing finalization actions.
1196 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1197 conversion does not need finalization actions.
1198 (Is_Tag_To_CW_Conversion): New routine.
1199 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1200 whether an object is the result of a tag-to-class-wide conversion.
1201
1202 2011-08-04 Yannick Moy <moy@adacore.com>
1203
1204 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1205 the left-hand-side and right-hand-side of a conjunct are inserted when
1206 translating a pre- or postcondition
1207 * sem_ch6.adb: Correct typo in comment
1208
1209 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1210
1211 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1212 Unchecked_Conversion and Unchecked_Deallocation.
1213
1214 2011-08-04 Thomas Quinot <quinot@adacore.com>
1215
1216 * make.adb: Minor reformatting.
1217
1218 2011-08-04 Emmanuel Briot <briot@adacore.com>
1219
1220 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1221 sources in the project and its imported projects, but not in the whole
1222 tree.
1223
1224 2011-08-04 Emmanuel Briot <briot@adacore.com>
1225
1226 * make.adb: Remove debug trace.
1227
1228 2011-08-04 Vincent Celier <celier@adacore.com>
1229
1230 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1231 path in canonical form, to be able to compare path names on platforms
1232 such as Windows or Darwin.
1233
1234 2011-08-04 Thomas Quinot <quinot@adacore.com>
1235
1236 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1237 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1238 * scos.ads: Update documentation accordingly.
1239 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1240 pragmas.
1241
1242 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1243
1244 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1245 attribute only if prefix type is scalar.
1246
1247 2011-08-04 Emmanuel Briot <briot@adacore.com>
1248
1249 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1250 in gnatmake for specifying mains on the command line that do not belong
1251 to the main project. These mains must currently all belong to the same
1252 project, though.
1253 (Ultimate_Extension_Of): removed, since duplicated
1254 Ultimate_Extending_Project.
1255
1256 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1257
1258 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1259 instead.
1260 (CodePeer_Mode_String): New.
1261 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1262 CodePeer mode.
1263 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1264 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1265 mode, since no useful elaboration subprogram is needed by CodePeer.
1266 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1267 In this mode, compile binder file with -gnatC and do stop after this
1268 step.
1269
1270 2011-08-04 Vincent Celier <celier@adacore.com>
1271
1272 * exp_ch7.adb: Minor comment fix.
1273
1274 2011-08-04 Robert Dewar <dewar@adacore.com>
1275
1276 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1277 exp_ch4.adb, makeutl.adb: Minor reformatting.
1278
1279 2011-08-04 Emmanuel Briot <briot@adacore.com>
1280
1281 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1282 Create several new subprograms to move code out of Make. This makes the
1283 code more readable, removes code duplication, and is a preparation work
1284 for adding support for aggregate projects.
1285
1286 2011-08-04 Tristan Gingold <gingold@adacore.com>
1287
1288 * s-po32gl.ads, s-po32gl.adb: New files.
1289 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1290 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1291 (Build_Finalization_Collection): Use it.
1292 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1293 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1294 literals.
1295 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1296 * gcc-interface/Make-lang.in: Update dependencies.
1297
1298 2011-08-04 Emmanuel Briot <briot@adacore.com>
1299
1300 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1301 the command line.
1302
1303 2011-08-04 Emmanuel Briot <briot@adacore.com>
1304
1305 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1306 command line is not a file name, also check whether it could be a unit
1307 name.
1308
1309 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1310
1311 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1312 the header of the finalization routine.
1313 If the unit has no finalizer but is a body whose spec has one, then
1314 generate the decrement of the elaboration entity only.
1315 If the unit has a finalizer and is a spec, then do not generate the
1316 decrement of the elaboration entity.
1317 (Gen_Finalize_Library_C): Likewise.
1318
1319 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1320
1321 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1322 (Bounds_Size_Expression): Removed.
1323 (Double_Alignment_Of): New subsidiary routine.
1324 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1325 for a hole in the dope vector of unconstrained arrays due to different
1326 index and element alignments.
1327
1328 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1329
1330 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1331 raise program_error because body has not been seen yet.
1332
1333 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1334
1335 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1336 an unresolved name.
1337
1338 2011-08-04 Vincent Celier <celier@adacore.com>
1339
1340 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1341
1342 2011-08-04 Yannick Moy <moy@adacore.com>
1343
1344 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1345 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1346
1347 2011-08-04 Thomas Quinot <quinot@adacore.com>
1348
1349 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1350 instantiation in RCI.
1351
1352 2011-08-04 Emmanuel Briot <briot@adacore.com>
1353
1354 * make.adb: Share more code with gprbuild
1355
1356 2011-08-04 Emmanuel Briot <briot@adacore.com>
1357
1358 * projects.texi: Added documentation for the IDE'Gnat project file
1359 attribute.
1360
1361 2011-08-04 Nicolas Roche <roche@adacore.com>
1362
1363 * gnat_rm.texi: Minor editing.
1364
1365 2011-08-04 Javier Miranda <miranda@adacore.com>
1366
1367 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1368 and the library case for VM targets.
1369 (Gen_Adainit_Ada): Likewise.
1370
1371 2011-08-04 Robert Dewar <dewar@adacore.com>
1372
1373 * g-altive.ads: Minor comment updates.
1374 * prj-nmsc.adb: Minor reformatting.
1375
1376 2011-08-04 Javier Miranda <miranda@adacore.com>
1377
1378 * opt.ads
1379 (Normalize_Scalars_Config): Value of the configuration switch set by
1380 pragma Normalize_Scalars when it appears in the gnat.adc file.
1381 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1382 to save and restore settings of this pragma.
1383 * opt.adb
1384 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1385 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1386
1387 2011-08-04 Vincent Celier <celier@adacore.com>
1388
1389 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1390
1391 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1392
1393 * makeutl.adb: Minor reformatting.
1394
1395 2011-08-04 Olivier Hainque <hainque@adacore.com>
1396
1397 * g-altive.ads: Update comments to reflect that only the soft
1398 binding is available today.
1399
1400 2011-08-04 Robert Dewar <dewar@adacore.com>
1401
1402 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1403 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1404 * gcc-interface/Make-lang.in: Update dependencies.
1405
1406 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1407
1408 * prj-env.adb: Remove local debug traces.
1409
1410 2011-08-04 Yannick Moy <moy@adacore.com>
1411
1412 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1413 was used instead of Hi_OK, which could cause a read of an uninitialized
1414 value later on. Detected while working on the new warning.
1415 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1416 to local variable.
1417 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1418 in more cases, in order to detect more unreferenced values.
1419 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1420 object for expression, if any.
1421
1422 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1423
1424 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1425 the operand types instead of the Esize.
1426
1427 2011-08-04 Steve Baird <baird@adacore.com>
1428
1429 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1430 enable CodePeer_Mode.
1431 * bindusg.adb (Display): Add help message describing -P binder switch.
1432 * gnat_ugn.texi: Document -P binder switch.
1433 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1434 user-defined main program directly.
1435 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1436 user-defined main program in the context clause of the package body.
1437
1438 2011-08-04 Yannick Moy <moy@adacore.com>
1439
1440 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1441 duplicate of Defining_Entity
1442 (Get_Unique_Entity_For_Decl): rename function into
1443 Unique_Defining_Entity
1444 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1445 (Formal_Proof_On): remove synthesized flag
1446 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1447 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1448 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1449 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1450 Annotate (Formal_Proof)
1451
1452 2011-08-04 Emmanuel Briot <briot@adacore.com>
1453
1454 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1455 source files with non-standard naming schemes, in imported projects
1456
1457 2011-08-04 Emmanuel Briot <briot@adacore.com>
1458
1459 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1460 specified on the gprbuild command line, we need to compile all units
1461 within that file, not just the first one we find
1462 Fix error message for mains that are not found.
1463
1464 2011-08-04 Thomas Quinot <quinot@adacore.com>
1465
1466 * sem_ch6.adb: Update comment.
1467 * sem_ch12.adb: Minor reformatting.
1468
1469 2011-08-04 Bob Duff <duff@adacore.com>
1470
1471 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1472 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1473 race condition whose symptom is to fail to lock Parent. That, in turn,
1474 causes Parent.Awake_Count to be accessed without locking Parent, which
1475 causes another race condition whose symptom is that Parent.Awake_Count
1476 can be off by 1 (either too high or too low). The solution is to lock
1477 Parent unconditionally, and then lock Acceptor, before reading
1478 Acceptor.Terminate_Alternative.
1479
1480 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1481
1482 * debug.adb: Update comment.
1483
1484 2011-08-04 Robert Dewar <dewar@adacore.com>
1485
1486 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1487 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1488 exp_ch6.adb: Minor reformatting.
1489
1490 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1491
1492 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1493 checks for -gnateE.
1494
1495 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1496
1497 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1498
1499 2011-08-04 Thomas Quinot <quinot@adacore.com>
1500
1501 * sinfo.ads: Minor reformatting.
1502
1503 2011-08-04 Emmanuel Briot <briot@adacore.com>
1504
1505 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1506 even if there is no location.
1507
1508 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1509
1510 * sem_res.adb, sem_ch4.adb: move check for restriction
1511 No_Task_Hierarchy to resolve_allocator.
1512
1513 2011-08-04 Thomas Quinot <quinot@adacore.com>
1514
1515 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1516 This flag of N_Pragma nodes is not used, remove it as well as all of
1517 the associated circuitry.
1518
1519 2011-08-04 Javier Miranda <miranda@adacore.com>
1520
1521 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1522 runtime check on duplicated externa tags
1523 * debug.adb Document switch -gnatdQ.
1524
1525 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1526
1527 * a-fihema.ads: Minor typo fix.
1528
1529 2011-08-04 Yannick Moy <moy@adacore.com>
1530
1531 * sem_ch10.adb: Minor comment update.
1532
1533 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1534
1535 * einfo.adb: Update the node field usage to reflect the renaming of
1536 Return_Flag to Return_ Flag_Or_Transient_Decl.
1537 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1538 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1539 (Write_Field15_Name): Change Return_Flag to
1540 Return_Flag_Or_Transient_Decl.
1541 * einfo.ads: Rename node field Return_Flag to
1542 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1543 occurrences in entities.
1544 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1545 associated Inline pragma.
1546 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1547 associated Inline pragma.
1548 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1549 routine.
1550 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1551 Return_Flag and Set_Return_Flag.
1552 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1553 objects generated for controlled transients declared inside an
1554 Exception_With_Actions. Update the calls to Return_Flag.
1555 (Process_Object_Declaration): Add code to add a null guard for hook
1556 objects generated for controlled transients declared inside an
1557 Exception_With_Actions. Update related comment.
1558 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1559 objects generated for controlled transients declared inside an
1560 Exception_With_Actions. Update the calls to Return_Flag.
1561 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1562
1563 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1564
1565 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1566 positional aggregate.
1567
1568 2011-08-04 Vincent Celier <celier@adacore.com>
1569
1570 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1571 SLOC only for pragmas.
1572
1573 2011-08-04 Emmanuel Briot <briot@adacore.com>
1574
1575 * projects.texi: Minor typo fix.
1576
1577 2011-08-04 Emmanuel Briot <briot@adacore.com>
1578
1579 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1580 on case-sensitive file systems.
1581
1582 2011-08-04 Thomas Quinot <quinot@adacore.com>
1583
1584 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1585 nested in a disabled pragma.
1586 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1587 enclosing pragma, if any, for X decisions.
1588
1589 2011-08-04 Thomas Quinot <quinot@adacore.com>
1590
1591 * sem_prag.adb: Minor reformatting.
1592
1593 2011-08-04 Vincent Celier <celier@adacore.com>
1594
1595 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1596 allowed in no run time mode.
1597
1598 2011-08-04 Vincent Celier <celier@adacore.com>
1599
1600 * make.adb (Check): When -gnatc is used, check for the source file
1601 inside the ALI file with a canonical case file name.
1602
1603 2011-08-04 Emmanuel Briot <briot@adacore.com>
1604
1605 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1606 overriding the separator.
1607
1608 2011-08-04 Robert Dewar <dewar@adacore.com>
1609
1610 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1611 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1612
1613 2011-08-04 Robert Dewar <dewar@adacore.com>
1614
1615 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1616
1617 2011-08-04 Yannick Moy <moy@adacore.com>
1618
1619 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1620 'Result only appears in postcondition of function.
1621
1622 2011-08-04 Thomas Quinot <quinot@adacore.com>
1623
1624 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1625 external tag, include the value of the external tag in the exception
1626 message.
1627
1628 2011-08-04 Yannick Moy <moy@adacore.com>
1629
1630 * sem_attr.adb (Result): modify error message for misplaced 'Result
1631
1632 2011-08-04 Sergey Rybin <rybin@adacore.com>
1633
1634 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1635 clear that the second argument must be an identifier.
1636
1637 2011-08-04 Thomas Quinot <quinot@adacore.com>
1638
1639 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1640 -fpreserve-control-flow, insert an IF statement on the barrier
1641 condition to ensure that a conditional branch instruction is generated.
1642
1643 2011-08-04 Emmanuel Briot <briot@adacore.com>
1644
1645 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1646 (Processing_Flags.Ignore_Missing_With): new flag.
1647
1648 2011-08-04 Emmanuel Briot <briot@adacore.com>
1649
1650 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1651 Source_List_File on case-insensitive systems where the file is actually
1652 on a case-sensitive file system (NFS,...).
1653
1654 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1655
1656 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1657 function return contains a controlled [extension] aggregate and the
1658 return statement is not part of a handled sequence of statements, wrap
1659 the return in a block. This ensures that all controlled temporaries
1660 generated during aggregate resolution will be picked up by the
1661 finalization machinery.
1662
1663 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1664
1665 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1666 components, freeze type before resolution, to ensure that default
1667 initializations are present for all components.
1668 * sem_res.adb (Resolve_Actuals): the designated object of an
1669 accces-to-constant type is a legal actual in a call to an
1670 initialization procedure.
1671
1672 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1673
1674 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1675 N_Unchecked_Type_Conversion to the possible containers of a renamed
1676 transient variable.
1677
1678 2011-08-04 Yannick Moy <moy@adacore.com>
1679
1680 * par-ch13.adb (Aspect_Specifications_Present): recognize
1681 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1682 is issued in Strict mode.
1683 * par.adb: Fix typos in comments.
1684
1685 2011-08-04 Yannick Moy <moy@adacore.com>
1686
1687 * sem_attr.adb (Result): modify error message to take into account Post
1688 aspect when compiling Ada 2012 (or newer) code.
1689
1690 2011-08-04 Nicolas Roche <roche@adacore.com>
1691
1692 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1693 remove need for GCC exceptions.
1694
1695 2011-08-04 Vincent Celier <celier@adacore.com>
1696
1697 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1698 project, not the source file name.
1699 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1700 excluded, continue looking. This excluded source will only be returned
1701 if there is no other source with the same base name that is not locally
1702 removed.
1703
1704 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1705
1706 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1707 private and one of the operands is a real literal, use a qualified
1708 expression rather than a conversion which is not meaningful to the
1709 back-end.
1710
1711 2011-08-04 Yannick Moy <moy@adacore.com>
1712
1713 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1714 corresponding aspect X'Class are allowed, proceed with analysis of the
1715 aspect instead of skipping it.
1716
1717 2011-08-04 Tristan Gingold <gingold@adacore.com>
1718
1719 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1720 This will allow to have an Ada implementation for the subprogram.
1721
1722 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1723
1724 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1725 completion and aspects are present, apply them to the entity for the
1726 type which is currently the partial view, but which is the one that
1727 will be frozen.
1728 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1729 applies to a partial view, indicate that the full view has predicates
1730 and delayed aspects.
1731 (Replace_Type_Reference): Handle properly predicates that apply to the
1732 full view of a private completion.
1733
1734 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1735
1736 * layout.adb (Layout_Type): For composite types, do not set Esize.
1737 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1738 set Esize.
1739 (Size_Known): Look at the RM size of components instead of the Esize.
1740 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1741 issue warning and activate Implicit_Packing.
1742 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1743 if the Esize is not known.
1744 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1745 for elementary types only.
1746 (Analyze_Record_Representation_Clause): Look at the RM size instead
1747 of the Esize to issue errors.
1748 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1749 is not known.
1750 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1751 obsolete block.
1752 Look at the RM size instead of the Esize for types if the latter is
1753 not known.
1754 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1755
1756 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1757
1758 * sem_type.adb: proper handling of equality not involving anonymous
1759 access types.
1760
1761 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1762
1763 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1764 Vis_Decls. When creating a library-level finalizer for a package spec,
1765 both the declaration and body of the finalizer are inserted either in
1766 the visible or private declarations of the package spec.
1767
1768 2011-08-04 Javier Miranda <miranda@adacore.com>
1769
1770 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1771 use of the full-view of a type when invoking Is_Ancestor.
1772 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1773 the full-view of private parents is requested, then use also the
1774 full-view of the parent of the first derivation.
1775
1776 2011-08-04 Tristan Gingold <gingold@adacore.com>
1777
1778 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1779 instead of the locally imported procedure.
1780 * s-taprop-mingw.adb (Enter_Task): Ditto.
1781 * s-valrea.adb (Scan_Real): Ditto.
1782 * s-imgrea.adb (Set_Image_Real): Ditto.
1783 * s-flocon.ads: Make the package pure.
1784
1785 2011-08-04 Thomas Quinot <quinot@adacore.com>
1786
1787 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1788 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1789 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1790 New subprogram, moved here from...
1791 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1792 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1793 rewriting of the last argument into a procedure call statement here...
1794 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1795 instead.
1796
1797 2011-08-04 Thomas Quinot <quinot@adacore.com>
1798
1799 * par_sco.adb: Minor reformatting.
1800
1801 2011-08-04 Robert Dewar <dewar@adacore.com>
1802
1803 * erroutc.adb: Minor reformatting.
1804
1805 2011-08-04 Thomas Quinot <quinot@adacore.com>
1806
1807 * par_sco.adb: Comment update.
1808
1809 2011-08-04 Tristan Gingold <gingold@adacore.com>
1810
1811 * s-flocon.ads: New file.
1812 * g-flocon.ads: Now a renaming of s-flocon.
1813 * Makefile.rtl: Add s-flocon.o
1814
1815 2011-08-04 Javier Miranda <miranda@adacore.com>
1816
1817 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1818 constrained, do not attempt to build a subtype of it.
1819
1820 2011-08-04 Yannick Moy <moy@adacore.com>
1821
1822 * errout.ads Change comments: remove 'R'M as an example where quotes
1823 are needed; add ALFA as another case where quotes are not needed
1824 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1825 case where quotes are not needed.
1826 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1827 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1828 Remove all occurrences of 'A'L'F'A
1829
1830 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1831
1832 * sem_ch13.adb: check legality of invariant pragma.
1833
1834 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1835
1836 * bindgen.adb: Add comments.
1837
1838 2011-08-04 Yannick Moy <moy@adacore.com>
1839
1840 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1841 synthesized flag.
1842 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1843 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1844
1845 2011-08-04 Robert Dewar <dewar@adacore.com>
1846
1847 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1848 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1849 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1850
1851 2011-08-04 Thomas Quinot <quinot@adacore.com>
1852
1853 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1854
1855 2011-08-04 Thomas Quinot <quinot@adacore.com>
1856
1857 PR ada/47880
1858 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1859 allocated object.
1860
1861 2011-08-04 Robert Dewar <dewar@adacore.com>
1862
1863 * einfo.ads, exp_ch4.adb: Minor reformatting.
1864
1865 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1866
1867 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1868
1869 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1870
1871 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1872 type in all cases to compute list of primitive operations, because full
1873 view may be an itype that is not attached to the list of declarations.
1874
1875 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1876
1877 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1878 library has already been finalized.
1879 (Gen_Adafinal_C): Likewise.
1880 (Gen_Adainit_Ada): Generate an early return if the library has
1881 already been elaborated.
1882 (Gen_Adainit_C): Likewise.
1883 (Gen_Output_File_Ada): Generate an elaboration flag.
1884 (Gen_Output_File_C): Likewise.
1885
1886 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1887
1888 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1889 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1890 built in the first place.
1891 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1892 for CodePeer because Finalize_Address was not built to begin with.
1893 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1894
1895 2011-08-04 Pascal Obry <obry@adacore.com>
1896
1897 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1898 filenames, this ensures unicity of filenames across processes.
1899
1900 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1901
1902 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1903 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1904 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1905 Add False as the actual to From_Abort in the generated call to
1906 Raise_From_Controlled_Operation.
1907
1908 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1909
1910 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1911 so that the ali file name can be retrieved from outside of this package.
1912 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1913 doing nothing in the general case, but used to update the object file
1914 timestamp if directly generated by the backend.
1915 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1916 to a later time than the ali file one.
1917
1918 2011-08-04 Yannick Moy <moy@adacore.com>
1919
1920 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1921 entities whose body contains an Annotate pragma which forces formal
1922 proof on this body.
1923 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1924 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1925 Mark_Non_ALFA_Subprogram to pass in a message and node.
1926 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1927 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1928 surrounding subprogram.
1929 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1930 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1931 as not in ALFA is annotated with Formal_Proof being On, then an error
1932 is issued based on the additional parameters for message and node.
1933 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1934 * gcc-interface/Make-lang.in: Update dependencies.
1935
1936 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1937
1938 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1939 Finalize_Address when CodePeer is enabled.
1940
1941 2011-08-04 Pascal Obry <obry@adacore.com>
1942
1943 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1944 the latter returns a pointer to a static buffer which is deallocated
1945 at the end of the routine.
1946
1947 2011-08-04 Yannick Moy <moy@adacore.com>
1948
1949 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1950 after index creation; mark unconstrained base array type generated as
1951 being in/not in ALFA as well
1952 (Make_Index): mark subtype created as in/not in ALFA
1953 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1954 over a loop as in/not in ALFA, depending on its type and form of loop
1955 iteration.
1956
1957 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1958
1959 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1960 directly to False on .NET and JVM.
1961
1962 2011-08-04 Yannick Moy <moy@adacore.com>
1963
1964 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1965 constraint that subtype must come from source code to be in ALFA, so
1966 that anonymous subtypes can be in ALFA too.
1967
1968 2011-08-04 Yannick Moy <moy@adacore.com>
1969
1970 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1971 reference for ALFA mode.
1972 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1973 procedure public so as to use it from formal verification back-end.
1974
1975 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1976
1977 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1978 invalid checks of the Parameter, making Remove_Switch not working
1979 correctly.
1980
1981 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1982
1983 * targparm.ads: Update header: no run-time exception is needed on this
1984 file.
1985
1986 2011-08-04 Vincent Celier <celier@adacore.com>
1987
1988 * a-fihema.adb: Use System.IO instead of GNAT.IO
1989
1990 2011-08-04 Thomas Quinot <quinot@adacore.com>
1991
1992 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1993 are forbidden in Compiler_Unit mode.
1994
1995 2011-08-04 Robert Dewar <dewar@adacore.com>
1996
1997 * sem_util.adb: Minor reformatting.
1998
1999 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2000
2001 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2002 library-level finalizers.
2003 (Gen_Finalize_Library_C): Update the import string for library-level
2004 finalizers.
2005 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2006 library-level finalizer.
2007 * exp_ch7.adb: Remove with and use clauses for Stringt.
2008 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2009 Spec_Decl. Add local variable Body_Id. The names of library-level
2010 finalizers are now manually fully qualified and are no longer external.
2011 A single name is now capable of servicing .NET, JVM and non-VM targets.
2012 Pragma Export is no longer required to provide visibility for the name.
2013 (Create_Finalizer_String): Removed.
2014 (New_Finalizer_Name): New routine which mimics New_..._Name.
2015
2016 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2017
2018 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2019 elaboration counter to Standard_Short_Integer.
2020 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2021 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2022 (Gen_Elab_Externals_C): Likewise.
2023
2024 2011-08-04 Ed Falis <falis@adacore.com>
2025
2026 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2027 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2028 system-vxworks-mips.ads, system-vxworks-x86.ads
2029 (Always_Compatible_Rep): set to False for all VxWorks targets.
2030
2031 2011-08-04 Robert Dewar <dewar@adacore.com>
2032
2033 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2034 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2035 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2036 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2037 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2038 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2039 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2040 Minor reformatting and code reorganization.
2041
2042 2011-08-04 Emmanuel Briot <briot@adacore.com>
2043
2044 * projects.texi: Added doc for aggregate projects.
2045
2046 2011-08-04 Emmanuel Briot <briot@adacore.com>
2047
2048 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2049 Add support for overriding the Project_Path in aggregate projects.
2050
2051 2011-08-04 Robert Dewar <dewar@adacore.com>
2052
2053 * a-cofove.ads: Minor reformatting.
2054
2055 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2056
2057 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2058 on the generated code.
2059 (Build_Finalize_Statements): Update the comment on the generated code.
2060 (Build_Initialize_Statements): Update the comment on the generated code.
2061 (Build_Object_Declarations): Add local variable Result. The object
2062 declarations are now built in sequence.
2063 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2064 RE_Unit_Table.
2065
2066 2011-08-04 Robert Dewar <dewar@adacore.com>
2067
2068 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2069
2070 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2071
2072 * einfo.ads (Elaboration_Entity): Document new definition and use.
2073 (Elaboration_Entity_Required): Adjust to above change.
2074 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2075 * exp_ch12.adb: And with and use for Snames.
2076 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2077 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2078 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2079 <Check_Unit_Name>: Deal with N_Expanded_Name.
2080 <Attribute_Elaborated>: Extend to all unit names.
2081 * sem_elab.adb: And with and use for Uintp.
2082 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2083 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2084 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2085 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2086 from Gen_Adainit_Ada.
2087 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2088 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2089 case, do not call System.Standard_Library.Adafinal; instead call
2090 finalize_library if needed.
2091 (Gen_Adafinal_C): Likewise.
2092 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2093 non-main program case.
2094 (Gen_Adainit_C): Generate a couple of external declarations here.
2095 In the main program case, set SSL.Finalize_Library_Objects.
2096 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2097 (Gen_Elab_Calls_C): Likewise.
2098 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2099 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2100 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2101 objects here.
2102 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2103 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2104 Gen_Adafinal_Ada.
2105 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2106 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2107 of external declarations.  Call Gen_Finalize_Library_C.
2108
2109 2011-08-04 Emmanuel Briot <briot@adacore.com>
2110
2111 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2112 Compute_Compilation_Phases): new subprogram.
2113 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2114 The number of mains as well as the various compilation phases that
2115 need to be run are now project tree specific, since various
2116 aggregated trees might have different requirements. In particular,
2117 they do not all require bind or link phases.
2118
2119 2011-08-04 Emmanuel Briot <briot@adacore.com>
2120
2121 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2122 (Project_Tree_Appdata): New type.
2123 It is now possible to associate application-specific data to a project
2124 tree. In particular, this is used in the gprbuild builder to avoid a
2125 number of global tables and htables, especially now that there can be
2126 several project trees loaded at once because of aggregate projects.
2127 (Debug_Name): new procedure.
2128 * projects.texi: Clarify syntax of "**" for Source_Dirs
2129
2130 2011-08-03 Emmanuel Briot <briot@adacore.com>
2131
2132 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2133 the "roots" for a main.
2134 (Fill_From_Project): add support for aggregate projects. Main units
2135 in aggregated projects are now automatically added in the list of
2136 files to build (although this fails later on in gprbuild, because
2137 these files are not using the root proejct tree, so this needs
2138 further cleanup)
2139 * gcc-interface/Make-lang.in: Update dependencies.
2140
2141 2011-08-03 Yannick Moy <moy@adacore.com>
2142
2143 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2144 conditional expression in ALFA.
2145 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2146 expressions as not in ALFA.
2147
2148 2011-08-03 Robert Dewar <dewar@adacore.com>
2149
2150 * a-cofove.adb: Minor reformatting.
2151
2152 2011-08-03 Emmanuel Briot <briot@adacore.com>
2153
2154 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2155 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2156 gprbuild sources.
2157 These packages are more logically placed in the Queue package, since
2158 they manipulate the queue. It is also likely that they can be adapted
2159 for gnatmake, thus sharing more code.
2160 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2161 that we could move the above.
2162
2163 2011-08-03 Emmanuel Briot <briot@adacore.com>
2164
2165 * errutil.adb (Finalize): clean up the list of error messages on exit.
2166 Calling this subprogram multiple times will no longer show duplicate
2167 error messages on stderr.
2168
2169 2011-08-03 Emmanuel Briot <briot@adacore.com>
2170
2171 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2172 Getopt_Switches when we have already define a command line
2173 configuration.
2174
2175 2011-08-03 Yannick Moy <moy@adacore.com>
2176
2177 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2178 in ALFA. Instead, they are considered as assertions to prove.
2179 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2180 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2181 if they have no ELSE part, or if they occur in pre- and postconditions,
2182 where the Condition cannot have side-effects in ALFA
2183 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2184 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2185 Instead, include type conversion between scalar types in ALFA.
2186 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2187 if-and-only-if its type is in ALFA.
2188
2189 2011-08-03 Thomas Quinot <quinot@adacore.com>
2190
2191 * scos.adb, get_scos.adb, put_scos.adb
2192 New code letter for decisions: G (entry guard)
2193 * par_sco.adb
2194 (Traverse_Subprogram_Body): Rename to...
2195 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2196 (Traverse_Protected_Body): New subprogram
2197 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2198 protected bodies and entry bodies.
2199
2200 2011-08-03 Yannick Moy <moy@adacore.com>
2201
2202 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2203 entities with get/set subprograms, which is set on procedure entities
2204 generated by the compiler for a postcondition.
2205 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2206 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2207 entity for a declaration
2208 (Get_Unique_Entity_For_Decl): new function returning an entity which
2209 represents a declaration, so that matching spec and body have the same
2210 entity.
2211
2212 2011-08-03 Robert Dewar <dewar@adacore.com>
2213
2214 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2215 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2216
2217 2011-08-03 Yannick Moy <moy@adacore.com>
2218
2219 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2220 library-level because retriction No_Implicit_Dynamic_Code in the
2221 front-end prevents its definition as a local subprogram
2222 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2223 for reuse in other contexts
2224 (Traverse_Declarations_Or_Statements,
2225 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2226 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2227 procedures take a callback parameter to be called on all declarations
2228 * lib-xref.ads
2229 (Traverse_All_Compilation_Units): new generic function to traverse a
2230 compilation unit and call a callback parameter on all declarations
2231
2232 2011-08-03 Javier Miranda <miranda@adacore.com>
2233
2234 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2235 in Java since they are always enclosed in a namespace that
2236 differentiates them, and overloaded entities are supported by the VM.
2237
2238 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2239
2240 * checks.adb (Determine_Range): If a computed bound of an operation is
2241 outside the range of the base type of the expression, and overflow
2242 checks are enabled, the result is unknown and cannot be used for any
2243 subsequent constant folding.
2244 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2245 unknown, so is the result of the comparison.
2246
2247 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2248
2249 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2250 From_Abort. When finalization was triggered by an abort, propagate
2251 Standard'Abort_Signal rather than Program_Error.
2252 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2253 From_Abort.
2254 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2255 From_Abort. When finalization was triggered by an abort, propagate
2256 Standard'Abort_Signal rather than Program_Error.
2257 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2258 From_Abort.
2259 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2260 Abort_Id. Update the calls to Build_Object_Declarations and
2261 Build_Raise_Statement to include Abort_Id.
2262 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2263 calls to Build_Object_Declarations and Build_Raise_Statement to include
2264 Abort_Id.
2265 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2266 calls to Build_Object_Declarations and Build_Raise_Statement to include
2267 Abort_Id.
2268 (Build_Components): Create an entity for Abort_Id when exceptions are
2269 allowed on the target.
2270 (Build_Finalizer): New local variable Abort_Id.
2271 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2272 calls to Build_Object_Declarations and Build_Raise_Statement to include
2273 Abort_Id.
2274 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2275 declaration of flag Abort_Id to preserve the original abort status
2276 before finalization code is executed.
2277 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2278 runtime routine Raise_From_Controlled_Operation.
2279 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2280 Abort_Id. Update the call to Build_Object_Declarations to include
2281 Abort_Id. Update the layout of the finalizer body.
2282 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2283 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2284 clunky code to create all flags and objects related to
2285 exception propagation and replace it with a call to
2286 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2287 include Abort_Id.
2288 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2289 Add new formal Abort_Id and associated comment on its use.
2290 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2291 on its use.
2292 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2293 Remove the clunky code to create all flags and objects related to
2294 exception propagation and replace it with a call to
2295 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2296
2297 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2298
2299 * s-tassta.adb: Fix minor typos.
2300
2301 2011-08-03 Robert Dewar <dewar@adacore.com>
2302
2303 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2304 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2305
2306 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2307
2308 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2309 to packages. This ensures that the finalizer body will not end up
2310 inside the freeze node.
2311 (Process_Declarations): Add code to detect whether a freeze node has a
2312 nested finalization collection.
2313
2314 2011-08-03 Pascal Obry <obry@adacore.com>
2315
2316 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2317 (Current_Session): Return a not null access to Session_Type.
2318 (Default_Session): Likewise.
2319
2320 2011-08-03 Robert Dewar <dewar@adacore.com>
2321
2322 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2323 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2324
2325 2011-08-03 Pascal Obry <obry@adacore.com>
2326
2327 * g-awk.ads: Minor comment fix.
2328
2329 2011-08-03 Sergey Rybin <rybin@adacore.com>
2330
2331 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2332 the tree structure related to discriminant constraints.
2333 Original_Discriminant cannot be used any more for computing the
2334 defining name for the reference to a discriminant.
2335
2336 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2337
2338 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2339 function is not visibly tagged, this is not a dispatching call and
2340 therfore is not Tag_Indeterminate, even if the function is marked as
2341 dispatching on result.
2342
2343 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2344
2345 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2346 (Expand_N_Free_Statement): Add a guard to protect against run-times
2347 which do not support controlled types.
2348 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2349 against run-times which do not support controlled types.
2350 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2351 against run-times which do not support controlled types.
2352 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2353 against run-times which do not support controlled types.
2354 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2355 protect against run-times which do not support controlled types.
2356
2357 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2358
2359 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2360 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2361
2362 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2363
2364 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2365 modified in the source, to prevent spurious warnings when compiling
2366 with -gnatg.
2367
2368 2011-08-03 Thomas Quinot <quinot@adacore.com>
2369
2370 * a-except-2005.adb: Minor reformatting.
2371
2372 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2373
2374 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2375 is a renaming declaration in the private part of a package, do not emit
2376 a warning that the with_clause could be moved because the renaming may
2377 be used in the body or in a child unit.
2378
2379 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2380
2381 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2382 Propagate the Comes_From_Source attribute from the original return
2383 object to the renaming.
2384
2385 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2386
2387 * exp_ch7.adb (Build_Raise_Statement): Do not call
2388 Raise_From_Controlled_Operation when this routine is not present in
2389 the run-time library.
2390 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2391 libraries (Ravenscar), tasks are non-terminating, and protected objects
2392 and tasks can only appear at library level, so we do not want
2393 finalization of protected objects nor tasks.
2394 * exp_intr.adb: Minor clarification in comment.
2395 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2396 Gen_Output_File_C): Remove references to finalization of library-level
2397 objects when using restricted run-time libraries.
2398
2399 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2400
2401 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2402 Original_Discriminant only if the parent type is a generic formal.
2403
2404 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2405
2406 * exp_ch13.adb: Add with and use clause for Targparm;
2407 (Expand_N_Free_Statement): Prevent the generation of a custom
2408 Deallocate on .NET/JVM targets since this requires pools and address
2409 arithmetic.
2410 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2411 .NET/JVM targets, attach the newly allocated object to the access
2412 type's finalization collection. Do not generate a call to
2413 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2414 exist in the runtime.
2415 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2416 create a custom Allocate for object that do not require initialization.
2417 Attach a newly allocated object to the access type's finalization
2418 collection on .NET/JVM.
2419 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2420 assignment of controlled types on .NET/JVM. The two hidden pointers
2421 Prev and Next and stored and later restored after the assignment takes
2422 place.
2423 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2424 kludge for .NET/JVM to recognize a particular piece of code coming from
2425 Heap_Management and change the call to Finalize into Deep_Finalize.
2426 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2427 finalization collections on .NET/JVM only for types derived from
2428 Controlled. Separate the association of storage pools with a collection
2429 and only allow it on non-.NET/JVM targets.
2430 (Make_Attach_Call): New routine.
2431 (Make_Detach_Call): New routine.
2432 (Process_Object_Declarations): Suppress the generation of
2433 build-in-place return object clean up code on .NET/JVM since it uses
2434 pools.
2435 * exp_ch7.ads (Make_Attach_Call): New routine.
2436 (Make_Detach_Call): New routine.
2437 * exp_intr.adb Add with and use clause for Targparm.
2438 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2439 on .NET/JVM targets.
2440 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2441 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2442 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2443 names used in finalization.
2444
2445 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2446
2447 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2448 (Attach, Detach): Lock the current task when chaining an object onto a
2449 collection.
2450
2451 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2452
2453 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2454 Rewritten to create the message strings when the exception is not
2455 raised by an abort during finalization.
2456 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2457 Raise_From_Controlled_Operation and update its associated comment.
2458 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2459 Ada.Finalization.Heap_Management provides key functionality
2460 associated with controlled objects on the heap, their creation,
2461 finalization and reclamation. Type Finalization_Collection is
2462 effectively a wrapper which sits ontop of a storage pool and performs
2463 all necessary bookkeeping for all the objects it contains. Each
2464 access-to-controlled or access-to-class-wide type receives a collection
2465 as part of its expansion. The compiler generates buffer code and
2466 invokes Allocate / Deallocate to create and destroy allocated
2467 controlled objects.
2468 * a-finali.adb ("="): Removed.
2469 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2470 fields Prev and Next.
2471 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2472 A library unit with at least one controlled object on the library level
2473 has a special finalizer which is invoked by the binder. To signal this,
2474 ali files carry field PF.
2475 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2476 associated comment on field usage.
2477 * a-tags.adb (Get_RC_Offset): Removed.
2478 (Needs_Finalization): New routine.
2479 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2480 Dispatch tables now carry field Needs_Finalization which provides
2481 runtime indication whether a type is controlled or has controlled
2482 components or both. Remove field RC_Offset.
2483 (Get_RC_Offset): Removed along with its associated pragma Export.
2484 Since tagged types with controlled components no longer carry hidden
2485 field _controller, the special mechanism to retrieve its location is no
2486 longer needed.
2487 (Needs_Finalization): New routine.
2488 * atree.ads, atree.adb (Elist24): New routine.
2489 (Set_Elist24): New routine.
2490 * atree.h: Add a define clause for Elist24.
2491 * bindgen.adb New library-level variable Lib_Final_Built.
2492 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2493 presence of a VM target, the routine generates calls to the proper
2494 library finalization routine.
2495 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2496 targets. Set the correct library finalization routine depending on
2497 whether the library has controlled objects or this is a VM compilation.
2498 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2499 to library-level finalizers of compiled units in reverse order of
2500 elaboration. It also produces exception management code and reraises a
2501 potential exception after all units have been finalized.
2502 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2503 library-level finalizers of compiled units in reverse order of
2504 elaboration.
2505 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2506 definitions of all library-level finalizers available to the compilation
2507 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2508 dependent code.
2509 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2510 System.Standard_Library.Adafinal directly. If the library needs
2511 finalization actions, create the sequence of finalization calls.
2512 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2513 Generate a with clause for System.Soft_Links when compiling for a VM.
2514 Remove the code which imports System.Standard_Library.Adafinal as
2515 Do_Finalize. Generate the library finalization routine.
2516 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2517 If the library needs finalization actions, create all the definitions
2518 of library- level finalizers.
2519 (Has_Finalizer): New routine. Determines whether at least one compiled
2520 unit has a library-level finalizer.
2521 Add type Qualification_Mode.
2522 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2523 * einfo.adb: New usage of field 15 as Return_Flag.
2524 Remove Finalization_Chain_Entity from the usages of field 19.
2525 Remove Associated_Final_Chain from the usages of field 23.
2526 New usage of field 23 as Associated_Collection.
2527 New usage of field 24 as Finalizer.
2528 New usage of flag 252 as Is_Processed_Transient.
2529 (Associated_Final_Chain): Removed.
2530 (Associated_Collection): New routine.
2531 (Finalization_Chain_Entity): Removed.
2532 (Finalizer): New routine.
2533 (Is_Finalizer): New routine.
2534 (Is_Processed_Transient): New routine.
2535 (Return_Flag): New routine.
2536 (Set_Associated_Final_Chain): Removed.
2537 (Set_Associated_Collection): New routine.
2538 (Set_Finalization_Chain_Entity): Removed.
2539 (Set_Finalizer): New routine.
2540 (Set_Is_Processed_Transient): New routine.
2541 (Set_Return_Flag): New routine.
2542 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2543 displayed flags.
2544 (Write_Field8_Name): Alphabetize the output.
2545 (Write_Field11_Name): Alphabetize the output.
2546 (Write_Field12_Name): Alphabetize the output.
2547 (Write_Field13_Name): Alphabetize the output.
2548 (Write_Field14_Name): Alphabetize the output.
2549 (Write_Field15_Name): Alphabetize the output.
2550 (Write_Field16_Name): Alphabetize the output.
2551 (Write_Field17_Name): Alphabetize the output.
2552 (Write_Field18_Name): Alphabetize the output.
2553 (Write_Field19_Name): Alphabetize the output. Remove the output of
2554 Finalization_Chain_Entity.
2555 (Write_Field20_Name): Alphabetize the output.
2556 (Write_Field21_Name): Alphabetize the output.
2557 (Write_Field22_Name): Alphabetize the output.
2558 (Write_Field23_Name): Alphabetize the output. Remove the output of
2559 Associated_Final_Chain. Add output for Associated_Collection.
2560 (Write_Field24_Name): Alphabetize the output.
2561 (Write_Field25_Name): Add output for Finalizer.
2562 (Write_Field26_Name): Alphabetize the output.
2563 (Write_Field27_Name): Alphabetize the output.
2564 (Write_Field28_Name): Alphabetize the output.
2565 * einfo.ads: Add new field description for Associated_Collection and
2566 its uses in nodes.
2567 Remove Associated_Final_Chain and its uses in nodes.
2568 Remove Finalization_Chain_Entity and its uses in nodes.
2569 Add new field description for Finalizer and its uses in nodes.
2570 Add new synthesized attribute Is_Finalizer.
2571 Add new flag description for Is_Processed_Transient and its uses in
2572 nodes.
2573 Add new field description for Return_Flag and its uses in nodes.
2574 (Associated_Final_Chain): Removed along with its pragma Inline.
2575 (Associated_Collection): New routine and pragma Inline.
2576 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2577 (Finalizer): New routine and pragma Inline.
2578 (Is_Finalizer): New routine and pragma Inline.
2579 (Is_Processed_Transient): New routine and pragma Inline.
2580 (Return_Flag): New routine and pragma Inline.
2581 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2582 (Set_Associated_Collection): New routine and pragma Inline.
2583 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2584 (Set_Finalizer): New routine and pragma Inline.
2585 (Set_Is_Processed_Transient): New routine and pragma Inline.
2586 (Set_Return_Flag): New routine and pragma Inline.
2587 * exp_aggr.adb: Alphabetize subprograms.
2588 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2589 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2590 associated comments. Remove local variables External_Final_List and
2591 Attach.
2592 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2593 Ancestor. Remove the retrieval of finalization lists. Update the call to
2594 Make_Adjust_Call.
2595 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2596 lists. Update the call to Late_Expansion.
2597 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2598 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2599 (Gen_Assign): Remove the retrieval of the finalization list used to
2600 build the assignment. Update the calls to Make_Init_Call and
2601 Make_Adjust_Call.
2602 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2603 Remove the mechanism to determine attachment levels and finalization
2604 list retrieval. Remove the processing for coextensions.
2605 (Init_Controller): Removed. Controllers no longer exist.
2606 (Late_Expansion): Remove formals Flist and Obj along with their
2607 associated comments. Update the calls to Build_Record_Aggr_Code and
2608 Build_Array_Aggr_Code.
2609 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2610 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2611 appear in entry bodies, protected subprograms and task bodies.
2612 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2613 * exp_ch3.adb (Add_Final_Chain): Removed.
2614 (Build_Array_Init_Proc): Alphabetize local variables.
2615 (Build_Assignment): Alphabetize local variables. Update the call to
2616 Maked_Adjust_Call.
2617 (Build_Class_Wide_Master): Rename local variables to better reflect
2618 their role.
2619 (Build_Discriminant_Assignments): Code reformatting.
2620 (Build_Init_Call_Thru): Code reformatting.
2621 (Build_Init_Procedure): Code reformatting. Generate a special version
2622 of Deep_Finalize which is capable of finalizing all initialized
2623 components and ignore the rest.
2624 (Build_Init_Statements): Rename local variables to better reflect their
2625 role.
2626 Reimplement the mechanism to include the creation and update of an index
2627 variable called a "counter". It is used as a bookmark for tracing
2628 initialized and non-initialized components.
2629 (Build_Initialization_Call): Remove local variable Controller_Typ.
2630 Alphabetize all local variables. Remove the initialization of the
2631 record controller and update the call to Make_Init_Call.
2632 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2633 New local variable Counter.
2634 (Constrain_Array): Alphabetize.
2635 (Expand_Freeze_Array_Type): Create a collection instead of a
2636 finalization list.
2637 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2638 Finalize_Address which is used in conjunction with allocated controlled
2639 objects.
2640 (Expand_N_Object_Declaration): Remove the creation of a finalization
2641 list for anonymous access types. Update the calls to Make_Init_Call and
2642 Make_Adjust_Call.
2643 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2644 retrieval of finalization lists. Remove the expansion of the record
2645 controller. Create TSS primitive Finalize_Address used in conjunction
2646 with controlled objects on the heap. Create finalization collections
2647 for access-to-controlled record components.
2648 (Expand_Record_Controller): Removed.
2649 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2650 class-wide types now requires additional processing. Create
2651 finalization collections for access-to-controlled types.
2652 (Increment_Counter): New routine.
2653 (Make_Counter): New routine.
2654 (Make_Eq_If): Remove the mention of Name_uController.
2655 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2656 types coming from System.Finalization_Root.
2657 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2658 (Predefined_Primitive_Bodies): There is no longer need to skip types
2659 coming from System.Finalization_Root.
2660 (Stream_Operation_OK): Do not generate stream routines for
2661 type Ada.Finalization.Heap_Management.Finalization_Collection.
2662 * exp_ch3.ads: Alphabetize subprograms.
2663 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2664 Add with and use clause for Lib.
2665 (Complete_Coextension_Finalization): Removed.
2666 (Complete_Controlled_Allocation): New routine. Create a finalization
2667 collection for anonymous access-to-controlled types. Create a custom
2668 Allocate which interfaces with the back end and the machinery in
2669 Heap_Management.
2670 (Expand_Allocator_Expression): Add necessary calls to
2671 Complete_Controlled_Allocation. Remove the retrieval of finalization
2672 lists. Update the calls to Make_Adjust_Call. Generate a call to
2673 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2674 the associated collection.
2675 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2676 Code clean up. Remove the retrieval of finalization lists and
2677 attachment levels.
2678 Update the call to Make_Init_Call. Generate a call to
2679 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2680 the associated collection.
2681 (Get_Allocator_Final_List): Removed. Finalization lists are not
2682 available.
2683 (Suitable_Element): Remove the mention of Name_uController.
2684 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2685 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2686 the left hand side, carry out the assignment and adjust the left hand
2687 side.
2688 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2689 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2690 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2691 BIP_Collection and BIPcollection.
2692 (Build_Heap_Allocator): New routine used to allocate the return object
2693 of a build-in-place function onto a collection.
2694 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2695 (Expand_Call): Do not replace direct calls to Deep routines with their
2696 aliases.
2697 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2698 and update their occurrences. Add a special return flag to monitor the
2699 [ab]normal execution of the function. The flag is set right before the
2700 return statement.
2701 Rewrite the mechanism used to allocate a build-in-place return object
2702 on the heap or on a storage pool.
2703 (Is_Direct_Deep_Call): New routine.
2704 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2705 build-in-place function call instead of a final list. Build a call to
2706 Set_Finalize_Address_Ptr to decorate the associated collection.
2707 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2708 order to name the build-in-place function call's result for later
2709 finalization. Add a collection to a build-in-place function call
2710 instead of a final list.
2711 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2712 build-in-place function call instead of a final list. Remove the code
2713 which moves one final list and transforms it into the actual in a
2714 nested build-in-place call.
2715 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2716 build-in-place function call instead of a final list.
2717 (Move_Final_List): Removed.
2718 (Needs_BIP_Collection): New routine.
2719 (Needs_BIP_Final_List): Removed.
2720 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2721 enumeration type BIP_Formal_Kind.
2722 Update the related comment.
2723 (Needs_BIP_Collection): New routine.
2724 (Needs_BIP_Final_List): Removed.
2725 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2726 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2727 majority of subprograms in this unit. Add Name_Finalize_Address to
2728 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2729 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2730 statements for an array type.
2731 (Build_Adjust_Statements): Create the adjust statements for a record
2732 type.
2733 (Build_Cleanup_Statements): New routine. A procedure which given any
2734 construct containing asynchronous calls, references to _master, or is a
2735 task body, a task allocation or a protected body produces the necessary
2736 runtime calls to clean up these constructs.
2737 (Build_Exception_Handler): New routine.
2738 (Build_Final_List): Removed.
2739 (Build_Finalization_Collection): New routine. A core procedure which
2740 creates a collection to service heap allocated controlled objects
2741 associated with an access-to-controlled type.
2742 (Build_Finalize_Statements): Create the finalization statements for a
2743 record types.
2744 (Build_Finalizer): New routine. A core procedure which given any
2745 construct with declarations and/or statements detects all objects which
2746 need any type of clean up (controlled objects, protected objects) and
2747 generates all necessary code to clean up the said objects in the proper
2748 order.
2749 (Build_Finalizer_Call): New routine.
2750 (Build_Initialize_Statements): Create the initialization statements for
2751 an array type. The generated routine contains code to finalize partially
2752 initialized arrays.
2753 (Build_Object_Declarations): New routine.
2754 (Build_Raise_Statement): New routine.
2755 (Clean_Simple_Protected_Objects): Removed.
2756 (Controller_Component): Removed.
2757 (Enclosing_Function): New routine.
2758 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2759 either declarations or statements or both.
2760 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2761 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2762 package.
2763 (Find_Final_List): Removed.
2764 (Global_Flist_Ref): Removed.
2765 (In_Finalization_Root): Removed.
2766 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2767 scope in terms of tree nodes. Process all transient variables within
2768 that range.
2769 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2770 generated after the adjust.
2771 (Make_Attach_Call): Removed.
2772 (Make_Call): New routine.
2773 (Make_Clean): Removed.
2774 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2775 build routines.
2776 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2777 in Deep routines.
2778 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2779 build routines.
2780 (Make_Final_Call): Modified to simply create a call to either
2781 Deep_Finalize or Finalize.
2782 (Make_Finalize_Address_Body): New routine.
2783 (Make_Finalize_Address_Stmts): New routine. A function which produces
2784 TSS primitive Finalize_Address used in conjunction with heap allocated
2785 controlled objects.
2786 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2787 (Make_Init_Call): Rewritten. There is no longer an attach call
2788 generated after initialization.
2789 (Make_Local_Deep_Finalize): New routine.
2790 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2791 (Make_Transient_Block): Remove the finalization list retrieval and
2792 manipulation.
2793 (Needs_Finalization): Moved to Exp_Util.
2794 (Parent_Field_Type): New routine.
2795 (Preprocess_Components): New routine.
2796 (Process_Transient_Objects): New routine.
2797 (Wrap_HSS_In_Block): New routine.
2798 (Wrap_Transient_Declaration): Remove finalization list management and
2799 controller insertion.
2800 (Wrap_Transient_Expression): Code reformatting.
2801 (Wrap_Transient_Statement): Code reformatting.
2802 * exp_ch7.ads (Build_Final_List): Removed.
2803 (Build_Finalization_Collection): New routine.
2804 (Build_Raise_Statement): New routine.
2805 (Controller_Component): Removed.
2806 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2807 (Find_Final_List): Removed.
2808 (In_Finalization_Root): Removed.
2809 (Is_Simple_Protected_Type): Update related comment.
2810 (Make_Adjust_Call): New parameter profile and associated comments.
2811 (Make_Attach_Call): Removed.
2812 (Make_Final_Call): New parameter profile and associated comments.
2813 (Make_Finalize_Address_Body): New routine.
2814 (Make_Init_Call): New parameter profile and associated comments.
2815 (Make_Local_Deep_Finalize): New routine.
2816 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2817 (Needs_Finalization): Moved to Exp_Util.
2818 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2819 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2820 (Find_Protection_Type): Moved to Exp_Util.
2821 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2822 (Make_DT): Update sequence of dispatch table initialization. Remove the
2823 initialization of field RC_Offset. Add initialization of field Needs_
2824 Finalization.
2825 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2826 Reimplement how an object is first finalized, then deallocated.
2827 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2828 Code reformatting.
2829 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2830 Register TSS_Finalize_Address with type TSS_Names.
2831 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2832 procedure provides the interface between an allocation / deallocation
2833 and the support machinery in Ada.Finalization.Heap_Management.
2834 (Find_Init_Call): Code reformatting.
2835 (Find_Init_Call_In_List): Code reformatting.
2836 (Find_Protection_Type): Moved from Exp_Ch9.
2837 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2838 (Has_Controlled_Coextensions): Removed.
2839 (Has_Controlled_Objects): New routine.
2840 (In_Library_Level_Package_Body): New routine.
2841 (Insert_Action_After): New routine.
2842 (Is_Finalizable_Transient): New routine. This predicate determines
2843 whether an object declaration is one of the many variants of controlled
2844 transients.
2845 (Is_Null_Access_BIP_Func_Call): New routine.
2846 (Is_Non_BIP_Func_Call): New routine.
2847 (Is_Related_To_Func_Return): New routine.
2848 (Needs_Finalization): Moved from Exp_Ch7.
2849 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2850 (Find_Protection_Type): Moved from Exp_Ch9.
2851 (Has_Controlled_Coextensions): Removed.
2852 (Has_Controlled_Objects): New routine.
2853 (In_Library_Level_Package_Body): New routine.
2854 (Insert_Action_After): New routine.
2855 (Is_Finalizable_Transient): New routine.
2856 (Is_Null_Access_BIP_Func_Call): New routine.
2857 (Is_Non_BIP_Func_Call): New routine.
2858 (Is_Related_To_Func_Return): New routine.
2859 (Needs_Finalization): Moved from Exp_ch7.
2860 * expander.adb (Expand): Add a case for N_Free_Statement.
2861 * freeze.adb (Freeze_All): Replace the generation of a finalization
2862 list with a collection for access-to-controlled types.
2863 (Freeze_Entity): Code reformatting.
2864 (Freeze_Record_Type): Remove the freezing of a record controller
2865 component.
2866 (Freeze_Subprogram): Code reformatting.
2867 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2868 finalization list.
2869 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2870 has a library-level finalizer.
2871 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2872 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2873 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2874 files. Add a-fihema to the list of object files.
2875 * par-ch4.adb:
2876 Alphabetize the associations in type Is_Parameterless_Attribute.
2877 * rtsfind.ads: Ada.Finalization_List.Controller and
2878 System.Finalization_Implementation are no longer a GNAT unit.
2879 Update the range of type Ada_Finalization_Child. Remove the following
2880 recoverable entities:
2881
2882 RE_Attach_To_Final_List
2883 RE_Deep_Tag_Attach
2884 RE_Finalize_List
2885 RE_Finalize_One
2886 RE_Finalizable_Ptr_Ptr
2887 RE_Global_Final_List
2888 RE_Limited_Record_Controller
2889 RE_List_Controller
2890 RE_Move_Final_List
2891 RE_Record_Controller
2892 RE_Simple_List_Controller
2893
2894 Add the following recoverable entities:
2895
2896 RE_Add_Offset_To_Address
2897 RE_Allocate
2898 RE_Base_Pool
2899 RE_Deallocate
2900 RE_Exception_Identity
2901 RE_Finalization_Collection
2902 RE_Finalization_Collection_Ptr
2903 RE_Needs_Finalization
2904 RE_Save_Library_Occurrence
2905 RE_Set_Finalize_Address_Ptr
2906 RE_Set_Storage_Pool_Ptr
2907 RE_Storage_Count
2908 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2909 Name_uController.
2910 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2911 (First_Stored_Discriminant): Remove the mention of Name_uController.
2912 * sem_aux.ads: Comment reformatting.
2913 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2914 to redecorate an already existing class-wide type.
2915 (Decorate_Tagged_Type): New parameter profile and associated comment.
2916 Create a "shadow class-wide type" for a shadow entity.
2917 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2918 of the final chain along with the associated comment.
2919 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2920 Full_Desig and set it to the full view of the designated type.
2921 Initialize the finalization collection to empty.
2922 (Build_Derived_Record_Type): Alphabetize local variables. Code
2923 reformatting.
2924 (Collect_Fixed_Components): Remove the mention of Name_uController.
2925 (Create_Constrained_Components): Remove the mention of Name_uController.
2926 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2927 class-wide type of a shadow entity.
2928 (Process_Full_View): Update the machinery which marks type
2929 Limited_Controlled's entity as limited.
2930 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2931 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2932 list, instead make a collection build-in-place formal.
2933 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2934 a designated type in order to establish a match between the renaming
2935 and the renamed entity.
2936 (Find_Selected_Component): Add guard to prevent spurious exceptions
2937 from being raised on .NET/JVM.
2938 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2939 to the list of primitive that need special processing. Update arrays
2940 C_Names and D_Names.
2941 (Replace_Types): Handle class-wide types.
2942 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2943 different parameter profile, look at the first formal.
2944 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2945 use clauses for Exp_Util.
2946 * sem_res.adb: Remove with and use clauses for Elists.
2947 (Propagate_Coextensions): Removed.
2948 (Resolve_Allocator): Do not propagate the list of coextensions from one
2949 allocator to another.
2950 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2951 Deaccessed_T to Desig_Typ.
2952 (Enter_Name): Remove the mention of Name_uController.
2953 (Gather_Components): Remove the mention of Name_uController.
2954 (Incomplete_Or_Private_View): New routine.
2955 (Is_Coextension_Root): Removed.
2956 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2957 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2958 (Is_Coextension_Root): Removed.
2959 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2960 Controlled types are now derived from a null tagged record. Remove
2961 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2962 * sinfo.adb (Coextensions): Removed.
2963 (Set_Coextensions): Removed.
2964 * sinfo.ads: Remove Coextensions from the explanation of node fields
2965 and its uses in nodes.
2966 Update the field usage of N_Allocator.
2967 (Coextensions): Removed along with its pragma Inline.
2968 (Set_Coextensions): Removed along with its pragma Inline.
2969 * snames.ads-tmpl: Remove names
2970
2971 Name_uClean
2972 Name_uController
2973 Name_uFinal_List
2974 Name_uLocal_Final_List
2975 Name_Finalization_Root
2976 Name_Next
2977 Name_Prev
2978
2979 Add names
2980
2981 Name_uFinalizer
2982 Name_Finalize_Address
2983 * s-pooglo.adb (Allocate): Add overriding indicator.
2984 (Deallocate): Add overriding indicator.
2985 (Storage_Size): Add overriding indicator.
2986 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2987 than Finalize_Global_List.
2988 (Null_Finalize_Global_List): Removed.
2989 (Save_Library_Occurrence): New routine.
2990 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2991 initialization. Add variable Finalize_Library_Objects along with its
2992 pragma Export. Add variables Library_Exception and
2993 Library_Exception_Set along with their pragma Export.
2994 (Null_Finalize_Global_List): Removed.
2995 (Save_Library_Occurrence): New routine.
2996 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2997 rather than Finalize_Global_List.
2998 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2999 of the constructed node.
3000
3001 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3002
3003 * link.c: Include "auto-host.h" before system headers.
3004
3005 2011-08-03 Vincent Celier <celier@adacore.com>
3006
3007 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3008 that are not extended. Do not check if a library project that is
3009 extended should be regenerated. Do not add to table Library_Paths the
3010 libraries that are in extended projects. Link only with libraries that
3011 are in libray projects that are not extended.
3012 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3013 for a library project that is extended.
3014
3015 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3016
3017 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3018 conforming subprogram renamings that appear to be completions if they
3019 are not fully conformant.
3020 Such renamings are homographs but not completions.
3021 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3022 names in a subprogram renaming that appears in an instance.
3023
3024 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3025
3026 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3027 not immutably limited, build actual subtype from expression to provide
3028 proper bounds to caller.
3029
3030 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3031
3032 * sem_ch8.adb: Minor comment correction.
3033
3034 2011-08-03 Thomas Quinot <quinot@adacore.com>
3035
3036 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3037 returning a limited array, use an extended return statement.
3038
3039 2011-08-03 Vincent Celier <celier@adacore.com>
3040
3041 * make.adb (Initialize): If --subdirs= is used, but no project file is
3042 specified, attempt to create the specify subdir if it does not already
3043 exist and use it as the object directory as if -D had been specified.
3044
3045 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3046
3047 * s-tpopsp-vms.adb: New file.
3048 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3049 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3050
3051 2011-08-03 Emmanuel Briot <briot@adacore.com>
3052
3053 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3054 package.
3055
3056 2011-08-03 Yannick Moy <moy@adacore.com>
3057
3058 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3059 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3060 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3061 detect that an array has static bounds.
3062
3063 2011-08-03 Thomas Quinot <quinot@adacore.com>
3064
3065 * exp_dist.adb: Minor reformatting.
3066
3067 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3068
3069 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3070 (ATCB_Key): Removed, not always used.
3071
3072 2011-08-03 Emmanuel Briot <briot@adacore.com>
3073
3074 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3075 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3076 most remaining global variables.
3077
3078 2011-08-03 Robert Dewar <dewar@adacore.com>
3079
3080 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3081 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3082 reformatting.
3083
3084 2011-08-03 Javier Miranda <miranda@adacore.com>
3085
3086 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3087 that must be passed by copy in VM targets.
3088
3089 2011-08-03 Emmanuel Briot <briot@adacore.com>
3090
3091 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3092 duplicates a similar htable now in the project tree.
3093
3094 2011-08-03 Claire Dross <dross@adacore.com>
3095
3096 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3097 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3098 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3099 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3100 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3101 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3102 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3103 update.
3104
3105 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3106
3107 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3108 (ATCB_Key): Removed, not always used.
3109 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3110 s-taprop-posix.adb.
3111 * s-tpopsp-tls.adb: New file.
3112 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3113 x86/x64/ia64/powerpc/sparc Linux.
3114
3115 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3116
3117 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3118 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3119
3120 2011-08-03 Thomas Quinot <quinot@adacore.com>
3121
3122 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3123 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3124 Fix type selection for mapping integer types to PolyORB types.
3125
3126 2011-08-03 Bob Duff <duff@adacore.com>
3127
3128 * sem_ch7.adb: Minor comment clarification.
3129
3130 2011-08-03 Bob Duff <duff@adacore.com>
3131
3132 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3133 an error analyzing a choice, skip further processing. Further
3134 processing could cause a crash or cascade errors.
3135
3136 2011-08-03 Emmanuel Briot <briot@adacore.com>
3137
3138 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3139 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3140 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3141 prj-env.ads (Shared_Project_Tree_Data): new type
3142 An aggregate project and its aggregated trees need to share the common
3143 data structures used for lists of strings, packages,... This makes the
3144 code simpler since otherwise we have to pass the root tree (also used
3145 for the configuration file data) in addition to the current project
3146 tree. This also avoids ambiguities as to which tree should be used.
3147 And finally this saves a bit of memory.
3148 (For_Every_Project_Imported): new parameter Tree.
3149 Since aggregated projects are using a different tree, we need to let
3150 the caller know which tree to use to manipulate the returned project.
3151
3152 2011-08-03 Robert Dewar <dewar@adacore.com>
3153
3154 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3155 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3156 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3157 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3158
3159 2011-08-03 Javier Miranda <miranda@adacore.com>
3160
3161 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3162 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3163
3164 2011-08-03 Bob Duff <duff@adacore.com>
3165
3166 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3167 the Base_Type.
3168
3169 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3170
3171 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3172 g-sehash.ads: Fix typo. Update header.
3173
3174 2011-08-03 Thomas Quinot <quinot@adacore.com>
3175
3176 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3177 expansion.
3178
3179 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3180
3181 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3182 prefixes of private types along with records, since the selector may be
3183 a discriminant.
3184 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3185 private types along with records, since the selector may be a
3186 discriminant.
3187
3188 2011-08-03 Emmanuel Briot <briot@adacore.com>
3189
3190 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3191
3192 2011-08-03 Javier Miranda <miranda@adacore.com>
3193
3194 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3195 Tagged_Type_Expansion.
3196
3197 2011-08-03 Yannick Moy <moy@adacore.com>
3198
3199 * sem_res.adb
3200 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3201 concatenation is the name of a constant
3202
3203 2011-08-03 Emmanuel Briot <briot@adacore.com>
3204
3205 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3206 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3207 (Process_Declarative_Items): new parameter Child_Env.
3208
3209 2011-08-03 Yannick Moy <moy@adacore.com>
3210
3211 * alfa.ads Update format of ALFA section in ALI file in order to add a
3212 mapping from bodies to specs when both are present
3213 (ALFA_Scope_Record): add components for spec file/scope
3214 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3215 * lib-xref-alfa.adb
3216 (Collect_ALFA): after all scopes have been collected, fill in the spec
3217 information when relevant
3218 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3219 present.
3220
3221 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3222
3223 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3224 code unit to decide whether to add internally generated subprograms.
3225
3226 2011-08-03 Javier Miranda <miranda@adacore.com>
3227
3228 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3229 * exp_ch9.adb
3230 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3231 in VM targets.
3232
3233 2011-08-03 Emmanuel Briot <briot@adacore.com>
3234
3235 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3236 code with Makeutl.Get_Switches.
3237 * prj-tree.adb: Update comment.
3238
3239 2011-08-03 Thomas Quinot <quinot@adacore.com>
3240
3241 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3242 subprogram with a limited formal that does not support external
3243 streaming.
3244
3245 2011-08-03 Yannick Moy <moy@adacore.com>
3246
3247 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3248 continuation line
3249 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3250 not from current unit in two phases, because it is not possible to
3251 change the table while iterating over its content.
3252 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3253
3254 2011-08-03 Sergey Rybin <rybin@adacore.com>
3255
3256 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3257 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3258
3259 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3260
3261 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3262 and the component type is composite, this is ambiguous for predefined
3263 concatenation, but if the node is not overloaded and the entity is a use
3264 -defined function its profile can be used to resolve that aggregate.
3265
3266 2011-08-03 Robert Dewar <dewar@adacore.com>
3267
3268 * exp_ch4.adb: Minor code cleanup.
3269
3270 2011-08-03 Thomas Quinot <quinot@adacore.com>
3271
3272 * exp_dist.adb: Do not generate distribution stubs if serious errors
3273 have been diagnosed.
3274
3275 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3276
3277 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3278 the first formal of a primitive operation, go to the base type to
3279 handle properly an access to a derived type with constrained
3280 discriminants.
3281 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3282 user-defined function that is only use-visible.
3283
3284 2011-08-03 Robert Dewar <dewar@adacore.com>
3285
3286 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3287 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3288 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3289 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3290 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3291 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3292 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3293 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3294
3295 2011-08-03 Robert Dewar <dewar@adacore.com>
3296
3297 * repinfo.adb (List_Mechanism): Add handling of
3298 Convention_Ada_Pass_By_XXX.
3299 * sem_mech.adb (Set_Mechanism): Ditto.
3300 * sem_prag.adb (Process_Convention): Add entries for
3301 Convention_Ada_Pass_By_XXX.
3302 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3303
3304 2011-08-03 Pascal Obry <obry@adacore.com>
3305
3306 * makeutl.adb: Minor reformatting.
3307
3308 2011-08-03 Vincent Celier <celier@adacore.com>
3309
3310 * fname-uf.adb
3311 (Get_File_Name) If the file cannot be found when there are no config
3312 pragmas file and May_Fail is True, return No_File instead of the file
3313 name, to be consistent.
3314
3315 2011-08-03 Pascal Obry <obry@adacore.com>
3316
3317 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3318 to null pointer.
3319
3320 2011-08-03 Javier Miranda <miranda@adacore.com>
3321
3322 * sem_ch13.adb
3323 (Same_Representation): In VM targets the representation of arrays with
3324 aliased components differs from arrays with non-aliased components.
3325
3326 2011-08-03 Emmanuel Briot <briot@adacore.com>
3327
3328 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3329 not systematically lower case attribute indexes that contain no "."
3330 Fix definition of several Naming attributes, which take
3331 a unit name as index and therefore should be case insensitive.
3332 Minor refactoring (reduce length of variable names).
3333
3334 2011-08-03 Emmanuel Briot <briot@adacore.com>
3335
3336 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3337
3338 2011-08-03 Emmanuel Briot <briot@adacore.com>
3339
3340 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3341 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3342 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3343 prj-tree.ads (Prj.Tree.Environment): new type.
3344
3345 2011-08-03 Emmanuel Briot <briot@adacore.com>
3346
3347 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3348 prj-tree.adb, prj-tree.ads (Environment): new type.
3349
3350 2011-08-03 Emmanuel Briot <briot@adacore.com>
3351
3352 * prj-tree.ads: Remove unused variable.
3353
3354 2011-08-03 Yannick Moy <moy@adacore.com>
3355
3356 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3357 issuing messages related to SPARK restriction violation.
3358
3359 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3360
3361 * sem_ch6.adb: guard against error nodes in return statements.
3362
3363 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3364
3365 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3366 a warning can only appear on a configuration file, so emit warning
3367 without further checks.
3368
3369 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3370
3371 * s-interr.ads: add overriding keyword.
3372
3373 2011-08-03 Geert Bosch <bosch@adacore.com>
3374
3375 * exp_attr.adb: Fix minor typo.
3376
3377 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3378
3379 * par-ch4.adb: improve error recovery.
3380
3381 2011-08-03 Emmanuel Briot <briot@adacore.com>
3382
3383 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3384 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3385 to Errout_Handling.
3386
3387 2011-08-03 Emmanuel Briot <briot@adacore.com>
3388
3389 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3390 "external" as an attribute name in aggregate projects.
3391
3392 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3393
3394 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3395 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3396 from 0, so we need to adjust.
3397
3398 2011-08-03 Emmanuel Briot <briot@adacore.com>
3399
3400 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3401 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3402
3403 2011-08-03 Yannick Moy <moy@adacore.com>
3404
3405 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3406 restriction on overloaded entity if the entity is not an operator.
3407
3408 2011-08-03 Yannick Moy <moy@adacore.com>
3409
3410 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3411 restrict.ads: Rename remaining Check_Formal_Restriction* into
3412 Check_SPARK_Restriction*.
3413
3414 2011-08-03 Emmanuel Briot <briot@adacore.com>
3415
3416 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3417 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3418 qualifier.
3419 (Project_Empty): removed
3420 (Empty_Project): new parameter Qualifier
3421 This is used to have fields specific to aggregate projects, cleaner
3422 New field to store the list of aggregated projects.
3423 (Check_Aggregate_Project): removed
3424 (Process_Aggregated_Projects, Free): new subprograms.
3425
3426 2011-08-03 Olivier Hainque <hainque@adacore.com>
3427
3428 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3429
3430 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3431
3432 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3433 explicit dereference of an unconstrained type, create a constrained
3434 subtype for it, as is done for function calls that return an
3435 unconstrained type.
3436
3437 2011-08-03 Thomas Quinot <quinot@adacore.com>
3438
3439 * g-pehage.adb (Finalize): Avoid possible double-free.
3440
3441 2011-08-03 Steve Baird <baird@adacore.com>
3442
3443 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3444 Elab_Spec/Body attrs in CodePeer_Mode.
3445
3446 2011-08-03 Javier Miranda <miranda@adacore.com>
3447
3448 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3449 low bound is not known at compile time but they have no others choice.
3450 Done because in this case the bounds can be obtained directly from the
3451 aggregate.
3452
3453 2011-08-03 Ed Falis <falis@adacore.com>
3454
3455 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3456 on VxWorks SMP. Remove unusable constant ANY_CPU.
3457
3458 2011-08-03 Emmanuel Briot <briot@adacore.com>
3459
3460 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3461 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3462 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3463 Prj.Env.Initialize_Empty): new subprograms
3464 (Get_Env, Find_Project): remove parameter Target_Name.
3465
3466 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3467
3468 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3469 as a condition for the delayed call to Derived_Subprograms done for the
3470 case of the rewriting of a derived type that constrains the
3471 discriminants of its parent type.
3472 Avoids redundant subprogram derivations for private subtype derivations.
3473
3474 2011-08-03 Javier Miranda <miranda@adacore.com>
3475
3476 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3477 Build_Record_Aggr_Code.
3478 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3479 discriminants in extension aggregates.
3480
3481 2011-08-03 Emmanuel Briot <briot@adacore.com>
3482
3483 * prj-pp.adb (Print): also output project qualifiers, since in
3484 particular "aggregate" is mandatory in an aggregate project.
3485
3486 2011-08-03 Emmanuel Briot <briot@adacore.com>
3487
3488 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3489 (Debug_Output): new function.
3490
3491 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3492
3493 * gnat_ugn.texi: Document -Wstack-usage.
3494 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3495
3496 2011-08-03 Thomas Quinot <quinot@adacore.com>
3497
3498 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3499 have keyword LIMITED.
3500
3501 2011-08-03 Yannick Moy <moy@adacore.com>
3502
3503 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3504 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3505 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3506 section (does not happen in compiler, only if code directly calls
3507 Scan_ALI).
3508 * get_alfa.adb, get_alfa.ads: New files.
3509 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3510 needed.
3511 * lib-xref-alfa.adb: New file.
3512 * lib-xref.adb, lib-xref.ads
3513 (Xref_Entry): redefine information needed in cross-references for ALFA.
3514 Push ALFA treatments in separated local package.
3515 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3516 identifiers. Return entity of package body instead of spec. Return
3517 Empty for a scope with no location.
3518 (Generate_Reference): adapt to new components for ALFA information.
3519 Remove the need for D references on definitions.
3520 (Is_Local_Reference): moved to ALFA local package
3521 (Output_References): extract subfunction as Extract_Source_Name
3522 (Output_Local_References): remove procedure, replaced by filtering of
3523 cross-references in package ALFA and printing in Put_ALFA.
3524 (Write_Entity_Name): remove procedure
3525 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3526 print exact name of entity as it appears in source file
3527 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3528 * put_alfa.adb, put_alfa.ads: New files.
3529 * xref_lib.adb (Search_Xref): protect read of cross-references against
3530 reading other sections of the ALI file, in gnatxref
3531 (Search): protect read of cross-references against reading other
3532 sections of the ALI file, in gnatfind.
3533 * gcc-interface/Make-lang.in: Update dependencies.
3534
3535 2011-08-03 Thomas Quinot <quinot@adacore.com>
3536
3537 * sem_ch3.adb: Minor reformatting.
3538
3539 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3540
3541 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3542 raising an exception.
3543
3544 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3545
3546 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3547 type, always use 1 as the lower bound or string, even if lower bound of
3548 context is not static, to handle properly null strings in a non-static
3549 context.
3550
3551 2011-08-03 Bob Duff <duff@adacore.com>
3552
3553 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3554 always legal on the right-hand side of an assignment statement; there
3555 is always an applicable index constraint in this case. Therefore, the
3556 check for Pkind = N_Assignment_Statement is now unconditional -- it
3557 doesn't depend on whether Is_Constrained (Typ).
3558
3559 2011-08-03 Robert Dewar <dewar@adacore.com>
3560
3561 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3562
3563 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3564
3565 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3566 for an itype created within a generic unit.
3567
3568 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3569
3570 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3571 suppresses all inlining.
3572
3573 2011-08-03 Robert Dewar <dewar@adacore.com>
3574
3575 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3576 exp_aggr.adb: Minor reformatting.
3577
3578 2011-08-03 Thomas Quinot <quinot@adacore.com>
3579
3580 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3581 tagged assignment when discriminant checks are suppressed. This is
3582 useless and extremely costly in terms of static stack usage.
3583
3584 2011-08-03 Bob Duff <duff@adacore.com>
3585
3586 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3587 of generics, because this leads to the wrong entity in the wrong scope,
3588 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3589 an instance.
3590 (Process_Interface_Name): Follow Alias for instances of generics, to
3591 correct for the above change.
3592
3593 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3594
3595 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3596 is an integer literal it is always safe to replace the reference. In
3597 addition, if the reference appears in the generated code for an object
3598 declaration it is necessary to copy because otherwise the reference
3599 might be to the uninitilized value of the discriminant of the object
3600 itself.
3601
3602 2011-08-03 Pascal Obry <obry@adacore.com>
3603
3604 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3605 ACL used, in this case we want to check for ending .exe, not .exe
3606 anywhere in the path.
3607
3608 2011-08-03 Sergey Rybin <rybin@adacore.com>
3609
3610 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3611 the tree structure (semantic decoration of references to record
3612 discriminants).
3613
3614 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3615
3616 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3617 choices of a named array aggregate, bail out when any choices are
3618 marked as Errors_Posted.
3619
3620 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3621
3622 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3623 in which entity is frozen, to handle properly loop variables in
3624 iterators.
3625
3626 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3627
3628 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3629 subtype is not static, compute the upper bound using attributes, to
3630 handle properly index types that are not integer types.
3631
3632 2011-08-03 Bob Duff <duff@adacore.com>
3633
3634 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3635 Update copyright notice.
3636
3637 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3638
3639 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3640 Original_Discriminant if within an instance.
3641 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3642
3643 2011-08-03 Thomas Quinot <quinot@adacore.com>
3644
3645 * einfo.ads: Minor reformatting.
3646
3647 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3648
3649 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3650 composite type with an unfrozen subcomponent, in the profile of a
3651 primitive operation.
3652
3653 2011-08-03 Robert Dewar <dewar@adacore.com>
3654
3655 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3656
3657 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3658
3659 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3660 unconstrained type with discriminants is initialized with an aggregate,
3661 use the constrained subtype of the aggregate as the type of the object,
3662 because it is immutable, and this allows the back-end to generate no
3663 code for the object declaration.
3664
3665 2011-08-03 Robert Dewar <dewar@adacore.com>
3666
3667 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3668 comparison operand is variable, and turns out to be zero or negative.
3669
3670 2011-08-03 Javier Miranda <miranda@adacore.com>
3671
3672 * exp_intr.adb
3673 (Expand_Dispatching_Constructor_Call): Disable expansion of
3674 code required for native targets. Done to avoid generating
3675 references to unavailable runtime entities in VM targets.
3676 * exp_ch3.adb
3677 (Expand_N_Object_Declaration): Add missing support to handle
3678 the explicit initialization of class-wide interface objects.
3679 Fix documentation.
3680
3681 2011-08-03 Matthew Heaney <heaney@adacore.com>
3682
3683 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3684
3685 2011-08-03 Matthew Heaney <heaney@adacore.com>
3686
3687 * a-cbdlli.adb (Splice): move source items from first to last
3688
3689 2011-08-03 Yannick Moy <moy@adacore.com>
3690
3691 * sem_util.ads: comment added.
3692
3693 2011-08-03 Javier Miranda <miranda@adacore.com>
3694
3695 * exp_aggr.adb
3696 (Expand_Record_Aggregate): In VM targets disable the expansion into
3697 assignments of aggregates whose type is not known at compile time.
3698
3699 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3700
3701 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3702 protected entries and task entries, to build the proper renaming
3703 declaration for entry formals, used in debugging.
3704 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3705 parameters in the same way.
3706
3707 2011-08-02 Robert Dewar <dewar@adacore.com>
3708
3709 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3710 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3711 code reorganization.
3712
3713 2011-08-02 Robert Dewar <dewar@adacore.com>
3714
3715 * debug.adb: Debug flag d.P to suppress length comparison optimization
3716 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3717 comparison of Length by comparing First/Last instead.
3718
3719 2011-08-02 Matthew Heaney <heaney@adacore.com>
3720
3721 * a-cobove.ads: Code clean up.
3722
3723 2011-08-02 Vincent Celier <celier@adacore.com>
3724
3725 * adaint.c (file_names_case_sensitive_cache): New static int.
3726 (__gnat_get_file_names_case_sensitive): Cache the return value in
3727 file_names_case_sensitive_cache at the first invocation, to avoid
3728 multiple calls to getenv.
3729
3730 2011-08-02 Bob Duff <duff@adacore.com>
3731
3732 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3733
3734 2011-08-02 Yannick Moy <moy@adacore.com>
3735
3736 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3737 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3738 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3739 indicate that we are in a precondition or postcondition. This is used in
3740 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3741 decide whether to flag the spec or body of the current subprogram as
3742 not in ALFA.
3743
3744 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3745
3746 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3747 list.
3748 * a-extiin.ads: New file.
3749
3750 2011-08-02 Bob Duff <duff@adacore.com>
3751
3752 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3753 now raises Name_Error instead of Use_Error in certain cases. The other
3754 parts of this AI were already implemented properly.
3755
3756 2011-08-02 Vincent Celier <celier@adacore.com>
3757
3758 * link.c: Only import "auto-host.h" when building the gnattools.
3759
3760 2011-08-02 Yannick Moy <moy@adacore.com>
3761
3762 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3763 which calls a local subprogram, so extract subprogram
3764 from Mark_Non_ALFA_Subprogram_Body.
3765
3766 2011-08-02 Javier Miranda <miranda@adacore.com>
3767
3768 * exp_ch9.adb
3769 (Extract_Dispatching_Call): If the type of the dispatching object is an
3770 access type then return an explicit dereference in the Object out-mode
3771 parameter.
3772
3773 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3774
3775 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3776 compatibility checks for all indexes of an array subtype, not just the
3777 first. Reset Has_Dynamic_Range_Check on the subtype before each
3778 potential check to ensure that Insert_Range_Checks will not elide any
3779 of the dynamic checks.
3780
3781 2011-08-02 Yannick Moy <moy@adacore.com>
3782
3783 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3784 SPARK restriction at parsing time.
3785 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3786 directive only if the SPARK restriction is set for this unit.
3787
3788 2011-08-02 Yannick Moy <moy@adacore.com>
3789
3790 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3791 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3792 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3793 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3794 Mark_Non_ALFA_Subprogram_Body.
3795 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3796 inlined.
3797
3798 2011-08-02 Yannick Moy <moy@adacore.com>
3799
3800 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3801 might be costly.
3802
3803 2011-08-02 Robert Dewar <dewar@adacore.com>
3804
3805 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3806 exp_ch3.adb: Minor reformatting.
3807
3808 2011-08-02 Emmanuel Briot <briot@adacore.com>
3809
3810 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3811 files, not any regular file.
3812 (__gnat_locate_file_with_predicate): new subprogram.
3813
3814 2011-08-02 Yannick Moy <moy@adacore.com>
3815
3816 * sinfo.adb, sinfo.ads: Restrict the use of flags
3817 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3818 nodes, plus N_Subtype_Declaration for the 2nd one.
3819
3820 2011-08-02 Sergey Rybin <rybin@adacore.com>
3821
3822 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3823 - fix bugs in the description of Source_Trace;
3824 - get rid of UNIT_NAME;
3825
3826 2011-08-02 Javier Miranda <miranda@adacore.com>
3827
3828 * exp_ch9.adb
3829 (Build_Dispatching_Requeue): Adding support for VM targets
3830 since we cannot directly reference the Tag entity.
3831 * exp_sel.adb (Build_K): Adding support for VM targets.
3832 (Build_S_Assignment): Adding support for VM targets.
3833 * exp_disp.adb
3834 (Default_Prim_Op_Position): In VM targets do not restrict availability
3835 of predefined interface primitives to compiling in Ada 2005 mode.
3836 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3837 restricted to compiling in Ada 2005 mode.
3838 (Make_VM_TSD): Generate code that declares and initializes the OSD
3839 record. Needed to support dispatching calls through synchronized
3840 interfaces.
3841 * exp_ch3.adb
3842 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3843 primitives associated with synchronized interfaces.
3844 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3845 primitives associated with synchronized interfaces.
3846
3847 2011-08-02 Yannick Moy <moy@adacore.com>
3848
3849 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3850 statements hidden in SPARK if preceded by the HIDE directive
3851 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3852 exception handlers as hidden in SPARK if preceded by the HIDE directive
3853 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3854 if starting with the HIDE directive
3855 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3856 starting with the HIDE directive; mark the declarations in a private
3857 part as hidden in SPARK if the private part starts with the HIDE
3858 directive
3859 * restrict.adb, restrict.ads
3860 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3861 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3862 argument node belongs to a part which is hidden in SPARK
3863 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3864 parts in SPARK; protect the possibly costly call to
3865 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3866 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3867 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3868 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3869 Tok_SPARK_Hide.
3870 (Scan): recognize special comment starting with '#' and followed by
3871 SPARK keyword "hide" as a HIDE directive.
3872
3873 2011-08-02 Yannick Moy <moy@adacore.com>
3874
3875 * types.ads, erroutc.ads: Minor reformatting.
3876
3877 2011-08-02 Vincent Celier <celier@adacore.com>
3878
3879 * link.c: Add response file support for cross platforms.
3880
3881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3882
3883 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3884 in an association, set parent field of copy before partial analysis.
3885 * sem_res.adb (Resolve_Slice): create reference to itype only when
3886 expansion is enabled.
3887
3888 2011-08-02 Yannick Moy <moy@adacore.com>
3889
3890 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3891 for new flag denoting which subprogram bodies are in ALFA
3892 * restrict.adb, sem_ch7.adb: Update comment
3893 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3894 sem_ch9.adb, sem_res.adb: Add calls to
3895 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3896 * sem_ch6.adb (Analyze_Function_Return): add calls to
3897 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3898 middle of the body, and extended return.
3899 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3900 False when missing return.
3901 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3902 to True for subprograms whose spec is in ALFA. Remove later on the flag
3903 on the entity used for a subprogram body when there exists a separate
3904 declaration.
3905 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3906 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3907 False, otherwise do nothing.
3908
3909 2011-08-02 Robert Dewar <dewar@adacore.com>
3910
3911 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3912
3913 2011-08-02 Yannick Moy <moy@adacore.com>
3914
3915 * sem_ch4.ads: minor formatting.
3916
3917 2011-08-02 Yannick Moy <moy@adacore.com>
3918
3919 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3920 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3921 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3922 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3923 opt.ads: cleanup of SPARK mode
3924
3925 2011-08-02 Yannick Moy <moy@adacore.com>
3926
3927 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3928 types.
3929 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3930 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3931 * sem_ch3.adb
3932 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3933 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3934 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3935 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3936 types.
3937 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3938 non-static range.
3939 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3940 functions whose return type is not in ALFA.
3941 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3942 specifications.
3943 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3944 parameter's type is not in ALFA.
3945 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3946 types are in ALFA.
3947
3948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3949
3950 * sem_ch6 (Analyze_Expression_Function): treat the function as
3951 Inline_Always, and introduce a subprogram declaration for it when it is
3952 not a completion.
3953 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3954 expression functions, so that the back-end can determine whether they
3955 can in fact be inlined.
3956 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3957 a function body comes from an expression function.
3958
3959 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3960
3961 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3962 null exclusions to test Can_Never_Be_Null on the anonymous access types
3963 of the formals rather than testing the formals themselves. Exclude this
3964 check in cases where the Old_Formal is marked as a controlling formal,
3965 to avoid issuing spurious errors for bodies completing dispatching
3966 operations (due to the flag not getting set on controlling access
3967 formals in body specs).
3968 (Find_Corresponding_Spec): When checking full and subtype conformance of
3969 subprogram bodies in instances, pass Designated and E in that order, for
3970 consistency with the expected order of the formals (New_Id followed by
3971 Old_Id).
3972
3973 2011-08-02 Robert Dewar <dewar@adacore.com>
3974
3975 * sem_ch8.adb: Minor reformatting.
3976
3977 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3978
3979 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3980 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3981 primitive operations of class-wide actuals.
3982
3983 2011-08-02 Javier Miranda <miranda@adacore.com>
3984
3985 * exp_atag.ads, exp_atag.adb
3986 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3987 since its value is implicitly passed in argument Typ.
3988 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3989 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3990 Build_Common_Dispatching_Select_Statements.
3991
3992 2011-08-02 Robert Dewar <dewar@adacore.com>
3993
3994 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3995 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3996 Minor reformatting.
3997
3998 2011-08-02 Robert Dewar <dewar@adacore.com>
3999
4000 * sem_res.adb: Minor reformatting.
4001 * sem_prag.adb: Minor reformatting.
4002
4003 2011-08-02 Javier Miranda <miranda@adacore.com>
4004
4005 * exp_atag.adb, exp_atags.ads
4006 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4007 by the tagged type Entity. Required to use this routine in the VM
4008 targets since we do not have available the Tag entity in the VM
4009 platforms.
4010 * exp_ch6.adb
4011 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4012 Ada.Tags has not been previously loaded.
4013 * exp_ch7.adb
4014 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4015 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4016 * sem_aux.adb
4017 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4018 view of enclosing scopes. Required to handle enclosing scopes that
4019 are synchronized types whose full view is a task type.
4020 * exp_disp.adb
4021 (Build_VM_TSDs): Minor code improvement to avoid generating and
4022 analyzing lists with empty nodes.
4023 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4024 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4025 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4026 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4027 (Make_Select_Specific_Data_Table): Add support for VM targets.
4028 (Make_VM_TSD): Generate code to initialize the SSD structure of
4029 the TSD.
4030
4031 2011-08-02 Yannick Moy <moy@adacore.com>
4032
4033 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4034 cross-references section in ALI.
4035 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4036 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4037 Sub).
4038 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4039 subprogram or package entity of a node
4040 (Is_Local_Reference_Type): new function returns True for references
4041 selected in local cross-references.
4042 (Lt): function extracted from Lt in Output_References
4043 (Write_Entity_Name): function extracted from Output_References
4044 (Generate_Definition): generate reference with type 'D' for definition
4045 of objects (object declaration and parameter specification), with
4046 appropriate locations and units, for use in local cross-references.
4047 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4048 references of type 'I' for initialization in object definition.
4049 (Output_References): move part of function Lt and procedure
4050 Write_Entity_Name outside of the body. Ignore references of types 'D'
4051 and 'I' introduced for local cross-references.
4052 (Output_Local_References): new procedure to output the local
4053 cross-references sections.
4054 (Lref_Entity_Status): new array defining whether an entity is a local
4055 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4056 with 'I' type when initialization expression is present.
4057 * get_scos.adb, get_scos.ads: Correct comments and typos
4058
4059 2011-08-02 Javier Miranda <miranda@adacore.com>
4060
4061 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4062 the JVM target.
4063 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4064 the JVM target.
4065 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4066 TSD support.
4067
4068 2011-08-02 Vincent Celier <celier@adacore.com>
4069
4070 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4071 (No_Space_Img): New function
4072 (Find_Excluded_Sources): When reading from a file, record the file name
4073 and the line number for each excluded source.
4074 (Mark_Excluded_Sources): When reporting an error, if the excluded
4075 sources were read from a file, include file name and line number in
4076 the error message.
4077
4078 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4079
4080 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4081
4082 2011-08-02 Robert Dewar <dewar@adacore.com>
4083
4084 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4085
4086 2011-08-02 Javier Miranda <miranda@adacore.com>
4087
4088 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4089 generation of TSDs to the DOTNET compiler.
4090 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4091 generation of TSDs to the DOTNET compiler.
4092
4093 2011-08-02 Javier Miranda <miranda@adacore.com>
4094
4095 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4096 record of all the tagged types declared inside library level package
4097 declarations, library level package bodies or library level subprograms.
4098 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4099 associated with a given tagged type.
4100 (Build_VM_TSDs): New subprogram.
4101 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4102 compilation units that are subprograms.
4103 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4104 compilation units that are package bodies.
4105 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4106 units that are a package declaration or a package instantiation.
4107 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4108 reorganization to improve the error generated by the frontend when the
4109 function Ada.Tags.Secondary_Tag is not available.
4110 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4111 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4112
4113 2011-08-02 Javier Miranda <miranda@adacore.com>
4114
4115 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4116
4117 2011-08-02 Robert Dewar <dewar@adacore.com>
4118
4119 * s-imenne.ads: Minor reformatting.
4120
4121 2011-08-02 Robert Dewar <dewar@adacore.com>
4122
4123 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4124 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4125 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4126
4127 2011-08-02 Robert Dewar <dewar@adacore.com>
4128
4129 * einfo.ads (Materialize_Entity): Document this is only for renamings
4130 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4131 required debug information in the case where we transform the object
4132 declaration into a renaming declaration.
4133 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4134 object
4135 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4136 Materialize_Entity.
4137
4138 2011-08-02 Robert Dewar <dewar@adacore.com>
4139
4140 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4141 Suppress_Init_Procs.
4142 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4143 Suppress_Initialization/Initialization_Suppressed.
4144 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4145 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4146 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4147 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4148
4149 2011-08-02 Robert Dewar <dewar@adacore.com>
4150
4151 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4152 Minor reformatting.
4153
4154 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4155
4156 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4157 only have inheritable classwide pre/postconditions.
4158
4159 2011-08-02 Javier Miranda <miranda@adacore.com>
4160
4161 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4162 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4163 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4164 checks if the external tag of a type is the same as the external tag
4165 of some other declaration.
4166
4167 2011-08-02 Thomas Quinot <quinot@adacore.com>
4168
4169 * s-taskin.ads: Minor reformatting.
4170
4171 2011-08-02 Emmanuel Briot <briot@adacore.com>
4172
4173 * g-comlin.adb (Display_Help): swap the order in which it prints the
4174 short help and the general usage.
4175
4176 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4177
4178 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4179 the aspect declarations and attach them to the generic copy for
4180 subsequent analysis.
4181 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4182 declarations of the generic tree to the new subprogram declarations.
4183 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4184 conditions that apply to a subprogram instance.
4185
4186 2011-08-02 Robert Dewar <dewar@adacore.com>
4187
4188 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4189
4190 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4191
4192 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4193 private type with a tagged full view is not derived in the immediate
4194 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4195
4196 2011-08-02 Robert Dewar <dewar@adacore.com>
4197
4198 * exp_ch4.adb: Minor reformatting.
4199
4200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4201
4202 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4203 Ada2012 iterator, the loop will be rewritten during expansion into a
4204 while loop with a cursor and an element declaration. Do not analyze the
4205 body in this case, because if the container is for indefinite types the
4206 actual subtype of the elements will only be determined when the cursor
4207 declaration is analyzed.
4208
4209 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4210
4211 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4212 size/alignment related attributes in CodePeer_Mode.
4213
4214 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4215
4216 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4217 Prepend_Element, since this can result in the operation getting the
4218 wrong slot in the full type's dispatch table if the full type has
4219 inherited operations. The incomplete type's operation will get added
4220 to the proper position in the full type's primitives
4221 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4222 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4223 dispatching operations, since there are cases where nonprimitive
4224 subprograms can get added to the list of incomplete dependents (such
4225 as subprograms in nested packages).
4226 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4227 private part when determining whether to add a primitive with a
4228 parameter of a tagged incomplete type to the Private_Dependents list.
4229 Such primitives can also occur in the visible part, and should not have
4230 been excluded from being private dependents.
4231 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4232 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4233 list of a Taft-amendment incomplete type is a primitive before issuing
4234 an error that the full type must appear in the same unit. There are
4235 cases where nonprimitives can be in the list (such as subprograms in
4236 nested packages).
4237 * sem_disp.adb (Derives_From): Use correct condition for checking that
4238 a formal's type is derived from the type of the corresponding formal in
4239 the parent subprogram (the condition was completely wrong). Add
4240 checking that was missing for controlling result types being derived
4241 from the result type of the parent operation.
4242
4243 2011-08-02 Yannick Moy <moy@adacore.com>
4244
4245 * errout.adb (First_Node): minor renaming
4246 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4247 first node.
4248
4249 2011-08-02 Yannick Moy <moy@adacore.com>
4250
4251 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4252 before accessing operands.
4253 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4254 decide whether an initialization expression respects SPARK rules, as
4255 the plain node is the expanded one. This allows for more valid warnings
4256 to be issued.
4257 * gnat_rm.texi: Minor update.
4258
4259 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4260
4261 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4262 previous change.
4263
4264 2011-08-02 Robert Dewar <dewar@adacore.com>
4265
4266 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4267
4268 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4269
4270 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4271 loop statements and the element renaming declaration with a block when
4272 the element type is controlled.
4273
4274 2011-08-02 Yannick Moy <moy@adacore.com>
4275
4276 * sinfo.ads: Minor formatting.
4277
4278 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4279
4280 * sem_aggr.adb (Add_Association): if the association has a box and no
4281 expression, use the Sloc of the aggregate itself for the new
4282 association.
4283 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4284 the Original_Node.
4285
4286 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4287
4288 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4289 When a container is provided via a function call, generate a renaming
4290 of the function result. This avoids the creation of a transient scope
4291 and the premature finalization of the container.
4292 * exp_ch7.adb (Is_Container_Cursor): Removed.
4293 (Wrap_Transient_Declaration): Remove the supression of the finalization
4294 of the list controller when the declaration denotes a container cursor,
4295 it is not needed.
4296
4297 2011-08-02 Yannick Moy <moy@adacore.com>
4298
4299 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4300 node is from source, instead of the original node being from source.
4301 * sem_aggr.adb
4302 (Resolve_Array_Aggregate): refine the check for a static expression, to
4303 recognize also static ranges
4304 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4305 Array_Type_Declaration): postpone the test for the type being a subtype
4306 mark after the type has been resolved, so that component-selection and
4307 expanded-name are discriminated.
4308 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4309 to distinguish the case of an iteration scheme, so that an error is
4310 issed on a non-static range in SPARK except in an iteration scheme.
4311 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4312 In_Iter_Schm = True.
4313 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4314 user-defined operators so that they are allowed in renaming
4315 * sem_ch8.adb
4316 (Find_Selected_Component): refine the check for prefixing of operators
4317 so that they are allowed in renaming. Move the checks for restrictions
4318 on selector name after analysis discriminated between
4319 component-selection and expanded-name.
4320 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4321 concatenation argument of string type if it is static.
4322 * sem_util.adb, sem_util.ads
4323 (Check_Later_Vs_Basic_Declarations): add a new function
4324 Is_Later_Declarative_Item to decice which declarations are allowed as
4325 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4326 mode, add that renamings are considered as later items.
4327 (Enclosing_Package): new function to return the enclosing package
4328 (Enter_Name): correct the rule for homonyms in SPARK
4329 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4330 from source (result of expansion) to avoid issuing wrong warnings.
4331
4332 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4333
4334 * errout.adb: On anything but an expression First_Node returns its
4335 argument.
4336
4337 2011-08-02 Pascal Obry <obry@adacore.com>
4338
4339 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4340
4341 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4342
4343 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4344 Set the associated loop as the related expression of internally
4345 generated cursors.
4346 * exp_ch7.adb (Is_Container_Cursor): New routine.
4347 (Wrap_Transient_Declaration): Supress the finalization of the list
4348 controller when the declaration denotes a container cursor.
4349
4350 2011-08-02 Yannick Moy <moy@adacore.com>
4351
4352 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4353 command line now.
4354 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4355 expression is a simple expression. This check cannot be performed in
4356 the semantics, so just drop it.
4357 (P_Index_Or_Discriminant_Constraint): move check that the index or
4358 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4359 semantics. Other cases were previously checked in the semantics.
4360 * par-ch4.adb (P_Name): move checks that a selector name is not
4361 character literal or an operator symbol to Find_Selected_Component in
4362 the semantics
4363 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4364 declarations are not placed after later declarations in a separate
4365 procedure in Sem_Util (possibly not the best choice?), to be used both
4366 during parsing, for Ada 83 mode, and during semantic analysis, for
4367 SPARK mode.
4368 * par-endh.adb (Check_End): move check that end label is not missing
4369 to Process_End_Label in the semantics
4370 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4371 the special case for SPARK restriction
4372 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4373 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4374 parameter Force to issue the error message even on internal node (used
4375 for generated end label). Call Check_Restriction to check when an error
4376 must be issued. In SPARK mode, issue an error message even if the
4377 restriction is not set.
4378 (Check_Restriction): new procedure with an additional out parameter to
4379 inform the caller that a message has been issued
4380 * sem_aggr.adb: Minor modification of message
4381 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4382 instead of issuing an error message directly
4383 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4384 declarations are not placed after later declarations, by calling
4385 Check_Later_Vs_Basic_Declarations
4386 (Analyze_Subtype_Declaration): move here the check that an index or
4387 discriminant constraint must be a subtype mark. Change the check that
4388 a subtype of String must start at one so that it works on subtype marks.
4389 * sem_ch4.adb (Analyze_Call): move here the check that a named
4390 association cannot follow a positional one in a call
4391 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4392 instead of issuing an error message directly
4393 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4394 selector name is not a character literal or an operator symbol. Move
4395 here the check that the prefix of an expanded name cannot be a
4396 subprogram or a loop statement.
4397 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4398 procedure called from parsing and semantics to check that basic
4399 declarations are not placed after later declarations
4400 (Process_End_Label): move here the check that end label is not missing
4401
4402 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4403
4404 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4405 representation clause in codepeer mode, since it confuses CodePeer and
4406 does not bring useful info.
4407
4408 2011-08-02 Ed Falis <falis@adacore.com>
4409
4410 * init.c: initialize fp hw on MILS.
4411
4412 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4413
4414 * errout.adb (First_Node): for bodies, return the node itself (small
4415 optimization). For other nodes, do not check source_unit if the node
4416 comes from Standard.
4417
4418 2011-08-02 Robert Dewar <dewar@adacore.com>
4419
4420 * exp_ch3.adb: Minor comment additions.
4421 * sem_ch13.adb: Minor reformatting.
4422
4423 2011-08-02 Pascal Obry <obry@adacore.com>
4424
4425 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4426
4427 2011-08-02 Robert Dewar <dewar@adacore.com>
4428
4429 * sem_attr.adb: Minor reformatting.
4430
4431 2011-08-02 Robert Dewar <dewar@adacore.com>
4432
4433 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4434 (Has_Default_Component_Value): Removed
4435 * einfo.ads Comment updates
4436 (Has_Default_Aspect): Replaces Has_Default_Value
4437 (Has_Default_Component_Value): Removed
4438 * exp_ch13.adb
4439 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4440 * exp_ch3.adb
4441 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4442 (Get_Simple_Init_Val): Handle Default_Value aspect
4443 (Needs_Simple_Initialization): Handle Default_Value aspect
4444 * exp_ch3.ads: Needs_Simple_Initialization
4445 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4446 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4447 * sem_ch13.adb
4448 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4449 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4450 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4451
4452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4453
4454 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4455 package containing iteration primitives.
4456 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4457
4458 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4459
4460 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4461 "of", pre-analyze expression in case it is a function call with
4462 finalization actions that must be placed ahead of the loop.
4463 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4464 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4465
4466 2011-08-02 Geert Bosch <bosch@adacore.com>
4467
4468 * cstand.adb (Create_Float_Types): Only consider C's long double for
4469 Long_Long_Float, in addition to double.
4470
4471 2011-08-02 Robert Dewar <dewar@adacore.com>
4472
4473 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4474 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4475 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4476 Minor reformatting.
4477
4478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4479
4480 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4481 indexed component.
4482
4483 2011-08-02 Javier Miranda <miranda@adacore.com>
4484
4485 * einfo.ads, einfo.adb
4486 (Original_Access_Type): Move this attribute to Node26 since there was
4487 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4488 which causes conflicts and breaks the generation of the .NET compiler.
4489 (Interface_Name): Add missing documentation on JGNAT only uses of
4490 this attribute.
4491
4492 2011-08-02 Geert Bosch <bosch@adacore.com>
4493
4494 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4495 (Find_Back_End_Float_Type): Likewise
4496 (Create_Back_End_Float_Types): Likewise
4497 (Create_Float_Types): Likewise
4498 (Register_Float_Type): Likewise
4499 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4500 Nlist and split out type selection in new local Find_Base_Type function.
4501 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4502 Nlist
4503 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4504
4505 2011-08-02 Robert Dewar <dewar@adacore.com>
4506
4507 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4508 alpha order).
4509 * opt.ads: Minor comment change.
4510 * sem_ch12.adb: Minor code reorganization.
4511
4512 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4513
4514 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4515 subtype's list of rep items to the list on the full subtype in the case
4516 where the lists are the same.
4517
4518 2011-08-02 Geert Bosch <bosch@adacore.com>
4519
4520 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4521 using the one from System.Strings, which also deallocates all strings.
4522
4523 2011-08-02 Geert Bosch <bosch@adacore.com>
4524
4525 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4526 function.
4527 * gcc-interface/Make-lang.in: Update dependencies.
4528
4529 2011-08-02 Olivier Hainque <hainque@adacore.com>
4530
4531 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4532 end_locus.
4533
4534 2011-08-02 Javier Miranda <miranda@adacore.com>
4535
4536 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4537 associated with anonymous access to subprograms.
4538
4539 2011-08-02 Geert Bosch <bosch@adacore.com>
4540
4541 * opt.ads
4542 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4543 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4544 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4545 (Add_Symbol_Definition): Move to switch-c.adb
4546 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4547 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4548 (Add_Symbol_Definition): Move to switch-c.adb.
4549 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4550 * sem_warn.adb
4551 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4552 Move to warnsw.adb.
4553 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4554 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4555 Move to warnsw.adb.
4556 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4557 (Add_Symbol_Definition): Moved from Prepcomp.
4558 * switch-c.ads: Update copyright notice. Use String_List instead of
4559 Argument_List, removing dependency on System.OS_Lib.
4560
4561 2011-08-02 Yannick Moy <moy@adacore.com>
4562
4563 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4564 mode on initialization expression which does not respect SPARK
4565 restrictions.
4566 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4567 if the tree referenced by its argument represents an initialization
4568 expression in SPARK, suitable for initializing an object in an object
4569 declaration.
4570
4571 2011-08-02 Javier Miranda <miranda@adacore.com>
4572
4573 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4574 internally generated access to subprogram with its associated protected
4575 subprogram type.
4576 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4577
4578 2011-08-02 Geert Bosch <bosch@adacore.com>
4579
4580 * cstand.adb (Register_Float_Type): Print information about type to
4581 register, if the Debug_Flag_Dot_B is set.
4582 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4583 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4584 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4585 with a requested precision of more than Max_Digits digits and no more
4586 than Max_Base_Digits digits, if a range specification is present and the
4587 Predefined_Float_Types list has a suitable type to derive from.
4588 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4589 case of type completion with pragma Import
4590 * sem_prag.adb
4591 (Process_Import_Predefined_Type): Processing to complete a type
4592 with pragma Import. Currently supports floating point types only.
4593 (Set_Convention_From_Pragma): Do nothing without underlying type.
4594 (Process_Convention): Guard against absence of underlying type,
4595 which may happen when importing incomplete types.
4596 (Process_Import_Or_Interface): Handle case of importing predefined
4597 types. Tweak error message.
4598
4599 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4600
4601 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4602 functions to previous change. Reorganize code slightly.
4603
4604 2011-08-02 Geert Bosch <bosch@adacore.com>
4605
4606 * back_end.ads (Register_Type_Proc): New call back procedure type for
4607 allowing the back end to provide information about available types.
4608 (Register_Back_End_Types): New procedure to register back end types.
4609 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4610 available types.
4611 * cstand.adb (Back_End_Float_Types): New list for floating point types
4612 supported by the back end.
4613 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4614 (Copy_Float_Type): New procedure to make new copies of predefined types.
4615 (Register_Float_Type): New call back procedure to populate the BEFT list
4616 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4617 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4618 (Create_Float_Types): New procedure to create entities for floating
4619 point types predefined in Standard, and put these and any remaining
4620 BEFTs on the Predefined_Float_Types list.
4621 * stand.ads (Predefined_Float_Types): New list for predefined floating
4622 point types that do not have declarations in package Standard.
4623
4624 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4625
4626 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4627 entity node for the unit containing the parameter.
4628 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4629 (Add_Inlined_Subprogram): Likewise.
4630 * gcc-interface/Make-lang.in: Update dependencies.
4631
4632 2011-08-02 Thomas Quinot <quinot@adacore.com>
4633
4634 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4635 suitable value.
4636
4637 2011-08-02 Geert Bosch <bosch@adacore.com>
4638
4639 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4640
4641 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4642
4643 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4644 computed value of Base_Type.
4645
4646 2011-08-02 Yannick Moy <moy@adacore.com>
4647
4648 * restrict.adb (Check_Restriction): issue an error for any use of
4649 class-wide, even if the No_Dispatch restriction is not set.
4650 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4651 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4652 when completing a private extension, the type named in the private part
4653 is not the same as that named in the visible part.
4654 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4655 of an inherited primitive operations of a tagged type or type extension
4656 that returns the tagged type.
4657 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4658 function which returns True for an implicit operation inherited by the
4659 derived type declaration for the argument type.
4660 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4661 order.
4662
4663 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4664
4665 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4666 Process_Bounds, to perform analysis with expansion of a range or an
4667 expression that is the iteration scheme for a loop.
4668 (Analyze_Iterator_Specification): If domain of iteration is given by a
4669 function call with a controlled result, as is the case if call returns
4670 a predefined container, ensure that finalization actions are properly
4671 generated.
4672 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4673
4674 2011-08-02 Javier Miranda <miranda@adacore.com>
4675
4676 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4677 * gcc-interface/Make-lang.in: Update dependencies.
4678
4679 2011-08-02 Javier Miranda <miranda@adacore.com>
4680
4681 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4682 determine if the analysis is performed using N or Original_Node (N).
4683 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4684 functionality of routine Is_Variable avoids code duplication.
4685 * checks.adb (Determine_Range): Handle temporaries generated by
4686 Remove_Side_Effects.
4687
4688 2011-08-02 Javier Miranda <miranda@adacore.com>
4689
4690 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4691 expansion of the condition. Required since the previous analysis was
4692 done with expansion disabled (see Resolve_Quantified_Expression) and
4693 hence checks were not inserted and record comparisons have not been
4694 expanded.
4695
4696 2011-08-02 Ed Falis <falis@adacore.com>
4697
4698 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4699 Update header.
4700
4701 2011-08-02 Bob Duff <duff@adacore.com>
4702
4703 * opt.ads: Minor comment fix.
4704
4705 2011-08-02 Bob Duff <duff@adacore.com>
4706
4707 * sem_ch12.adb (Analyze_Package_Instantiation,
4708 Analyze_Subprogram_Instantiation): Turn off style checking while
4709 analyzing an instance. Whatever style checks that apply to the generic
4710 unit should apply, so it makes no sense to apply them in an instance.
4711 This was causing trouble when compiling an instance of a runtime
4712 unit that violates the -gnatyO switch.
4713 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4714 one of the two case statements, causing spurious errors.
4715
4716 2011-08-02 Robert Dewar <dewar@adacore.com>
4717
4718 * uname.adb: Minor reformatting.
4719 * gnatcmd.adb: Minor reformatting.
4720 * exp_attr.adb: Minor reformatting.
4721
4722 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4723
4724 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4725 No_Dispatching_Calls, do not look for the Assign primitive, because
4726 predefined primitives are not created in this case.
4727
4728 2011-08-02 Bob Duff <duff@adacore.com>
4729
4730 * stylesw.ads: Minor comment fixes.
4731
4732 2011-08-02 Robert Dewar <dewar@adacore.com>
4733
4734 * freeze.adb (Add_To_Result): New procedure.
4735
4736 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4737
4738 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4739 time, if the specific run-time routines for handling streams of strings
4740 are not available, use the default mechanism.
4741
4742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4743
4744 * s-regpat.ads: Fix typo.
4745
4746 2011-08-02 Vincent Celier <celier@adacore.com>
4747
4748 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4749 not null, call it to create the in memory config project file without
4750 parsing an existing default config project file.
4751
4752 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4753
4754 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4755
4756 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4757
4758 * sem_elim.adb: an abstract subprogram does not need an eliminate
4759 pragma for its descendant to be eliminable.
4760
4761 2011-08-02 Ed Falis <falis@adacore.com>
4762
4763 * init.c: revert to handling before previous checkin for VxWorks
4764 * s-intman-vxworks.adb: delete unnecessary declarations related to
4765 using Ada interrupt facilities for handling signals.
4766 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4767 * s-intman-vxworks.ads: Import __gnat_install_handler as
4768 Initialize_Interrupts.
4769 * s-taprop-vxworks.adb: Delete Signal_Mask.
4770 (Abort_Handler): change construction of mask to unblock exception
4771 signals.
4772
4773 2011-08-02 Jerome Guitton <guitton@adacore.com>
4774
4775 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4776 Debug_Raise_Exception before propagation starts.
4777
4778 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4779
4780 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4781 to Restriction_Check_Required.
4782 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4783 * sem_res.adb (Resolve_Call): Likewise.
4784 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4785
4786 2011-08-02 Bob Duff <duff@adacore.com>
4787
4788 * stylesw.ads: Update comment.
4789 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4790 * errout.ads: Remove obsolete comment.
4791
4792 2011-08-02 Javier Miranda <miranda@adacore.com>
4793
4794 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4795 (Set_Is_Safe_To_Reevaluate): new procedure.
4796 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4797 assignment is allowed on safe-to-reevaluate variables.
4798 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4799 temporary created to remove side effects in expressions that use
4800 the secondary stack as safe-to-reevaluate.
4801 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4802 variables that are not true constants.
4803
4804 2011-08-02 Robert Dewar <dewar@adacore.com>
4805
4806 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4807 sem_res.adb, sem_ch6.adb: Minor reformatting.
4808
4809 2011-08-02 Jerome Guitton <guitton@adacore.com>
4810
4811 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4812
4813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4814
4815 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4816 not set Overridden_Operation if subprogram is an initialization
4817 procedure.
4818
4819 2011-08-02 Yannick Moy <moy@adacore.com>
4820
4821 * par-ch6.adb: Correct obsolete name in comments
4822 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4823 which takes two message arguments (existing function takes one), with
4824 second message used for continuation.
4825 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4826 block statements that originate from a source block statement, not
4827 generated block statements
4828 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4829 symmetry with procedure case
4830 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4831 function to issue an error in formal mode if a package specification
4832 contains more than one tagged type or type extension.
4833 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4834 parameters matching formals of tagged types are objects (or ancestor
4835 type conversions of objects), not general expressions. Issue an error
4836 on view conversions that are not involving ancestor conversion of an
4837 extended type.
4838 (Resolve_Type_Conversion): in formal mode, issue an error on the
4839 operand of an ancestor type conversion which is not an object
4840 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4841 procedure so that it works also for actuals of function calls
4842 (Is_Actual_Tagged_Parameter): new function which determines if its
4843 argument is an actual parameter of a formal of tagged type in a
4844 subprogram call
4845 (Is_SPARK_Object_Reference): new function which determines if the tree
4846 referenced by its argument represents an object in SPARK
4847
4848 2011-08-02 Robert Dewar <dewar@adacore.com>
4849
4850 * sem_ch3.adb: Minor reformatting
4851 Minor comment addition
4852 Minor error msg text change
4853
4854 2011-08-02 Javier Miranda <miranda@adacore.com>
4855
4856 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4857 function. Used to be more precise when we generate a variable plus one
4858 assignment to remove side effects in the evaluation of the Bound
4859 expressions.
4860 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4861 of the bound expression to force its re-analysis and thus expand the
4862 associated transient scope (if required). Code cleanup replacing the
4863 previous code that declared the constant entity by an invocation to
4864 routine Force_Evaluation which centralizes this work in the frontend.
4865
4866 2011-08-02 Robert Dewar <dewar@adacore.com>
4867
4868 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4869 (Base_Type): Now uses improved Is_Base_Type function
4870 * einfo.ads (Base_Type): Inline this function
4871
4872 2011-08-02 Robert Dewar <dewar@adacore.com>
4873
4874 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4875 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4876
4877 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4878
4879 * gcc-interface/Make-lang.in: Update dependencies.
4880 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4881 targets.
4882
4883 2011-08-02 Yannick Moy <moy@adacore.com>
4884
4885 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4886 non-simple expression used in delta constraint
4887 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4888 index constraint which is not a subtype mark
4889 * par.adb: With and use Restrict
4890 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4891 mode on component type which is not a subtype mark and default
4892 expression on component
4893 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4894 of string which does not have a lower index bound equal to 1
4895 (Array_Type_Declaration): issue an error in formal mode on index or
4896 component type which is not a subtype mark, and on aliased keyword on
4897 component
4898 (Derived_Type_Declaration): issue an error in formal mode on interface,
4899 limited or abstract type
4900 (Record_Type_Declaration): issue an error in formal mode on interface
4901 (Record_Type_Definition): issue an error in formal mode on tagged types
4902 and type extensions not declared in the specification of a library unit
4903 package; on null non-tagged record; on variant part
4904
4905 2011-08-02 Vincent Celier <celier@adacore.com>
4906
4907 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4908 not declared for qualified library project when Library_Name is not
4909 declared, but Library_Dir is.
4910
4911 2011-08-02 Robert Dewar <dewar@adacore.com>
4912
4913 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4914 pragmas (affects aspects [Component_]Default_Value
4915 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4916 component type for the resolution
4917
4918 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4919
4920 * einfo.adb (Base_Type): Tune implementation for speed.
4921
4922 2011-08-02 Robert Dewar <dewar@adacore.com>
4923
4924 * freeze.adb: Minor reformatting.
4925
4926 2011-08-02 Thomas Quinot <quinot@adacore.com>
4927
4928 * scos.ads: Update comments.
4929
4930 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4931
4932 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4933 base type, because the parent may be a subtype of a private type whose
4934 convention is established in a private part.
4935
4936 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4937
4938 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4939 statement in a block when the expansion of the return expression has
4940 created a finalization chain.
4941 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4942 with the parent node.
4943 Add N_Extended_Return_Statement to handle the case where a transient
4944 object declaration appears in the Return_Object_Declarations list of
4945 an extended return statement.
4946
4947 2011-08-02 Matthew Gingell <gingell@adacore.com>
4948
4949 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4950 unused parameter 'name'.
4951
4952 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4953
4954 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4955 inherited operation, check whether its alias, which is the source
4956 operastion that it renames, has been marked eliminated.
4957
4958 2011-08-02 Javier Miranda <miranda@adacore.com>
4959
4960 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4961 in-mode parameter whose type is an access type since it can be used to
4962 modify its designated object. Enforce code that handles as safe an
4963 access type that is not access-to-constant but it is the result of a
4964 previous removal of side-effects.
4965 (Remove_Side_Effects): Minor code reorganization of cases which require
4966 no action. Done to incorporate documentation on new cases uncovered
4967 working in this ticket: no action needed if this routine was invoked
4968 too early and the nodes are not yet decorated.
4969 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4970 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4971 were issued with actuals that are implicitly provided by
4972 Force_Evaluation.
4973
4974 2011-08-02 Robert Dewar <dewar@adacore.com>
4975
4976 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4977
4978 2011-08-02 Yannick Moy <moy@adacore.com>
4979
4980 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4981 to issue an error in formal mode on attribute not supported in this mode
4982 (Analyze_Attribute): issue errors on standard attributes not supported
4983 in formal mode.
4984 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4985 comment, and issue error in formal mode on modulus which is not a power
4986 of 2.
4987 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4988 range.
4989 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4990 subtype mark.
4991 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4992 operator on modular type (except 'not').
4993
4994 2011-08-02 Robert Dewar <dewar@adacore.com>
4995
4996 * gnat_rm.texi: Minor reformatting.
4997
4998 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4999
5000 * s-osinte-linux.ads: Minor comment update and reformatting.
5001 * i-cexten.ads: Make this unit pure, as for its parent.
5002 Will allow its usage in more contexts if needed.
5003
5004 2011-08-02 Robert Dewar <dewar@adacore.com>
5005
5006 * s-utf_32.ads: Minor comment fix.
5007
5008 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5009
5010 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5011 operation of a tagged synchronized type, handle the case where the
5012 controlling argument is overloaded.
5013
5014 2011-08-02 Yannick Moy <moy@adacore.com>
5015
5016 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5017 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5018 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5019 SPARK mode and formal verification mode on processing SPARK restriction
5020 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5021 requiring consistency checking.
5022
5023 2011-08-02 Robert Dewar <dewar@adacore.com>
5024
5025 * sem_res.adb: Minor reformatting.
5026
5027 2011-08-02 Robert Dewar <dewar@adacore.com>
5028
5029 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5030 a-cforse.ads: Remove unneeded with of Ada.Containers
5031 Remove commented out pragma Inline's
5032 Move specifications of new subprograms to the actual specs
5033
5034 2011-08-02 Yannick Moy <moy@adacore.com>
5035
5036 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5037 a-cforse.ads: Update comments.
5038
5039 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5040
5041 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5042
5043 2011-08-02 Robert Dewar <dewar@adacore.com>
5044
5045 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5046 a-cforse.ads, a-cofove.ads: Minor reformatting.
5047
5048 2011-08-02 Claire Dross <dross@adacore.com>
5049
5050 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5051 a-cofove.ads: Add comments.
5052
5053 2011-08-02 Yannick Moy <moy@adacore.com>
5054
5055 * gnat_rm.texi: Document formal containers.
5056
5057 2011-08-02 Emmanuel Briot <briot@adacore.com>
5058
5059 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5060 are empty sections.
5061
5062 2011-08-02 Robert Dewar <dewar@adacore.com>
5063
5064 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5065 reformatting.
5066
5067 2011-08-02 Robert Dewar <dewar@adacore.com>
5068
5069 * aspects.adb: New aspects Default_Value and Default_Component_Value
5070 New format of Aspect_Names table checks for omitted entries
5071 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5072 handling of boolean aspects for derived types.
5073 New aspects Default_Value and Default_Component_Value
5074 New format of Aspect_Names table checks for omitted entries
5075 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5076 (Has_Default_Value): New flag
5077 (Has_Default_Component_Value): New flag
5078 (Has_Default_Value): New flag
5079 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5080 table.
5081 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5082 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5083 Default_Value and Default_Component_Value
5084 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5085 New aspects Default_Value and Default_Component_Value
5086 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5087 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5088
5089 2011-08-02 Vincent Celier <celier@adacore.com>
5090
5091 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5092 inherit library kind.
5093
5094 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5095
5096 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5097 Minor reformatting.
5098
5099 2011-08-02 Robert Dewar <dewar@adacore.com>
5100
5101 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5102
5103 2011-08-02 Yannick Moy <moy@adacore.com>
5104
5105 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5106
5107 2011-08-02 Robert Dewar <dewar@adacore.com>
5108
5109 * impunit.adb: Add comment.
5110
5111 2011-08-02 Yannick Moy <moy@adacore.com>
5112
5113 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5114 qualification of aggregates in formal mode
5115 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5116 another aggregate
5117 (Resolve_Aggregate): complete the test that an aggregate is adequately
5118 qualified in formal mode
5119
5120 2011-08-02 Pascal Obry <obry@adacore.com>
5121
5122 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5123 * mlib-prj.adb: Supress warning when compiling binder generated file.
5124 (Build_Library): Supress all warnings when compiling the binder
5125 generated file.
5126
5127 2011-08-02 Yannick Moy <moy@adacore.com>
5128
5129 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5130 from here...
5131 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5132 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5133 Add with/use clauses to make Check_Formal_Restriction visible
5134
5135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5136
5137 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5138 in-parameters when type of the generic formal is private in the generic
5139 spec and non-private in the body.
5140
5141 2011-08-02 Claire Dross <dross@adacore.com>
5142
5143 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5144 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5145 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5146 * impunit.adb, Makefile.rtl: Take new files into account.
5147
5148 2011-08-02 Robert Dewar <dewar@adacore.com>
5149
5150 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5151 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5152
5153 2011-08-02 Yannick Moy <moy@adacore.com>
5154
5155 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5156 formal mode
5157 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5158 matching static array bounds, taking into account the special case of
5159 string literals
5160 * sem_ch3.adb: Typo in comment.
5161
5162 2011-08-02 Yannick Moy <moy@adacore.com>
5163
5164 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5165 which issues an error in formal mode if its argument node is originally
5166 from source
5167 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5168 has a discriminant specification so that it does not include the case
5169 of derived types
5170 (Derived_Type_Declaration): move here the test that a derived type has a
5171 discriminant specification
5172 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5173 first element of a component association before accessing its choices
5174 (presence of component association is not enough)
5175 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5176 declaration is a library item before accessing the next element in a
5177 list, as library items are not member of lists
5178 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5179 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5180 Check_Formal_Restriction whenever possible.
5181
5182 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5183
5184 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5185 reference when needed.
5186
5187 2011-08-02 Bob Duff <duff@adacore.com>
5188
5189 * gnat_ugn.texi: Fix typo.
5190
5191 2011-08-02 Vincent Celier <celier@adacore.com>
5192
5193 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5194 archive file name. Do not use the full path name of archives for Open
5195 VMS.
5196
5197 2011-08-02 Robert Dewar <dewar@adacore.com>
5198
5199 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5200 Analyze_Aspect_Specifications
5201 * sem_ch13.adb
5202 (Analyze_Aspect_Specifications): New handling for boolean aspects
5203 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5204 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5205 sequence for Analyze_Aspect_Specifications
5206 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5207 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5208
5209 2011-08-02 Robert Dewar <dewar@adacore.com>
5210
5211 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5212 aspects, since these no longer exist.
5213
5214 2011-08-02 Robert Dewar <dewar@adacore.com>
5215
5216 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5217 semicolon, do not try to see if there are aspects following it.
5218 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5219 aspect spec.
5220
5221 2011-08-02 Robert Dewar <dewar@adacore.com>
5222
5223 * sem_ch8.adb, aspects.ads: Minor reformatting.
5224
5225 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5226
5227 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5228 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5229 extracted from...
5230 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5231
5232 2011-08-02 Yannick Moy <moy@adacore.com>
5233
5234 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5235 mode on subprogram declaration outside of package specification, unless
5236 it is followed by a pragma Import
5237 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5238 Access_Type_Declaration): issue error in formal mode on access type
5239 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5240 incomplete type
5241 (Analyze_Object_Declaration): issue error in formal mode on object
5242 declaration which does not respect SPARK restrictions
5243 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5244 declaration which does not respect SPARK restrictions
5245 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5246 error in formal mode on digits or delta constraint
5247 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5248 decimal fixed point type
5249 (Derived_Type_Declaration): issue error in formal mode on derived type
5250 other than type extensions of tagged record types
5251 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5252 with check on access definition
5253 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5254 mode on protected definition.
5255 (Analyze_Task_Definition): issue error in formal mode on task definition
5256
5257 2011-08-02 Robert Dewar <dewar@adacore.com>
5258
5259 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5260
5261 2011-08-02 Javier Miranda <miranda@adacore.com>
5262
5263 * sem_ch6.adb (Can_Override_Operator): New function.
5264 (Verify_Overriding_Indicator): Add missing code to check overriding
5265 indicator in operators. Fixes regression.
5266 (Check_Overriding_Indicator): Minor reformating after replacing the
5267 code that evaluates if the subprogram can override an operator by
5268 invocations to the above new function.
5269 * einfo.adb
5270 (Write_Field26_Name): Add missing code to ensure that, following
5271 the documentation in einfo.ads, this field is not shown as attribute
5272 "Static_Initialization" on non-dispatching functions.
5273
5274 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5275
5276 * sem_res.adb (Resolve_Call): A call to
5277 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5278 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5279 i.e., when the second parameter is of type Time_Span.
5280
5281 2011-08-02 Vincent Celier <celier@adacore.com>
5282
5283 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5284 with an archive instead of -L<library dir> -l<library name>.
5285
5286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5287
5288 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5289 mark the base types In_Use in addition to making the operations
5290 use_visible.
5291
5292 2011-08-02 Ed Falis <falis@adacore.com>
5293
5294 * init.c: add and setup __gnat_signal_mask for the exception signals
5295 * s-inmaop-vxworks.adb: new file.
5296 * s-intman-vxworks.adb: remove unnecessary initializations and
5297 simplify remaining
5298 * s-intman-vxworks.ads: remove unnecessary variable
5299 * s-taprop-vxworks.adb: simplify signal initialization
5300
5301 2011-08-02 Robert Dewar <dewar@adacore.com>
5302
5303 * sem_ch8.adb: Minor code reorganization, comment updates.
5304
5305 2011-08-02 Robert Dewar <dewar@adacore.com>
5306
5307 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5308 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5309 here from Sem_Res.
5310 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5311 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5312
5313 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5314
5315 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5316 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5317 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5318 use_type_clauses, to handle more efficiently use_type and use_all_type
5319 constructs.
5320 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5321 Ada2012 Use_All_Type clause.
5322 (Use_Class_Wide_Operations): new procedure.
5323
5324 2011-08-02 Robert Dewar <dewar@adacore.com>
5325
5326 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5327 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5328 expression to expression function.
5329
5330 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5331
5332 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5333 if types are compatible.
5334
5335 2011-08-02 Yannick Moy <moy@adacore.com>
5336
5337 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5338 returns True if its argument array types have same dimension and same
5339 static bounds at each index.
5340 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5341 OUT or IN OUT paramaters which are not view conversions in SPARK.
5342 (Resolve_Arithmetic_Op): issue an error in formal mode on
5343 multiplication or division with operands of fixed point types which are
5344 not qualified or explicitly converted.
5345 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5346 Boolean or array type (except String) operands.
5347 (Resolve_Equality_Op): issue an error in formal mode on equality
5348 operators for array types other than String with non-matching static
5349 bounds.
5350 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5351 for array types with non-matching static bounds. Factorize the code in
5352 Matching_Static_Array_Bounds.
5353 (Resolve_Qualified_Expression): issue an error in formal mode on
5354 qualified expressions for array types with non-matching static bounds.
5355 (Resolve_Type_Conversion): issue an error in formal mode on type
5356 conversion for array types with non-matching static bounds
5357
5358 2011-08-02 Robert Dewar <dewar@adacore.com>
5359
5360 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5361
5362 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5363
5364 * par-ch9.adb: save location of entry for proper error message.
5365
5366 2011-08-02 Javier Miranda <miranda@adacore.com>
5367
5368 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5369 (Use_Full_View) which permits this routine to climb through the
5370 ancestors using the full-view of private parents.
5371 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5372 Use_Full_View to true in calls to Is_Ancestor.
5373 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5374 true in call to Is_Ancestor.
5375 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5376 Use_Full_View to true in call to Is_Ancestor.
5377 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5378 call to Is_Ancestor.
5379 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5380 Use_Full_View to true in calls to Is_Ancestor.
5381 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5382 Make_Select_Specific_Data_Table, Register_Primitive,
5383 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5384 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5385 to true in call to Is_Ancestor.
5386 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5387 Use_Full_View to true in calls to Is_Ancestor.
5388 * exp_cg.adb
5389 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5390 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5391
5392 2011-08-02 Robert Dewar <dewar@adacore.com>
5393
5394 * gnat_rm.texi: Minor reformatting.
5395 * sem_prag.adb: Minor reformatting.
5396
5397 2011-08-02 Tristan Gingold <gingold@adacore.com>
5398
5399 * vms_data.ads: Add VMS qualifier for -gnateP.
5400
5401 2011-08-02 Robert Dewar <dewar@adacore.com>
5402
5403 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5404 * par-ch7.adb (P_Package): Proper placement of aspects for package
5405 decl/instantiation.
5406 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5407 (End_Statements): Add Is_Sloc parameterr
5408 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5409 (Check_End): Ad Is_Sloc parameter
5410 (End_Statements): Add Is_Sloc parameterr
5411
5412 2011-08-02 Vincent Celier <celier@adacore.com>
5413
5414 * ug_words: Add VMS qualifier equivalent to -gnateP:
5415 /SYMBOL_PREPROCESSING.
5416
5417 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5418
5419 * gnat-style.texi: For hexadecimal numeric literals the typical
5420 grouping of digits is 4 to represent 2 bytes.
5421 A procedure spec which is split into several lines is indented two
5422 characters.
5423
5424 2011-08-02 Yannick Moy <moy@adacore.com>
5425
5426 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5427 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5428 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5429 properly qualified
5430 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5431 choice in array aggregate
5432 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5433 mark as ancestor
5434 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5435 positional and named aggregate for record, or others in record
5436 aggregate, or multiple choice in record aggregate
5437 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5438 array operands to logical operations AND, OR and XOR do not have the
5439 same static lower and higher bounds
5440 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5441
5442 2011-08-01 Robert Dewar <dewar@adacore.com>
5443
5444 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5445 Replaces Last_Source_Node_In_Sequence.
5446 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5447 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5448 parens and blank in string (this was inconsistently implemented).
5449 * errout.ads
5450 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5451 blank in string (this was inconsistently implemented).
5452 * gnat1drv.adb
5453 (Set_Global_Switches): Set formal mode switches appropriately
5454 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5455 * par-prag.adb
5456 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5457 call Set_Error_Msg_Lang to set "spark" as language name.
5458 * par.adb: Remove unnecessary call to set formal language for errout
5459 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5460 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5461 name.
5462 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5463 calls to it, moved after resolution so that types are known
5464 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5465 result of concatenation is not of type String
5466 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5467 concatenation is not properly restricted
5468 * gnat_rm.texi: Add doc on pragma Spark_95.
5469 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5470 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5471 * gcc-interface/Make-lang.in: Update dependencies.
5472
5473 2011-08-01 Javier Miranda <miranda@adacore.com>
5474
5475 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5476 condition that detects if the overridden operation must replace an
5477 existing entity.
5478
5479 2011-08-01 Javier Miranda <miranda@adacore.com>
5480
5481 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5482 code declarations inserted by Insert_Actions in each alternative of the
5483 N_Case_Expression node.
5484
5485 2011-08-01 Robert Dewar <dewar@adacore.com>
5486
5487 * sem_ch6.adb: Minor code reorganization.
5488 * sem_util.adb: Minor reformatting.
5489
5490 2011-08-01 Pascal Obry <obry@adacore.com>
5491
5492 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5493 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5494
5495 2011-08-01 Yannick Moy <moy@adacore.com>
5496
5497 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5498 literal or operator symbol which is prefixed
5499 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5500 mode on access attributes.
5501 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5502 that concatenation operands are properly restricted in formal mode
5503 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5504 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5505 result of the concatenation has a type different from String.
5506 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5507 Analyze_Quantified_Expression, Analyze_Slice,
5508 Analyze_Null): issue an error in formal mode on unsupported constructs
5509 * sem_ch5.adb
5510 (Analyze_Block_Statement): only issue error on source block statement
5511 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5512 function which returns the last node in a list of nodes for which
5513 Comes_From_Source returns True, if any
5514 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5515 Last_Source_Node_In_Sequence
5516 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5517 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5518 mode on unsupported constructs
5519 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5520 rest of the actions may be needed later on since the error is marked as
5521 not serious.
5522 * sinfo.ads: Typos in comments.
5523
5524 2011-08-01 Pascal Obry <obry@adacore.com>
5525
5526 * projects.texi: Minor editing.
5527
5528 2011-08-01 Yannick Moy <moy@adacore.com>
5529
5530 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5531 insertion character ~~
5532 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5533 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5534 with insertion character ~~
5535 (Set_Msg_Text): treat insertion character ~~
5536 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5537 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5538 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5539 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5540 errors related to the formal language restriction not serious
5541 (insertion character |).
5542 * par.adb (Par): set formal language for error messages if needed
5543 * sem_ch6.adb (Check_Missing_Return): take into account possible
5544 generated statements at the end of the function
5545 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5546 enumeration value to define a new pragma SPARK_95
5547 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5548 SPARK_Version): new type and variables to store the SPARK version
5549 (none by default).
5550 (SPARK_Mode): return True when SPARK_Version is set
5551 * par-prag.adb: Correct indentation
5552 (Prag): take Pragma_SPARK_95 into account
5553 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5554 into account.
5555
5556 2011-08-01 Robert Dewar <dewar@adacore.com>
5557
5558 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5559 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5560 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5561
5562 2011-08-01 Pascal Obry <obry@adacore.com>
5563
5564 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5565 Target_Name to Get_Path call.
5566 (Parse_Single_Project): Likewise.
5567 (Post_Parse_Context_Clause): Likewise.
5568 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5569 Call Initialise_Project_Path with the proper Target_Name.
5570 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5571 search path.
5572 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5573 with the proper Target_Name.
5574 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5575 Part.Parse routine.
5576 (Parse_Project_And_Apply_Config): Likewise.
5577 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5578 This is fine as this part of the code is supporting only native
5579 compilation.
5580 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5581 is fine as this part of the code is supporting only native compilation.
5582
5583 2011-08-01 Yannick Moy <moy@adacore.com>
5584
5585 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5586 of homonym, unless the homonym is one of the cases allowed in SPARK
5587 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5588 package declaration occurring after a body.
5589
5590 2011-08-01 Robert Dewar <dewar@adacore.com>
5591
5592 * checks.adb, exp_ch4.adb: Minor reformatting.
5593
5594 2011-08-01 Javier Miranda <miranda@adacore.com>
5595
5596 * einfo.ads (Access_Disp_Table): Fix documentation.
5597 (Dispatch_Table_Wrappers): Fix documentation.
5598
5599 2011-08-01 Pascal Obry <obry@adacore.com>
5600
5601 * prj-env.adb, prj-env.ads: Minor reformatting.
5602
5603 2011-08-01 Yannick Moy <moy@adacore.com>
5604
5605 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5606 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5607 procedures out of these packages.
5608 * errout.ads, errout.adb
5609 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5610 procedures in of this package
5611 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5612 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5613 on misplaced later vs initial declarations, like in Ada 83
5614 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5615 formal mode on attribute of private type whose full type declaration
5616 is not visible
5617 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5618 package declaration inside a package specification
5619 (Analyze_Full_Type_Declaration): issue error in formal mode on
5620 controlled type or discriminant type
5621 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5622 user-defined operator means that it should come from the source
5623 (New_Overloaded_Entity): issue error in formal mode on overloaded
5624 entity.
5625 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5626
5627 2011-08-01 Thomas Quinot <quinot@adacore.com>
5628
5629 * atree.adb: Minor reformatting.
5630 * checks.adb: Minor reformatting.
5631
5632 2011-08-01 Vincent Celier <celier@adacore.com>
5633
5634 * s-parame-vms-ia64.ads: Fix typo in comment
5635 Minor reformatting
5636 * s-parame-vms-restrict.ads: Removed, unused.
5637
5638 2011-08-01 Javier Miranda <miranda@adacore.com>
5639
5640 * exp_ch3.adb
5641 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5642 * sem_ch3.adb
5643 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5644 * sem_ch3.ads, sem_ch3.adb
5645 (Is_Constant_Bound): New extended version of the subprogram that was
5646 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5647 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5648 * sem_aux.ads (Constant_Value): Fix typo in comment.
5649 * checks.adb (Generate_Index_Checks): New implementation which, for
5650 array objects with constant bounds, generates the runtime check
5651 referencing the bounds of the array type. For other cases this routine
5652 provides its previous behavior obtaining such values from the array
5653 object.
5654 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5655 parent type.
5656 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5657 we cannot have semantic interpretations of the new node.
5658
5659 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5660
5661 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5662 expressions.
5663
5664 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5665
5666 * sem_ch8.adb: Minor code editing.
5667 * s-vxwext.adb: Remove trailing space.
5668 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5669 consistency with other files.
5670
5671 2011-08-01 Thomas Quinot <quinot@adacore.com>
5672
5673 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5674
5675 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5676
5677 * par-ch10.adb: reject parameterized expressions as compilation unit.
5678 * sem_ch4.adb: handle properly conditional expression with overloaded
5679 then_clause and no else_clause.
5680
5681 2011-08-01 Tristan Gingold <gingold@adacore.com>
5682
5683 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5684 like done by System.Aux_DEC.
5685 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5686
5687 2011-08-01 Yannick Moy <moy@adacore.com>
5688
5689 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5690 missing label at end of declaration (subprogram or package)
5691 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5692 of positional and named parameter association
5693 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5694 Error_Msg_SP which adds a prefix to the error message giving the name
5695 of the formal language analyzed
5696 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5697 access result type in subprogram, unconstrained array as result type,.
5698 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5699 procedure
5700 * sem_ch8.adb: Code clean up.
5701
5702 2011-08-01 Javier Miranda <miranda@adacore.com>
5703
5704 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5705 * einfo.ads (Access_Disp_Table): Fix documentation.
5706 (Dispatch_Table_Wrappers): Fix documentation.
5707 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5708 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5709 to enforce the documentation of this attribute.
5710 (Set_Is_Interface): Cleanup the assertion.
5711 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5712 the Underlying_Type entity before reading attribute Access_Disp_Table.
5713 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5714 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5715 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5716 the Underlying_Type entity before reading attribute Access_Disp_Table.
5717 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5718 Locate the Underlying_Type entity before reading attribute
5719 Access_Disp_Table.
5720
5721 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5722
5723 * s-poosiz.ads: Additional overriding indicators.
5724
5725 2011-08-01 Yannick Moy <moy@adacore.com>
5726
5727 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5728 formal mode.
5729 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5730 parameter specification does not include a subtype mark.
5731 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5732 formal mode on abstract subprogram.
5733 (Analyze_Subprogram_Specification): issue error in formal mode on
5734 user-defined operator.
5735 (Process_Formals): issue error in formal mode on access parameter and
5736 default expression.
5737 * sem_ch9.adb (Analyze_Abort_Statement,
5738 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5739 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5740 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5741 Analyze_Requeue, Analyze_Selective_Accept,
5742 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5743 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5744 issue error in formal mode on user-defined raise statement.
5745
5746 2011-08-01 Thomas Quinot <quinot@adacore.com>
5747
5748 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5749 declaration being hidden when overriding an implicit inherited
5750 subprogram.
5751 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5752 (-gnats), do not complain about a source file that contains only a
5753 pragma No_Body.
5754
5755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5756
5757 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5758 variable if already set.
5759
5760 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5761
5762 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5763 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5764 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5765 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5766 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5767 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5768 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5769 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5770 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5771 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5772 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5773 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5774 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5775 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5776 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5777 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5778 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5779 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5780 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5781 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5782 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5783 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5784 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5785 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5786 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5787 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5788 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5789 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5790 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5791 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5792 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5793 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5794 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5795 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5796 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5797 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5798 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5799 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5800 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5801 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5802 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5803 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5804 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5805 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5806 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5807 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5808 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5809 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5810 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5811 Use GNAT instead of GNARL.
5812
5813 2011-08-01 Bob Duff <duff@adacore.com>
5814
5815 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5816 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5817 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5818 reformatting.
5819
5820 2011-08-01 Yannick Moy <moy@adacore.com>
5821
5822 * debug.adb (d.D) reverve flag for the SPARK mode
5823 (d.E) reverve flag for SPARK generation mode
5824 (d.F) reverve flag for Why generation mode
5825 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5826 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5827 functions which return True when the corresponding modes are set
5828 (Formal_Language): return "spark" or "alfa" when in formal verification
5829 mode.
5830 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5831 Error_Msg to prefix the error message with a tag giving the formal
5832 language
5833 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5834 message with a tag giving the formal language
5835 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5836 block statement
5837 (Analyze_Case_Statement): issue error in formal mode on case statement
5838 with a single "others" case alternative
5839 (Analyze_Exit_Statement): issue errors in formal mode on exit
5840 statements which do not respect SPARK restrictions
5841 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5842 (Check_Unreachable_Code): always issue an error (not a warning) in
5843 formal mode on unreachable code (concerns both code after an infinite
5844 loop and after an unconditional jump, both not allowed in SPARK)
5845 * sem_ch6.adb (Analyze_Return_Statement): add call to
5846 Set_Return_Present for a procedure containing a return statement
5847 (already done for functions in Analyze_Function_Return)
5848 (Analyze_Function_Return): issue error in formal mode on extended
5849 return or if return is not last statement in function
5850 (Check_Missing_Return): issue error in formal mode if function does
5851 not end with return or if procedure contains a return
5852 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5853 function to detect if there is an inner scope of its parameter S which
5854 is a loop.
5855
5856 2011-08-01 Thomas Quinot <quinot@adacore.com>
5857
5858 * sem_ch6.ads: Minor reformatting.
5859
5860 2011-08-01 Javier Miranda <miranda@adacore.com>
5861
5862 * sem_util.adb (Abstract_Interface_List): Complete condition when
5863 processing private type declarations to avoid reading unavailable
5864 attribute.
5865 (Is_Synchronized_Tagged_Type): Complete condition when processing
5866 private extension declaration nodes to avoid reading unavailable
5867 attribute.
5868
5869 2011-08-01 Thomas Quinot <quinot@adacore.com>
5870
5871 * sem_ch3.adb: Minor reformatting.
5872
5873 2011-08-01 Thomas Quinot <quinot@adacore.com>
5874
5875 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5876 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5877 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5878 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5879 for VMS, instead parametrize the common implementation with
5880 System.Parameters declarations.
5881
5882 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5883
5884 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5885
5886 2011-08-01 Tristan Gingold <gingold@adacore.com>
5887
5888 * seh_init.c: Fix SEH handler installation on win64.
5889
5890 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5891
5892 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5893 double analysis of an anonymous access to subprogram, because it can
5894 lead to improper sharing of profiles and a back-end crash.
5895
5896 2011-08-01 Robert Dewar <dewar@adacore.com>
5897
5898 * make.adb, sem_ch4.adb: Minor reformatting.
5899 * gcc-interface/Make-lang.in: Update dependencies.
5900 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5901
5902 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5903
5904 * gnat_rm.texi: Fix definition of Long_Integer.
5905
5906 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5907
5908 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5909 to prevent storage exhaustion.
5910 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5911 finalized is a function body, insert the cleanup code before the final
5912 return statement, to prevent spurious warnings.
5913 * s-pooglo.ads: add overriding indicator.
5914
5915 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5916
5917 * sem_ch4.adb (Operator_Check): improve error message when both a
5918 with_clause and a use_clause are needed to make operator usage legal.
5919 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5920 determine whether a compilation unit is visible within an other,
5921 either through a with_clause in the current unit, or a with_clause in
5922 its library unit or one one of its parents.
5923
5924 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5925
5926 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5927 over an arbitrary expression of an array or container type.
5928 * lib-xref.adb: clarify comment.
5929
5930 2011-08-01 Bob Duff <duff@adacore.com>
5931
5932 * einfo.ads: Minor reformatting.
5933 * debug.adb: Minor comment improvement.
5934
5935 2011-08-01 Javier Miranda <miranda@adacore.com>
5936
5937 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5938 consider hidden subprograms as valid candidates.
5939
5940 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5941
5942 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5943
5944 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5945
5946 * gnat_ugn.texi: Fix typo.
5947
5948 2011-08-01 Robert Dewar <dewar@adacore.com>
5949
5950 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5951 lib-xref.adb: Minor reformatting
5952
5953 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5954
5955 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5956 when to generate a call to Move_Final_List.
5957 (Has_Controlled_Parts): Remove this function.
5958
5959 2011-08-01 Geert Bosch <bosch@adacore.com>
5960
5961 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5962 "," in choice list.
5963
5964 2011-08-01 Thomas Quinot <quinot@adacore.com>
5965
5966 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5967 explicit raise of a predefined exception as Comes_From_Source if the
5968 original N_Raise_Statement comes from source.
5969
5970 2011-08-01 Robert Dewar <dewar@adacore.com>
5971
5972 * sinfo.ads: Add comment.
5973 * sem_ch6.adb: Minor reformatting.
5974
5975 2011-08-01 Robert Dewar <dewar@adacore.com>
5976
5977 * freeze.adb (Freeze_Entity): Refine check for bad component size
5978 clause to avoid rejecting confirming clause when atomic/aliased present.
5979
5980 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5981
5982 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5983 better determine whether an entity reference is a write.
5984 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5985 subcomponent.
5986 * lib-xref.adb (Output_References): Do no suppress a read reference at
5987 the same location as an immediately preceeding modify-reference, to
5988 handle properly in-out actuals.
5989
5990 2011-08-01 Tristan Gingold <gingold@adacore.com>
5991
5992 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5993
5994 2011-08-01 Quentin Ochem <ochem@adacore.com>
5995
5996 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5997 heap to compute the result.
5998
5999 2011-08-01 Robert Dewar <dewar@adacore.com>
6000
6001 * atree.ads: Minor reformatting.
6002
6003 2011-08-01 Emmanuel Briot <briot@adacore.com>
6004
6005 * g-expect.adb (Get_Command_Output): Fix memory leak.
6006
6007 2011-08-01 Geert Bosch <bosch@adacore.com>
6008
6009 * cstand.adb (P_Float_Type): New procedure to print the definition of
6010 predefined fpt types.
6011 (P_Mixed_Name): New procedure to print a name using mixed case
6012 (Print_Standard): Use P_Float_Type for printing floating point types
6013 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6014 precision IEEE float.
6015
6016 2011-08-01 Thomas Quinot <quinot@adacore.com>
6017
6018 * sem_ch3.adb: Minor reformatting.
6019
6020 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6021
6022 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6023 the completion of a generic function, insert the new body rather than
6024 rewriting the original.
6025
6026 2011-08-01 Yannick Moy <moy@adacore.com>
6027
6028 * sinfo.ads, errout.ads: Typos in comments.
6029
6030 2011-08-01 Robert Dewar <dewar@adacore.com>
6031
6032 * par-endh.adb: Minor reformatting.
6033
6034 2011-08-01 Robert Dewar <dewar@adacore.com>
6035
6036 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6037 (Pre_Post_Aspects): New subtype.
6038 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6039 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6040 * par-ch7.adb (P_Package): Remove Decl parameter
6041 (P_Package): Handle new syntax for aspects (before IS)
6042 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6043 new aspect syntax
6044 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6045 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6046 (P_Package): Remove Decl parameter
6047 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6048 aspects
6049 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6050 specs
6051 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6052 * sinfo.ads: Document new syntax for aspects in packages etc.
6053 * sprint.adb: Handle new syntax of aspects before IS in package
6054
6055 2011-08-01 Thomas Quinot <quinot@adacore.com>
6056
6057 * atree.ads: Minor reformatting.
6058 * sem_prag.adb: Minor reformatting.
6059
6060 2011-08-01 Robert Dewar <dewar@adacore.com>
6061
6062 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6063 case expr alternative.
6064
6065 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6066
6067 * sem_ch12.adb: Fix typo.
6068
6069 2011-08-01 Geert Bosch <bosch@adacore.com>
6070
6071 * sem_prag.adb (Check_No_Link_Name): New procedure.
6072 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6073 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6074 instead of Standard_Long_Long_Float_Size global. Preparation for
6075 eventual removal of per type constants.
6076 * exp_util.ads (Get_Stream_Size): New function returning the stream
6077 size value of subtype E.
6078 * exp_util.adb (Get_Stream_Size): Implement new function.
6079 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6080 function.
6081 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6082 * einfo.adb:
6083 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6084
6085 2011-08-01 Geert Bosch <bosch@adacore.com>
6086
6087 * cstand.adb: Fix comments.
6088 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6089 count of arguments.
6090
6091 2011-08-01 Robert Dewar <dewar@adacore.com>
6092
6093 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6094
6095 2011-08-01 Geert Bosch <bosch@adacore.com>
6096
6097 * atree.ads: Fix comment.
6098
6099 2011-08-01 Robert Dewar <dewar@adacore.com>
6100
6101 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6102 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6103 * par.adb: Add with for Namet.Sp.
6104 * par-tchk.adb: Minor reformatting.
6105
6106 2011-08-01 Vincent Celier <celier@adacore.com>
6107
6108 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6109 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6110 of the init procedure of a SAL.
6111 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6112 New procedure.
6113
6114 2011-08-01 Thomas Quinot <quinot@adacore.com>
6115
6116 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6117 reformatting.
6118
6119 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6120
6121 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6122
6123 2011-08-01 Thomas Quinot <quinot@adacore.com>
6124
6125 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6126 conformant with its spec (return True only for types that have
6127 an overriding Initialize primitive operation that prevents them from
6128 having preelaborable initialization).
6129 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6130 initialization for controlled types in Ada 2005 or later mode.
6131
6132 2011-08-01 Robert Dewar <dewar@adacore.com>
6133
6134 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6135 Postcondition.
6136 (Same_Aspect): New function.
6137 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6138 Type_Invariant, Precondition, Postcondition.
6139 * snames.ads-tmpl: Add Name_Type_Invariant.
6140
6141 2011-08-01 Robert Dewar <dewar@adacore.com>
6142
6143 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6144 here.
6145 (Freeze_All_Ent): Fix error in handling inherited aspects.
6146 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6147 already analyzed, but don't skip entire processing of a declaration,
6148 that's wrong in some cases of declarations being rewritten.
6149 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6150 Don't delay for integer, string literals
6151 Treat predicates in usual manner for delay, remove special case code,
6152 not needed.
6153 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6154 (Build_Predicate_Function): Update saved expression in aspect
6155 (Build_Invariant_Procedure): Update saved expression in aspect
6156 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6157 of replacement of discriminant references if the reference is simple.
6158
6159 2011-08-01 Robert Dewar <dewar@adacore.com>
6160
6161 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6162 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6163 Static_Predicate and Dynamic_Predicate.
6164 (Build_Predicate_Function): Add processing for Static_Predicate
6165 and Dynamic_Predicate.
6166 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6167 (From_Static_Predicate): New flag
6168 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6169
6170 2011-08-01 Robert Dewar <dewar@adacore.com>
6171
6172 * usage.adb: Documentation cleanup for Ada version modes in usage.
6173 * expander.adb: Minor reformatting.
6174
6175 2011-08-01 Robert Dewar <dewar@adacore.com>
6176
6177 * atree.ads: Minor comment fix.
6178 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6179 a-witeio.ads, sem_prag.adb: Minor reformatting.
6180
6181 2011-08-01 Doug Rupp <rupp@adacore.com>
6182
6183 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6184 pointers. Use descrip.h header file for convenience. Add some
6185 comments.
6186
6187 2011-08-01 Robert Dewar <dewar@adacore.com>
6188
6189 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6190 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6191 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6192 New procedure.
6193 (Check_Aspect_At_End_Of_Declarations): New procedure
6194 (Analye_Aspect_Specification): Minor changes for above procedures
6195 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6196 specification node as well.
6197
6198 2011-08-01 Pascal Obry <obry@adacore.com>
6199
6200 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6201 Windows files. Use GetFilesAttributes() in this case to check for file
6202 existence instead of returning with an error code.
6203
6204 2011-08-01 Vincent Celier <celier@adacore.com>
6205
6206 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6207 High is above Source length.
6208
6209 2011-08-01 Robert Dewar <dewar@adacore.com>
6210
6211 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6212
6213 2011-08-01 Robert Dewar <dewar@adacore.com>
6214
6215 * aspects.ads (Boolean_Aspects): New subtype.
6216 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6217 for derived types in cases where the parent type and derived type have
6218 aspects.
6219 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6220 with aspects when parent type also has aspects.
6221 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6222 boolean expression at this point).
6223 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6224 accordance with final decision on the Ada 2012 feature.
6225 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6226
6227 2011-08-01 Matthew Heaney <heaney@adacore.com>
6228
6229 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6230
6231 2011-08-01 Pascal Obry <obry@adacore.com>
6232
6233 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6234 Fix Replace_Slice when High is above current string size.
6235 (Replace_Slice): Fix DL computation when High is above current
6236 string length.
6237
6238 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6239
6240 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6241
6242 2011-08-01 Matthew Heaney <heaney@adacore.com>
6243
6244 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6245 of node.
6246
6247 2011-08-01 Pascal Obry <obry@adacore.com>
6248
6249 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6250 reformatting.
6251
6252 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6253
6254 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6255 access to protected subprograms in generic bodies.
6256 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6257 protected type, indicate that the convention of the subprogram is
6258 Convention_Protected, because it may be used in subsequent declarations
6259 within the protected declaration.
6260
6261 2011-08-01 Vincent Celier <celier@adacore.com>
6262
6263 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6264 and "final" procedures when the name of the library is "ada", to avoid
6265 duplicate symbols "adainit" and "adafinal" in executables.
6266
6267 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6268
6269 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6270 quantified expression that appears within a postcondition and uses the
6271 Ada2012 'Result attribute.
6272
6273 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6274
6275 * init.c (__gnat_error_handler): Cast reason to int.
6276 (__gnat_install_handler): Explain sa_sigaction use.
6277
6278 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6279
6280 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6281 subprogram has copy-in copy-out parameters, try to promote the mode of
6282 the return type if it is passed in registers.
6283
6284 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6285
6286 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6287 left operand as addressable.
6288
6289 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6290
6291 * gcc-interface/gigi.h (build_function_stub): Remove.
6292 (build_return_expr): Likewise.
6293 (convert_vms_descriptor): Declare.
6294 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6295 (build_function_stub): Move to...
6296 * gcc-interface/utils2.c (build_return_expr): Move to...
6297 * gcc-interface/trans.c (build_function_stub): ...here.
6298 (build_return_expr): ...here.
6299 (Subprogram_Body_to_gnu): Add local variable for language_function.
6300 Disconnect the parameter attributes cache, if any, once done with it.
6301 Call end_subprog_body only after setting the end_locus.
6302 Build the stub associated with the function, if any, at the very end.
6303 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6304 variables and streamline control flow.
6305
6306 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6307
6308 PR ada/49819
6309 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6310 g-trasym-dwarf.adb.
6311
6312 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6313
6314 PR bootstrap/49794
6315 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6316 Assign to act.sa_sigaction.
6317 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6318 current->return_address to char * before arithmetic.
6319
6320 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6321
6322 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6323 Correct argument types.
6324 Extract code from reason.
6325 (__gnat_install_handler): Assign to act.sa_sigaction.
6326
6327 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6328
6329 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6330 (GNAT1_OBJS): ...here.
6331
6332 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6333
6334 PR ada/48711
6335 * g-socthi-mingw.adb (Fill): Fix formatting.
6336
6337 * gcc-interface/gigi.h: Move around comment.
6338
6339 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6340
6341 PR ada/46350
6342 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6343
6344 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6345
6346 PR ada/48711
6347 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6348
6349 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6350
6351 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6352 range comparison if Pmode is SImode.
6353
6354 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6355 Eric Botcazou <ebotcazou@adacore.com>
6356
6357 * adadecode.c: Wrap up in extern "C" block.
6358 * adadecode.h: Likewise.
6359 * adaint.c: Likewise. Remove 'const' keyword.
6360 * adaint.h: Likewise.
6361 * argv.c: Likewise.
6362 * atree.h: Likewise.
6363 * cio.c: Likewise.
6364 * cstreams.c: Likewise.
6365 * env.c: Likewise.
6366 * exit.c: Likewise.
6367 * fe.h: Likewise.
6368 * final.c: Likewise.
6369 * init.c: Likewise.
6370 * initialize.c: Likewise.
6371 * link.c: Likewise.
6372 * namet.h: Likewise.
6373 * nlists.h: Likewise.
6374 * raise.c: Likewise.
6375 * raise.h: Likewise.
6376 * repinfo.h: Likewise.
6377 * seh_init.c: Likewise.
6378 * targext.c: Likewise.
6379 * tracebak.c: Likewise.
6380 * uintp.h: Likewise.
6381 * urealp.h: Likewise.
6382 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6383 * xsinfo.adb: Likewise.
6384 * xsnamest.adb: Likewise.
6385 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6386 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6387 * gcc-interface/misc.c: Likewise.
6388 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6389 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6390 ada/targext.o here...
6391 (GNAT_ADA_OBJS): ...and not here.
6392 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6393 (GNATBIND_OBJS): Reorder.
6394
6395 2011-07-07 Richard Henderson <rth@redhat.com>
6396
6397 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6398 dwarf2out_frame_init.
6399
6400 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6401
6402 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6403
6404 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6405
6406 PR target/39150
6407 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6408
6409 2011-07-06 Richard Guenther <rguenther@suse.de>
6410
6411 * gcc-interface/misc.c (gnat_init): Merge calls to
6412 build_common_tree_nodes and build_common_tree_nodes_2.
6413 Re-initialize boolean_false_node.
6414
6415 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6416 Olivier Hainque <hainque@adacore.com>
6417 Nicolas Setton <setton@adacore.com>
6418
6419 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6420 the type according to the ARTIFICIAL_P parameter.
6421 (create_type_decl): Likewise.
6422 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6423
6424 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6425
6426 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6427 (gnatbind): Likewise.
6428
6429 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6430
6431 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6432
6433 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6434
6435 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6436 local variable throughout. Remove useless call to Base_Type.
6437 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6438 Take it also into account for the volatileness of the field. Set the
6439 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6440
6441 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6442
6443 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6444 on a dereference built for a by-ref object if it has an address clause.
6445
6446 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6447
6448 * einfo.ads (Address_Taken): Document use for the second argument of
6449 Asm_Input and Asm_Output attributes.
6450 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6451 argument is an entity name, then set Address_Taken on it.
6452 <Attribute_Asm_Output>: Likewise.
6453 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6454 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6455 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6456 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6457
6458 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6459
6460 PR middle-end/46500
6461 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6462
6463 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6464
6465 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6466 (ada/utils.o): Update dependencies.
6467 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6468 ../../../libcpp/libcpp.a.
6469 * gcc-interface/utils.c: Include common/common-target.h.
6470 (process_attributes): Use targetm_common.have_named_sections.
6471
6472 2011-06-07 Richard Guenther <rguenther@suse.de>
6473
6474 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6475 set_sizetype.
6476
6477 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6478
6479 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6480 TREE_THIS_NOTRAP flag.
6481
6482 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6483
6484 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6485 Fix thinko.
6486
6487 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6488
6489 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6490 constants whose full view has discriminants specially.
6491
6492 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6493
6494 * gcc-interface/utils.c: Include diagnostic.h.
6495 (gnat_write_global_declarations): Output debug information for all
6496 global type declarations before finalizing the compilation unit.
6497 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6498
6499 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6500
6501 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6502
6503 2011-05-25 Kai Tietz <ktietz@redhat.com>
6504
6505 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6506 initialization instead of const/none-const pointer assignment.
6507
6508 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6509
6510 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6511 $(EXTRA_GNAT1_OBJS).
6512 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6513 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6514 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6515 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6516 libcommon-target.a instead of prefix.o.
6517
6518 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6519
6520 PR ada/49097
6521 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6522
6523 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6524
6525 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6526 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6527 instead of version.o.
6528
6529 2011-05-18 Kai Tietz <ktietz@redhat.com>
6530
6531 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6532 boolean_false_node instead of integer_zero_node.
6533 (convert_with_check): Likewise.
6534 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6535
6536 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6537
6538 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6539 type of the parameter is an unconstrained array, convert the actual to
6540 the type of the formal in the In Out and Out cases as well.
6541
6542 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6543
6544 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6545 call build_function_type_array or build_varargs_function_type_array
6546 instead.
6547 (create_subprog_type): Don't call build_function_type; call
6548 build_function_type_vec instead.
6549
6550 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6551
6552 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6553 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6554 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6555
6556 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6557
6558 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6559
6560 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6561 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6562
6563 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6564
6565 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6566
6567 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6568
6569 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6570 instead of accessing TYPE_ARG_TYPES directly.
6571 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6572
6573 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6574
6575 PR ada/48844
6576 * gcc-interface/gigi.h (get_variant_part): Declare.
6577 * gcc-interface/decl.c (get_variant_part): Make global.
6578 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6579 types have the same constant size, are record types and T1 has a
6580 variant part while T2 doesn't.
6581
6582 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6583
6584 * gcc-interface/utils.c (begin_subprog_body): Do not call
6585 get_pending_sizes.
6586 (end_subprog_body): Likewise.
6587
6588 2011-05-04 Richard Guenther <rguenther@suse.de>
6589
6590 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6591 int_const_binop.
6592 (pos_to_constructor): Likewise.
6593
6594 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6595 Eric Botcazou <ebotcazou@adacore.com>
6596
6597 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6598 of build_function_type. Adjust calls to...
6599 (build_raise_check): ...this. Do not take a void_tree parameter.
6600 Call build_function_type_list instead of build_function_type.
6601 Fix head comment and swap couple of conditional blocks.
6602
6603 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6604
6605 * gnatvsn.ads (Library_Version): Bump to 4.7.
6606 (Current_Year): Bump to 2011.
6607
6608 2011-04-29 Michael Matz <matz@suse.de>
6609
6610 * gcc-interface/misc.c (gnat_handle_option): Set
6611 warn_maybe_uninitialized.
6612
6613 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6614
6615 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6616 the Watson/McCabe paper.
6617
6618 2011-04-23 Jim Meyering <meyering@redhat.com>
6619
6620 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6621
6622 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6623
6624 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6625 onto the new type.
6626
6627 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6628
6629 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6630 parameter.
6631 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6632 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6633 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6634 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6635 <all>: Do not set flags on the reused DECL node coming from an alias.
6636 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6637 don't need debug info here...
6638 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6639 (gigi): Adjust calls to create_subprog_decl.
6640 (build_raise_check): Likewise.
6641 (establish_gnat_vms_condition_handler): Likewise.
6642 (Compilation_Unit_to_gnu): Likewise.
6643 (gnat_to_gnu): Likewise.
6644
6645 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6646
6647 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6648 (NO_REORDER_ADAFLAGS): New variable.
6649 (EXTRA_GNATTOOLS): Always define.
6650 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6651 Clean up and adjust list of files compiled with special options.
6652 * gcc-interface/Make-lang.in: Likewise.
6653 (ada/decl.o): Cosmetical change.
6654 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6655
6656 2011-04-20 Jim Meyering <meyering@redhat.com>
6657
6658 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6659
6660 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6661
6662 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6663 $(CFLAGS) on the link line.
6664
6665 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6666
6667 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6668 padded type built for the return type if it is unconstrained.
6669
6670 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6671
6672 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6673
6674 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6675
6676 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6677 before calling TREE_CHAIN.
6678 * gcc-interface/misc.c (gnat_init_ts): New function.
6679 (LANG_HOOKS_INIT_TS): Define.
6680
6681 2011-04-12 Martin Jambor <mjambor@suse.cz>
6682
6683 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6684 instead of cgraph_node.
6685
6686 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6687
6688 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6689 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6690 mechanism.
6691
6692 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6693
6694 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6695 of aggregate types that contain a placeholder.
6696
6697 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6698
6699 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6700 TYPE_ARG_TYPES.
6701 (handle_type_generic_attribute): Likewise.
6702
6703 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6704
6705 PR ada/47163
6706 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6707
6708 2011-04-04 Kai Tietz <ktietz@redhat.com>
6709
6710 PR ada/47163
6711 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6712 to flag value.
6713
6714 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6715
6716 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6717 type case, do not strip a padding type around the array type.
6718
6719 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6720
6721 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6722 types.
6723
6724 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6725
6726 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6727 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6728 code for -feliminate-unused-debug-types.
6729 (gnat_post_options): Likewise.
6730
6731 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6732
6733 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6734 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6735 distinct copy.
6736
6737 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6738
6739 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6740 DECL_ARTIFICIAL flag on enumeration types.
6741
6742 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6743
6744 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6745 fat pointer types artificial unconditionally.
6746 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6747 isn't artificial.
6748
6749 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6750
6751 * gcc-interface/gigi.h (get_dummy_type): Declare.
6752 (build_dummy_unc_pointer_types): Likewise.
6753 (finish_fat_pointer_type): Likewise.
6754 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6755 fat pointer type has been built, complete it in place.
6756 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6757 and thin pointers. Remove useless variable.
6758 (finish_fat_pointer_type): Make global and move to...
6759 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6760 (get_dummy_type): New function.
6761 (build_dummy_unc_pointer_types): Likewise.
6762 (gnat_pushdecl): Propage the name to the anonymous variants only.
6763 (update_pointer_to): Only adjust the pointer types in the unconstrained
6764 array case.
6765
6766 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6767
6768 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6769 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6770 if this is a Taft amendment type and the full declaration is available.
6771 * gcc-interface/trans.c (process_type): Likewise.
6772 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6773 (process_freeze_entity): Likewise.
6774 * gcc-interface/utils.c (dummy_global): New static variable.
6775 (gnat_write_global_declarations): If there are types declared as used
6776 at the global level, insert them in the global hash table.
6777
6778 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6779
6780 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6781 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6782 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6783 copy.
6784 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6785 flag of the type accordingly.
6786 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6787
6788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6789
6790 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6791 finalizing types when updating the pointers to the designated type.
6792 <all>: Finalize the deferred types even if we didn't defer processing
6793 of incomplete types in this invocation.
6794
6795 2011-04-01 Olivier Hainque <hainque@adacore.com>
6796 Nicolas Setton <setton@adacore.com>
6797 Eric Botcazou <ebotcazou@adacore.com>
6798
6799 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6800 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6801
6802 2011-03-28 Kai Tietz <ktietz@redhat.com>
6803
6804 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6805 Windows targets.
6806 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6807 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6808
6809 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6810
6811 2011-03-28 Tristan Gingold <gingold@adacore.com>
6812
6813 PR ada/44431
6814 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6815 Use ada output of gnatbind.
6816 (ada/b_gnatb.adb): Ditto.
6817 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6818 (ada.mostlyclean, ada.stage1)
6819 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6820 (ada.stagefeedback): Adjust.
6821 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6822 Use ada output of gnatbind.
6823 (b_gnatm.adb): Ditto.
6824 (b_gnatl.o, b_gnatm.o): New rules.
6825
6826 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6827
6828 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6829 for the padded type built to support a specified size or alignment.
6830
6831 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6832
6833 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6834 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6835 unconditionally to the end of the unit when the designated type is
6836 limited_with'ed.
6837 <all>: Rename local variable. Attempt to un-defer types only and do it
6838 for limited_with'ed types as well.
6839 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6840 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6841 consistently and remove redundant call to finalize_from_with_types.
6842
6843 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6844
6845 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6846 subprograms without a previous spec declared in the same unit.
6847 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6848 subprograms at the end of the unit instead of at the beginning.
6849 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6850 isn't public for the special handling of non-inline functions nested
6851 inside inline external functions.
6852
6853 2011-03-25 Jeff Law <law@redhat.com>
6854
6855 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6856
6857 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6858
6859 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6860 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6861 to compute Set_Size_Depends_On_Discriminant.
6862 (Layout_Type): Call it on array types in back-end layout mode.
6863 * sem_util.adb (Requires_Transient_Scope): Return true for array
6864 types only if the size depends on the value of discriminants.
6865 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6866 type if the RHS is a call to a function that returns an unconstrained
6867 type with default discriminant.
6868
6869 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6870
6871 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6872 non-conversion to the nominal result type at the end.
6873
6874 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6875
6876 * gcc-interface/trans.c (create_temporary): New function taken from...
6877 (create_init_temporary): ...here. Call it.
6878 (call_to_gnu): Create the temporary for the return value early, if any.
6879 Create it for a function with copy-in/copy-out parameters if there is
6880 no target; in other cases of copy-in/copy-out, use another temporary.
6881 Push the new binding level lazily. Add and rename local variables.
6882
6883 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6884
6885 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6886 error message.
6887 (set_rm_size): Likewise.
6888
6889 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6890
6891 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6892 for the padded type built in order to support a specified alignment.
6893 Fix incorrect formatting.
6894
6895 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6896
6897 PR bootstrap/48216
6898 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6899
6900 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6901
6902 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6903 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6904 to the end of the list. Adjust recursive call. Rename local variable.
6905 If REORDER is true, reorder components of the record type.
6906 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6907 components_to_record and adjust the parameter list.
6908
6909 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6910
6911 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6912 disabled, use the variable for bounds of loop iteration scheme.
6913
6914 2011-03-21 Kai Tietz <ktietz@redhat.com>
6915
6916 PR target/12171
6917 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6918
6919 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6920
6921 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6922 out whether the expression is read-only. Short-circuit placeholder
6923 case and rename a couple of local variables.
6924
6925 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6926
6927 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6928 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6929 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6930 (convert): Deal with conversions from a smaller form type specially.
6931
6932 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6933
6934 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6935 its argument, except for the special -I- switch.
6936
6937 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6938
6939 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6940 "Ada Issues".
6941
6942 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6943
6944 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6945
6946 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6947
6948 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6949 GNAT_FORMAL.
6950 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6951 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6952 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6953 Do not generate the check directly, instead instantiate the template
6954 check present in the descriptor.
6955 (make_descriptor_field): Move around.
6956 (build_vms_descriptor32): Build a template check in the POINTER field.
6957 (build_vms_descriptor): Remove useless suffixes.
6958 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6959
6960 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6961
6962 PR bootstrap/47467
6963 * targext.c: Include target files if IN_RTS is defined.
6964
6965 2011-01-26 Richard Guenther <rguenther@suse.de>
6966
6967 PR bootstrap/47467
6968 * targext.c: Include config.h.
6969 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6970 dependency.
6971
6972 2011-01-04 Pascal Obry <obry@adacore.com>
6973 Eric Botcazou <ebotcazou@adacore.com>
6974
6975 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6976
6977 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6978
6979 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6980 end-of-case on the end label and its associated gotos, if any.
6981
6982 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6983
6984 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6985 expressions of the parameter cache within the statement group of
6986 the CICO mechanism.
6987
6988 2011-01-04 Olivier Hainque <hainque@adacore.com>
6989 Eric Botcazou <ebotcazou@adacore.com>
6990
6991 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6992 (set_end_locus_from_node): New function.
6993 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6994 make and the function end_locus.
6995 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6996 for the elaboration subprogram.
6997 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6998 set the end_locus of the expression as well.
6999
7000 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7001
7002 PR ada/47131
7003 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7004 variables that are referenced in exception handlers volatile.
7005
7006
7007 \f
7008 Copyright (C) 2011 Free Software Foundation, Inc.
7009
7010 Copying and distribution of this file, with or without modification,
7011 are permitted in any medium without royalty provided the copyright
7012 notice and this notice are preserved.
7013
7014 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7015 - fix bugs in the description of Source_Trace;
7016 - get rid of UNIT_NAME;
7017
7018 2011-08-02 Javier Miranda <miranda@adacore.com>
7019
7020 * exp_ch9.adb
7021 (Build_Dispatching_Requeue): Adding support for VM targets
7022 since we cannot directly reference the Tag entity.
7023 * exp_sel.adb (Build_K): Adding support for VM targets.
7024 (Build_S_Assignment): Adding support for VM targets.
7025 * exp_disp.adb
7026 (Default_Prim_Op_Position): In VM targets do not restrict availability
7027 of predefined interface primitives to compiling in Ada 2005 mode.
7028 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7029 restricted to compiling in Ada 2005 mode.
7030 (Make_VM_TSD): Generate code that declares and initializes the OSD
7031 record. Needed to support dispatching calls through synchronized
7032 interfaces.
7033 * exp_ch3.adb
7034 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7035 primitives associated with synchronized interfaces.
7036 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7037 primitives associated with synchronized interfaces.
7038
7039 2011-08-02 Yannick Moy <moy@adacore.com>
7040
7041 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7042 statements hidden in SPARK if preceded by the HIDE directive
7043 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7044 exception handlers as hidden in SPARK if preceded by the HIDE directive
7045 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7046 if starting with the HIDE directive
7047 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7048 starting with the HIDE directive; mark the declarations in a private
7049 part as hidden in SPARK if the private part starts with the HIDE
7050 directive
7051 * restrict.adb, restrict.ads
7052 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7053 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7054 argument node belongs to a part which is hidden in SPARK
7055 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7056 parts in SPARK; protect the possibly costly call to
7057 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7058 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7059 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7060 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7061 Tok_SPARK_Hide.
7062 (Scan): recognize special comment starting with '#' and followed by
7063 SPARK keyword "hide" as a HIDE directive.
7064
7065 2011-08-02 Yannick Moy <moy@adacore.com>
7066
7067 * types.ads, erroutc.ads: Minor reformatting.
7068
7069 2011-08-02 Vincent Celier <celier@adacore.com>
7070
7071 * link.c: Add response file support for cross platforms.
7072
7073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7074
7075 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7076 in an association, set parent field of copy before partial analysis.
7077 * sem_res.adb (Resolve_Slice): create reference to itype only when
7078 expansion is enabled.
7079
7080 2011-08-02 Yannick Moy <moy@adacore.com>
7081
7082 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7083 for new flag denoting which subprogram bodies are in ALFA
7084 * restrict.adb, sem_ch7.adb: Update comment
7085 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7086 sem_ch9.adb, sem_res.adb: Add calls to
7087 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7088 * sem_ch6.adb (Analyze_Function_Return): add calls to
7089 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7090 middle of the body, and extended return.
7091 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7092 False when missing return.
7093 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7094 to True for subprograms whose spec is in ALFA. Remove later on the flag
7095 on the entity used for a subprogram body when there exists a separate
7096 declaration.
7097 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7098 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7099 False, otherwise do nothing.
7100
7101 2011-08-02 Robert Dewar <dewar@adacore.com>
7102
7103 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7104
7105 2011-08-02 Yannick Moy <moy@adacore.com>
7106
7107 * sem_ch4.ads: minor formatting.
7108
7109 2011-08-02 Yannick Moy <moy@adacore.com>
7110
7111 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7112 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7113 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7114 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7115 opt.ads: cleanup of SPARK mode
7116
7117 2011-08-02 Yannick Moy <moy@adacore.com>
7118
7119 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7120 types.
7121 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7122 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7123 * sem_ch3.adb
7124 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7125 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7126 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7127 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7128 types.
7129 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7130 non-static range.
7131 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7132 functions whose return type is not in ALFA.
7133 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7134 specifications.
7135 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7136 parameter's type is not in ALFA.
7137 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7138 types are in ALFA.
7139
7140 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7141
7142 * sem_ch6 (Analyze_Expression_Function): treat the function as
7143 Inline_Always, and introduce a subprogram declaration for it when it is
7144 not a completion.
7145 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7146 expression functions, so that the back-end can determine whether they
7147 can in fact be inlined.
7148 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7149 a function body comes from an expression function.
7150
7151 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7152
7153 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7154 null exclusions to test Can_Never_Be_Null on the anonymous access types
7155 of the formals rather than testing the formals themselves. Exclude this
7156 check in cases where the Old_Formal is marked as a controlling formal,
7157 to avoid issuing spurious errors for bodies completing dispatching
7158 operations (due to the flag not getting set on controlling access
7159 formals in body specs).
7160 (Find_Corresponding_Spec): When checking full and subtype conformance of
7161 subprogram bodies in instances, pass Designated and E in that order, for
7162 consistency with the expected order of the formals (New_Id followed by
7163 Old_Id).
7164
7165 2011-08-02 Robert Dewar <dewar@adacore.com>
7166
7167 * sem_ch8.adb: Minor reformatting.
7168
7169 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7170
7171 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7172 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7173 primitive operations of class-wide actuals.
7174
7175 2011-08-02 Javier Miranda <miranda@adacore.com>
7176
7177 * exp_atag.ads, exp_atag.adb
7178 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7179 since its value is implicitly passed in argument Typ.
7180 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7181 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7182 Build_Common_Dispatching_Select_Statements.
7183
7184 2011-08-02 Robert Dewar <dewar@adacore.com>
7185
7186 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7187 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7188 Minor reformatting.
7189
7190 2011-08-02 Robert Dewar <dewar@adacore.com>
7191
7192 * sem_res.adb: Minor reformatting.
7193 * sem_prag.adb: Minor reformatting.
7194
7195 2011-08-02 Javier Miranda <miranda@adacore.com>
7196
7197 * exp_atag.adb, exp_atags.ads
7198 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7199 by the tagged type Entity. Required to use this routine in the VM
7200 targets since we do not have available the Tag entity in the VM
7201 platforms.
7202 * exp_ch6.adb
7203 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7204 Ada.Tags has not been previously loaded.
7205 * exp_ch7.adb
7206 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7207 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7208 * sem_aux.adb
7209 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7210 view of enclosing scopes. Required to handle enclosing scopes that
7211 are synchronized types whose full view is a task type.
7212 * exp_disp.adb
7213 (Build_VM_TSDs): Minor code improvement to avoid generating and
7214 analyzing lists with empty nodes.
7215 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7216 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7217 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7218 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7219 (Make_Select_Specific_Data_Table): Add support for VM targets.
7220 (Make_VM_TSD): Generate code to initialize the SSD structure of
7221 the TSD.
7222
7223 2011-08-02 Yannick Moy <moy@adacore.com>
7224
7225 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7226 cross-references section in ALI.
7227 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7228 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7229 Sub).
7230 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7231 subprogram or package entity of a node
7232 (Is_Local_Reference_Type): new function returns True for references
7233 selected in local cross-references.
7234 (Lt): function extracted from Lt in Output_References
7235 (Write_Entity_Name): function extracted from Output_References
7236 (Generate_Definition): generate reference with type 'D' for definition
7237 of objects (object declaration and parameter specification), with
7238 appropriate locations and units, for use in local cross-references.
7239 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7240 references of type 'I' for initialization in object definition.
7241 (Output_References): move part of function Lt and procedure
7242 Write_Entity_Name outside of the body. Ignore references of types 'D'
7243 and 'I' introduced for local cross-references.
7244 (Output_Local_References): new procedure to output the local
7245 cross-references sections.
7246 (Lref_Entity_Status): new array defining whether an entity is a local
7247 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7248 with 'I' type when initialization expression is present.
7249 * get_scos.adb, get_scos.ads: Correct comments and typos
7250
7251 2011-08-02 Javier Miranda <miranda@adacore.com>
7252
7253 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7254 the JVM target.
7255 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7256 the JVM target.
7257 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7258 TSD support.
7259
7260 2011-08-02 Vincent Celier <celier@adacore.com>
7261
7262 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7263 (No_Space_Img): New function
7264 (Find_Excluded_Sources): When reading from a file, record the file name
7265 and the line number for each excluded source.
7266 (Mark_Excluded_Sources): When reporting an error, if the excluded
7267 sources were read from a file, include file name and line number in
7268 the error message.
7269
7270 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7271
7272 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7273
7274 2011-08-02 Robert Dewar <dewar@adacore.com>
7275
7276 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7277
7278 2011-08-02 Javier Miranda <miranda@adacore.com>
7279
7280 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7281 generation of TSDs to the DOTNET compiler.
7282 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7283 generation of TSDs to the DOTNET compiler.
7284
7285 2011-08-02 Javier Miranda <miranda@adacore.com>
7286
7287 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7288 record of all the tagged types declared inside library level package
7289 declarations, library level package bodies or library level subprograms.
7290 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7291 associated with a given tagged type.
7292 (Build_VM_TSDs): New subprogram.
7293 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7294 compilation units that are subprograms.
7295 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7296 compilation units that are package bodies.
7297 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7298 units that are a package declaration or a package instantiation.
7299 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7300 reorganization to improve the error generated by the frontend when the
7301 function Ada.Tags.Secondary_Tag is not available.
7302 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7303 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7304
7305 2011-08-02 Javier Miranda <miranda@adacore.com>
7306
7307 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7308
7309 2011-08-02 Robert Dewar <dewar@adacore.com>
7310
7311 * s-imenne.ads: Minor reformatting.
7312
7313 2011-08-02 Robert Dewar <dewar@adacore.com>
7314
7315 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7316 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7317 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7318
7319 2011-08-02 Robert Dewar <dewar@adacore.com>
7320
7321 * einfo.ads (Materialize_Entity): Document this is only for renamings
7322 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7323 required debug information in the case where we transform the object
7324 declaration into a renaming declaration.
7325 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7326 object
7327 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7328 Materialize_Entity.
7329
7330 2011-08-02 Robert Dewar <dewar@adacore.com>
7331
7332 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7333 Suppress_Init_Procs.
7334 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7335 Suppress_Initialization/Initialization_Suppressed.
7336 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7337 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7338 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7339 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7340
7341 2011-08-02 Robert Dewar <dewar@adacore.com>
7342
7343 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7344 Minor reformatting.
7345
7346 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7347
7348 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7349 only have inheritable classwide pre/postconditions.
7350
7351 2011-08-02 Javier Miranda <miranda@adacore.com>
7352
7353 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7354 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7355 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7356 checks if the external tag of a type is the same as the external tag
7357 of some other declaration.
7358
7359 2011-08-02 Thomas Quinot <quinot@adacore.com>
7360
7361 * s-taskin.ads: Minor reformatting.
7362
7363 2011-08-02 Emmanuel Briot <briot@adacore.com>
7364
7365 * g-comlin.adb (Display_Help): swap the order in which it prints the
7366 short help and the general usage.
7367
7368 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7369
7370 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7371 the aspect declarations and attach them to the generic copy for
7372 subsequent analysis.
7373 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7374 declarations of the generic tree to the new subprogram declarations.
7375 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7376 conditions that apply to a subprogram instance.
7377
7378 2011-08-02 Robert Dewar <dewar@adacore.com>
7379
7380 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7381
7382 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7383
7384 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7385 private type with a tagged full view is not derived in the immediate
7386 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7387
7388 2011-08-02 Robert Dewar <dewar@adacore.com>
7389
7390 * exp_ch4.adb: Minor reformatting.
7391
7392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7393
7394 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7395 Ada2012 iterator, the loop will be rewritten during expansion into a
7396 while loop with a cursor and an element declaration. Do not analyze the
7397 body in this case, because if the container is for indefinite types the
7398 actual subtype of the elements will only be determined when the cursor
7399 declaration is analyzed.
7400
7401 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7402
7403 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7404 size/alignment related attributes in CodePeer_Mode.
7405
7406 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7407
7408 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7409 Prepend_Element, since this can result in the operation getting the
7410 wrong slot in the full type's dispatch table if the full type has
7411 inherited operations. The incomplete type's operation will get added
7412 to the proper position in the full type's primitives
7413 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7414 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7415 dispatching operations, since there are cases where nonprimitive
7416 subprograms can get added to the list of incomplete dependents (such
7417 as subprograms in nested packages).
7418 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7419 private part when determining whether to add a primitive with a
7420 parameter of a tagged incomplete type to the Private_Dependents list.
7421 Such primitives can also occur in the visible part, and should not have
7422 been excluded from being private dependents.
7423 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7424 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7425 list of a Taft-amendment incomplete type is a primitive before issuing
7426 an error that the full type must appear in the same unit. There are
7427 cases where nonprimitives can be in the list (such as subprograms in
7428 nested packages).
7429 * sem_disp.adb (Derives_From): Use correct condition for checking that
7430 a formal's type is derived from the type of the corresponding formal in
7431 the parent subprogram (the condition was completely wrong). Add
7432 checking that was missing for controlling result types being derived
7433 from the result type of the parent operation.
7434
7435 2011-08-02 Yannick Moy <moy@adacore.com>
7436
7437 * errout.adb (First_Node): minor renaming
7438 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7439 first node.
7440
7441 2011-08-02 Yannick Moy <moy@adacore.com>
7442
7443 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7444 before accessing operands.
7445 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7446 decide whether an initialization expression respects SPARK rules, as
7447 the plain node is the expanded one. This allows for more valid warnings
7448 to be issued.
7449 * gnat_rm.texi: Minor update.
7450
7451 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7452
7453 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7454 previous change.
7455
7456 2011-08-02 Robert Dewar <dewar@adacore.com>
7457
7458 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7459
7460 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7461
7462 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7463 loop statements and the element renaming declaration with a block when
7464 the element type is controlled.
7465
7466 2011-08-02 Yannick Moy <moy@adacore.com>
7467
7468 * sinfo.ads: Minor formatting.
7469
7470 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7471
7472 * sem_aggr.adb (Add_Association): if the association has a box and no
7473 expression, use the Sloc of the aggregate itself for the new
7474 association.
7475 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7476 the Original_Node.
7477
7478 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7479
7480 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7481 When a container is provided via a function call, generate a renaming
7482 of the function result. This avoids the creation of a transient scope
7483 and the premature finalization of the container.
7484 * exp_ch7.adb (Is_Container_Cursor): Removed.
7485 (Wrap_Transient_Declaration): Remove the supression of the finalization
7486 of the list controller when the declaration denotes a container cursor,
7487 it is not needed.
7488
7489 2011-08-02 Yannick Moy <moy@adacore.com>
7490
7491 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7492 node is from source, instead of the original node being from source.
7493 * sem_aggr.adb
7494 (Resolve_Array_Aggregate): refine the check for a static expression, to
7495 recognize also static ranges
7496 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7497 Array_Type_Declaration): postpone the test for the type being a subtype
7498 mark after the type has been resolved, so that component-selection and
7499 expanded-name are discriminated.
7500 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7501 to distinguish the case of an iteration scheme, so that an error is
7502 issed on a non-static range in SPARK except in an iteration scheme.
7503 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7504 In_Iter_Schm = True.
7505 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7506 user-defined operators so that they are allowed in renaming
7507 * sem_ch8.adb
7508 (Find_Selected_Component): refine the check for prefixing of operators
7509 so that they are allowed in renaming. Move the checks for restrictions
7510 on selector name after analysis discriminated between
7511 component-selection and expanded-name.
7512 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7513 concatenation argument of string type if it is static.
7514 * sem_util.adb, sem_util.ads
7515 (Check_Later_Vs_Basic_Declarations): add a new function
7516 Is_Later_Declarative_Item to decice which declarations are allowed as
7517 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7518 mode, add that renamings are considered as later items.
7519 (Enclosing_Package): new function to return the enclosing package
7520 (Enter_Name): correct the rule for homonyms in SPARK
7521 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7522 from source (result of expansion) to avoid issuing wrong warnings.
7523
7524 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7525
7526 * errout.adb: On anything but an expression First_Node returns its
7527 argument.
7528
7529 2011-08-02 Pascal Obry <obry@adacore.com>
7530
7531 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7532
7533 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7534
7535 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7536 Set the associated loop as the related expression of internally
7537 generated cursors.
7538 * exp_ch7.adb (Is_Container_Cursor): New routine.
7539 (Wrap_Transient_Declaration): Supress the finalization of the list
7540 controller when the declaration denotes a container cursor.
7541
7542 2011-08-02 Yannick Moy <moy@adacore.com>
7543
7544 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7545 command line now.
7546 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7547 expression is a simple expression. This check cannot be performed in
7548 the semantics, so just drop it.
7549 (P_Index_Or_Discriminant_Constraint): move check that the index or
7550 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7551 semantics. Other cases were previously checked in the semantics.
7552 * par-ch4.adb (P_Name): move checks that a selector name is not
7553 character literal or an operator symbol to Find_Selected_Component in
7554 the semantics
7555 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7556 declarations are not placed after later declarations in a separate
7557 procedure in Sem_Util (possibly not the best choice?), to be used both
7558 during parsing, for Ada 83 mode, and during semantic analysis, for
7559 SPARK mode.
7560 * par-endh.adb (Check_End): move check that end label is not missing
7561 to Process_End_Label in the semantics
7562 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7563 the special case for SPARK restriction
7564 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7565 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7566 parameter Force to issue the error message even on internal node (used
7567 for generated end label). Call Check_Restriction to check when an error
7568 must be issued. In SPARK mode, issue an error message even if the
7569 restriction is not set.
7570 (Check_Restriction): new procedure with an additional out parameter to
7571 inform the caller that a message has been issued
7572 * sem_aggr.adb: Minor modification of message
7573 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7574 instead of issuing an error message directly
7575 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7576 declarations are not placed after later declarations, by calling
7577 Check_Later_Vs_Basic_Declarations
7578 (Analyze_Subtype_Declaration): move here the check that an index or
7579 discriminant constraint must be a subtype mark. Change the check that
7580 a subtype of String must start at one so that it works on subtype marks.
7581 * sem_ch4.adb (Analyze_Call): move here the check that a named
7582 association cannot follow a positional one in a call
7583 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7584 instead of issuing an error message directly
7585 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7586 selector name is not a character literal or an operator symbol. Move
7587 here the check that the prefix of an expanded name cannot be a
7588 subprogram or a loop statement.
7589 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7590 procedure called from parsing and semantics to check that basic
7591 declarations are not placed after later declarations
7592 (Process_End_Label): move here the check that end label is not missing
7593
7594 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7595
7596 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7597 representation clause in codepeer mode, since it confuses CodePeer and
7598 does not bring useful info.
7599
7600 2011-08-02 Ed Falis <falis@adacore.com>
7601
7602 * init.c: initialize fp hw on MILS.
7603
7604 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7605
7606 * errout.adb (First_Node): for bodies, return the node itself (small
7607 optimization). For other nodes, do not check source_unit if the node
7608 comes from Standard.
7609
7610 2011-08-02 Robert Dewar <dewar@adacore.com>
7611
7612 * exp_ch3.adb: Minor comment additions.
7613 * sem_ch13.adb: Minor reformatting.
7614
7615 2011-08-02 Pascal Obry <obry@adacore.com>
7616
7617 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7618
7619 2011-08-02 Robert Dewar <dewar@adacore.com>
7620
7621 * sem_attr.adb: Minor reformatting.
7622
7623 2011-08-02 Robert Dewar <dewar@adacore.com>
7624
7625 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7626 (Has_Default_Component_Value): Removed
7627 * einfo.ads Comment updates
7628 (Has_Default_Aspect): Replaces Has_Default_Value
7629 (Has_Default_Component_Value): Removed
7630 * exp_ch13.adb
7631 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7632 * exp_ch3.adb
7633 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7634 (Get_Simple_Init_Val): Handle Default_Value aspect
7635 (Needs_Simple_Initialization): Handle Default_Value aspect
7636 * exp_ch3.ads: Needs_Simple_Initialization
7637 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7638 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7639 * sem_ch13.adb
7640 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7641 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7642 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7643
7644 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7645
7646 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7647 package containing iteration primitives.
7648 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7649
7650 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7651
7652 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7653 "of", pre-analyze expression in case it is a function call with
7654 finalization actions that must be placed ahead of the loop.
7655 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7656 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7657
7658 2011-08-02 Geert Bosch <bosch@adacore.com>
7659
7660 * cstand.adb (Create_Float_Types): Only consider C's long double for
7661 Long_Long_Float, in addition to double.
7662
7663 2011-08-02 Robert Dewar <dewar@adacore.com>
7664
7665 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7666 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7667 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7668 Minor reformatting.
7669
7670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7671
7672 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7673 indexed component.
7674
7675 2011-08-02 Javier Miranda <miranda@adacore.com>
7676
7677 * einfo.ads, einfo.adb
7678 (Original_Access_Type): Move this attribute to Node26 since there was
7679 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7680 which causes conflicts and breaks the generation of the .NET compiler.
7681 (Interface_Name): Add missing documentation on JGNAT only uses of
7682 this attribute.
7683
7684 2011-08-02 Geert Bosch <bosch@adacore.com>
7685
7686 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7687 (Find_Back_End_Float_Type): Likewise
7688 (Create_Back_End_Float_Types): Likewise
7689 (Create_Float_Types): Likewise
7690 (Register_Float_Type): Likewise
7691 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7692 Nlist and split out type selection in new local Find_Base_Type function.
7693 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7694 Nlist
7695 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7696
7697 2011-08-02 Robert Dewar <dewar@adacore.com>
7698
7699 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7700 alpha order).
7701 * opt.ads: Minor comment change.
7702 * sem_ch12.adb: Minor code reorganization.
7703
7704 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7705
7706 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7707 subtype's list of rep items to the list on the full subtype in the case
7708 where the lists are the same.
7709
7710 2011-08-02 Geert Bosch <bosch@adacore.com>
7711
7712 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7713 using the one from System.Strings, which also deallocates all strings.
7714
7715 2011-08-02 Geert Bosch <bosch@adacore.com>
7716
7717 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7718 function.
7719 * gcc-interface/Make-lang.in: Update dependencies.
7720
7721 2011-08-02 Olivier Hainque <hainque@adacore.com>
7722
7723 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7724 end_locus.
7725
7726 2011-08-02 Javier Miranda <miranda@adacore.com>
7727
7728 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7729 associated with anonymous access to subprograms.
7730
7731 2011-08-02 Geert Bosch <bosch@adacore.com>
7732
7733 * opt.ads
7734 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7735 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7736 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7737 (Add_Symbol_Definition): Move to switch-c.adb
7738 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7739 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7740 (Add_Symbol_Definition): Move to switch-c.adb.
7741 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7742 * sem_warn.adb
7743 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7744 Move to warnsw.adb.
7745 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7746 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7747 Move to warnsw.adb.
7748 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7749 (Add_Symbol_Definition): Moved from Prepcomp.
7750 * switch-c.ads: Update copyright notice. Use String_List instead of
7751 Argument_List, removing dependency on System.OS_Lib.
7752
7753 2011-08-02 Yannick Moy <moy@adacore.com>
7754
7755 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7756 mode on initialization expression which does not respect SPARK
7757 restrictions.
7758 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7759 if the tree referenced by its argument represents an initialization
7760 expression in SPARK, suitable for initializing an object in an object
7761 declaration.
7762
7763 2011-08-02 Javier Miranda <miranda@adacore.com>
7764
7765 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7766 internally generated access to subprogram with its associated protected
7767 subprogram type.
7768 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7769
7770 2011-08-02 Geert Bosch <bosch@adacore.com>
7771
7772 * cstand.adb (Register_Float_Type): Print information about type to
7773 register, if the Debug_Flag_Dot_B is set.
7774 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7775 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7776 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7777 with a requested precision of more than Max_Digits digits and no more
7778 than Max_Base_Digits digits, if a range specification is present and the
7779 Predefined_Float_Types list has a suitable type to derive from.
7780 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7781 case of type completion with pragma Import
7782 * sem_prag.adb
7783 (Process_Import_Predefined_Type): Processing to complete a type
7784 with pragma Import. Currently supports floating point types only.
7785 (Set_Convention_From_Pragma): Do nothing without underlying type.
7786 (Process_Convention): Guard against absence of underlying type,
7787 which may happen when importing incomplete types.
7788 (Process_Import_Or_Interface): Handle case of importing predefined
7789 types. Tweak error message.
7790
7791 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7792
7793 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7794 functions to previous change. Reorganize code slightly.
7795
7796 2011-08-02 Geert Bosch <bosch@adacore.com>
7797
7798 * back_end.ads (Register_Type_Proc): New call back procedure type for
7799 allowing the back end to provide information about available types.
7800 (Register_Back_End_Types): New procedure to register back end types.
7801 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7802 available types.
7803 * cstand.adb (Back_End_Float_Types): New list for floating point types
7804 supported by the back end.
7805 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7806 (Copy_Float_Type): New procedure to make new copies of predefined types.
7807 (Register_Float_Type): New call back procedure to populate the BEFT list
7808 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7809 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7810 (Create_Float_Types): New procedure to create entities for floating
7811 point types predefined in Standard, and put these and any remaining
7812 BEFTs on the Predefined_Float_Types list.
7813 * stand.ads (Predefined_Float_Types): New list for predefined floating
7814 point types that do not have declarations in package Standard.
7815
7816 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7817
7818 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7819 entity node for the unit containing the parameter.
7820 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7821 (Add_Inlined_Subprogram): Likewise.
7822 * gcc-interface/Make-lang.in: Update dependencies.
7823
7824 2011-08-02 Thomas Quinot <quinot@adacore.com>
7825
7826 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7827 suitable value.
7828
7829 2011-08-02 Geert Bosch <bosch@adacore.com>
7830
7831 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7832
7833 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7834
7835 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7836 computed value of Base_Type.
7837
7838 2011-08-02 Yannick Moy <moy@adacore.com>
7839
7840 * restrict.adb (Check_Restriction): issue an error for any use of
7841 class-wide, even if the No_Dispatch restriction is not set.
7842 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7843 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7844 when completing a private extension, the type named in the private part
7845 is not the same as that named in the visible part.
7846 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7847 of an inherited primitive operations of a tagged type or type extension
7848 that returns the tagged type.
7849 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7850 function which returns True for an implicit operation inherited by the
7851 derived type declaration for the argument type.
7852 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7853 order.
7854
7855 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7856
7857 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7858 Process_Bounds, to perform analysis with expansion of a range or an
7859 expression that is the iteration scheme for a loop.
7860 (Analyze_Iterator_Specification): If domain of iteration is given by a
7861 function call with a controlled result, as is the case if call returns
7862 a predefined container, ensure that finalization actions are properly
7863 generated.
7864 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7865
7866 2011-08-02 Javier Miranda <miranda@adacore.com>
7867
7868 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7869 * gcc-interface/Make-lang.in: Update dependencies.
7870
7871 2011-08-02 Javier Miranda <miranda@adacore.com>
7872
7873 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7874 determine if the analysis is performed using N or Original_Node (N).
7875 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7876 functionality of routine Is_Variable avoids code duplication.
7877 * checks.adb (Determine_Range): Handle temporaries generated by
7878 Remove_Side_Effects.
7879
7880 2011-08-02 Javier Miranda <miranda@adacore.com>
7881
7882 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7883 expansion of the condition. Required since the previous analysis was
7884 done with expansion disabled (see Resolve_Quantified_Expression) and
7885 hence checks were not inserted and record comparisons have not been
7886 expanded.
7887
7888 2011-08-02 Ed Falis <falis@adacore.com>
7889
7890 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7891 Update header.
7892
7893 2011-08-02 Bob Duff <duff@adacore.com>
7894
7895 * opt.ads: Minor comment fix.
7896
7897 2011-08-02 Bob Duff <duff@adacore.com>
7898
7899 * sem_ch12.adb (Analyze_Package_Instantiation,
7900 Analyze_Subprogram_Instantiation): Turn off style checking while
7901 analyzing an instance. Whatever style checks that apply to the generic
7902 unit should apply, so it makes no sense to apply them in an instance.
7903 This was causing trouble when compiling an instance of a runtime
7904 unit that violates the -gnatyO switch.
7905 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7906 one of the two case statements, causing spurious errors.
7907
7908 2011-08-02 Robert Dewar <dewar@adacore.com>
7909
7910 * uname.adb: Minor reformatting.
7911 * gnatcmd.adb: Minor reformatting.
7912 * exp_attr.adb: Minor reformatting.
7913
7914 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7915
7916 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7917 No_Dispatching_Calls, do not look for the Assign primitive, because
7918 predefined primitives are not created in this case.
7919
7920 2011-08-02 Bob Duff <duff@adacore.com>
7921
7922 * stylesw.ads: Minor comment fixes.
7923
7924 2011-08-02 Robert Dewar <dewar@adacore.com>
7925
7926 * freeze.adb (Add_To_Result): New procedure.
7927
7928 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7929
7930 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7931 time, if the specific run-time routines for handling streams of strings
7932 are not available, use the default mechanism.
7933
7934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7935
7936 * s-regpat.ads: Fix typo.
7937
7938 2011-08-02 Vincent Celier <celier@adacore.com>
7939
7940 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7941 not null, call it to create the in memory config project file without
7942 parsing an existing default config project file.
7943
7944 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7945
7946 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7947
7948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7949
7950 * sem_elim.adb: an abstract subprogram does not need an eliminate
7951 pragma for its descendant to be eliminable.
7952
7953 2011-08-02 Ed Falis <falis@adacore.com>
7954
7955 * init.c: revert to handling before previous checkin for VxWorks
7956 * s-intman-vxworks.adb: delete unnecessary declarations related to
7957 using Ada interrupt facilities for handling signals.
7958 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7959 * s-intman-vxworks.ads: Import __gnat_install_handler as
7960 Initialize_Interrupts.
7961 * s-taprop-vxworks.adb: Delete Signal_Mask.
7962 (Abort_Handler): change construction of mask to unblock exception
7963 signals.
7964
7965 2011-08-02 Jerome Guitton <guitton@adacore.com>
7966
7967 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7968 Debug_Raise_Exception before propagation starts.
7969
7970 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7971
7972 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7973 to Restriction_Check_Required.
7974 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7975 * sem_res.adb (Resolve_Call): Likewise.
7976 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7977
7978 2011-08-02 Bob Duff <duff@adacore.com>
7979
7980 * stylesw.ads: Update comment.
7981 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7982 * errout.ads: Remove obsolete comment.
7983
7984 2011-08-02 Javier Miranda <miranda@adacore.com>
7985
7986 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7987 (Set_Is_Safe_To_Reevaluate): new procedure.
7988 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7989 assignment is allowed on safe-to-reevaluate variables.
7990 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7991 temporary created to remove side effects in expressions that use
7992 the secondary stack as safe-to-reevaluate.
7993 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7994 variables that are not true constants.
7995
7996 2011-08-02 Robert Dewar <dewar@adacore.com>
7997
7998 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7999 sem_res.adb, sem_ch6.adb: Minor reformatting.
8000
8001 2011-08-02 Jerome Guitton <guitton@adacore.com>
8002
8003 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8004
8005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8006
8007 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8008 not set Overridden_Operation if subprogram is an initialization
8009 procedure.
8010
8011 2011-08-02 Yannick Moy <moy@adacore.com>
8012
8013 * par-ch6.adb: Correct obsolete name in comments
8014 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8015 which takes two message arguments (existing function takes one), with
8016 second message used for continuation.
8017 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8018 block statements that originate from a source block statement, not
8019 generated block statements
8020 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8021 symmetry with procedure case
8022 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8023 function to issue an error in formal mode if a package specification
8024 contains more than one tagged type or type extension.
8025 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8026 parameters matching formals of tagged types are objects (or ancestor
8027 type conversions of objects), not general expressions. Issue an error
8028 on view conversions that are not involving ancestor conversion of an
8029 extended type.
8030 (Resolve_Type_Conversion): in formal mode, issue an error on the
8031 operand of an ancestor type conversion which is not an object
8032 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8033 procedure so that it works also for actuals of function calls
8034 (Is_Actual_Tagged_Parameter): new function which determines if its
8035 argument is an actual parameter of a formal of tagged type in a
8036 subprogram call
8037 (Is_SPARK_Object_Reference): new function which determines if the tree
8038 referenced by its argument represents an object in SPARK
8039
8040 2011-08-02 Robert Dewar <dewar@adacore.com>
8041
8042 * sem_ch3.adb: Minor reformatting
8043 Minor comment addition
8044 Minor error msg text change
8045
8046 2011-08-02 Javier Miranda <miranda@adacore.com>
8047
8048 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8049 function. Used to be more precise when we generate a variable plus one
8050 assignment to remove side effects in the evaluation of the Bound
8051 expressions.
8052 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8053 of the bound expression to force its re-analysis and thus expand the
8054 associated transient scope (if required). Code cleanup replacing the
8055 previous code that declared the constant entity by an invocation to
8056 routine Force_Evaluation which centralizes this work in the frontend.
8057
8058 2011-08-02 Robert Dewar <dewar@adacore.com>
8059
8060 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8061 (Base_Type): Now uses improved Is_Base_Type function
8062 * einfo.ads (Base_Type): Inline this function
8063
8064 2011-08-02 Robert Dewar <dewar@adacore.com>
8065
8066 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8067 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8068
8069 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8070
8071 * gcc-interface/Make-lang.in: Update dependencies.
8072 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8073 targets.
8074
8075 2011-08-02 Yannick Moy <moy@adacore.com>
8076
8077 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8078 non-simple expression used in delta constraint
8079 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8080 index constraint which is not a subtype mark
8081 * par.adb: With and use Restrict
8082 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8083 mode on component type which is not a subtype mark and default
8084 expression on component
8085 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8086 of string which does not have a lower index bound equal to 1
8087 (Array_Type_Declaration): issue an error in formal mode on index or
8088 component type which is not a subtype mark, and on aliased keyword on
8089 component
8090 (Derived_Type_Declaration): issue an error in formal mode on interface,
8091 limited or abstract type
8092 (Record_Type_Declaration): issue an error in formal mode on interface
8093 (Record_Type_Definition): issue an error in formal mode on tagged types
8094 and type extensions not declared in the specification of a library unit
8095 package; on null non-tagged record; on variant part
8096
8097 2011-08-02 Vincent Celier <celier@adacore.com>
8098
8099 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8100 not declared for qualified library project when Library_Name is not
8101 declared, but Library_Dir is.
8102
8103 2011-08-02 Robert Dewar <dewar@adacore.com>
8104
8105 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8106 pragmas (affects aspects [Component_]Default_Value
8107 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8108 component type for the resolution
8109
8110 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8111
8112 * einfo.adb (Base_Type): Tune implementation for speed.
8113
8114 2011-08-02 Robert Dewar <dewar@adacore.com>
8115
8116 * freeze.adb: Minor reformatting.
8117
8118 2011-08-02 Thomas Quinot <quinot@adacore.com>
8119
8120 * scos.ads: Update comments.
8121
8122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8123
8124 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8125 base type, because the parent may be a subtype of a private type whose
8126 convention is established in a private part.
8127
8128 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8129
8130 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8131 statement in a block when the expansion of the return expression has
8132 created a finalization chain.
8133 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8134 with the parent node.
8135 Add N_Extended_Return_Statement to handle the case where a transient
8136 object declaration appears in the Return_Object_Declarations list of
8137 an extended return statement.
8138
8139 2011-08-02 Matthew Gingell <gingell@adacore.com>
8140
8141 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8142 unused parameter 'name'.
8143
8144 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8145
8146 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8147 inherited operation, check whether its alias, which is the source
8148 operastion that it renames, has been marked eliminated.
8149
8150 2011-08-02 Javier Miranda <miranda@adacore.com>
8151
8152 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8153 in-mode parameter whose type is an access type since it can be used to
8154 modify its designated object. Enforce code that handles as safe an
8155 access type that is not access-to-constant but it is the result of a
8156 previous removal of side-effects.
8157 (Remove_Side_Effects): Minor code reorganization of cases which require
8158 no action. Done to incorporate documentation on new cases uncovered
8159 working in this ticket: no action needed if this routine was invoked
8160 too early and the nodes are not yet decorated.
8161 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8162 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8163 were issued with actuals that are implicitly provided by
8164 Force_Evaluation.
8165
8166 2011-08-02 Robert Dewar <dewar@adacore.com>
8167
8168 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8169
8170 2011-08-02 Yannick Moy <moy@adacore.com>
8171
8172 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8173 to issue an error in formal mode on attribute not supported in this mode
8174 (Analyze_Attribute): issue errors on standard attributes not supported
8175 in formal mode.
8176 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8177 comment, and issue error in formal mode on modulus which is not a power
8178 of 2.
8179 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8180 range.
8181 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8182 subtype mark.
8183 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8184 operator on modular type (except 'not').
8185
8186 2011-08-02 Robert Dewar <dewar@adacore.com>
8187
8188 * gnat_rm.texi: Minor reformatting.
8189
8190 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8191
8192 * s-osinte-linux.ads: Minor comment update and reformatting.
8193 * i-cexten.ads: Make this unit pure, as for its parent.
8194 Will allow its usage in more contexts if needed.
8195
8196 2011-08-02 Robert Dewar <dewar@adacore.com>
8197
8198 * s-utf_32.ads: Minor comment fix.
8199
8200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8201
8202 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8203 operation of a tagged synchronized type, handle the case where the
8204 controlling argument is overloaded.
8205
8206 2011-08-02 Yannick Moy <moy@adacore.com>
8207
8208 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8209 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8210 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8211 SPARK mode and formal verification mode on processing SPARK restriction
8212 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8213 requiring consistency checking.
8214
8215 2011-08-02 Robert Dewar <dewar@adacore.com>
8216
8217 * sem_res.adb: Minor reformatting.
8218
8219 2011-08-02 Robert Dewar <dewar@adacore.com>
8220
8221 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8222 a-cforse.ads: Remove unneeded with of Ada.Containers
8223 Remove commented out pragma Inline's
8224 Move specifications of new subprograms to the actual specs
8225
8226 2011-08-02 Yannick Moy <moy@adacore.com>
8227
8228 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8229 a-cforse.ads: Update comments.
8230
8231 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8232
8233 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8234
8235 2011-08-02 Robert Dewar <dewar@adacore.com>
8236
8237 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8238 a-cforse.ads, a-cofove.ads: Minor reformatting.
8239
8240 2011-08-02 Claire Dross <dross@adacore.com>
8241
8242 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8243 a-cofove.ads: Add comments.
8244
8245 2011-08-02 Yannick Moy <moy@adacore.com>
8246
8247 * gnat_rm.texi: Document formal containers.
8248
8249 2011-08-02 Emmanuel Briot <briot@adacore.com>
8250
8251 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8252 are empty sections.
8253
8254 2011-08-02 Robert Dewar <dewar@adacore.com>
8255
8256 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8257 reformatting.
8258
8259 2011-08-02 Robert Dewar <dewar@adacore.com>
8260
8261 * aspects.adb: New aspects Default_Value and Default_Component_Value
8262 New format of Aspect_Names table checks for omitted entries
8263 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8264 handling of boolean aspects for derived types.
8265 New aspects Default_Value and Default_Component_Value
8266 New format of Aspect_Names table checks for omitted entries
8267 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8268 (Has_Default_Value): New flag
8269 (Has_Default_Component_Value): New flag
8270 (Has_Default_Value): New flag
8271 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8272 table.
8273 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8274 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8275 Default_Value and Default_Component_Value
8276 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8277 New aspects Default_Value and Default_Component_Value
8278 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8279 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8280
8281 2011-08-02 Vincent Celier <celier@adacore.com>
8282
8283 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8284 inherit library kind.
8285
8286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8287
8288 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8289 Minor reformatting.
8290
8291 2011-08-02 Robert Dewar <dewar@adacore.com>
8292
8293 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8294
8295 2011-08-02 Yannick Moy <moy@adacore.com>
8296
8297 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8298
8299 2011-08-02 Robert Dewar <dewar@adacore.com>
8300
8301 * impunit.adb: Add comment.
8302
8303 2011-08-02 Yannick Moy <moy@adacore.com>
8304
8305 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8306 qualification of aggregates in formal mode
8307 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8308 another aggregate
8309 (Resolve_Aggregate): complete the test that an aggregate is adequately
8310 qualified in formal mode
8311
8312 2011-08-02 Pascal Obry <obry@adacore.com>
8313
8314 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8315 * mlib-prj.adb: Supress warning when compiling binder generated file.
8316 (Build_Library): Supress all warnings when compiling the binder
8317 generated file.
8318
8319 2011-08-02 Yannick Moy <moy@adacore.com>
8320
8321 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8322 from here...
8323 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8324 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8325 Add with/use clauses to make Check_Formal_Restriction visible
8326
8327 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8328
8329 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8330 in-parameters when type of the generic formal is private in the generic
8331 spec and non-private in the body.
8332
8333 2011-08-02 Claire Dross <dross@adacore.com>
8334
8335 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8336 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8337 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8338 * impunit.adb, Makefile.rtl: Take new files into account.
8339
8340 2011-08-02 Robert Dewar <dewar@adacore.com>
8341
8342 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8343 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8344
8345 2011-08-02 Yannick Moy <moy@adacore.com>
8346
8347 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8348 formal mode
8349 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8350 matching static array bounds, taking into account the special case of
8351 string literals
8352 * sem_ch3.adb: Typo in comment.
8353
8354 2011-08-02 Yannick Moy <moy@adacore.com>
8355
8356 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8357 which issues an error in formal mode if its argument node is originally
8358 from source
8359 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8360 has a discriminant specification so that it does not include the case
8361 of derived types
8362 (Derived_Type_Declaration): move here the test that a derived type has a
8363 discriminant specification
8364 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8365 first element of a component association before accessing its choices
8366 (presence of component association is not enough)
8367 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8368 declaration is a library item before accessing the next element in a
8369 list, as library items are not member of lists
8370 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8371 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8372 Check_Formal_Restriction whenever possible.
8373
8374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8375
8376 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8377 reference when needed.
8378
8379 2011-08-02 Bob Duff <duff@adacore.com>
8380
8381 * gnat_ugn.texi: Fix typo.
8382
8383 2011-08-02 Vincent Celier <celier@adacore.com>
8384
8385 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8386 archive file name. Do not use the full path name of archives for Open
8387 VMS.
8388
8389 2011-08-02 Robert Dewar <dewar@adacore.com>
8390
8391 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8392 Analyze_Aspect_Specifications
8393 * sem_ch13.adb
8394 (Analyze_Aspect_Specifications): New handling for boolean aspects
8395 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8396 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8397 sequence for Analyze_Aspect_Specifications
8398 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8399 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8400
8401 2011-08-02 Robert Dewar <dewar@adacore.com>
8402
8403 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8404 aspects, since these no longer exist.
8405
8406 2011-08-02 Robert Dewar <dewar@adacore.com>
8407
8408 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8409 semicolon, do not try to see if there are aspects following it.
8410 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8411 aspect spec.
8412
8413 2011-08-02 Robert Dewar <dewar@adacore.com>
8414
8415 * sem_ch8.adb, aspects.ads: Minor reformatting.
8416
8417 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8418
8419 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8420 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8421 extracted from...
8422 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8423
8424 2011-08-02 Yannick Moy <moy@adacore.com>
8425
8426 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8427 mode on subprogram declaration outside of package specification, unless
8428 it is followed by a pragma Import
8429 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8430 Access_Type_Declaration): issue error in formal mode on access type
8431 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8432 incomplete type
8433 (Analyze_Object_Declaration): issue error in formal mode on object
8434 declaration which does not respect SPARK restrictions
8435 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8436 declaration which does not respect SPARK restrictions
8437 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8438 error in formal mode on digits or delta constraint
8439 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8440 decimal fixed point type
8441 (Derived_Type_Declaration): issue error in formal mode on derived type
8442 other than type extensions of tagged record types
8443 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8444 with check on access definition
8445 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8446 mode on protected definition.
8447 (Analyze_Task_Definition): issue error in formal mode on task definition
8448
8449 2011-08-02 Robert Dewar <dewar@adacore.com>
8450
8451 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8452
8453 2011-08-02 Javier Miranda <miranda@adacore.com>
8454
8455 * sem_ch6.adb (Can_Override_Operator): New function.
8456 (Verify_Overriding_Indicator): Add missing code to check overriding
8457 indicator in operators. Fixes regression.
8458 (Check_Overriding_Indicator): Minor reformating after replacing the
8459 code that evaluates if the subprogram can override an operator by
8460 invocations to the above new function.
8461 * einfo.adb
8462 (Write_Field26_Name): Add missing code to ensure that, following
8463 the documentation in einfo.ads, this field is not shown as attribute
8464 "Static_Initialization" on non-dispatching functions.
8465
8466 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8467
8468 * sem_res.adb (Resolve_Call): A call to
8469 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8470 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8471 i.e., when the second parameter is of type Time_Span.
8472
8473 2011-08-02 Vincent Celier <celier@adacore.com>
8474
8475 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8476 with an archive instead of -L<library dir> -l<library name>.
8477
8478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8479
8480 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8481 mark the base types In_Use in addition to making the operations
8482 use_visible.
8483
8484 2011-08-02 Ed Falis <falis@adacore.com>
8485
8486 * init.c: add and setup __gnat_signal_mask for the exception signals
8487 * s-inmaop-vxworks.adb: new file.
8488 * s-intman-vxworks.adb: remove unnecessary initializations and
8489 simplify remaining
8490 * s-intman-vxworks.ads: remove unnecessary variable
8491 * s-taprop-vxworks.adb: simplify signal initialization
8492
8493 2011-08-02 Robert Dewar <dewar@adacore.com>
8494
8495 * sem_ch8.adb: Minor code reorganization, comment updates.
8496
8497 2011-08-02 Robert Dewar <dewar@adacore.com>
8498
8499 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8500 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8501 here from Sem_Res.
8502 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8503 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8504
8505 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8506
8507 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8508 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8509 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8510 use_type_clauses, to handle more efficiently use_type and use_all_type
8511 constructs.
8512 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8513 Ada2012 Use_All_Type clause.
8514 (Use_Class_Wide_Operations): new procedure.
8515
8516 2011-08-02 Robert Dewar <dewar@adacore.com>
8517
8518 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8519 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8520 expression to expression function.
8521
8522 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8523
8524 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8525 if types are compatible.
8526
8527 2011-08-02 Yannick Moy <moy@adacore.com>
8528
8529 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8530 returns True if its argument array types have same dimension and same
8531 static bounds at each index.
8532 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8533 OUT or IN OUT paramaters which are not view conversions in SPARK.
8534 (Resolve_Arithmetic_Op): issue an error in formal mode on
8535 multiplication or division with operands of fixed point types which are
8536 not qualified or explicitly converted.
8537 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8538 Boolean or array type (except String) operands.
8539 (Resolve_Equality_Op): issue an error in formal mode on equality
8540 operators for array types other than String with non-matching static
8541 bounds.
8542 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8543 for array types with non-matching static bounds. Factorize the code in
8544 Matching_Static_Array_Bounds.
8545 (Resolve_Qualified_Expression): issue an error in formal mode on
8546 qualified expressions for array types with non-matching static bounds.
8547 (Resolve_Type_Conversion): issue an error in formal mode on type
8548 conversion for array types with non-matching static bounds
8549
8550 2011-08-02 Robert Dewar <dewar@adacore.com>
8551
8552 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8553
8554 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8555
8556 * par-ch9.adb: save location of entry for proper error message.
8557
8558 2011-08-02 Javier Miranda <miranda@adacore.com>
8559
8560 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8561 (Use_Full_View) which permits this routine to climb through the
8562 ancestors using the full-view of private parents.
8563 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8564 Use_Full_View to true in calls to Is_Ancestor.
8565 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8566 true in call to Is_Ancestor.
8567 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8568 Use_Full_View to true in call to Is_Ancestor.
8569 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8570 call to Is_Ancestor.
8571 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8572 Use_Full_View to true in calls to Is_Ancestor.
8573 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8574 Make_Select_Specific_Data_Table, Register_Primitive,
8575 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8576 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8577 to true in call to Is_Ancestor.
8578 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8579 Use_Full_View to true in calls to Is_Ancestor.
8580 * exp_cg.adb
8581 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8582 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8583
8584 2011-08-02 Robert Dewar <dewar@adacore.com>
8585
8586 * gnat_rm.texi: Minor reformatting.
8587 * sem_prag.adb: Minor reformatting.
8588
8589 2011-08-02 Tristan Gingold <gingold@adacore.com>
8590
8591 * vms_data.ads: Add VMS qualifier for -gnateP.
8592
8593 2011-08-02 Robert Dewar <dewar@adacore.com>
8594
8595 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8596 * par-ch7.adb (P_Package): Proper placement of aspects for package
8597 decl/instantiation.
8598 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8599 (End_Statements): Add Is_Sloc parameterr
8600 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8601 (Check_End): Ad Is_Sloc parameter
8602 (End_Statements): Add Is_Sloc parameterr
8603
8604 2011-08-02 Vincent Celier <celier@adacore.com>
8605
8606 * ug_words: Add VMS qualifier equivalent to -gnateP:
8607 /SYMBOL_PREPROCESSING.
8608
8609 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8610
8611 * gnat-style.texi: For hexadecimal numeric literals the typical
8612 grouping of digits is 4 to represent 2 bytes.
8613 A procedure spec which is split into several lines is indented two
8614 characters.
8615
8616 2011-08-02 Yannick Moy <moy@adacore.com>
8617
8618 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8619 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8620 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8621 properly qualified
8622 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8623 choice in array aggregate
8624 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8625 mark as ancestor
8626 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8627 positional and named aggregate for record, or others in record
8628 aggregate, or multiple choice in record aggregate
8629 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8630 array operands to logical operations AND, OR and XOR do not have the
8631 same static lower and higher bounds
8632 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8633
8634 2011-08-01 Robert Dewar <dewar@adacore.com>
8635
8636 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8637 Replaces Last_Source_Node_In_Sequence.
8638 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8639 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8640 parens and blank in string (this was inconsistently implemented).
8641 * errout.ads
8642 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8643 blank in string (this was inconsistently implemented).
8644 * gnat1drv.adb
8645 (Set_Global_Switches): Set formal mode switches appropriately
8646 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8647 * par-prag.adb
8648 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8649 call Set_Error_Msg_Lang to set "spark" as language name.
8650 * par.adb: Remove unnecessary call to set formal language for errout
8651 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8652 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8653 name.
8654 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8655 calls to it, moved after resolution so that types are known
8656 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8657 result of concatenation is not of type String
8658 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8659 concatenation is not properly restricted
8660 * gnat_rm.texi: Add doc on pragma Spark_95.
8661 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8662 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8663 * gcc-interface/Make-lang.in: Update dependencies.
8664
8665 2011-08-01 Javier Miranda <miranda@adacore.com>
8666
8667 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8668 condition that detects if the overridden operation must replace an
8669 existing entity.
8670
8671 2011-08-01 Javier Miranda <miranda@adacore.com>
8672
8673 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8674 code declarations inserted by Insert_Actions in each alternative of the
8675 N_Case_Expression node.
8676
8677 2011-08-01 Robert Dewar <dewar@adacore.com>
8678
8679 * sem_ch6.adb: Minor code reorganization.
8680 * sem_util.adb: Minor reformatting.
8681
8682 2011-08-01 Pascal Obry <obry@adacore.com>
8683
8684 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8685 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8686
8687 2011-08-01 Yannick Moy <moy@adacore.com>
8688
8689 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8690 literal or operator symbol which is prefixed
8691 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8692 mode on access attributes.
8693 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8694 that concatenation operands are properly restricted in formal mode
8695 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8696 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8697 result of the concatenation has a type different from String.
8698 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8699 Analyze_Quantified_Expression, Analyze_Slice,
8700 Analyze_Null): issue an error in formal mode on unsupported constructs
8701 * sem_ch5.adb
8702 (Analyze_Block_Statement): only issue error on source block statement
8703 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8704 function which returns the last node in a list of nodes for which
8705 Comes_From_Source returns True, if any
8706 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8707 Last_Source_Node_In_Sequence
8708 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8709 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8710 mode on unsupported constructs
8711 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8712 rest of the actions may be needed later on since the error is marked as
8713 not serious.
8714 * sinfo.ads: Typos in comments.
8715
8716 2011-08-01 Pascal Obry <obry@adacore.com>
8717
8718 * projects.texi: Minor editing.
8719
8720 2011-08-01 Yannick Moy <moy@adacore.com>
8721
8722 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8723 insertion character ~~
8724 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8725 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8726 with insertion character ~~
8727 (Set_Msg_Text): treat insertion character ~~
8728 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8729 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8730 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8731 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8732 errors related to the formal language restriction not serious
8733 (insertion character |).
8734 * par.adb (Par): set formal language for error messages if needed
8735 * sem_ch6.adb (Check_Missing_Return): take into account possible
8736 generated statements at the end of the function
8737 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8738 enumeration value to define a new pragma SPARK_95
8739 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8740 SPARK_Version): new type and variables to store the SPARK version
8741 (none by default).
8742 (SPARK_Mode): return True when SPARK_Version is set
8743 * par-prag.adb: Correct indentation
8744 (Prag): take Pragma_SPARK_95 into account
8745 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8746 into account.
8747
8748 2011-08-01 Robert Dewar <dewar@adacore.com>
8749
8750 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8751 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8752 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8753
8754 2011-08-01 Pascal Obry <obry@adacore.com>
8755
8756 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8757 Target_Name to Get_Path call.
8758 (Parse_Single_Project): Likewise.
8759 (Post_Parse_Context_Clause): Likewise.
8760 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8761 Call Initialise_Project_Path with the proper Target_Name.
8762 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8763 search path.
8764 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8765 with the proper Target_Name.
8766 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8767 Part.Parse routine.
8768 (Parse_Project_And_Apply_Config): Likewise.
8769 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8770 This is fine as this part of the code is supporting only native
8771 compilation.
8772 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8773 is fine as this part of the code is supporting only native compilation.
8774
8775 2011-08-01 Yannick Moy <moy@adacore.com>
8776
8777 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8778 of homonym, unless the homonym is one of the cases allowed in SPARK
8779 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8780 package declaration occurring after a body.
8781
8782 2011-08-01 Robert Dewar <dewar@adacore.com>
8783
8784 * checks.adb, exp_ch4.adb: Minor reformatting.
8785
8786 2011-08-01 Javier Miranda <miranda@adacore.com>
8787
8788 * einfo.ads (Access_Disp_Table): Fix documentation.
8789 (Dispatch_Table_Wrappers): Fix documentation.
8790
8791 2011-08-01 Pascal Obry <obry@adacore.com>
8792
8793 * prj-env.adb, prj-env.ads: Minor reformatting.
8794
8795 2011-08-01 Yannick Moy <moy@adacore.com>
8796
8797 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8798 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8799 procedures out of these packages.
8800 * errout.ads, errout.adb
8801 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8802 procedures in of this package
8803 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8804 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8805 on misplaced later vs initial declarations, like in Ada 83
8806 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8807 formal mode on attribute of private type whose full type declaration
8808 is not visible
8809 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8810 package declaration inside a package specification
8811 (Analyze_Full_Type_Declaration): issue error in formal mode on
8812 controlled type or discriminant type
8813 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8814 user-defined operator means that it should come from the source
8815 (New_Overloaded_Entity): issue error in formal mode on overloaded
8816 entity.
8817 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8818
8819 2011-08-01 Thomas Quinot <quinot@adacore.com>
8820
8821 * atree.adb: Minor reformatting.
8822 * checks.adb: Minor reformatting.
8823
8824 2011-08-01 Vincent Celier <celier@adacore.com>
8825
8826 * s-parame-vms-ia64.ads: Fix typo in comment
8827 Minor reformatting
8828 * s-parame-vms-restrict.ads: Removed, unused.
8829
8830 2011-08-01 Javier Miranda <miranda@adacore.com>
8831
8832 * exp_ch3.adb
8833 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8834 * sem_ch3.adb
8835 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8836 * sem_ch3.ads, sem_ch3.adb
8837 (Is_Constant_Bound): New extended version of the subprogram that was
8838 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8839 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8840 * sem_aux.ads (Constant_Value): Fix typo in comment.
8841 * checks.adb (Generate_Index_Checks): New implementation which, for
8842 array objects with constant bounds, generates the runtime check
8843 referencing the bounds of the array type. For other cases this routine
8844 provides its previous behavior obtaining such values from the array
8845 object.
8846 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8847 parent type.
8848 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8849 we cannot have semantic interpretations of the new node.
8850
8851 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8852
8853 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8854 expressions.
8855
8856 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8857
8858 * sem_ch8.adb: Minor code editing.
8859 * s-vxwext.adb: Remove trailing space.
8860 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8861 consistency with other files.
8862
8863 2011-08-01 Thomas Quinot <quinot@adacore.com>
8864
8865 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8866
8867 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8868
8869 * par-ch10.adb: reject parameterized expressions as compilation unit.
8870 * sem_ch4.adb: handle properly conditional expression with overloaded
8871 then_clause and no else_clause.
8872
8873 2011-08-01 Tristan Gingold <gingold@adacore.com>
8874
8875 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8876 like done by System.Aux_DEC.
8877 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8878
8879 2011-08-01 Yannick Moy <moy@adacore.com>
8880
8881 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8882 missing label at end of declaration (subprogram or package)
8883 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8884 of positional and named parameter association
8885 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8886 Error_Msg_SP which adds a prefix to the error message giving the name
8887 of the formal language analyzed
8888 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8889 access result type in subprogram, unconstrained array as result type,.
8890 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8891 procedure
8892 * sem_ch8.adb: Code clean up.
8893
8894 2011-08-01 Javier Miranda <miranda@adacore.com>
8895
8896 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8897 * einfo.ads (Access_Disp_Table): Fix documentation.
8898 (Dispatch_Table_Wrappers): Fix documentation.
8899 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8900 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8901 to enforce the documentation of this attribute.
8902 (Set_Is_Interface): Cleanup the assertion.
8903 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8904 the Underlying_Type entity before reading attribute Access_Disp_Table.
8905 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8906 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8907 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8908 the Underlying_Type entity before reading attribute Access_Disp_Table.
8909 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8910 Locate the Underlying_Type entity before reading attribute
8911 Access_Disp_Table.
8912
8913 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8914
8915 * s-poosiz.ads: Additional overriding indicators.
8916
8917 2011-08-01 Yannick Moy <moy@adacore.com>
8918
8919 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8920 formal mode.
8921 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8922 parameter specification does not include a subtype mark.
8923 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8924 formal mode on abstract subprogram.
8925 (Analyze_Subprogram_Specification): issue error in formal mode on
8926 user-defined operator.
8927 (Process_Formals): issue error in formal mode on access parameter and
8928 default expression.
8929 * sem_ch9.adb (Analyze_Abort_Statement,
8930 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8931 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8932 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8933 Analyze_Requeue, Analyze_Selective_Accept,
8934 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8935 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8936 issue error in formal mode on user-defined raise statement.
8937
8938 2011-08-01 Thomas Quinot <quinot@adacore.com>
8939
8940 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8941 declaration being hidden when overriding an implicit inherited
8942 subprogram.
8943 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8944 (-gnats), do not complain about a source file that contains only a
8945 pragma No_Body.
8946
8947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8948
8949 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8950 variable if already set.
8951
8952 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8953
8954 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8955 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8956 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8957 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8958 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8959 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8960 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8961 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8962 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8963 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8964 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8965 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8966 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8967 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8968 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8969 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8970 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8971 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8972 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8973 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8974 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8975 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8976 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8977 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8978 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8979 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8980 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8981 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8982 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8983 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8984 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8985 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8986 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8987 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8988 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8989 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8990 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8991 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8992 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8993 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8994 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8995 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8996 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8997 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8998 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8999 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9000 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9001 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9002 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9003 Use GNAT instead of GNARL.
9004
9005 2011-08-01 Bob Duff <duff@adacore.com>
9006
9007 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9008 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9009 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9010 reformatting.
9011
9012 2011-08-01 Yannick Moy <moy@adacore.com>
9013
9014 * debug.adb (d.D) reverve flag for the SPARK mode
9015 (d.E) reverve flag for SPARK generation mode
9016 (d.F) reverve flag for Why generation mode
9017 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9018 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9019 functions which return True when the corresponding modes are set
9020 (Formal_Language): return "spark" or "alfa" when in formal verification
9021 mode.
9022 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9023 Error_Msg to prefix the error message with a tag giving the formal
9024 language
9025 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9026 message with a tag giving the formal language
9027 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9028 block statement
9029 (Analyze_Case_Statement): issue error in formal mode on case statement
9030 with a single "others" case alternative
9031 (Analyze_Exit_Statement): issue errors in formal mode on exit
9032 statements which do not respect SPARK restrictions
9033 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9034 (Check_Unreachable_Code): always issue an error (not a warning) in
9035 formal mode on unreachable code (concerns both code after an infinite
9036 loop and after an unconditional jump, both not allowed in SPARK)
9037 * sem_ch6.adb (Analyze_Return_Statement): add call to
9038 Set_Return_Present for a procedure containing a return statement
9039 (already done for functions in Analyze_Function_Return)
9040 (Analyze_Function_Return): issue error in formal mode on extended
9041 return or if return is not last statement in function
9042 (Check_Missing_Return): issue error in formal mode if function does
9043 not end with return or if procedure contains a return
9044 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9045 function to detect if there is an inner scope of its parameter S which
9046 is a loop.
9047
9048 2011-08-01 Thomas Quinot <quinot@adacore.com>
9049
9050 * sem_ch6.ads: Minor reformatting.
9051
9052 2011-08-01 Javier Miranda <miranda@adacore.com>
9053
9054 * sem_util.adb (Abstract_Interface_List): Complete condition when
9055 processing private type declarations to avoid reading unavailable
9056 attribute.
9057 (Is_Synchronized_Tagged_Type): Complete condition when processing
9058 private extension declaration nodes to avoid reading unavailable
9059 attribute.
9060
9061 2011-08-01 Thomas Quinot <quinot@adacore.com>
9062
9063 * sem_ch3.adb: Minor reformatting.
9064
9065 2011-08-01 Thomas Quinot <quinot@adacore.com>
9066
9067 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9068 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9069 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9070 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9071 for VMS, instead parametrize the common implementation with
9072 System.Parameters declarations.
9073
9074 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9075
9076 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9077
9078 2011-08-01 Tristan Gingold <gingold@adacore.com>
9079
9080 * seh_init.c: Fix SEH handler installation on win64.
9081
9082 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9083
9084 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9085 double analysis of an anonymous access to subprogram, because it can
9086 lead to improper sharing of profiles and a back-end crash.
9087
9088 2011-08-01 Robert Dewar <dewar@adacore.com>
9089
9090 * make.adb, sem_ch4.adb: Minor reformatting.
9091 * gcc-interface/Make-lang.in: Update dependencies.
9092 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9093
9094 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9095
9096 * gnat_rm.texi: Fix definition of Long_Integer.
9097
9098 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9099
9100 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9101 to prevent storage exhaustion.
9102 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9103 finalized is a function body, insert the cleanup code before the final
9104 return statement, to prevent spurious warnings.
9105 * s-pooglo.ads: add overriding indicator.
9106
9107 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9108
9109 * sem_ch4.adb (Operator_Check): improve error message when both a
9110 with_clause and a use_clause are needed to make operator usage legal.
9111 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9112 determine whether a compilation unit is visible within an other,
9113 either through a with_clause in the current unit, or a with_clause in
9114 its library unit or one one of its parents.
9115
9116 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9117
9118 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9119 over an arbitrary expression of an array or container type.
9120 * lib-xref.adb: clarify comment.
9121
9122 2011-08-01 Bob Duff <duff@adacore.com>
9123
9124 * einfo.ads: Minor reformatting.
9125 * debug.adb: Minor comment improvement.
9126
9127 2011-08-01 Javier Miranda <miranda@adacore.com>
9128
9129 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9130 consider hidden subprograms as valid candidates.
9131
9132 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9133
9134 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9135
9136 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9137
9138 * gnat_ugn.texi: Fix typo.
9139
9140 2011-08-01 Robert Dewar <dewar@adacore.com>
9141
9142 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9143 lib-xref.adb: Minor reformatting
9144
9145 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9146
9147 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9148 when to generate a call to Move_Final_List.
9149 (Has_Controlled_Parts): Remove this function.
9150
9151 2011-08-01 Geert Bosch <bosch@adacore.com>
9152
9153 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9154 "," in choice list.
9155
9156 2011-08-01 Thomas Quinot <quinot@adacore.com>
9157
9158 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9159 explicit raise of a predefined exception as Comes_From_Source if the
9160 original N_Raise_Statement comes from source.
9161
9162 2011-08-01 Robert Dewar <dewar@adacore.com>
9163
9164 * sinfo.ads: Add comment.
9165 * sem_ch6.adb: Minor reformatting.
9166
9167 2011-08-01 Robert Dewar <dewar@adacore.com>
9168
9169 * freeze.adb (Freeze_Entity): Refine check for bad component size
9170 clause to avoid rejecting confirming clause when atomic/aliased present.
9171
9172 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9173
9174 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9175 better determine whether an entity reference is a write.
9176 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9177 subcomponent.
9178 * lib-xref.adb (Output_References): Do no suppress a read reference at
9179 the same location as an immediately preceeding modify-reference, to
9180 handle properly in-out actuals.
9181
9182 2011-08-01 Tristan Gingold <gingold@adacore.com>
9183
9184 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9185
9186 2011-08-01 Quentin Ochem <ochem@adacore.com>
9187
9188 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9189 heap to compute the result.
9190
9191 2011-08-01 Robert Dewar <dewar@adacore.com>
9192
9193 * atree.ads: Minor reformatting.
9194
9195 2011-08-01 Emmanuel Briot <briot@adacore.com>
9196
9197 * g-expect.adb (Get_Command_Output): Fix memory leak.
9198
9199 2011-08-01 Geert Bosch <bosch@adacore.com>
9200
9201 * cstand.adb (P_Float_Type): New procedure to print the definition of
9202 predefined fpt types.
9203 (P_Mixed_Name): New procedure to print a name using mixed case
9204 (Print_Standard): Use P_Float_Type for printing floating point types
9205 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9206 precision IEEE float.
9207
9208 2011-08-01 Thomas Quinot <quinot@adacore.com>
9209
9210 * sem_ch3.adb: Minor reformatting.
9211
9212 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9213
9214 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9215 the completion of a generic function, insert the new body rather than
9216 rewriting the original.
9217
9218 2011-08-01 Yannick Moy <moy@adacore.com>
9219
9220 * sinfo.ads, errout.ads: Typos in comments.
9221
9222 2011-08-01 Robert Dewar <dewar@adacore.com>
9223
9224 * par-endh.adb: Minor reformatting.
9225
9226 2011-08-01 Robert Dewar <dewar@adacore.com>
9227
9228 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9229 (Pre_Post_Aspects): New subtype.
9230 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9231 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9232 * par-ch7.adb (P_Package): Remove Decl parameter
9233 (P_Package): Handle new syntax for aspects (before IS)
9234 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9235 new aspect syntax
9236 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9237 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9238 (P_Package): Remove Decl parameter
9239 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9240 aspects
9241 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9242 specs
9243 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9244 * sinfo.ads: Document new syntax for aspects in packages etc.
9245 * sprint.adb: Handle new syntax of aspects before IS in package
9246
9247 2011-08-01 Thomas Quinot <quinot@adacore.com>
9248
9249 * atree.ads: Minor reformatting.
9250 * sem_prag.adb: Minor reformatting.
9251
9252 2011-08-01 Robert Dewar <dewar@adacore.com>
9253
9254 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9255 case expr alternative.
9256
9257 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9258
9259 * sem_ch12.adb: Fix typo.
9260
9261 2011-08-01 Geert Bosch <bosch@adacore.com>
9262
9263 * sem_prag.adb (Check_No_Link_Name): New procedure.
9264 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9265 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9266 instead of Standard_Long_Long_Float_Size global. Preparation for
9267 eventual removal of per type constants.
9268 * exp_util.ads (Get_Stream_Size): New function returning the stream
9269 size value of subtype E.
9270 * exp_util.adb (Get_Stream_Size): Implement new function.
9271 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9272 function.
9273 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9274 * einfo.adb:
9275 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9276
9277 2011-08-01 Geert Bosch <bosch@adacore.com>
9278
9279 * cstand.adb: Fix comments.
9280 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9281 count of arguments.
9282
9283 2011-08-01 Robert Dewar <dewar@adacore.com>
9284
9285 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9286
9287 2011-08-01 Geert Bosch <bosch@adacore.com>
9288
9289 * atree.ads: Fix comment.
9290
9291 2011-08-01 Robert Dewar <dewar@adacore.com>
9292
9293 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9294 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9295 * par.adb: Add with for Namet.Sp.
9296 * par-tchk.adb: Minor reformatting.
9297
9298 2011-08-01 Vincent Celier <celier@adacore.com>
9299
9300 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9301 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9302 of the init procedure of a SAL.
9303 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9304 New procedure.
9305
9306 2011-08-01 Thomas Quinot <quinot@adacore.com>
9307
9308 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9309 reformatting.
9310
9311 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9312
9313 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9314
9315 2011-08-01 Thomas Quinot <quinot@adacore.com>
9316
9317 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9318 conformant with its spec (return True only for types that have
9319 an overriding Initialize primitive operation that prevents them from
9320 having preelaborable initialization).
9321 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9322 initialization for controlled types in Ada 2005 or later mode.
9323
9324 2011-08-01 Robert Dewar <dewar@adacore.com>
9325
9326 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9327 Postcondition.
9328 (Same_Aspect): New function.
9329 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9330 Type_Invariant, Precondition, Postcondition.
9331 * snames.ads-tmpl: Add Name_Type_Invariant.
9332
9333 2011-08-01 Robert Dewar <dewar@adacore.com>
9334
9335 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9336 here.
9337 (Freeze_All_Ent): Fix error in handling inherited aspects.
9338 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9339 already analyzed, but don't skip entire processing of a declaration,
9340 that's wrong in some cases of declarations being rewritten.
9341 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9342 Don't delay for integer, string literals
9343 Treat predicates in usual manner for delay, remove special case code,
9344 not needed.
9345 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9346 (Build_Predicate_Function): Update saved expression in aspect
9347 (Build_Invariant_Procedure): Update saved expression in aspect
9348 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9349 of replacement of discriminant references if the reference is simple.
9350
9351 2011-08-01 Robert Dewar <dewar@adacore.com>
9352
9353 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9354 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9355 Static_Predicate and Dynamic_Predicate.
9356 (Build_Predicate_Function): Add processing for Static_Predicate
9357 and Dynamic_Predicate.
9358 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9359 (From_Static_Predicate): New flag
9360 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9361
9362 2011-08-01 Robert Dewar <dewar@adacore.com>
9363
9364 * usage.adb: Documentation cleanup for Ada version modes in usage.
9365 * expander.adb: Minor reformatting.
9366
9367 2011-08-01 Robert Dewar <dewar@adacore.com>
9368
9369 * atree.ads: Minor comment fix.
9370 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9371 a-witeio.ads, sem_prag.adb: Minor reformatting.
9372
9373 2011-08-01 Doug Rupp <rupp@adacore.com>
9374
9375 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9376 pointers. Use descrip.h header file for convenience. Add some
9377 comments.
9378
9379 2011-08-01 Robert Dewar <dewar@adacore.com>
9380
9381 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9382 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9383 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9384 New procedure.
9385 (Check_Aspect_At_End_Of_Declarations): New procedure
9386 (Analye_Aspect_Specification): Minor changes for above procedures
9387 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9388 specification node as well.
9389
9390 2011-08-01 Pascal Obry <obry@adacore.com>
9391
9392 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9393 Windows files. Use GetFilesAttributes() in this case to check for file
9394 existence instead of returning with an error code.
9395
9396 2011-08-01 Vincent Celier <celier@adacore.com>
9397
9398 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9399 High is above Source length.
9400
9401 2011-08-01 Robert Dewar <dewar@adacore.com>
9402
9403 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9404
9405 2011-08-01 Robert Dewar <dewar@adacore.com>
9406
9407 * aspects.ads (Boolean_Aspects): New subtype.
9408 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9409 for derived types in cases where the parent type and derived type have
9410 aspects.
9411 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9412 with aspects when parent type also has aspects.
9413 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9414 boolean expression at this point).
9415 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9416 accordance with final decision on the Ada 2012 feature.
9417 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9418
9419 2011-08-01 Matthew Heaney <heaney@adacore.com>
9420
9421 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9422
9423 2011-08-01 Pascal Obry <obry@adacore.com>
9424
9425 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9426 Fix Replace_Slice when High is above current string size.
9427 (Replace_Slice): Fix DL computation when High is above current
9428 string length.
9429
9430 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9431
9432 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9433
9434 2011-08-01 Matthew Heaney <heaney@adacore.com>
9435
9436 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9437 of node.
9438
9439 2011-08-01 Pascal Obry <obry@adacore.com>
9440
9441 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9442 reformatting.
9443
9444 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9445
9446 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9447 access to protected subprograms in generic bodies.
9448 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9449 protected type, indicate that the convention of the subprogram is
9450 Convention_Protected, because it may be used in subsequent declarations
9451 within the protected declaration.
9452
9453 2011-08-01 Vincent Celier <celier@adacore.com>
9454
9455 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9456 and "final" procedures when the name of the library is "ada", to avoid
9457 duplicate symbols "adainit" and "adafinal" in executables.
9458
9459 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9460
9461 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9462 quantified expression that appears within a postcondition and uses the
9463 Ada2012 'Result attribute.
9464
9465 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9466
9467 * init.c (__gnat_error_handler): Cast reason to int.
9468 (__gnat_install_handler): Explain sa_sigaction use.
9469
9470 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9471
9472 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9473 subprogram has copy-in copy-out parameters, try to promote the mode of
9474 the return type if it is passed in registers.
9475
9476 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9477
9478 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9479 left operand as addressable.
9480
9481 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9482
9483 * gcc-interface/gigi.h (build_function_stub): Remove.
9484 (build_return_expr): Likewise.
9485 (convert_vms_descriptor): Declare.
9486 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9487 (build_function_stub): Move to...
9488 * gcc-interface/utils2.c (build_return_expr): Move to...
9489 * gcc-interface/trans.c (build_function_stub): ...here.
9490 (build_return_expr): ...here.
9491 (Subprogram_Body_to_gnu): Add local variable for language_function.
9492 Disconnect the parameter attributes cache, if any, once done with it.
9493 Call end_subprog_body only after setting the end_locus.
9494 Build the stub associated with the function, if any, at the very end.
9495 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9496 variables and streamline control flow.
9497
9498 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9499
9500 PR ada/49819
9501 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9502 g-trasym-dwarf.adb.
9503
9504 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9505
9506 PR bootstrap/49794
9507 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9508 Assign to act.sa_sigaction.
9509 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9510 current->return_address to char * before arithmetic.
9511
9512 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9513
9514 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9515 Correct argument types.
9516 Extract code from reason.
9517 (__gnat_install_handler): Assign to act.sa_sigaction.
9518
9519 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9520
9521 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9522 (GNAT1_OBJS): ...here.
9523
9524 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9525
9526 PR ada/48711
9527 * g-socthi-mingw.adb (Fill): Fix formatting.
9528
9529 * gcc-interface/gigi.h: Move around comment.
9530
9531 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9532
9533 PR ada/46350
9534 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9535
9536 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9537
9538 PR ada/48711
9539 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9540
9541 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9542
9543 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9544 range comparison if Pmode is SImode.
9545
9546 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9547 Eric Botcazou <ebotcazou@adacore.com>
9548
9549 * adadecode.c: Wrap up in extern "C" block.
9550 * adadecode.h: Likewise.
9551 * adaint.c: Likewise. Remove 'const' keyword.
9552 * adaint.h: Likewise.
9553 * argv.c: Likewise.
9554 * atree.h: Likewise.
9555 * cio.c: Likewise.
9556 * cstreams.c: Likewise.
9557 * env.c: Likewise.
9558 * exit.c: Likewise.
9559 * fe.h: Likewise.
9560 * final.c: Likewise.
9561 * init.c: Likewise.
9562 * initialize.c: Likewise.
9563 * link.c: Likewise.
9564 * namet.h: Likewise.
9565 * nlists.h: Likewise.
9566 * raise.c: Likewise.
9567 * raise.h: Likewise.
9568 * repinfo.h: Likewise.
9569 * seh_init.c: Likewise.
9570 * targext.c: Likewise.
9571 * tracebak.c: Likewise.
9572 * uintp.h: Likewise.
9573 * urealp.h: Likewise.
9574 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9575 * xsinfo.adb: Likewise.
9576 * xsnamest.adb: Likewise.
9577 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9578 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9579 * gcc-interface/misc.c: Likewise.
9580 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9581 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9582 ada/targext.o here...
9583 (GNAT_ADA_OBJS): ...and not here.
9584 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9585 (GNATBIND_OBJS): Reorder.
9586
9587 2011-07-07 Richard Henderson <rth@redhat.com>
9588
9589 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9590 dwarf2out_frame_init.
9591
9592 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9593
9594 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9595
9596 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9597
9598 PR target/39150
9599 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9600
9601 2011-07-06 Richard Guenther <rguenther@suse.de>
9602
9603 * gcc-interface/misc.c (gnat_init): Merge calls to
9604 build_common_tree_nodes and build_common_tree_nodes_2.
9605 Re-initialize boolean_false_node.
9606
9607 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9608 Olivier Hainque <hainque@adacore.com>
9609 Nicolas Setton <setton@adacore.com>
9610
9611 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9612 the type according to the ARTIFICIAL_P parameter.
9613 (create_type_decl): Likewise.
9614 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9615
9616 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9617
9618 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9619 (gnatbind): Likewise.
9620
9621 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9622
9623 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9624
9625 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9626
9627 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9628 local variable throughout. Remove useless call to Base_Type.
9629 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9630 Take it also into account for the volatileness of the field. Set the
9631 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9632
9633 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9634
9635 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9636 on a dereference built for a by-ref object if it has an address clause.
9637
9638 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9639
9640 * einfo.ads (Address_Taken): Document use for the second argument of
9641 Asm_Input and Asm_Output attributes.
9642 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9643 argument is an entity name, then set Address_Taken on it.
9644 <Attribute_Asm_Output>: Likewise.
9645 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9646 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9647 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9648 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9649
9650 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9651
9652 PR middle-end/46500
9653 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9654
9655 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9656
9657 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9658 (ada/utils.o): Update dependencies.
9659 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9660 ../../../libcpp/libcpp.a.
9661 * gcc-interface/utils.c: Include common/common-target.h.
9662 (process_attributes): Use targetm_common.have_named_sections.
9663
9664 2011-06-07 Richard Guenther <rguenther@suse.de>
9665
9666 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9667 set_sizetype.
9668
9669 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9670
9671 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9672 TREE_THIS_NOTRAP flag.
9673
9674 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9675
9676 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9677 Fix thinko.
9678
9679 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9680
9681 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9682 constants whose full view has discriminants specially.
9683
9684 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9685
9686 * gcc-interface/utils.c: Include diagnostic.h.
9687 (gnat_write_global_declarations): Output debug information for all
9688 global type declarations before finalizing the compilation unit.
9689 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9690
9691 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9692
9693 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9694
9695 2011-05-25 Kai Tietz <ktietz@redhat.com>
9696
9697 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9698 initialization instead of const/none-const pointer assignment.
9699
9700 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9701
9702 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9703 $(EXTRA_GNAT1_OBJS).
9704 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9705 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9706 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9707 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9708 libcommon-target.a instead of prefix.o.
9709
9710 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9711
9712 PR ada/49097
9713 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9714
9715 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9716
9717 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9718 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9719 instead of version.o.
9720
9721 2011-05-18 Kai Tietz <ktietz@redhat.com>
9722
9723 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9724 boolean_false_node instead of integer_zero_node.
9725 (convert_with_check): Likewise.
9726 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9727
9728 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9729
9730 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9731 type of the parameter is an unconstrained array, convert the actual to
9732 the type of the formal in the In Out and Out cases as well.
9733
9734 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9735
9736 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9737 call build_function_type_array or build_varargs_function_type_array
9738 instead.
9739 (create_subprog_type): Don't call build_function_type; call
9740 build_function_type_vec instead.
9741
9742 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9743
9744 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9745 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9746 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9747
9748 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9749
9750 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9751
9752 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9753 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9754
9755 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9756
9757 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9758
9759 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9760
9761 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9762 instead of accessing TYPE_ARG_TYPES directly.
9763 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9764
9765 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9766
9767 PR ada/48844
9768 * gcc-interface/gigi.h (get_variant_part): Declare.
9769 * gcc-interface/decl.c (get_variant_part): Make global.
9770 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9771 types have the same constant size, are record types and T1 has a
9772 variant part while T2 doesn't.
9773
9774 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9775
9776 * gcc-interface/utils.c (begin_subprog_body): Do not call
9777 get_pending_sizes.
9778 (end_subprog_body): Likewise.
9779
9780 2011-05-04 Richard Guenther <rguenther@suse.de>
9781
9782 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9783 int_const_binop.
9784 (pos_to_constructor): Likewise.
9785
9786 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9787 Eric Botcazou <ebotcazou@adacore.com>
9788
9789 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9790 of build_function_type. Adjust calls to...
9791 (build_raise_check): ...this. Do not take a void_tree parameter.
9792 Call build_function_type_list instead of build_function_type.
9793 Fix head comment and swap couple of conditional blocks.
9794
9795 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9796
9797 * gnatvsn.ads (Library_Version): Bump to 4.7.
9798 (Current_Year): Bump to 2011.
9799
9800 2011-04-29 Michael Matz <matz@suse.de>
9801
9802 * gcc-interface/misc.c (gnat_handle_option): Set
9803 warn_maybe_uninitialized.
9804
9805 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9806
9807 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9808 the Watson/McCabe paper.
9809
9810 2011-04-23 Jim Meyering <meyering@redhat.com>
9811
9812 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9813
9814 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9815
9816 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9817 onto the new type.
9818
9819 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9820
9821 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9822 parameter.
9823 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9824 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9825 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9826 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9827 <all>: Do not set flags on the reused DECL node coming from an alias.
9828 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9829 don't need debug info here...
9830 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9831 (gigi): Adjust calls to create_subprog_decl.
9832 (build_raise_check): Likewise.
9833 (establish_gnat_vms_condition_handler): Likewise.
9834 (Compilation_Unit_to_gnu): Likewise.
9835 (gnat_to_gnu): Likewise.
9836
9837 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9838
9839 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9840 (NO_REORDER_ADAFLAGS): New variable.
9841 (EXTRA_GNATTOOLS): Always define.
9842 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9843 Clean up and adjust list of files compiled with special options.
9844 * gcc-interface/Make-lang.in: Likewise.
9845 (ada/decl.o): Cosmetical change.
9846 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9847
9848 2011-04-20 Jim Meyering <meyering@redhat.com>
9849
9850 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9851
9852 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9853
9854 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9855 $(CFLAGS) on the link line.
9856
9857 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9858
9859 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9860 padded type built for the return type if it is unconstrained.
9861
9862 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9863
9864 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9865
9866 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9867
9868 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9869 before calling TREE_CHAIN.
9870 * gcc-interface/misc.c (gnat_init_ts): New function.
9871 (LANG_HOOKS_INIT_TS): Define.
9872
9873 2011-04-12 Martin Jambor <mjambor@suse.cz>
9874
9875 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9876 instead of cgraph_node.
9877
9878 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9879
9880 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9881 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9882 mechanism.
9883
9884 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9885
9886 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9887 of aggregate types that contain a placeholder.
9888
9889 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9890
9891 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9892 TYPE_ARG_TYPES.
9893 (handle_type_generic_attribute): Likewise.
9894
9895 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9896
9897 PR ada/47163
9898 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9899
9900 2011-04-04 Kai Tietz <ktietz@redhat.com>
9901
9902 PR ada/47163
9903 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9904 to flag value.
9905
9906 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9907
9908 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9909 type case, do not strip a padding type around the array type.
9910
9911 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9912
9913 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9914 types.
9915
9916 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9917
9918 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9919 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9920 code for -feliminate-unused-debug-types.
9921 (gnat_post_options): Likewise.
9922
9923 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9924
9925 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9926 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9927 distinct copy.
9928
9929 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9930
9931 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9932 DECL_ARTIFICIAL flag on enumeration types.
9933
9934 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9935
9936 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9937 fat pointer types artificial unconditionally.
9938 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9939 isn't artificial.
9940
9941 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9942
9943 * gcc-interface/gigi.h (get_dummy_type): Declare.
9944 (build_dummy_unc_pointer_types): Likewise.
9945 (finish_fat_pointer_type): Likewise.
9946 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9947 fat pointer type has been built, complete it in place.
9948 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9949 and thin pointers. Remove useless variable.
9950 (finish_fat_pointer_type): Make global and move to...
9951 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9952 (get_dummy_type): New function.
9953 (build_dummy_unc_pointer_types): Likewise.
9954 (gnat_pushdecl): Propage the name to the anonymous variants only.
9955 (update_pointer_to): Only adjust the pointer types in the unconstrained
9956 array case.
9957
9958 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9959
9960 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9961 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9962 if this is a Taft amendment type and the full declaration is available.
9963 * gcc-interface/trans.c (process_type): Likewise.
9964 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9965 (process_freeze_entity): Likewise.
9966 * gcc-interface/utils.c (dummy_global): New static variable.
9967 (gnat_write_global_declarations): If there are types declared as used
9968 at the global level, insert them in the global hash table.
9969
9970 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9971
9972 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9973 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9974 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9975 copy.
9976 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9977 flag of the type accordingly.
9978 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9979
9980 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9981
9982 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9983 finalizing types when updating the pointers to the designated type.
9984 <all>: Finalize the deferred types even if we didn't defer processing
9985 of incomplete types in this invocation.
9986
9987 2011-04-01 Olivier Hainque <hainque@adacore.com>
9988 Nicolas Setton <setton@adacore.com>
9989 Eric Botcazou <ebotcazou@adacore.com>
9990
9991 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9992 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9993
9994 2011-03-28 Kai Tietz <ktietz@redhat.com>
9995
9996 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9997 Windows targets.
9998 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9999 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10000
10001 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10002
10003 2011-03-28 Tristan Gingold <gingold@adacore.com>
10004
10005 PR ada/44431
10006 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10007 Use ada output of gnatbind.
10008 (ada/b_gnatb.adb): Ditto.
10009 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10010 (ada.mostlyclean, ada.stage1)
10011 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10012 (ada.stagefeedback): Adjust.
10013 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10014 Use ada output of gnatbind.
10015 (b_gnatm.adb): Ditto.
10016 (b_gnatl.o, b_gnatm.o): New rules.
10017
10018 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10019
10020 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10021 for the padded type built to support a specified size or alignment.
10022
10023 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10024
10025 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10026 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10027 unconditionally to the end of the unit when the designated type is
10028 limited_with'ed.
10029 <all>: Rename local variable. Attempt to un-defer types only and do it
10030 for limited_with'ed types as well.
10031 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10032 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10033 consistently and remove redundant call to finalize_from_with_types.
10034
10035 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10036
10037 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10038 subprograms without a previous spec declared in the same unit.
10039 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10040 subprograms at the end of the unit instead of at the beginning.
10041 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10042 isn't public for the special handling of non-inline functions nested
10043 inside inline external functions.
10044
10045 2011-03-25 Jeff Law <law@redhat.com>
10046
10047 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10048
10049 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10050
10051 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10052 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10053 to compute Set_Size_Depends_On_Discriminant.
10054 (Layout_Type): Call it on array types in back-end layout mode.
10055 * sem_util.adb (Requires_Transient_Scope): Return true for array
10056 types only if the size depends on the value of discriminants.
10057 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10058 type if the RHS is a call to a function that returns an unconstrained
10059 type with default discriminant.
10060
10061 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10062
10063 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10064 non-conversion to the nominal result type at the end.
10065
10066 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10067
10068 * gcc-interface/trans.c (create_temporary): New function taken from...
10069 (create_init_temporary): ...here. Call it.
10070 (call_to_gnu): Create the temporary for the return value early, if any.
10071 Create it for a function with copy-in/copy-out parameters if there is
10072 no target; in other cases of copy-in/copy-out, use another temporary.
10073 Push the new binding level lazily. Add and rename local variables.
10074
10075 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10076
10077 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10078 error message.
10079 (set_rm_size): Likewise.
10080
10081 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10082
10083 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10084 for the padded type built in order to support a specified alignment.
10085 Fix incorrect formatting.
10086
10087 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10088
10089 PR bootstrap/48216
10090 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10091
10092 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10093
10094 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10095 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10096 to the end of the list. Adjust recursive call. Rename local variable.
10097 If REORDER is true, reorder components of the record type.
10098 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10099 components_to_record and adjust the parameter list.
10100
10101 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10102
10103 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10104 disabled, use the variable for bounds of loop iteration scheme.
10105
10106 2011-03-21 Kai Tietz <ktietz@redhat.com>
10107
10108 PR target/12171
10109 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10110
10111 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10112
10113 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10114 out whether the expression is read-only. Short-circuit placeholder
10115 case and rename a couple of local variables.
10116
10117 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10118
10119 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10120 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10121 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10122 (convert): Deal with conversions from a smaller form type specially.
10123
10124 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10125
10126 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10127 its argument, except for the special -I- switch.
10128
10129 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10130
10131 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10132 "Ada Issues".
10133
10134 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10135
10136 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10137
10138 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10139
10140 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10141 GNAT_FORMAL.
10142 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10143 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10144 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10145 Do not generate the check directly, instead instantiate the template
10146 check present in the descriptor.
10147 (make_descriptor_field): Move around.
10148 (build_vms_descriptor32): Build a template check in the POINTER field.
10149 (build_vms_descriptor): Remove useless suffixes.
10150 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10151
10152 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10153
10154 PR bootstrap/47467
10155 * targext.c: Include target files if IN_RTS is defined.
10156
10157 2011-01-26 Richard Guenther <rguenther@suse.de>
10158
10159 PR bootstrap/47467
10160 * targext.c: Include config.h.
10161 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10162 dependency.
10163
10164 2011-01-04 Pascal Obry <obry@adacore.com>
10165 Eric Botcazou <ebotcazou@adacore.com>
10166
10167 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10168
10169 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10170
10171 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10172 end-of-case on the end label and its associated gotos, if any.
10173
10174 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10175
10176 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10177 expressions of the parameter cache within the statement group of
10178 the CICO mechanism.
10179
10180 2011-01-04 Olivier Hainque <hainque@adacore.com>
10181 Eric Botcazou <ebotcazou@adacore.com>
10182
10183 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10184 (set_end_locus_from_node): New function.
10185 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10186 make and the function end_locus.
10187 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10188 for the elaboration subprogram.
10189 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10190 set the end_locus of the expression as well.
10191
10192 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10193
10194 PR ada/47131
10195 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10196 variables that are referenced in exception handlers volatile.
10197
10198
10199 \f
10200 Copyright (C) 2011 Free Software Foundation, Inc.
10201
10202 Copying and distribution of this file, with or without modification,
10203 are permitted in any medium without royalty provided the copyright
10204 notice and this notice are preserved.