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