]> gcc.gnu.org Git - gcc.git/blob - gcc/ada/ChangeLog
42707a4d6c16d9667180a06d447b8c0cb2866fda
[gcc.git] / gcc / ada / ChangeLog
1 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2
3 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
4 declaration.
5
6 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
7
8 * s-finmas.adb (Set_Finalize_Address): Explain the reason
9 for the synchronization. Move the test for null from
10 s-stposu.Allocate_Any_Controlled to this routine since the check
11 needs to be protected too.
12 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
13 synchronization code.
14 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
15 explaining the context in which this routine is used.
16 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
17 to s-finmas.Set_Finalize_Address.
18
19 2011-09-05 Ed Schonberg <schonberg@adacore.com>
20
21 * einfo.ads: Document that itypes have no parent field.
22
23 2011-09-05 Robert Dewar <dewar@adacore.com>
24
25 * rtsfind.adb (Check_CRT): Check for overloaded entity
26 * rtsfind.ads: Document that entities to be found by rtsfind
27 cannot be overloaded
28 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
29 (Lock_Entries_With_Status): New name for Lock_Entries with two
30 arguments (changed to meet rtsfind no overloading rule).
31
32 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
33
34 * s-finmas.adb (Set_Finalize_Address (Address,
35 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
36 (Set_Finalize_Address (in out Finalization_Master,
37 Finalize_Address_Ptr): Add synchronization code.
38 * s-finmas.ads (Set_Finalize_Address (Address,
39 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
40 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
41 Set_Finalize_Address for the heterogeneous case.
42
43 2011-09-05 Ed Schonberg <schonberg@adacore.com>
44
45 * sem_ch3.adb: Undo previous change, not suitable after all.
46
47 2011-09-05 Robert Dewar <dewar@adacore.com>
48
49 * einfo.ads: Minor comment clarification.
50
51 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
52
53 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
54 no longer needs to search through the entities of the return
55 statement scope to find the _chain.
56 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
57 (Analyze_Block_Statement): Add local variable
58 Is_BIP_Return_Statement. Add machinery to install all entities
59 produced by the expansion of the return object declaration.
60 (Install_Return_Entities): New routine.
61 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
62
63 2011-09-05 Ed Schonberg <schonberg@adacore.com>
64
65 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
66 of subunit is incomplete.
67 (Analyze_Proper_Body): If parent spec is not available, do not
68 attempt analysis.
69
70 2011-09-05 Ed Schonberg <schonberg@adacore.com>
71
72 * sem_disp.adb (Find_Controlling_Arg): Add checks for
73 interface type conversions, that are expanded into dereferences.
74
75 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
76
77 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
78 Examine the parameter and return profile of a subprogram and swap
79 any incomplete types coming from a limited context with their
80 corresponding non-limited views.
81 (Exchange_Limited_Views): New routine.
82
83 2011-09-05 Ed Schonberg <schonberg@adacore.com>
84
85 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
86 of internal entity to the subtype declaration, so that when
87 entities are subsequently exchanged in a package body, the tree
88 remains properly formatted for ASIS.
89
90 2011-09-05 Johannes Kanig <kanig@adacore.com>
91
92 * g-comlin.adb (Set_Usage): Additional optional argument to set help
93 message.
94 (Display_Help): display the user given help message, if available.
95
96 2011-09-05 Ed Schonberg <schonberg@adacore.com>
97
98 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
99 is legal if the original node is an identifier that is a
100 parameterless function call.
101
102 2011-09-05 Pascal Obry <obry@adacore.com>
103
104 * prj-nmsc.adb: Minor reformatting.
105 Add support for standalone aggregate library.
106 (Check_Stand_Alone_Library): Handle standalone aggregate library.
107 * projects.texi: Fix documentation for aggregate library projects.
108
109 2011-09-05 Robert Dewar <dewar@adacore.com>
110
111 * sem_ch6.adb: Minor reformatting.
112
113 2011-09-05 Matthew Gingell <gingell@adacore.com>
114
115 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
116 stack guard page on PPC Linux. This patch ensures the 64K guard page at
117 the bottom of the stack is not overwritten.
118
119 2011-09-05 Thomas Quinot <quinot@adacore.com>
120
121 * exp_intr.adb, s-tasini.adb: Minor reformatting.
122
123 2011-09-05 Ed Schonberg <schonberg@adacore.com>
124
125 * sem_ch3.adb (Access_Definition): If an access type declaration
126 appears in a child unit, the scope of whatever anonymous type
127 may be generated is the child unit itself.
128
129 2011-09-05 Ed Schonberg <schonberg@adacore.com>
130
131 * sem_ch6.adb (Analyze_Expression_Function): Do not set
132 Comes_From_Source on rewritten body.
133 (Analyze_Subprogram_Body_Helper): Check that the original node for
134 the body comes from source, when determining whether expansion
135 of a protected operation is needed.
136
137 2011-09-05 Ed Schonberg <schonberg@adacore.com>
138
139 * exp_aggr.adb (Replace_Type): If the target of the assignment is
140 a selected component and the right-hand side is a self-referential
141 access, the proper prefix of the rewritten attribute is a copy
142 of the left-hand side, not of its prefix.
143
144 2011-09-05 Robert Dewar <dewar@adacore.com>
145
146 * sem_ch5.adb: Minor reformatting.
147 * sem_ch3.adb: Minor code clean up.
148
149 2011-09-05 Jose Ruiz <ruiz@adacore.com>
150
151 * exp_ch9.adb (Make_Initialize_Protection): The fact that
152 restriction No_Dynamic_Attachment is in effect or not should
153 not influence the default priority associated to a protected
154 object. With this change, when the restriction is in effect (as
155 is the case for the Ravenscar profile) the default priority of
156 a protected object with an interrupt handler is in the range of
157 interrupt priorities (Default_Interrupt_Priority) as required
158 by D.3(10).
159
160 2011-09-05 Arnaud Charlet <charlet@adacore.com>
161
162 * a-iteint.ads: Fix header.
163
164 2011-09-05 Vincent Celier <celier@adacore.com>
165
166 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
167 with a directory separator to avoid output such as:
168 "/path/to/objauto.cgpr" has been deleted.
169
170 2011-09-05 Robert Dewar <dewar@adacore.com>
171
172 * sem_ch3.adb: Minor reformatting.
173
174 2011-09-05 Ed Schonberg <schonberg@adacore.com>
175
176 * sem_ch5.adb: Better error message.
177
178 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
179
180 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
181 (Expand_Array_Aggregate): Detect a special case of an aggregate
182 which contains tasks in the context of an unexpanded return
183 statement of a build-in-place function.
184 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
185 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
186 which contains tasks and expand it now that the original simple
187 return statement has been rewritten.
188 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
189 reformatting. Do not create a chain for an extended return
190 statement if one is already available.
191 (Has_Activation_Chain): New routine.
192
193 2011-09-05 Marc Sango <sango@adacore.com>
194
195 * sem_ch3.adb (Analyze_Object_Declaration): Remove
196 the wrong test and add the correct test to detect the violation
197 of illegal use of unconstrained string type in SPARK mode.
198
199 2011-09-05 Ed Schonberg <schonberg@adacore.com>
200
201 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
202 message on an iterator over an array.
203
204 2011-09-05 Robert Dewar <dewar@adacore.com>
205
206 * lib-xref-alfa.adb: Minor reformatting.
207
208 2011-09-05 Robert Dewar <dewar@adacore.com>
209
210 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
211 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
212
213 2011-09-05 Gary Dismukes <dismukes@adacore.com>
214
215 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
216
217 2011-09-05 Johannes Kanig <kanig@adacore.com>
218
219 * lib-xref-alfa.adb: Update comments.
220
221 2011-09-05 Thomas Quinot <quinot@adacore.com>
222
223 * sem_res.adb: Minor reformatting
224
225 2011-09-05 Ed Schonberg <schonberg@adacore.com>
226
227 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
228 present, create them now. Needed in case the return type was
229 a limited view in the function declaration.
230 (Make_Build_In_Place_Call_In_Allocator): If return type contains
231 tasks, build the activation chain for it. Pass a reference to
232 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
233 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
234 with build_in_place calls.
235 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
236 incomplete, inatialize its Corresponding_Record_Type component.
237 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
238 of limited views.
239
240 2011-09-05 Johannes Kanig <kanig@adacore.com>
241
242 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
243 information.
244
245 2011-09-05 Ed Schonberg <schonberg@adacore.com>
246
247 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
248 appears within a package specification and the token after "IS"
249 is not a parenthesis, assume that this is an unparenthesized
250 expression function, even if the token appears in a line by
251 itself.
252 * par.adb: Clarify use of Labl field of scope stack in error
253 recovery.
254
255 2011-09-05 Bob Duff <duff@adacore.com>
256
257 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
258 conversions instead of normal type conversions in all cases where a
259 type conversion would be illegal. In particular, use unchecked
260 conversions when the operand types are private.
261
262 2011-09-05 Johannes Kanig <kanig@adacore.com>
263
264 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
265 objects of task type or protected type.
266
267 2011-09-05 Ed Schonberg <schonberg@adacore.com>
268
269 * sem_ch6.adb (Analyze_Expression_Function): If the expression
270 function comes from source, indicate that so does its rewriting,
271 so it is compatible with any subsequent expansion of the
272 subprogram body (e.g. when it is a protected operation).
273 * sem_ch4.adb: minor reformatting
274
275 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
276
277 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
278 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
279 may lead to wrong ancestor package in the case of instantiated subunit
280 bodies. If a subunit is instantiated, follow the chain of instantiations
281 rather than the stub structure.
282
283 2011-09-02 Robert Dewar <dewar@adacore.com>
284
285 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
286 * gcc-interface/Make-lang.in: Update dependencies.
287
288 2011-09-02 Marc Sango <sango@adacore.com>
289
290 * sem_ch3.adb (Analyze_Object_Declaration): Change
291 comment and add additional check to differentiate constant of
292 type string from others unconstrained type.
293
294 2011-09-02 Ed Schonberg <schonberg@adacore.com>
295
296 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
297 present in incomplete type declarations to refine the error
298 message the full declaration is in the same unit.
299 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
300 an incomplete type, set the Premature_Use for additional message.
301 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
302 and Premature_Use is set, place additional information at the
303 point of premature use.
304
305 2011-09-02 Bob Duff <duff@adacore.com>
306
307 * sem_ch6.adb: (Check_Post_State): Suppress warning
308 "postcondition refers only to pre-state" when the expression has not
309 yet been analyzed, because it causes false alarms. This can happen when
310 the postcondition contains a quantified expression, because those are
311 analyzed later. This is a temporary/partial fix.
312 (Process_Post_Conditions): Minor: change wording of warning.
313
314 2011-09-02 Marc Sango <sango@adacore.com>
315
316 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
317 illegal use of unconstrained string type in SPARK mode.
318 * sem_res.adb (Analyze_Operator_Symbol): Set the
319 right place where the string operand of concatenation should be
320 violate in SPARK mode.
321
322 2011-09-02 Robert Dewar <dewar@adacore.com>
323
324 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
325 exp_ch3.adb: Minor reformatting.
326
327 2011-09-02 Vincent Celier <celier@adacore.com>
328
329 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
330 as the compiler driver so Is_Compilable returns True for sources.
331 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
332 for the body.
333
334 2011-09-02 Ed Schonberg <schonberg@adacore.com>
335
336 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
337 condition, a reference to a controlling formal must be interpreted
338 as having the class-wide type (or an access to such) so that the
339 inherited condition can be properly applied to any overriding
340 operation (see ARM12 6.6.1 (7)).
341
342 2011-09-02 Tristan Gingold <gingold@adacore.com>
343
344 * init.c (__gnat_is_vms_v7): Fix case and add prototype
345 for LIB$GETSYI.
346
347 2011-09-02 Javier Miranda <miranda@adacore.com>
348
349 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
350 initializing expression of a class-wide interface object declaration
351 if its type is limited.
352
353 2011-09-02 Johannes Kanig <kanig@adacore.com>
354
355 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
356 literals, take into account the type name; the type is *not*
357 the scope for an enumeration literal.
358
359 2011-09-02 Ed Schonberg <schonberg@adacore.com>
360
361 * sem_ch6.adb (Check_Overriding_Indicator): add special check
362 to reject an overriding indicator on a user-defined Adjust
363 subprogram for a limited controlled type.
364
365 2011-09-02 Ed Schonberg <schonberg@adacore.com>
366
367 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
368 for an actual that is a function call returning an unconstrained
369 limited controlled type.
370
371 2011-09-02 Tristan Gingold <gingold@adacore.com>
372
373 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
374
375 2011-09-02 Johannes Kanig <kanig@adacore.com>
376
377 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
378 from "HEAP" to __HEAP Change comment that refers to that variable
379 * put_alfa.adb: Change comment that refers to that variable
380
381 2011-09-02 Robert Dewar <dewar@adacore.com>
382
383 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
384
385 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
386
387 * exp_util.adb (Extract_Renamed_Object): Renamed to
388 Find_Renamed_Object. This routine has been reimplemented and now uses
389 tree traversal to locate a renamed object.
390 (Is_Aliased): Replace call to Extract_Renamed_Object with
391 Find_Renamed_Object.
392
393 2011-09-02 Tristan Gingold <gingold@adacore.com>
394
395 * init.c: (__gnat_is_vms_v7): New function.
396
397 2011-09-02 Olivier Hainque <hainque@adacore.com>
398
399 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
400 that have a misaligned backchain, necessarily bogus.
401
402 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
403
404 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
405 TSS routine Finalize_Address when compiling in Alfa mode.
406 (Expand_Freeze_Record_Type): Do not create TSS routine
407 Finalize_Address when compiling in Alfa mode.
408 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
409 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
410 not built.
411 (Expand_N_Allocator): Do not produce a call to
412 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
413 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
414 produce a call to primitive Set_Finalize_Address in Alfa mode because
415 Finalize_Address is not built.
416 * exp_ch7.adb (Build_Finalization_Master): Do not create
417 finalization masters in Afa mode since they are not needed.
418 (Build_Finalizer): Do not create scope and library-level
419 finalizers in Alfa mode since they are not needed.
420 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
421 "new" and "free" when applied to controlled objects in Alfa mode since
422 this is not needed.
423
424 2011-09-02 Vincent Celier <celier@adacore.com>
425
426 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
427 only library names with the syntax of Ada identifiers, to avoid errors
428 when compiling the binder generated files.
429 * projects.texi: Document restriction on SAL library names
430
431 2011-09-02 Thomas Quinot <quinot@adacore.com>
432
433 * a-chtgbo.adb: Minor comment fix.
434
435 2011-09-02 Robert Dewar <dewar@adacore.com>
436
437 * lib-xref.adb: Minor reformatting
438
439 2011-09-02 Vincent Celier <celier@adacore.com>
440
441 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
442 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
443 --version and --help in usage.
444 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
445
446 2011-09-02 Bob Duff <duff@adacore.com>
447
448 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
449 compilers don't understand it.
450
451 2011-09-02 Gary Dismukes <dismukes@adacore.com>
452
453 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
454 underlying subtype rather than its base type on the call to
455 Build_Record_Or_Elementary_Input_Function, so that any
456 constraints on a discriminated subtype will be available for
457 doing the check required by AI05-0192.
458 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
459 If the prefix subtype of the 'Input attribute is a constrained
460 discriminated subtype, then check each constrained discriminant value
461 against the corresponding value read from the stream.
462
463 2011-09-02 Yannick Moy <moy@adacore.com>
464
465 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
466 warnings on suspicious contracts, and enable them with -gnatwa.
467
468 2011-09-02 Robert Dewar <dewar@adacore.com>
469
470 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
471 reformatting.
472
473 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
474
475 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
476 which ensure that restriction No_Dynamic_Attachment has not been
477 violated.
478 (Make_Initialize_Protection): Protected types with attach or
479 interrupt handlers must not violate restriction No_Dynamic_Attachment.
480 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
481 which ensures that restriction No_Dynamic_Attachment has not been
482 violated.
483 * sem_attr.adb: (Eval_Attribute): Transform
484 VAX_Float_Type'First and 'Last into references to
485 the temporaries which store the corresponding bounds. The
486 transformation is needed since the back end cannot evaluate
487 'First and 'Last on VAX.
488 (Is_VAX_Float): New routine.
489
490 2011-09-02 Ed Schonberg <schonberg@adacore.com>
491
492 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
493 generic unit is not intrinsic and has an explicit convention,
494 the instance inherits it.
495
496 2011-09-02 Robert Dewar <dewar@adacore.com>
497
498 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
499 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
500
501 2011-09-02 Thomas Quinot <quinot@adacore.com>
502
503 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
504 Guard against a prefix that is an N_Has_Entity but has no
505 associated entity.
506
507 2011-09-02 Yannick Moy <moy@adacore.com>
508
509 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
510 references.
511
512 2011-09-02 Yannick Moy <moy@adacore.com>
513
514 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
515 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
516 contracts.
517 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
518 procedure looking for suspicious postconditions.
519 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
520 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
521 options -gnatw.t and -gnatw.T.
522
523 2011-09-02 Pascal Obry <obry@adacore.com>
524
525 * prj.adb: Minor code refactoring. Move check for null project in
526 Project_Changed.
527 * projects.texi: Fix minor typos.
528
529 2011-09-02 Ed Schonberg <schonberg@adacore.com>
530
531 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
532 of iteration is an expression, its value must be captured in a
533 renaming declaration, so that modification of the elements is
534 propagated to the original container.
535
536 2011-09-02 Pascal Obry <obry@adacore.com>
537
538 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
539 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
540 prj-tree.adb: Minor reformatting and style fixes.
541
542 2011-09-02 Robert Dewar <dewar@adacore.com>
543
544 * s-rident.ads: Add new restriction No_Implicit_Aliasing
545 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
546 No_Implicit_Aliasing
547 (Analyze_Attribute, case Address): ditto
548 (Analyze_Attribute, case Unrestricted_Access): ditto
549 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
550 No_Implicit_Aliasing restriction.
551 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
552
553 2011-09-02 Ed Schonberg <schonberg@adacore.com>
554
555 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
556 is an unchecked conversion, apply test to its expression.
557
558 2011-09-02 Javier Miranda <miranda@adacore.com>
559
560 * sem_ch3.adb (Check_Abstract_Overriding): When
561 traversing the chain of aliased subprograms avoid reporting a
562 redundant error on the current entity.
563
564 2011-09-02 Sergey Rybin <rybin@adacore.com>
565
566 * gnat_ugn.texi: Minor clean up.
567
568 2011-09-02 Bob Duff <duff@adacore.com>
569
570 * s-htable.adb (Set_If_Not_Present): Use renaming
571 instead of ":=", because the type Key is limited in the generic (even
572 if not in the instances).
573
574 2011-09-02 Robert Dewar <dewar@adacore.com>
575
576 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
577 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
578 reformatting.
579
580 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
581
582 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
583 inherited component with the enclosing derived type. Code reformatting.
584
585 2011-09-02 Gary Dismukes <dismukes@adacore.com>
586
587 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
588 return done when overflow checks are enabled, since comparisons against
589 Lor and Hir should not be done when OK1 is False.
590
591 2011-09-02 Gary Dismukes <dismukes@adacore.com>
592
593 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
594 Add new formal Master_Exp. When present, add that expression to the
595 call as an extra actual.
596 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
597 Fmaster_Actual and in the case of a BIP call initializing a return
598 object of an enclosing BIP function set it to a
599 new reference to the implicit finalization master
600 formal of the enclosing function. Fmaster_Actual is
601 then passed to the new formal Master_Exp on the call to
602 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
603 initializations of Enclosing_Func to its declaration.
604
605 2011-09-02 Thomas Quinot <quinot@adacore.com>
606
607 * csets.ads: Minor reformatting
608
609 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
610
611 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
612 the full view of a private type coming from an instantiation.
613 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
614 loop to iterate over the declarations rather than use the
615 First_Entity / Next_Entity scheme.
616
617 2011-09-02 Ed Schonberg <schonberg@adacore.com>
618
619 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
620 X'range (N) into X'First (N) .. X'Last (N), do not share the
621 dimension indicator N, if present. Even though it is a static
622 constant, its source location may be modified when printing
623 expanded code under -gnatDL, and node sharing will lead to chaos
624 in Sprint on large files, by generating a sloc value that does
625 not correspond to any source file.
626
627 2011-09-02 Bob Duff <duff@adacore.com>
628
629 * einfo.adb: (Has_Xref_Entry): Do not call
630 Implementation_Base_Type. Lib.Xref has been
631 rewritten to avoid the need for it, and it was costly.
632 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
633 functions in support of efficient xref.
634 * lib-xref-alfa.adb: Misc changes related to Key component of
635 type Xref_Entry.
636 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
637 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
638 no longer does. This is the one place where it is needed.
639
640 2011-09-02 Johannes Kanig <kanig@adacore.com>
641
642 * g-comlin.adb (Getopt): New optional argument Concatenate to have
643 similar interface as the other Getopt function.
644
645 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
646
647 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
648 a call to Set_Finalize_Address if there is no allocator available.
649 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
650 a case of allocator expansion where the allocator is not expanded but
651 needs a custom allocate routine. Code reformatting.
652 (Is_Finalizable_Transient): Remove local variables Has_Rens and
653 Ren_Obj. Code reformatting.
654 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
655 through the use of 'reference.
656 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
657 as part of build-in-place expansion. They are intentionally marked as
658 coming from source, but their parents are not.
659
660 2011-09-02 Ed Schonberg <schonberg@adacore.com>
661
662 * sem_ch10.adb (Analyze_With_Clause): If the library unit
663 is the generated subprogram declaration for a child unit body
664 that acts as spec, use the original body in the with_clause,
665 to prevent binding errors.
666
667 2011-09-02 Vincent Celier <celier@adacore.com>
668
669 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
670 qualifier /MULTI_UNIT_INDEX=
671
672 2011-09-02 Johannes Kanig <kanig@adacore.com>
673
674 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
675 instead of calling the callback function
676
677 2011-09-02 Robert Dewar <dewar@adacore.com>
678
679 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
680 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
681
682 2011-09-02 Vincent Celier <celier@adacore.com>
683
684 * prj-nmsc.adb: (Find_Sources): When the list of sources is
685 explicitly declared in an extending project, do not warn if a source
686 for an inherited naming exception is not found.
687
688 2011-09-02 Gary Dismukes <dismukes@adacore.com>
689
690 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
691 expansion is inactive.
692
693 2011-09-02 Ed Schonberg <schonberg@adacore.com>
694
695 * sem_util.adb (Note_Possible_Modification): If the entity
696 being modified is the renaming generated for an Ada2012 iterator
697 element, the enclosing container or array is modified as well.
698
699 2011-09-02 Jose Ruiz <ruiz@adacore.com>
700
701 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
702 Initialize): Define and initialize the
703 mutex attributes and condition variable attributes locally.
704
705 2011-09-02 Vincent Celier <celier@adacore.com>
706
707 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
708 exception replaced in an extending project.
709 (Check_Object): No error when the other source is locally removed.
710
711 2011-09-02 Yannick Moy <moy@adacore.com>
712
713 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
714 unresolved calls.
715
716 2011-08-31 Arnaud Charlet <charlet@adacore.com>
717
718 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
719 run-time files.
720 * gcc-interface/Make-lang.in: Update dependencies.
721
722 2011-09-01 Robert Dewar <dewar@adacore.com>
723
724 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
725
726 2011-09-01 Jose Ruiz <ruiz@adacore.com>
727
728 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
729 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
730 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
731 specific for systems where their glibc version does not define the
732 routines to handle dynamically allocated CPU sets.
733
734 2011-09-01 Vincent Celier <celier@adacore.com>
735
736 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
737 prj-env.adb: Implement inheritance of naming exceptions in extending
738 projects.
739
740 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
741
742 * gnatls.adb: Display simple message instead of content of
743 gnatlic.adl.
744
745 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
746
747 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
748 access discriminant and anonymous access component scopes.
749 (Inherit_Component): Reuse the itype of an access discriminant
750 or anonymous access component by copying it in order to set the proper
751 scope. This is done only when the parent and the derived type
752 are in different scopes.
753 (Set_Anonymous_Etype): New routine.
754
755 2011-09-01 Robert Dewar <dewar@adacore.com>
756
757 * a-convec.adb: Minor reformatting throughout.
758
759 2011-09-01 Jose Ruiz <ruiz@adacore.com>
760
761 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
762 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
763 CPU_ALLOC_SIZE and CPU_FREE linux macros.
764 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
765 CPU_SET_S respectively because we are now using dynamically allocated
766 CPU sets which are more portable across different glibc versions.
767 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
768 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
769 masks dynamically according to the number of processors in the target
770 platform.
771 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
772 respectively, so we need to pass the size of the masks as
773 parameters.
774 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
775 created cpu_set_t masks
776 with the number of processors available in the target platform,
777 instead of static bit arrays. It enhances portability because
778 it uses the information from the target platform.
779 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
780 are using a restricted run-time library, use the flag
781 Configurable_Run_Time_Mode instead of Restricted_Profile.
782
783 2011-09-01 Vincent Celier <celier@adacore.com>
784
785 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
786 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
787
788 2011-09-01 Nicolas Roche <roche@adacore.com>
789
790 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
791 on VxWorks in kernel mode.
792
793 2011-09-01 Jose Ruiz <ruiz@adacore.com>
794
795 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
796 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
797 directly the bit array.
798 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
799 the linux macros with the same name.
800 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
801 wrappers around the CPU_ZERO and CPU_SET linux macros.
802
803 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
804
805 * exp_ch7.adb (Find_Insertion_List): Removed.
806 (Process_Transient_Objects): Insert the declarations of the hook
807 access type and the hook object before the associated transient object.
808
809 2011-09-01 Jose Ruiz <ruiz@adacore.com>
810
811 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
812 package System.Aux_Dec when using restricted run-time libraries which
813 do not have this package.
814
815 2011-09-01 Tristan Gingold <gingold@adacore.com>
816
817 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
818
819 2011-09-01 Bob Duff <duff@adacore.com>
820
821 * sem_attr.adb (Analyze_Access_Attribute): Do not call
822 Kill_Current_Values for P'Unrestricted_Access, where P is library level
823
824 2011-09-01 Thomas Quinot <quinot@adacore.com>
825
826 * exp_ch5.adb: Minor reformatting
827 * gnat_ugn.texi: Fix minor typos.
828 * gcc-interface/Make-lang.in: Update dependencies.
829
830 2011-09-01 Robert Dewar <dewar@adacore.com>
831
832 * inline.adb, sem_aggr.adb: Minor reformatting.
833
834 2011-09-01 Ed Schonberg <schonberg@adacore.com>
835
836 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
837
838 2011-09-01 Robert Dewar <dewar@adacore.com>
839
840 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
841
842 2011-09-01 Bob Duff <duff@adacore.com>
843
844 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
845 body" the same as "in inlined body", because visibility shouldn't
846 apply there.
847
848 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
849
850 * inline.adb (Add_Inlined_Body): Refine previous change.
851
852 2011-09-01 Gary Dismukes <dismukes@adacore.com>
853
854 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
855 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
856 Test for case where call
857 initializes an object of a return statement before testing for
858 a constrained call, to ensure that all such cases get handled
859 by simply passing on the caller's parameters. Also, in that
860 case call Needs_BIP_Alloc_Form to determine whether to pass on
861 the BIP_Alloc_Form parameter of the enclosing function rather
862 than testing Is_Constrained. Add similar tests for the return
863 of a BIP call to later processing to ensure consistent handling.
864 (Needs_BIP_Alloc_Form): New utility function.
865 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
866 a BIP_Alloc_Form formal with call to new utility function
867 Needs_BIP_Alloc_Form.
868
869 2011-09-01 Pascal Obry <obry@adacore.com>
870
871 * prj-part.adb: Minor reformatting.
872
873 2011-09-01 Vincent Celier <celier@adacore.com>
874
875 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
876 half character in the unit name.
877
878 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
879
880 * exp_ch4.adb: Minor code and comment reformatting.
881
882 2011-09-01 Thomas Quinot <quinot@adacore.com>
883
884 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
885 for Is_Limited_Type and Is_Tagged_Type in condition checking
886 for by-reference type.
887 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
888 subprograms may have a completion because of a previous
889 Inline_Always clause, but the enclosing package must be marked
890 inlined for the subprogram body to become visible to the backend.
891
892 2011-09-01 Thomas Quinot <quinot@adacore.com>
893
894 * sem_aux.adb, exp_ch4.adb: Minor reformatting
895
896 2011-09-01 Pascal Obry <obry@adacore.com>
897
898 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
899
900 2011-09-01 Ed Schonberg <schonberg@adacore.com>
901
902 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
903 the formals of a subprogram stub that acts as a spec.
904
905 2011-09-01 Ed Schonberg <schonberg@adacore.com>
906
907 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
908 type, declare a renaming for it, not an object declaration.
909
910 2011-09-01 Yannick Moy <moy@adacore.com>
911
912 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
913 Ignore_Errors to ignore failures to read ALI files when True.
914
915 2011-09-01 Javier Miranda <miranda@adacore.com>
916
917 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
918 constructor calls associated with non-tagged record types.
919
920 2011-09-01 Robert Dewar <dewar@adacore.com>
921
922 * g-socthi-vms.adb: Minor reformatting.
923
924 2011-09-01 Nicolas Roche <roche@adacore.com>
925
926 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
927 in order to avoid impact of imcompatible changes.
928 * cstreams.c: Likewise
929 * cio.c: Likewise
930 * aux-io.c: Likewise
931
932 2011-09-01 Yannick Moy <moy@adacore.com>
933
934 * lib-writ.adb (Write_With_Lines): Always output complete information
935 on "with" line in Alfa mode, as this is required by formal verification
936 back-end.
937
938 2011-09-01 Tristan Gingold <gingold@adacore.com>
939
940 * g-socthi-vms.adb: Add comments.
941
942 2011-09-01 Pascal Obry <obry@adacore.com>
943
944 * prj.ads: Minor reformatting.
945
946 2011-09-01 Vincent Celier <celier@adacore.com>
947
948 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
949 exceptions in the config pragmas file.
950
951 2011-09-01 Tristan Gingold <gingold@adacore.com>
952
953 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
954
955 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
956
957 * exp_ch7.adb (Find_Insertion_List): New routine.
958 (Process_Transient_Objects): Add code to handle the abnormal
959 finalization of a controlled transient associated with a subprogram
960 call. Since transients are cleaned up right after the associated
961 context, an exception raised during a subprogram call may bypass the
962 finalization code.
963
964 2011-09-01 Robert Dewar <dewar@adacore.com>
965
966 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
967 aliased.
968
969 2011-09-01 Robert Dewar <dewar@adacore.com>
970
971 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
972
973 2011-09-01 Robert Dewar <dewar@adacore.com>
974
975 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
976
977 2011-09-01 Thomas Quinot <quinot@adacore.com>
978
979 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
980 GNATRTL_NONTASKING_OBJS.
981
982 2011-09-01 Robert Dewar <dewar@adacore.com>
983
984 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
985 possibility of this flag being set for formals in Ada 2012 mode.
986 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
987 2012.
988 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
989 mode.
990 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
991 Ada 2012.
992 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
993 Ada 2012.
994
995 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
996
997 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
998 insertion node in a tree of nested Expression_With_Actions nodes.
999 (Process_Transient_Object): In the case where a complex if statement
1000 has been converted into nested Expression_With_Actions nodes, the
1001 "hook" object and the associated access type must be inserted before
1002 the top most Expression_With_Actions.
1003
1004 2011-09-01 Robert Dewar <dewar@adacore.com>
1005
1006 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
1007 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
1008
1009 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1010
1011 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
1012
1013 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1014
1015 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
1016 aspect.
1017 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
1018 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
1019 in a similar way as we do for the Priority or Dispatching_Domain aspect.
1020 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
1021 Dispatching_Domains_Frozen): Move this local data to package
1022 System.Tasking because with the CPU aspect we need to have access
1023 to this data when creating the task in System.Tasking.Stages.Create_Task
1024 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
1025 Move these variables from the body of
1026 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
1027 we need to have access to this data when creating the task in
1028 System.Tasking.Stages.Create_Task.
1029 * s-taskin.adb (Initialize): Signal the allocation of the environment
1030 task to a CPU, if any, so that we know whether the CPU can be
1031 transferred to a different dispatching domain.
1032 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
1033 is being allocated belongs to the dispatching domain where the task
1034 lives. Signal the allocation of the task to a CPU, if any, so that we
1035 know whether the CPU can be transferred to a different dispatching
1036 domain.
1037
1038 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1039
1040 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
1041 attributes Same_Storage and Overlaps_Storage.
1042
1043 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1044
1045 * exp_strm.adb: Remove with and use clause for Opt.
1046 (Build_Array_Input_Function): Remove the version-dependent generation
1047 of the return statement. The Ada 2005 tree is now the default.
1048
1049 2011-09-01 Yannick Moy <moy@adacore.com>
1050
1051 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
1052 it is never empty when compiling in Alfa mode.
1053
1054 2011-09-01 Robert Dewar <dewar@adacore.com>
1055
1056 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
1057 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
1058 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
1059 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
1060
1061 2011-09-01 Matthew Heaney <heaney@adacore.com>
1062
1063 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
1064 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
1065 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
1066 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
1067 unbounded queue container.
1068 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
1069 bounded queue container.
1070 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
1071 unbounded priority queue container.
1072 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
1073 bounded priority queue container.
1074
1075 2011-08-31 Pascal Obry <obry@adacore.com>
1076
1077 * a-direct.adb: Do not try to create an UNC path on Windows.
1078 (Create_Path): Skip leading computer name in UNC path if any.
1079
1080 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1081
1082 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
1083 version-dependent generation of the return statement. The Ada 2005 tree
1084 is now the default.
1085
1086 2011-08-31 Thomas Quinot <quinot@adacore.com>
1087
1088 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
1089 types Stream_Element_Offset and Storage_Offset have a different native
1090 type depending on whether the platform is 32 or 64 bits. When
1091 exchanging them, always convert to 64 bits.
1092
1093 2011-08-31 Yannick Moy <moy@adacore.com>
1094
1095 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
1096 --force-alfa to gnat2why.
1097
1098 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1099
1100 * sem_ch12.adb (Save_References): If the node has aspects, save
1101 references within the corresponding expressions in a separate step,
1102 because the aspects are not directly in the tree for the declaration
1103 to which they belong.
1104
1105 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1106
1107 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
1108 in CodePeer mode, since representation clauses are partially ignored.
1109 * gcc-interface/Make-lang.in: Update dependencies.
1110
1111 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1112
1113 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1114 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
1115 to any dispatching domain.
1116
1117 2011-08-31 Thomas Quinot <quinot@adacore.com>
1118
1119 * exp_ch4.adb: Minor reformatting.
1120
1121 2011-08-31 Bob Duff <duff@adacore.com>
1122
1123 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
1124 on nodes for which it is not defined.
1125 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
1126 parent type.
1127
1128 2011-08-31 Bob Duff <duff@adacore.com>
1129
1130 * sem_ch3.adb (Process_Full_View): Disable legality check if
1131 In_Instance, to avoid spurious errors.
1132 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
1133 if In_Instance, to avoid spurious errors.
1134
1135 2011-08-31 Pascal Obry <obry@adacore.com>
1136
1137 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
1138 directory speparators.
1139 (Compose): Use Dir_Seps to handle both forms.
1140 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
1141 changes.
1142 (Extension): Use Dir_Seps to handle both forms.
1143
1144 2011-08-31 Pascal Obry <obry@adacore.com>
1145
1146 * prj-conf.adb: Minor reformatting.
1147
1148 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1149
1150 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
1151 dispatching domain aspect.
1152 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
1153 aspect.
1154 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
1155 Dispatching_Domain aspect in a similar way as we do for the Priority
1156 aspect.
1157 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
1158 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
1159 is present.
1160 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
1161 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
1162 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
1163 Dispatching_Domain and add it to the task definition.
1164 (Sig_Flags): Add Pragma_Dispatching_Domain.
1165 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
1166 support to find the types Dispatching_Domain and
1167 Dispatching_Domain_Access.
1168 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
1169 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
1170 query the availability of a pragma Dispatching_Domain.
1171 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
1172 the expander to pass the Dispatching_Domain when creating a task.
1173 (Name_Dispatching_Domain): Add this new name for a pragma.
1174 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
1175 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
1176 task has been allocated at creation time.
1177 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
1178 Ravenscar is always null.
1179 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
1180 the task has been allocated at creation time.
1181 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
1182 a specific dispatching domain.
1183 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
1184 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
1185 and CPU are specified for the task, and the CPU value is not contained
1186 within the range of processors for the domain.
1187
1188 2011-08-31 Vincent Celier <celier@adacore.com>
1189
1190 * make.adb (Original_Gcc) : New constant String_Access.
1191 (Gnatmake): For VM targets, do not use VM version of the compiler if
1192 --GCC= has been specified.
1193
1194 2011-08-31 Thomas Quinot <quinot@adacore.com>
1195
1196 * sem_ch5.adb: Minor reformatting.
1197
1198 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1199
1200 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
1201 not reanalyze it.
1202
1203 2011-08-31 Bob Duff <duff@adacore.com>
1204
1205 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
1206 the access type is private; we don't care about privacy in expansion.
1207
1208 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1209
1210 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
1211 subcomponents tnat may be limited, because they originate in view
1212 conflicts. If the original aggregate is legal and the actuals are
1213 legal, the aggregate itself is legal.
1214
1215 2011-08-31 Matthew Heaney <heaney@adacore.com>
1216
1217 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
1218 status.
1219
1220 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1221
1222 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
1223 errors in B tests.
1224
1225 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1226
1227 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
1228 Interrupt_Priority aspects, force the analysis of the aspect expression
1229 (when building the equivalent pragma). Otherwise, its analysis is done
1230 too late, after the task or protected object has been created.
1231 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
1232 Analyze_Single_Task_Declaration): Remove the code to move the aspects
1233 to the object declaration because they are needed in the type
1234 declaration.
1235
1236 2011-08-31 Robert Dewar <dewar@adacore.com>
1237
1238 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
1239 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
1240 reformatting.
1241
1242 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1243
1244 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
1245 if the corresponding type is malformed due to restriction violations.
1246
1247 2011-08-31 Robert Dewar <dewar@adacore.com>
1248
1249 * s-ransee.ads, s-ransee.adb: Minor reformatting.
1250
1251 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1252
1253 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
1254 would cause the generation of Set_Finalize_Address if the target is a
1255 VM and the designated type is not derived from [Limited_]Controlled.
1256
1257 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1258
1259 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
1260 subprogram.
1261 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
1262 case of a compilation error.
1263
1264 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1265
1266 * init.c (__gnat_error_handler): Standardize the stack overflow or
1267 erroneous memory access message.
1268 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
1269 or erroneous memory access message.
1270
1271 2011-08-31 Robert Dewar <dewar@adacore.com>
1272
1273 * sem_ch4.adb: Minor reformatting.
1274 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
1275
1276 2011-08-31 Thomas Quinot <quinot@adacore.com>
1277
1278 * scos.ads: Minor documentation clarification.
1279 * put_scos.adb: Do not generate SCO unit header line for a unit that
1280 has no SCO lines.
1281
1282 2011-08-31 Robert Dewar <dewar@adacore.com>
1283
1284 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
1285
1286 2011-08-31 Tristan Gingold <gingold@adacore.com>
1287
1288 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
1289 hold variables between these following subprograms.
1290 (Build_Exception_Handler, Build_Object_Declarations,
1291 Build_Raise_Statement): Use the above type as parameter.
1292 Make the above adjustments.
1293 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
1294
1295 2011-08-31 Pascal Obry <obry@adacore.com>
1296
1297 * projects.texi: Minor reformatting.
1298
1299 2011-08-31 Tristan Gingold <gingold@adacore.com>
1300
1301 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
1302 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
1303
1304 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1305
1306 * exp_ch5.adb: Minor code cleanup.
1307 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
1308 prevent cascaded errors.
1309 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
1310 variable of an iterator specification in current scope.
1311 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
1312 postconditions on the stack, as they contain no return statements.
1313
1314 2011-08-31 Yannick Moy <moy@adacore.com>
1315
1316 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
1317 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
1318 call Qualify_Entity_Names.
1319 (Expand_Alfa): call Qualify_Entity_Names in more cases
1320 * lib-xref-alfa.adb: Take into account system package.
1321 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
1322 CodePeer mode in which we are interested in finding bugs even if
1323 compiler cannot compile source.
1324 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
1325 deferred constant.
1326
1327 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1328
1329 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
1330 denoted by the subtype mark to ensure getting the concurrent type in
1331 the case where the subtype mark denotes a private subtype of a
1332 concurrent type (needed when using -gnatc).
1333 (Process_Subtype): For the processing specific to type kinds, case on
1334 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
1335 subtype denotes a private subtype whose base type is nonprivate (needed
1336 for subtypes of private fulfilled by task types when compiling with
1337 -gnatc).
1338
1339 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1340
1341 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
1342 late primitives that override interface operations when the full
1343 expander is not active, to avoid blowups in Register_Primitive when
1344 types don't have associated secondary dispatch tables.
1345
1346 2011-08-31 Yannick Moy <moy@adacore.com>
1347
1348 * alfa_test.adb: Code clean up.
1349
1350 2011-08-31 Marc Sango <sango@adacore.com>
1351
1352 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
1353 by Comes_From_Source (Original_Node (N)) in order to treat also the
1354 nodes which have been rewritten.
1355 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
1356 explicit dereference and slice violation in spark mode on the nodes
1357 coming only from the source code.
1358
1359 2011-08-31 Robert Dewar <dewar@adacore.com>
1360
1361 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
1362 lib-xref-alfa.adb: Minor reformatting.
1363
1364 2011-08-31 Matthew Heaney <heaney@adacore.com>
1365
1366 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
1367
1368 2011-08-31 Javier Miranda <miranda@adacore.com>
1369
1370 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
1371 only for class-wide subprograms conflicting with entities of concurrent
1372 tagged types.
1373
1374 2011-08-31 Matthew Heaney <heaney@adacore.com>
1375
1376 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
1377 node to null value.
1378
1379 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1380
1381 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
1382 general description of the routine.
1383
1384 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1385
1386 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
1387 doubly-linked lists.
1388
1389 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1390
1391 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
1392 check is needed for a left-hand side that is a dereference, and the
1393 base type is private without discriminants (whereas the full type does
1394 have discriminants), an extra retrieval of the underlying type may be
1395 needed in the case where the subtype is a record subtype whose base
1396 type is private. Update comments.
1397
1398 2011-08-31 Javier Miranda <miranda@adacore.com>
1399
1400 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
1401 found check if there is a class-wide subprogram covering the primitive.
1402
1403 2011-08-31 Yannick Moy <moy@adacore.com>
1404
1405 * sem_res.adb: Further cases where full expansion test is needed,
1406 rather than expansion test.
1407
1408 2011-08-31 Pascal Obry <obry@adacore.com>
1409
1410 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
1411
1412 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1413
1414 * exp_ch5.adb: Handle iterators over derived container types.
1415
1416 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1417
1418 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
1419 (Has_Anonymous_Master): New routine.
1420 (Set_Has_Anonymous_Master): New routine.
1421 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
1422 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
1423 (Current_Anonymous_Master): New routine.
1424 (Current_Unit_First_Declaration): Removed.
1425 (Current_Unit_Scope): Removed.
1426 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
1427 their objects on a per-unit heterogeneous finalization master.
1428
1429 2011-08-31 Matthew Heaney <heaney@adacore.com>
1430
1431 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
1432 array.
1433
1434 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1435
1436 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
1437 when not needed.
1438
1439 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1440
1441 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
1442 where the actual is an unexpanded call to 'Input.
1443
1444 2011-08-31 Yannick Moy <moy@adacore.com>
1445
1446 * sem_ch4.adb: Code clean up.
1447
1448 2011-08-31 Yannick Moy <moy@adacore.com>
1449
1450 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
1451
1452 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1453
1454 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
1455 and TSS primitive Finalize_Address if finalization is suppressed.
1456 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
1457 primitive Finalize_Address if finalization is suppressed.
1458
1459 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1460
1461 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
1462 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
1463 sure that the underlying task has already been created before trying
1464 to change its affinity.
1465 (Set_CPU): Use the term processor instead of CPU, as we do in
1466 Assign_Task.
1467
1468 2011-08-31 Vincent Celier <celier@adacore.com>
1469
1470 * prj-attr.adb: New Compiler attribute Source_File_Switches.
1471 * prj-nmsc.adb (Process_Compiler): Process attribute
1472 Source_File_Switches.
1473 * prj.ads (Language_Config): New name list component
1474 Name_Source_File_Switches.
1475 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
1476
1477 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1478
1479 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
1480 discriminated component of an actual, expand at once to prevent
1481 ouf-of-order references with generated subtypes.
1482
1483 2011-08-31 Yannick Moy <moy@adacore.com>
1484
1485 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
1486 reference to operator in Alfa xrefs.
1487
1488 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1489
1490 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
1491 where the parent instance was frozen before the current instance due to
1492 the presence of a source body. Update calls to Insert_After_Last_Decl.
1493 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
1494 Update the comment which illustrates the purpose of the routine.
1495 Package instances are now frozen by source bodies which appear after
1496 the instance. This ensures that entities coming from within the
1497 instance are available for use in the said bodies.
1498 (Install_Body): Add code to handle the case where the parent instance
1499 was frozen before the current instance due to the presence of a source
1500 body. Update calls to Insert_After_Last_Decl.
1501
1502 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1503
1504 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
1505 access types.
1506 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
1507
1508 2011-08-31 Yannick Moy <moy@adacore.com>
1509
1510 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
1511 full-expander test.
1512 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
1513 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
1514 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
1515 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
1516 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
1517 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1518 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
1519 ALFA in Alfa (we dropped acronym).
1520 * einfo.adb (Primitive_Operations): Correctly return list of primitive
1521 operations in a case where it returned previously No_Elist.
1522
1523 2011-08-31 Robert Dewar <dewar@adacore.com>
1524
1525 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
1526 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
1527 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1528 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
1529 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
1530 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
1531 reformatting.
1532
1533 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1534
1535 * sem_ch12 (Check_Private_View): Revert previous change.
1536 * sem_res.adb (Conversion_Check): Do not emit the error message if the
1537 conversion is in a generic instance.
1538
1539 2011-08-31 Matthew Heaney <heaney@adacore.com>
1540
1541 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
1542 * a-chtgbo.adb (Free): Allow 0 as index value.
1543
1544 2011-08-31 Matthew Heaney <heaney@adacore.com>
1545
1546 * a-cborma.adb (Insert): Add comment to explain why no element
1547 assignment.
1548
1549 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1550
1551 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
1552 spec discriminant is already a concurrent type, in which case just use
1553 it, otherwise fetch the Corresponding_Concurrent_Type as before.
1554
1555 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1556
1557 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
1558 system-linux-mips.ads, system-linux-mipsel.ads,
1559 system-linux-mips64el.ads, system-linux-ppc64.ads,
1560 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
1561
1562 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1563
1564 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
1565 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
1566 (build_unary_op): Likewise.
1567
1568 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1569
1570 * raise-gcc.c: Do not include coretypes.h and tm.h.
1571 (setup_to_install): Remove test for compiler macro.
1572 * targext.c: Document use for the library.
1573 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
1574
1575 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1576
1577 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
1578 the expression to the nominal type if the latter is a record type with
1579 a variant part and the type of the former is a record type without one.
1580
1581 2011-08-30 Yannick Moy <moy@adacore.com>
1582
1583 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1584 expansion in Alfa mode.
1585 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
1586 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
1587 Alfa mode.
1588 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
1589 * sem_res.adb: Ditto.
1590 * gcc-interface/Make-lang.in: Update dependencies.
1591
1592 2011-08-30 Thomas Quinot <quinot@adacore.com>
1593
1594 * g-socket.ads: Minor documentation adjustment.
1595
1596 2011-08-30 Robert Dewar <dewar@adacore.com>
1597
1598 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
1599
1600 2011-08-30 Yannick Moy <moy@adacore.com>
1601
1602 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
1603 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
1604 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
1605 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
1606 Revert change which introduced files for "light"
1607 expansion, to be replaced by a single file for Alfa expansion.
1608
1609 2011-08-30 Robert Dewar <dewar@adacore.com>
1610
1611 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
1612 Minor code reorg/reformatting.
1613
1614 2011-08-30 Yannick Moy <moy@adacore.com>
1615
1616 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
1617 common shorthand for (Expander_Active and not ALFA_Mode) that can be
1618 used for testing full expansion, that is active expansion not in the
1619 reduced mode for Alfa
1620 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
1621 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
1622 of the verbose (Expander_Active and not ALFA_Mode)
1623
1624 2011-08-30 Tristan Gingold <gingold@adacore.com>
1625
1626 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
1627 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
1628 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
1629 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
1630
1631 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1632
1633 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
1634 access conversions to check that the conversion is a rewritten node,
1635 rather than just having Comes_From_Source set to False, which wasn't
1636 sufficient.
1637
1638 2011-08-30 Robert Dewar <dewar@adacore.com>
1639
1640 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
1641 g-socket.ads: Minor reformatting.
1642
1643 2011-08-30 Thomas Quinot <quinot@adacore.com>
1644
1645 * sem_util.adb: Minor reformatting.
1646
1647 2011-08-30 Tristan Gingold <gingold@adacore.com>
1648
1649 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
1650 to be compliant with the ABI.
1651
1652 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1653
1654 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
1655 of a designated type when the related access type is an actual in an
1656 instance. This ensures that the full view of designated type is
1657 available when inside the body of the instance.
1658
1659 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1660
1661 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
1662 in a position to be modified, a slice is treated like an indexed
1663 component.
1664
1665 2011-08-30 Thomas Quinot <quinot@adacore.com>
1666
1667 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
1668 field tv_sec in struct timeval.
1669
1670 2011-08-30 Yannick Moy <moy@adacore.com>
1671
1672 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
1673 blocks of code doing full expansion, previously only guarded by
1674 Expander_Active, by anding the test that ALFA_Mode is not set
1675
1676 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1677
1678 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
1679 add the function to the list of private dependents, for subsequent
1680 legality check on Taft amendment types.
1681 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
1682 Private_Dependents, as for other incomplete types.
1683 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
1684 Taft-amendment type is used as the return type of a function.
1685
1686 2011-08-30 Javier Miranda <miranda@adacore.com>
1687
1688 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
1689 which emits an error by a call to a new routine which report the error.
1690 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
1691 entity does not cover an existing interface.
1692 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
1693 code.
1694 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
1695 protected procedures or entries whose mode is not conformant.
1696 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
1697 an error by a call to a new routine which report the error.
1698
1699 2011-08-30 Robert Dewar <dewar@adacore.com>
1700
1701 * gnat_rm.texi: Minor change.
1702 * exp_attr_light.adb: Minor reformatting.
1703
1704 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1705
1706 * sem_ch3.adb: Patch inheritance of aspects in
1707 Complete_Private_Subtype, to avoid infinite loop.
1708
1709 2011-08-30 Javier Miranda <miranda@adacore.com>
1710
1711 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
1712 been reported and a subprogram covering an interface primitive is not
1713 found then skip generating the internal entity. Done to avoid crashing
1714 the frontend.
1715 (Check_Abstract_Overriding): Change text of error of wrong formal of
1716 protected subprogram or entry. Done for consistency to emit exactly the
1717 same error reported by Check_Synchronized_Overriding. In addition, the
1718 error is restricted to protected types (bug found working on AI05-0090)
1719
1720 2011-08-30 Yannick Moy <moy@adacore.com>
1721
1722 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1723 expansion in Alfa mode.
1724 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
1725 * exp_light.adb, exp_light.ads: New package defining light expansion.
1726 * expander.adb (Expand): Call light expansion in Alfa mode
1727 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
1728 constructs.
1729 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
1730 constructs.
1731 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
1732 * gnat1drv.adb (Adjust_Global_Switches): Comment
1733
1734 2011-08-30 Yannick Moy <moy@adacore.com>
1735
1736 * lib-xref-alfa.adb: Minor refactoring.
1737
1738 2011-08-30 Yannick Moy <moy@adacore.com>
1739
1740 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
1741 mode.
1742 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
1743 expansion in Alfa mode.
1744 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
1745 mode.
1746
1747 2011-08-30 Robert Dewar <dewar@adacore.com>
1748
1749 * debug_a.adb: Update comment.
1750
1751 2011-08-30 Robert Dewar <dewar@adacore.com>
1752
1753 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
1754 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
1755 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
1756 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
1757
1758 2011-08-30 Robert Dewar <dewar@adacore.com>
1759
1760 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
1761 volatile.
1762
1763 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1764
1765 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
1766 Build_Finalization_Master by supplying an insertion node and enclosing
1767 scope. In its old version, the call did not generate a finalization
1768 master.
1769 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
1770 recognize anonymous access-to-controlled components. Rewrite the
1771 machinery which creates finalization masters to service anonymous
1772 access-to-controlled components of a record type. In its current state,
1773 only one heterogeneous master is necessary to handle multiple anonymous
1774 components.
1775 (Freeze_Type): Comment reformatting.
1776 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
1777 RE_Unit_Table.
1778 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
1779 associates TSS primitive Finalize_Address with either the master itself
1780 or with the internal hash table depending on the mode of operation of
1781 the master.
1782
1783 2011-08-30 Javier Miranda <miranda@adacore.com>
1784
1785 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1786 interface type then do not generate code to compare this component.
1787 Required since they have no components and their equality operator is
1788 abstract.
1789
1790 2011-08-30 Steve Baird <baird@adacore.com>
1791
1792 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1793 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1794 returns the (static) accessibility level of the object. Otherwise, the
1795 same as Type_Access_Level.
1796 (Dynamic_Accessibility_Level): New function; given an expression which
1797 could occur as the rhs of an assignment to a saooaaat (i.e., an
1798 expression of an access-to-object type), return the new value for the
1799 saooaaat's associated Extra_Accessibility object.
1800 (Effective_Extra_Accessibility): New function; same as
1801 Einfo.Extra_Accessibility except that object renames are looked through.
1802 * sem_util.adb
1803 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1804 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1805 description.
1806 (Effective_Extra_Accessibility): New function; see sem_util.ads
1807 description.
1808 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1809 (Extra_Accessibility): Update comments.
1810 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1811 except RM_Size field (which is only for types) is unaffected.
1812 * einfo.adb
1813 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1814 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1815 formals.
1816 (Init_Size): Add assertion that we are not trashing the
1817 Extra_Accessibility attribute of an object.
1818 (Init_Size_Align): Add assertion that we are not trashing the
1819 Extra_Accessibility attribute of an object.
1820 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1821 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1822 differently for the type of a (non-library-level) saooaaat depending
1823 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1824 is queried in this set of changes - everything else (in particular,
1825 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1826 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1827 The special treatment of library-level saooaaats is an optimization,
1828 not required for correctnesss. This is based on the observation that the
1829 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1830 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1831 * exp_ch3.adb
1832 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1833 false for the type of a saooaaat, declare and initialize its
1834 accessibility level object and set the Extra_Accessibility attribute
1835 of the saooaaat to refer to this object.
1836 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1837 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1838 calls to Effective_Extra_Accessibility in order to support
1839 renames of saooaaats.
1840 (Expand_N_Type_Conversion): Add new local function,
1841 Has_Extra_Accessibility, and call it when determining whether an
1842 accessibility check is needed.
1843 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1844 evaluate to True (without raising an exception).
1845 * exp_ch5.adb
1846 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1847 saooaaat, update its associated Extra_Accessibility object (if
1848 it has one). This includes an accessibility check.
1849 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1850 a saooaaat, update its Extra_Accessibility object too (if it
1851 has one).
1852 (Expand_Call): Replace a couple of calls to Type_Access_Level
1853 with calls to Dynamic_Access_Level to handle cases where
1854 passing a literal (any literal) is incorrect.
1855 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1856 checks associated with "Saooaat := Some_Object'Access;"; this must
1857 be rejected if Some_Object is declared in a more nested scope
1858 than Saooaat.
1859 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1860 assignment to a saooaaat even if Is_Local_Anonymous_Access
1861 returns False for its type (indicating a 2012-style saooaaat).
1862 * sem_ch8.adb
1863 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1864 (which is only appropriate for objects, not types) with a call
1865 of Init_Object_Size_Align in order to avoid trashing the
1866 Extra_Accessibility attribute of a rename (the two attributes
1867 share storage).
1868 * sem_res.adb
1869 (Valid_Conversion) Replace six calls to Type_Access_Level with
1870 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1871 Ada2012 non-library-level saooaaat, the former returns library level
1872 while the latter returns the (static) accessibility level of the
1873 saooaaat. A type conversion to the anonymous type of a saooaaat
1874 can only occur as part of an assignment to the saooaaat, so we
1875 know that such a conversion must be in a lhs context, so Deepest
1876 yields the result that we need. If such a conversion could occur,
1877 say, as the operand of an equality operator, then this might not
1878 be right. Also add a test so that static accessibilty checks are
1879 performed for converting to a saooaaat's type even if
1880 Is_Local_Anonymous_Access yields False for the type.
1881
1882 2011-08-30 Javier Miranda <miranda@adacore.com>
1883
1884 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1885 controls generation of a warning associated with late declaration of
1886 dispatching functions. Required to avoid generating spurious
1887 warnings.
1888
1889 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1890
1891 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1892 return object has an anonymous access type and the function's type is
1893 a named access type.
1894 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1895 conversions on implicit conversions, since such conversions can occur
1896 for anonymous access cases due to expansion. Issue error for attempt
1897 to rename an anonymous expression as an object of a named access type.
1898 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1899 to indicate whether this function should report errors on invalid
1900 conversions.
1901 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1902 the expression is of an anonymous access type and the expected type is
1903 a named general access type, rewrite the expression as a type
1904 conversion, unless this is an expression of a membership test.
1905 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1906 calling of Error_Msg_N on new formal Report_Errs.
1907 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1908 calling of Error_Msg_NE on new formal Report_Errs.
1909 (Valid_Conversion): Move declaration of this function to the package
1910 spec, to allow calls from membership test processing. For Ada 2012,
1911 enforce legality restrictions on implicit conversions of anonymous
1912 access values to general access types, disallowing such conversions in
1913 cases where the expression has a dynamic accessibility level (access
1914 parameters, stand-alone anonymous access objects, or a component of a
1915 dereference of one of the first two cases).
1916 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1917 in the context of a named general access expected type.
1918 * exp_ch4.adb Add with and use of Exp_Ch2.
1919 (Expand_N_In): Add processing for membership tests applied to
1920 expressions of an anonymous access type. First, Valid_Conversion is
1921 called to check whether the test is statically False, and then the
1922 conversion is expanded to test that the expression's accessibility
1923 level is no deeper than that of the tested type. In the case of
1924 anonymous access-to-tagged types, a tagged membership test is applied
1925 as well.
1926 (Tagged_Membership): Extend to handle access type cases, applying the
1927 test to the designated types.
1928 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1929 accessibility level, and the actual is a 'Access applied to a current
1930 instance, pass the accessibility level of the type of the current
1931 instance rather than applying Object_Access_Level to the prefix. Add a
1932 ??? comment, since this level isn't quite right either (will eventually
1933 need to pass an implicit level parameter to init procs).
1934
1935 2011-08-30 Bob Duff <duff@adacore.com>
1936
1937 * s-taskin.ads: Minor comment fix.
1938
1939 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1940
1941 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1942 component and the selector is a dispatching operation, check if it is
1943 a prefixed call before rewriting as a parameterless function call.
1944
1945 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1946
1947 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1948 tsystem.h into $(RTSDIR) instead of rts.
1949
1950 2011-08-29 Robert Dewar <dewar@adacore.com>
1951
1952 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1953 reformatting.
1954 * gcc-interface/Make-lang.in: Update dependencies.
1955
1956 2011-08-29 Yannick Moy <moy@adacore.com>
1957
1958 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1959 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1960 table to hold dereferences.
1961 (Add_ALFA_Xrefs): Take into account dereferences as special
1962 reads/writes to the variable "HEAP".
1963 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1964 (Generate_Dereference): New procedure to store a read/write dereferencew
1965 in the table Drefs.
1966 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1967 the special "HEAP" var.
1968 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1969 in ALFA mode.
1970 * sem_util.adb (Note_Possible_Modification): Store write dereference
1971 in ALFA mode.
1972
1973 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1974
1975 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1976 ensures that the level of the subpool access type is not deeper than
1977 that of the pool object.
1978 * sem_util.adb (Object_Access_Level): Expand to handle defining
1979 identifiers.
1980 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1981 subpool handle name of a rewritten allocator.
1982
1983 2011-08-29 Robert Dewar <dewar@adacore.com>
1984
1985 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1986
1987 2011-08-29 Thomas Quinot <quinot@adacore.com>
1988
1989 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1990 values, we generate multiple triples of parameters in the TypeCode.
1991 Bump Choice_Index for each such triple so that a subsequent default
1992 choice is associated with the correct index in the typecode.
1993
1994 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1995
1996 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1997 container.
1998 (First, Last): Handle properly an iterator over a null container.
1999
2000 2011-08-29 Bob Duff <duff@adacore.com>
2001
2002 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
2003 processing if we run across a node with no Scope. This can happen if
2004 we're with-ing an library-level instance, and that instance got errors
2005 that caused "instantiation abandoned".
2006 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
2007 an exception instead of using Assert, so it won't go into an infinite
2008 loop, even when assertions are turned off.
2009
2010 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2011
2012 * a-coorse.adb: Proper handling of empty ordered sets.
2013
2014 2011-08-29 Johannes Kanig <kanig@adacore.com>
2015
2016 * debug.adb: Add comments.
2017
2018 2011-08-29 Thomas Quinot <quinot@adacore.com>
2019
2020 * a-except.adb, a-except-2005.adb: Minor comment rewording and
2021 reformatting.
2022
2023 2011-08-29 Yannick Moy <moy@adacore.com>
2024
2025 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
2026 declaration for Itypes in Alfa mode.
2027
2028 2011-08-29 Robert Dewar <dewar@adacore.com>
2029
2030 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
2031 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2032 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
2033 reformatting.
2034
2035 2011-08-29 Tristan Gingold <gingold@adacore.com>
2036
2037 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
2038 package spec.
2039 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
2040 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
2041 while raising PE.
2042
2043 2011-08-29 Robert Dewar <dewar@adacore.com>
2044
2045 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
2046
2047 2011-08-29 Javier Miranda <miranda@adacore.com>
2048
2049 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
2050 renamings of formal subprograms when the actual for a formal type is
2051 class-wide.
2052
2053 2011-08-29 Matthew Heaney <heaney@adacore.com>
2054
2055 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
2056 to Target.
2057
2058 2011-08-29 Matthew Heaney <heaney@adacore.com>
2059
2060 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
2061 components of record type.
2062 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
2063 to Target.
2064
2065 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2066
2067 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
2068 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
2069 container packages.
2070
2071 2011-08-29 Robert Dewar <dewar@adacore.com>
2072
2073 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
2074 reformatting.
2075
2076 2011-08-29 Matthew Heaney <heaney@adacore.com>
2077
2078 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
2079 components of record type.
2080
2081 2011-08-29 Bob Duff <duff@adacore.com>
2082
2083 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
2084 by the termination handler.
2085
2086 2011-08-29 Yannick Moy <moy@adacore.com>
2087
2088 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
2089 created in Alfa mode, instead of inserting artificial declarations of
2090 non-Itypes in the tree.
2091 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
2092 know if an Itype has a corresponding declaration, as defined in
2093 itypes.ads.
2094
2095 2011-08-29 Yannick Moy <moy@adacore.com>
2096
2097 * gnat1drv.adb: Minor rewrite.
2098
2099 2011-08-29 Bob Duff <duff@adacore.com>
2100
2101 * s-tasuti.adb (Make_Passive): Work around race condition in
2102 Make_Independent, which can cause Wait_Count to be zero. So instead of
2103 asserting that Wait_Count > 0, and then decrementing it, decrement it
2104 only if Wait_Count > 0.
2105 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
2106 should be nonnegative, so declare them Natural instead of Integer.
2107
2108 2011-08-29 Robert Dewar <dewar@adacore.com>
2109
2110 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
2111 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
2112 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
2113 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
2114 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
2115
2116 2011-08-29 Tristan Gingold <gingold@adacore.com>
2117
2118 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
2119
2120 2011-08-29 Vadim Godunko <godunko@adacore.com>
2121
2122 * s-parint.ads: Minor comment clarification.
2123
2124 2011-08-29 Vincent Celier <celier@adacore.com>
2125
2126 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
2127 may be used as identifiers.
2128
2129 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2130
2131 * a-coinho.ads: Minor reformating.
2132
2133 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2134
2135 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
2136 container of a derived type.
2137
2138 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2139
2140 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
2141 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
2142
2143 2011-08-29 Pascal Obry <obry@adacore.com>
2144
2145 * exp_disp.adb: Minor comment fix.
2146 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
2147 to avoid warnings when compiling with -Wall.
2148 (Make_Disp_Conditional_Select_Body): Likewise.
2149 (Make_Disp_Timed_Select_Body): Likewise.
2150
2151 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2152
2153 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
2154 an entity name, generate reference for it.
2155
2156 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2157
2158 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
2159 iterator form.
2160 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
2161 the class-wide type.
2162 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
2163
2164 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2165
2166 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
2167 subtype for an object whose type is an unconstrained union.
2168
2169 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2170
2171 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
2172 is allowed in a component definition, by AI95-406.
2173
2174 2011-08-29 Matthew Heaney <heaney@adacore.com>
2175
2176 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
2177
2178 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2179
2180 * a-except-2005.adb: Alphabetize all routines.
2181 (Triggered_By_Abort): New routine.
2182 * a-except-2005.ads (Triggered_By_Abort): New routine.
2183 * a-except.adb Alphabetize all routines.
2184 (Triggered_By_Abort): New routine.
2185 * a-except.ads (Triggered_By_Abort): New routine.
2186 * exp_ch7.adb: Update all comments involving the detection of aborts in
2187 finalization code.
2188 (Build_Object_Declarations): Do not generate code to detect the
2189 presence of an abort at the start of finalization code, use a runtime
2190 routine istead.
2191 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
2192 RE_Unit_Table.
2193 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
2194 allocate a task on a subpool.
2195 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
2196 The flag disables all actions related to the maintenance of
2197 Finalize_Address_Table when subpools are not in use.
2198 (Allocate_Any_Controlled): Signal the machinery that subpools are in
2199 use.
2200 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
2201 performs costly task locking when subpools are not in use.
2202
2203 2011-08-29 Yannick Moy <moy@adacore.com>
2204
2205 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
2206 types and dispatching calls in Alfa mode.
2207 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
2208 correspondance between body and spec scopes, to reuse utility functions
2209 (Traverse_Declarations_Or_Statements): Protect access to body for stub
2210 by testing the presence of the library unit for the body
2211 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
2212 mode the expansion of accept statements is skipped
2213 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
2214 the unique entity corresponding to the one returned by
2215 Unique_Defining_Entity applied to the enclosing declaration of the
2216 argument.
2217
2218 2011-08-29 Bob Duff <duff@adacore.com>
2219
2220 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
2221 gdb when x is not a node (it can be a node list, name_id, etc). pp is
2222 an alias for pn. ppp is an alias for pt.
2223
2224 2011-08-29 Javier Miranda <miranda@adacore.com>
2225
2226 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
2227 aggregate to take a consistent decision on the need to convert into
2228 assignments aggregates that initialize constant objects.
2229
2230 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2231
2232 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
2233 Build_Allocate_Deallocate_Proc in order to handle allocation of
2234 non-controlled objects on subpools.
2235 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
2236 to be end-user visible.
2237 * s-finmas.adb: Add with and use clause for System.HTable.
2238 Add an instantiation of Simple_HTable which provides a mapping between
2239 the address of a controlled object and the corresponding
2240 Finalize_Address used to clean up the object. The table is used when a
2241 master is operating in heterogeneous mode.
2242 (Attach): Explain why the input node is not verified on being already
2243 attached.
2244 (Delete_Finalize_Address): New routine.
2245 (Detach): Add pragma Assert which ensures that a node is already
2246 attached.
2247 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
2248 since nodes are no longer removed on traversal. Explain why node
2249 detachment is undesirable in this case.
2250 (Get_Finalize_Address): New routine.
2251 (Hash): New routine.
2252 (Is_Empty_List): Removed.
2253 (pm): Renamed to Print_Master. Add output for discriminant
2254 Is_Homogeneous.
2255 Comment reformatting.
2256 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
2257 * s-finmas.ads: Various comments additions / improvements.
2258 Type Finalization_Master has a discriminant which determines the mode of
2259 operation.
2260 (Delete_Finalize_Address): New routine.
2261 (Get_Finalize_Address): New routine.
2262 (pm): Renamed to Print_Master.
2263 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
2264 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
2265 use clause for System.IO.
2266 (Allocate_Any_Controlled): Add machinery to set TSS primitive
2267 Finalize_Address depending on the mode of allocation and the mode of
2268 the master.
2269 (Deallocate_Any_Controlled): Remove the relation pair object -
2270 Finalize_Address regardless of the master mode. Add comment explaining
2271 the reason.
2272 (Detach): Ensure that fields Prev and Next are null after detachment.
2273 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
2274 scheme to check whether the list of subpools is empty. There is no
2275 longer need to store the next subpool or advance the current pointer.
2276 (Is_Empty_List): New routine.
2277 (Print_Pool): New routine.
2278 (Print_Subpool): New routine.
2279 * s-stposu.ads: Various comments additions / improvements.
2280 Field Master of type Root_Subpool is now a heterogeneous collection.
2281 (Print_Pool): New routine.
2282 (Print_Subpool): New routine.
2283
2284 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2285
2286 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
2287 forms, using aspects of container types.
2288 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
2289 Has_Implicit_Dereference flags, that may be set on the partial view.
2290 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
2291 container type with an indexing aspect.
2292 (Analyze_Quantified_Expression): Analyze construct with expansion
2293 disabled, because it will be rewritten as a loop during expansion.
2294 (Try_Container_Indexing): The prefix itself may be a container type
2295 with an indexing aspect, as with a vector of vectors.
2296 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
2297 the original doamin of iteration, for name capture.
2298 (Analyze_Iterator_Specification): If the domain is an expression that
2299 needs finalization, create a separate declaration for it.
2300 For an iterator with "of" retrieve default iterator info from aspect of
2301 container type. For "in" iterator, retrieve type of Iterate function.
2302 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
2303 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
2304 analysis, to prevent spurious errors about late attributes.
2305 * sprint.adb: Handle quantified expression with either loop or iterator
2306 specification.
2307 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
2308 iterator.
2309
2310 2011-08-29 Vincent Celier <celier@adacore.com>
2311
2312 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
2313 Binder or Linker of the main project file.
2314
2315 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2316
2317 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
2318 unit.
2319
2320 2011-08-29 Yannick Moy <moy@adacore.com>
2321
2322 * exp_ch9.adb: Partial revert of previous change for Alfa mode
2323
2324 2011-08-29 Yannick Moy <moy@adacore.com>
2325
2326 * exp_ch11.adb: Minor expansion of comment.
2327
2328 2011-08-29 Yannick Moy <moy@adacore.com>
2329
2330 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
2331
2332 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2333
2334 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
2335 interpretation, set the type before resolving the operands, because
2336 legality checks on an exponention operand need to know the type of the
2337 context.
2338
2339 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2340
2341 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
2342 cleanups on a master if the instance is within a generic unit.
2343 Complement to the corresponding fix to inline.adb for K520-030.
2344
2345 2011-08-29 Tristan Gingold <gingold@adacore.com>
2346
2347 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
2348 occurrence.
2349 * exp_intr.adb: Minor comment fix.
2350
2351 2011-08-29 Bob Duff <duff@adacore.com>
2352
2353 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
2354 Delay_Required was used as an uninitialized variable.
2355
2356 2011-08-29 Robert Dewar <dewar@adacore.com>
2357
2358 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
2359 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
2360 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
2361
2362 2011-08-29 Thomas Quinot <quinot@adacore.com>
2363
2364 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
2365 Remove unused variables.
2366
2367 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2368
2369 * sem_res.adb: Remove Build_Explicit_Dereference.
2370 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
2371 from sem_res.adb, used in analysis of additional constructs.
2372 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
2373 expansion of iterators.
2374 (Is_Object_Reference): Recognize variables rewritten as explicit
2375 dereferences in Ada2012.
2376 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
2377 Reversible_Iterator names, for expansion of Ada2012 iterators.
2378 * aspects.ads, aspects.adb (Find_Aspect): Utility.
2379 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
2380 linked list container.
2381 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
2382 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
2383
2384 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2385
2386 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
2387 containers.
2388
2389 2011-08-29 Vincent Celier <celier@adacore.com>
2390
2391 * make.adb (Gnatmake): Get the maximum number of simultaneous
2392 compilation processes after the Builder switches has been scanned, as
2393 there may include -jnn.
2394
2395 2011-08-29 Matthew Heaney <heaney@adacore.com>
2396
2397 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
2398
2399 2011-08-29 Tristan Gingold <gingold@adacore.com>
2400
2401 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
2402 GNAT_DRIVER_COMMAND_LINE to 255.
2403
2404 2011-08-29 Pascal Obry <obry@adacore.com>
2405
2406 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
2407 reformatting and style fix (class attribute casing).
2408
2409 2011-08-29 Yannick Moy <moy@adacore.com>
2410
2411 * exp_ch11.adb: Yet another case where expansion should be common
2412 between CodePeer and Alfa.
2413
2414 2011-08-29 Yannick Moy <moy@adacore.com>
2415
2416 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
2417
2418 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2419
2420 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
2421 incomplete type and its completion match.
2422
2423 2011-08-29 Yannick Moy <moy@adacore.com>
2424
2425 * exp_ch13.adb: Adjust previous change.
2426
2427 2011-08-29 Robert Dewar <dewar@adacore.com>
2428
2429 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
2430 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
2431 Minor reformatting.
2432
2433 2011-08-29 Emmanuel Briot <briot@adacore.com>
2434
2435 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
2436 initialize aggregated projects.
2437
2438 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2439
2440 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
2441 depth of candidates to resolve a potentially spurious ambiguity between
2442 two visible subprograms.
2443
2444 2011-08-29 Yannick Moy <moy@adacore.com>
2445
2446 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
2447 Requires/Ensures.
2448 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
2449 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
2450 Requires/Ensures.
2451
2452 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2453
2454 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
2455 Add comment.
2456
2457 2011-08-29 Thomas Quinot <quinot@adacore.com>
2458
2459 * sem_res.adb: Minor reformatting.
2460
2461 2011-08-29 Johannes Kanig <kanig@adacore.com>
2462
2463 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
2464 mode.
2465 * gnat1drv.adb (Adjust_Global_Switches): Set
2466 Use_Expressions_With_Actions to False in ALFA mode.
2467 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
2468 ALFA mode.
2469
2470 2011-08-29 Yannick Moy <moy@adacore.com>
2471
2472 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
2473 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
2474 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
2475 tagged types and dispatching calls in Alfa mode.
2476
2477 2011-08-29 Javier Miranda <miranda@adacore.com>
2478
2479 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
2480 we do not report an error on an Empty node.
2481
2482 2011-08-29 Geert Bosch <bosch@adacore.com>
2483
2484 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
2485 a-nlrear.o and a-nurear.o.
2486
2487 2011-08-29 Robert Dewar <dewar@adacore.com>
2488
2489 * freeze.adb: Minor code reorganization.
2490 Minor reformatting.
2491 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
2492 sem_ch6.adb: Minor reformatting
2493
2494 2011-08-29 Tristan Gingold <gingold@adacore.com>
2495
2496 * s-except.ads, s-except.adb: Provide dummy body.
2497
2498 2011-08-29 Yannick Moy <moy@adacore.com>
2499
2500 * sem_warn.adb (Within_Postcondition): Take into account the case of
2501 an Ensures component in a Test_Case.
2502
2503 2011-08-29 Tristan Gingold <gingold@adacore.com>
2504
2505 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
2506 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
2507 System_Exceptions_Debug
2508 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
2509 * a-except.adb: With and use System.Exceptions_Debug instead of
2510 System.Exceptions.
2511 * a-except-2005.adb: Likewise.
2512 * s-assert.adb: Likewise.
2513 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
2514 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
2515 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
2516 s-excdeb. Update dependencies.
2517 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
2518 as these no longer need external libraries.
2519
2520 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2521
2522 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
2523 exponentiation operator on universal values in a context that requires
2524 a fixed-point type.
2525
2526 2011-08-29 Tristan Gingold <gingold@adacore.com>
2527
2528 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
2529 before calling notify_handled_exception.
2530 * a-exextr.adb: Fix comment.
2531
2532 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2533
2534 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
2535 Finalize_Address of the access type's finalization master.
2536 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
2537 access type's finalization master. Add a guard to prevent
2538 Associated_Storage_Pool from being set on .NET/JVM.
2539 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
2540 attribute Finalize_Address of the access type's finalization master.
2541 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
2542 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
2543 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
2544 RE_Unit_Table.
2545 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
2546 use clause for System.IO
2547 (Detach): Relax the assertion, to be reinstated later.
2548 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
2549 Relax the assertion on Finalize_Address, to be reinstated later.
2550 (Is_Empty_List): New routine.
2551 (pm): New debug routine.
2552 (Set_Finalize_Address): New routine.
2553 * s-finmas.ads (pm): New debug routine.
2554 (Set_Finalize_Address): New routine.
2555 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2556
2557 2011-08-29 Tristan Gingold <gingold@adacore.com>
2558
2559 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
2560 Remove convention C.
2561
2562 2011-08-29 Tristan Gingold <gingold@adacore.com>
2563
2564 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
2565 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
2566 (Finalize_TCB): Remove its finalization.
2567 (Initialize): Remove assignment of GET_Exc_Stack_Addr
2568 * s-soflin.adb (NT_Exc_Stack): Remove
2569 (Get_Exc_Stack_Addr_NT): Likewise.
2570 (Get_Exc_Stack_Addr_Soft): Likewise.
2571 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
2572 (Get_Exc_Stack_Addr): Likewise.
2573 (Get_Exc_Stack_Addr_Soft): Likewise
2574 * s-taspri-vms.ads (Exc_Stack_T): Remove.
2575 (Exc_Stack_Ptr_T): Likewise.
2576 (Private_Data): Remove Exc_Stack_Ptr component.
2577
2578 2011-08-29 Tristan Gingold <gingold@adacore.com>
2579
2580 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
2581
2582 2011-08-29 Tristan Gingold <gingold@adacore.com>
2583
2584 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2585
2586 2011-08-29 Geert Bosch <bosch@adacore.com>
2587
2588 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
2589 L2_Norm, Swap_Column): New generic subprograms
2590 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
2591 L2_Norm, Swap_Column): Implement new subprograms in order to
2592 eliminate dependency on BLAS and LAPACK libraries in
2593 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
2594 version. Forward_Eliminate/Back_Substitute can be used to put a
2595 matrix in row echelon or reduced row echelon form using partial
2596 pivoting.
2597 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
2598 Swap_Column): Instantiate from System.Generic_Array_Operations.
2599 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
2600 (Sqrt): Local function for simple computation of square root without
2601 adding dependencies on Generic_Elementary_Functions.
2602 (Swap): New subprogram to exchange floating point numbers.
2603 (Inverse): Reimplement using Jordan-Gauss elimination.
2604 (Jacobi): New procedure implementing Jacobi's method for computation
2605 of eigensystems, based on Rutishauser's implementation.
2606 (L2_Norm): Implement directly using the inner product.
2607 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
2608 decreasing eigenvalue as required by the Ada RM.
2609 (Swap_Column): New helper procedure for Sort_Eigensystem.
2610 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
2611 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
2612 Sort_Eigensystems.
2613
2614 2011-08-29 Thomas Quinot <quinot@adacore.com>
2615
2616 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
2617 statements line.
2618
2619 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2620
2621 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
2622 than the current node.
2623 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
2624 Finalization_Master. The list headers have two fields instead of three.
2625 This should fix alignment issue but subpool allocations are now
2626 unusable. Alphabetize subprograms.
2627 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
2628 the size of the header when converting the beginning of the object to
2629 a FM_Node. Set the master's Finalize_Address attribute if not already
2630 set.
2631 (Deallocate_Any_Controlled): Use the offset rather than the size of the
2632 header when converting the beginning of the object to a FM_Node.
2633
2634 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2635
2636 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
2637 reraise when compiling for CodePeer.
2638
2639 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2640
2641 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
2642 now needed by a-convec.adb. Fix warning.
2643
2644 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2645
2646 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
2647 processing of TSS routine Finalize_Address when compiling in
2648 CodePeer_Mode.
2649
2650 2011-08-29 Thomas Quinot <quinot@adacore.com>
2651
2652 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
2653 sem_warn.adb: Minor reformatting.
2654
2655 2011-08-29 Emmanuel Briot <briot@adacore.com>
2656
2657 * prj-conf.adb (Get_Config_Switches): Also collect the list of
2658 languages from aggregated projects.
2659
2660 2011-08-29 Yannick Moy <moy@adacore.com>
2661
2662 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
2663 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2664 Traverse_Package_Declaration, Traverse_Subprogram_Body,
2665 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
2666 for stubs are traversed too when parameter is set
2667 (Traverse_All_Compilation_Units): Traverse without going inside stubs
2668 (Traverse_Declarations_Or_Statements): Do the special traversing for
2669 stubs when required.
2670 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
2671 return subprogram or package body from stub.
2672 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
2673 stubs without prior subprogram decl.
2674
2675 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2676
2677 * gnat_ugn.texi: Fix typo.
2678
2679 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2680
2681 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
2682 which accounts for size vs alignment issues and calculates the size of
2683 the list header.
2684 (Deallocate_Any_Controlled): Ditto.
2685 (Nearest_Multiple_Rounded_Up): New routine.
2686
2687 2011-08-29 Tristan Gingold <gingold@adacore.com>
2688
2689 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
2690 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
2691 (Set_Exception_Msg): Ditto.
2692 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
2693 Private_Data.
2694 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
2695 Use Save_Occurrence instead of Save_Occurrence_No_Private.
2696 (Raise_With_Msg): Remove Cleanup_Flag.
2697 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
2698 Clean_Flag and Private_Data components.
2699
2700 2011-08-29 Yannick Moy <moy@adacore.com>
2701
2702 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
2703 in CodePeer mode.
2704 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
2705 of an explicitly declared type, so that the base types of the original
2706 type and this generated type are the same, and a "type" (not a subtype
2707 like previously).
2708 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
2709 small" in Alfa mode, like in CodePeer mode.
2710 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
2711 clauses in Alfa mode.
2712
2713 2011-08-29 Javier Miranda <miranda@adacore.com>
2714
2715 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
2716 function to the package spec.
2717 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
2718 internally generated bodies of null procedures locate the internally
2719 generated spec enforcing mode conformance.
2720 (Is_Interface_Conformant): Ensure that the controlling formal of the
2721 primitives match.
2722
2723 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2724
2725 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
2726 reject the pragma if it appears to apply to a formal subprogram.
2727
2728 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2729
2730 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
2731 inner expression, to prevent double evaluation.
2732
2733 2011-08-29 Tristan Gingold <gingold@adacore.com>
2734
2735 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
2736 they were unused.
2737 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
2738 * a-except-2005.adb (Propagate_Exception): Adjust spec.
2739 (Raise_Current_Excep): Adjust call.
2740 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
2741
2742 2011-08-29 Thomas Quinot <quinot@adacore.com>
2743
2744 * exp_disp.adb: Minor reformatting.
2745
2746 2011-08-29 Tristan Gingold <gingold@adacore.com>
2747
2748 * a-exexpr.adb (Setup_Exception): Removed.
2749 * a-exexpr-gcc.adb (Setup_Exception): Removed.
2750 * a-except.adb (Exception_Propagation): Removed.
2751 * a-except-2005.adb (Setup_Exception): Removed.
2752 (Reraise): Remove call to Setup_Exception.
2753 (Reraise_Occurrence): Ditto.
2754 (Reraise_Occurrence_Always): Ditto.
2755 (Reraise_Occurrence_No_Defer): Ditto.
2756 (Transfer_Occurrence): Ditto.
2757 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
2758 (Set_Exception_Msg): Ditto.
2759
2760 2011-08-29 Robert Dewar <dewar@adacore.com>
2761
2762 * a-convec.adb, exp_disp.adb: Minor reformatting.
2763
2764 2011-08-29 Tristan Gingold <gingold@adacore.com>
2765
2766 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
2767
2768 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2769
2770 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
2771 Exception_Handlers to No_List instead of Empty_List in the case where
2772 there are no handlers.
2773
2774 2011-08-29 Tristan Gingold <gingold@adacore.com>
2775
2776 * gcc-interface/gigi.h (enum standard_datatypes): Add
2777 ADT_reraise_zcx_decl
2778 (reraise_zcx_decl): New macro.
2779 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
2780 (gigi): Set reraise_zcx_decl.
2781 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2782 (gnat_to_gnu): Handle N_Raise_Statement.
2783
2784 2011-08-29 Robert Dewar <dewar@adacore.com>
2785
2786 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2787 a-undesu.adb: Minor reformatting.
2788
2789 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2790
2791 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2792 table, accept an unfrozen untagged component if it is an actual for a
2793 formal incomplete type.
2794 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2795 provide new iterator forms over vectors.
2796 Introduce type Iterator in package body to implement operations of
2797 Reversible_Iterator interface.
2798 * a-iteint.ads: Make package pure so it is usable with new container
2799 packages, that are categorized Remote_Types.
2800
2801 2011-08-29 Robert Dewar <dewar@adacore.com>
2802
2803 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2804
2805 2011-08-29 Bob Duff <duff@adacore.com>
2806
2807 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2808 of <>, because this is the routine that checks for dimensionality
2809 errors (for example, for a two-dimensional array, (others => <>) should
2810 be (others => (others => <>)).
2811
2812 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2813
2814 * impunit.adb: Add new run-time units.
2815 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2816 s-stposu.ads, s-stposu.adb: Code clean up.
2817 Handle protected class-wide or task class-wide types
2818 Handle C/C++/CIL/Java types.
2819 * s-spsufi.adb, s-spsufi.ads: New files.
2820
2821 2011-08-29 Yannick Moy <moy@adacore.com>
2822
2823 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2824 library-level subprogram.
2825 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2826 placement.
2827 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2828 component.
2829 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2830 component.
2831 * gnat_rm.texi: Update doc for Test_Case pragma.
2832
2833 2011-08-29 Tristan Gingold <gingold@adacore.com>
2834
2835 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2836 convention C.
2837 (GCC_Exception_Access): New type.
2838 (Unwind_DeleteException): New imported procedure
2839 (Foreign_Exception): Import it.
2840 (GNAT_GCC_Exception): Simply have the occurrence inside.
2841 (To_GCC_Exception): New function.
2842 (To_GNAT_GCC_Exception): New function.
2843 (GNAT_GCC_Exception_Cleanup): New procedure..
2844 (Propagate_GCC_Exception): New procedure.
2845 (Reraise_GCC_Exception): New procedure.
2846 (Setup_Current_Excep): New procedure.
2847 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2848 (Unwind_RaiseException): Ditto.
2849 (Unwind_ForcedUnwind): Ditto.
2850 (Remove): Removed.
2851 (Begin_Handler): Change type of parameter.
2852 (End_Handler): Ditto. Now delete the exception if still present.
2853 (Setup_Key): Removed.
2854 (Is_Setup_And_Not_Propagated): Removed.
2855 (Set_Setup_And_Not_Propagated): Ditto.
2856 (Clear_Setup_And_Not_Propagated): Ditto.
2857 (Save_Occurrence_And_Private): Ditto.
2858 (EID_For): Add 'not null' constraint on parameter.
2859 (Setup_Exception): Does nothing.
2860 (Propagate_Exception): Simplified.
2861 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2862 re-raise is not expanded anymore.
2863 * s-except.ads (Foreign_Exception): New exception - placeholder for
2864 non Ada exceptions.
2865 * raise-gcc.c (__gnat_setup_current_excep): Declare
2866 (CXX_EXCEPTION_CLASS): Define (not yet used)
2867 (GNAT_EXCEPTION_CLASS): Define.
2868 (is_handled_by): Handle foreign exceptions.
2869 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2870
2871 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2872
2873 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2874
2875 2011-08-29 Thomas Quinot <quinot@adacore.com>
2876
2877 * a-synbar-posix.adb: Minor reformatting.
2878
2879 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2880
2881 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2882 a-exetim-default.ads (Interrupt_Clocks_Supported,
2883 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2884 definitions to be compliant with AI-0171. The target systems do not
2885 support separate account for the execution time of interrupt handlers.
2886
2887 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2888
2889 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2890 in the barrier to put first the easiest to evaluate (and the one which
2891 will be True more often). More efficient.
2892
2893 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2894
2895 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2896
2897 2011-08-29 Bob Duff <duff@adacore.com>
2898
2899 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2900 attributes that are now aspects, as specified by AI05-0229-1.
2901 * sem_ch13.adb (Analyze_Aspect_Specifications,
2902 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2903 pragmas or attribute references, as appropriate.
2904
2905 2011-08-29 Robert Dewar <dewar@adacore.com>
2906
2907 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2908 a-synbar-posix.ads: Minor reformatting.
2909
2910 2011-08-29 Yannick Moy <moy@adacore.com>
2911
2912 * snames.ads-tmpl: Add name Force.
2913
2914 2011-08-29 Pascal Obry <obry@adacore.com>
2915
2916 * prj-nmsc.adb: Minor reformatting.
2917
2918 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2919
2920 * a-exetim.ads (Interrupt_Clocks_Supported,
2921 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2922 definitions to be compliant with AI-0171.
2923
2924 2011-08-29 Robert Dewar <dewar@adacore.com>
2925
2926 * a-ngelfu.adb: Add comments.
2927
2928 2011-08-29 Geert Bosch <bosch@adacore.com>
2929
2930 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2931 the closest machine number to Pi / 2.0.
2932
2933 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2934
2935 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2936 package Ada.Synchronous_Barriers.
2937 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2938 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2939 default implementation using protected objects and another one
2940 a-synbar-posix using POSIX barriers as the underlying support.
2941 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2942 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2943 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2944 Clean up dependencies.
2945 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2946
2947 2011-08-29 Robert Dewar <dewar@adacore.com>
2948
2949 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2950 exp_dist.adb: Minor code reorganization.
2951 Minor reformatting.
2952
2953 2011-08-29 Thomas Quinot <quinot@adacore.com>
2954
2955 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2956 primitive operation must support external streaming if it is not a
2957 controlling access result.
2958
2959 2011-08-29 Thomas Quinot <quinot@adacore.com>
2960
2961 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2962
2963 2011-08-29 Bob Duff <duff@adacore.com>
2964
2965 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2966 restriction on allocators, as required by AI05-0013-1.
2967 * restrict.ads: Minor comment fix.
2968
2969 2011-08-29 Tristan Gingold <gingold@adacore.com>
2970
2971 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2972 (To_Jmpbuf_Address): Ditto
2973 (builtin_longjmp): Ditto
2974
2975 2011-08-29 Thomas Quinot <quinot@adacore.com>
2976
2977 * sem_res.adb: Minor reformatting.
2978
2979 2011-08-29 Vincent Celier <celier@adacore.com>
2980
2981 * make.adb (Gnatmake): Move special processing for VM targets after the
2982 call to Get_Target_Parameters.
2983
2984 2011-08-29 Thomas Quinot <quinot@adacore.com>
2985
2986 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2987
2988 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2989
2990 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2991 where an anonymous access discriminant of a limited designated type
2992 appears in a non-immutably limited discriminated type and issue an
2993 error message. Add local variable Desig_T and replace all occurrences
2994 of Designated_Type.
2995
2996 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2997
2998 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2999 implementation is compliant to RM D.15(15/2) after the modification
3000 imposed by AI05-0094-1 (binding interpretation).
3001
3002 2011-08-29 Robert Dewar <dewar@adacore.com>
3003
3004 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
3005 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
3006
3007 2011-08-29 Thomas Quinot <quinot@adacore.com>
3008
3009 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
3010 the scope name, do not report a missing label as a style violation (it
3011 will be diagnosed as an illegality).
3012 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
3013 variant records: Get_Enum_Lit_From_Pos already returns a usage
3014 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
3015 on Expr in Integer_Literal case so that it can be used by
3016 Build_To_Any_Call.
3017
3018 2011-08-29 Tristan Gingold <gingold@adacore.com>
3019
3020 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
3021 Adjust comment.
3022 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
3023 (Build_Abort_Block_Handler): New function to build an Abort_Signal
3024 exception handler.
3025 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
3026 Build_Abort_Block_Handler to build the exception handler. Do not
3027 undefer aborts for the Abort_Signal exception handler if back-end
3028 exception mechanism.
3029 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
3030 back_end exceptions for all others and abort_signal.
3031 * s-except.ads (ZCX_By_Default): New constant.
3032 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
3033 (Raise_Exception_Always): Ditto.
3034 (Raise_From_Signal_Handler): Ditto.
3035 (Raise_With_Location_And_Msg): Ditto.
3036 (Raise_With_Msg): Ditto.
3037 (Reraise): Ditto.
3038 (Reraise_Occurence): Ditto.
3039 (Reraise_Occurrence_Always): Ditto.
3040 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
3041 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
3042
3043 2011-08-29 Thomas Quinot <quinot@adacore.com>
3044
3045 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
3046
3047 2011-08-29 Robert Dewar <dewar@adacore.com>
3048
3049 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
3050 Minor code reorganization.
3051
3052 2011-08-29 Bob Duff <duff@adacore.com>
3053
3054 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
3055 2012, not just Ada 2005.
3056
3057 2011-08-29 Vincent Celier <celier@adacore.com>
3058
3059 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
3060 with a project file or with gprbuid, if -gnatep= is specified, the
3061 builder may need to be invoked with -x.
3062
3063 2011-08-29 Tristan Gingold <gingold@adacore.com>
3064
3065 * a-exexpr-gcc.adb: Minor comment fix.
3066
3067 2011-08-29 Robert Dewar <dewar@adacore.com>
3068
3069 * sem_ch8.adb: Minor reformatting.
3070
3071 2011-08-29 Bob Duff <duff@adacore.com>
3072
3073 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
3074 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
3075 treating "some" as unreserved in earlier Ada versions. This is now
3076 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
3077 rather than Name_Some, since Tok_Some is now recognized as reserved.
3078 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
3079 reserved word.
3080 * scans.ads: Minor comment fixes.
3081 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
3082 for other language versions.
3083 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
3084 treating "some" as unreserved in earlier Ada versions. This is now
3085 handled in Snames.Is_Keyword_Name.
3086 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
3087 Ada 2012.
3088 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
3089 unreserved in earlier Ada versions. This is now handled in
3090 Snames.Is_Keyword_Name.
3091 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
3092 words as for other language versions.
3093 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
3094 Ada 2012, not just Ada 2005.
3095
3096 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3097
3098 * sem_ch13.adb: Additional semantic checks for aspects involved in
3099 iterators.
3100
3101 2011-08-29 Matthew Heaney <heaney@adacore.com>
3102
3103 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
3104 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
3105 Container parameter.
3106 (Ancestor_Find): ditto.
3107
3108 2011-08-29 Thomas Quinot <quinot@adacore.com>
3109
3110 * par-endh.adb: Minor reformatting.
3111
3112 2011-08-29 Tristan Gingold <gingold@adacore.com>
3113
3114 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
3115 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
3116 (Adjust_N_CLeanups_For): Remove.
3117 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
3118 stack is reached.
3119 (Propgate_Exception): Adjust.
3120 * raise-gcc.c: Add a few static/const.
3121 (Adjust_N_Cleanups_For): Remove declaration.
3122 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
3123
3124 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3125
3126 * sem_ch8.adb: Use type of function return when rewriting as object
3127 declaration.
3128
3129 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3130
3131 * sem_type.adb: Minor reformatting.
3132
3133 2011-08-29 Robert Dewar <dewar@adacore.com>
3134
3135 * makeutl.adb: Minor reformatting.
3136
3137 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3138
3139 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
3140 function call of a limited type, the expansion of the renaming is
3141 complicated by the presence of various temporaries and subtypes that
3142 capture constraints of the renamed object.
3143 Rewrite node as an object declaration, whose expansion is simpler.
3144 Given that the object is limited there is no copy involved and no
3145 performance hit.
3146
3147 2011-08-29 Robert Dewar <dewar@adacore.com>
3148
3149 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
3150 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
3151
3152 2011-08-29 Tristan Gingold <gingold@adacore.com>
3153
3154 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
3155 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
3156 system-linux-hppa.ads, system-linux-s390.ads,
3157 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
3158 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
3159 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
3160 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
3161 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
3162 system-solaris-sparc.ads, system-lynxos-x86.ads,
3163 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
3164 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
3165 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
3166 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
3167 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
3168 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
3169 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
3170 * opt.ads: Adjust comment.
3171 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
3172 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
3173 * system.ads: Move GCC_ZCX_Support to obsolete entries.
3174
3175 2011-08-29 Emmanuel Briot <briot@adacore.com>
3176
3177 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
3178 file name is specified on the gnatmake or gprbuild command line, and
3179 before we search for that file in the project.
3180
3181 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3182
3183 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
3184 used to determine whether a possible interpretation for an overloadable
3185 entity is declared within the current instantiation and should be
3186 included in the candidate set.
3187
3188 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3189
3190 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
3191
3192 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3193
3194 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
3195 access subtype is access_to_subprogram, when applying checks for
3196 RM 3.10.2 (27).
3197
3198 2011-08-29 Matthew Heaney <heaney@adacore.com>
3199
3200 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
3201 for sibling when common parent.
3202
3203 2011-08-29 Thomas Quinot <quinot@adacore.com>
3204
3205 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
3206 "pragma_".
3207
3208 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3209
3210 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
3211 for the return type when in ASIS mode.
3212
3213 2011-08-29 Vincent Celier <celier@adacore.com>
3214
3215 * make.adb (Gnatmake): Get the default search dirs, then the target
3216 parameters after getting the Builder switches, as the Builder switches
3217 may include --RTS= and that could change the default search dirs.
3218
3219 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3220
3221 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
3222 Make_Final_Call. Move the processing for class-wide types before the
3223 processing for derivations from [Limited_]Controlled.
3224 (Make_Final_Call): Move the processing for class-wide types before the
3225 processing for derivations from [Limited_]Controlled.
3226 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
3227 Add code to account for alignments larger than the list header. Add a
3228 comment illustrating the structure of the allocated object + padding +
3229 header.
3230 (Deallocate_Any_Controlled): Add code to account for alignments larger
3231 than the list header.
3232
3233 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3234
3235 * sinfo.ads, sinfo.adb: New node kind
3236 N_Formal_Incomplete_Type_Definition, related flags.
3237 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
3238 Parse formal incomplete types.
3239 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
3240 sem_ch12.
3241 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
3242 Formal incomplete types do not need completion.
3243 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
3244 Validate_Incomplete_Type_Instance): New procedures to handle formal
3245 incomplete types.
3246 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
3247 that corresponds to a formal incomplete type.
3248 * sprint.adb: Handle formal incomplete type declarations.
3249 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
3250 an insertion point.
3251
3252 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3253
3254 * a-fihema.ads, a-fihema.adb: Unit removed.
3255 * a-undesu.ads, a-undesu.adb: New unit implementing
3256 Ada.Unchecked_Deallocate_Subpool.
3257 * einfo.adb: Remove Associated_Collection from the node usage.
3258 Add Finalization_Master to the node usage.
3259 (Associated_Collection): Removed.
3260 (Finalization_Master): New routine.
3261 (Set_Associated_Collection): Removed.
3262 (Set_Finalization_Master): New routine.
3263 (Write_Field23_Name): Remove Associated_Collection from the output. Add
3264 Finalization_Master to the output.
3265 * einfo.ads: Remove attribute Associated_Collection and its uses in
3266 entities.
3267 Add new attribute Finalization_Master along with its uses in entitites.
3268 (Associated_Collection): Removed along with its pragma import.
3269 (Finalization_Master): New routine along with a pragma import.
3270 (Set_Associated_Collection): Removed along with its pragma import.
3271 (Set_Finalization_Master): New routine along with a pragma import.
3272 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
3273 Build_Finalization_Collection with Build_Finalization_Master.
3274 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
3275 before the bodies of the predefined routines. Add comment explaining
3276 this. Replace call to Build_Finalization_Collection with
3277 Build_Finalization_Master.
3278 (Freeze_Type): Replace call to Build_Finalization_Collection with
3279 Build_Finalization_Master.
3280 (Make_Finalize_Address_Body): Comment reformatting.
3281 (Make_Predefined_Primitive_Specs): Code reformatting.
3282 (Stream_Operation_OK): Update comment mentioning finalization
3283 collections. Replace RE_Finalization_Collection with
3284 RE_Finalization_Master.
3285 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
3286 Associated_Collection with Finalization_Master. Replace call to
3287 Build_Finalization_Collection with Build_Finalization_Master.
3288 (Expand_Allocator_Expression): Replace call to Associated_Collection
3289 with Finalization_Master. Replace call to Set_Associated_Collection with
3290 Set_Finalization_Master. Remove the generation of
3291 Set_Finalize_Address_Ptr.
3292 (Expand_N_Allocator): Replace call to Associated_Collection with
3293 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
3294 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
3295 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
3296 comment on usage. Replace call to Needs_BIP_Collection with
3297 Needs_BIP_Finalization_Master Remplace BIP_Collection with
3298 BIP_Finalization_Master. Update all comments which mention finalization
3299 collections. Replace Associated_Collection with
3300 Finalization_Master. Replace Build_Finalization_Collection with
3301 Build_Finalization_Master.
3302 (BIP_Formal_Suffix): Update BIP_Collection's case.
3303 (Build_Heap_Allocator): Update the related comment. Rename local
3304 variable Collect to Fin_Mas_Id and update its occurrences. Update
3305 comments which mention finalization collections. Replace
3306 Set_Associated_Collection with Set_Finalization_Master.
3307 (Expand_Call): Update the code which detects a special piece of library
3308 code for .NET/JVM.
3309 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
3310 Add_Collection_Actual_To_Build_In_Place_Call with
3311 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
3312 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
3313 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
3314 Add_Collection_Actual_To_Build_In_Place_Call with
3315 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
3316 (Make_Build_In_Place_Call_In_Assignment): Replace call to
3317 Add_Collection_Actual_To_Build_In_Place_Call with
3318 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
3319 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
3320 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
3321 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
3322 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
3323 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
3324 Replace call to Set_Associated_Collection with Set_Finalization_Master.
3325 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
3326 Replace the call to Associated_Collection with Finalization_Master.
3327 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
3328 Update the way finalization master names are generated. Update the
3329 retrieval of the correct access type which will carry the pool and
3330 master attributes.
3331 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
3332 (Make_Finalize_Address_Body): Abstract types do not need
3333 Finalize_Address. Code reformatting.
3334 (Make_Finalize_Address_Stmts): Update comment on usage.
3335 (Make_Set_Finalize_Address_Ptr_Call): Removed.
3336 (Process_Declarations): Update comments.
3337 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
3338 Build_Finalization_Master. Update associated comment.
3339 (Make_Set_Finalize_Address_Ptr_Call): Removed.
3340 * exp_ch13.adb: Update comments which mention finalization collections.
3341 (Expand_N_Free_Statement): Replace the call to Associated_Collection
3342 with Finalization_Master.
3343 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
3344 create calls to routines Allocate_Any_Controlled and
3345 Deallocate_Any_Controlled.
3346 (Find_Finalize_Address): New routine.
3347 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
3348 comparison.
3349 (Requires_Cleanup_Actions): Update the comment on freeze node
3350 inspection.
3351 * exp_util.ads: Remove comment on generated code for
3352 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
3353 is better to simply look in the body.
3354 * freeze.adb (Freeze_All): Update the comment of finalization
3355 collections. Replace the call to Associated_Collection with
3356 Finalization_Master. Replace the call to Build_Finalization_Collection
3357 with Build_Finalization_Master.
3358 * impunit.adb: Add a-undesu and s-stposu to the list of units.
3359 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
3360 a-fihema.
3361 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
3362 Ada.Finalization. Add processing for children of System.Storage_Pools.
3363 * rtsfind.ads: Remove the naming of second level children of
3364 Ada.Finalization.
3365 Remove Ada_Finalization_Heap_Management from the list of units.
3366 Remove subtype Ada_Finalization_Child.
3367 Remove the following subprogram entities:
3368
3369 RE_Allocate
3370 RE_Deallocate
3371 RE_Finalization_Collection
3372 RE_Finalization_Collection_Ptr
3373 RE_Set_Finalize_Address_Ptr
3374
3375 Add the naming of second level children of System.Storage_Pools.
3376 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
3377 the list of units.
3378 Add subtype System_Storage_Pools_Child.
3379 Add the following subprogram entities to System.Finalization_Masters:
3380
3381 RE_Finalization_Master
3382 RE_Finalization_Master_Ptr
3383
3384 Add the following subprogram entities to System.Storage_Pools.Subpools:
3385
3386 RE_Allocate_Any_Controlled
3387 RE_Deallocate_Any_Controlled
3388 RE_Root_Storage_Pool_With_Subpools
3389 RE_Root_Subpool
3390 RE_Subpool_Handle
3391
3392 Move the following subprogram entities from
3393 Ada.Finalization.Heap_Management to System.Finalization_Masters:
3394
3395 RE_Add_Offset_To_Address
3396 RE_Attach
3397 RE_Base_Pool
3398 RE_Detach
3399
3400 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
3401 Set_Associated_Collection with Set_Finalization_Master.
3402 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
3403 BIP_Finalization_Master is created.
3404 * s-finmas.adb: New unit System.Finalization_Masters.
3405 * s-finmas.ads: New unit System.Finalization_Masters.
3406 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
3407 * s-stposu.ads, s-stposu.adb: New unit implementing
3408 System.Storage_Pools.Subpools.
3409
3410 2011-08-29 Bob Duff <duff@adacore.com>
3411
3412 * tbuild.adb: Add assertion.
3413
3414 2011-08-29 Thomas Quinot <quinot@adacore.com>
3415
3416 * s-pooglo.adb: Minor reformatting.
3417
3418 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3419
3420 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
3421 an indexed component of a packed array whose element type is a record
3422 with a representation clause different from that of the right-hand
3423 side, generate a temporary to minimuze the number of bit-field
3424 operations generated.
3425
3426 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3427
3428 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
3429 declarations, and thus are likely insertion points for actions.
3430
3431 2011-08-29 Bob Duff <duff@adacore.com>
3432
3433 * einfo.ads: Minor comment fix.
3434
3435 2011-08-29 Robert Dewar <dewar@adacore.com>
3436
3437 * frontend.adb, gnat1drv.adb: Minor reformatting.
3438
3439 2011-08-29 Tristan Gingold <gingold@adacore.com>
3440
3441 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
3442 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
3443 space in front of the header.
3444
3445 2011-08-29 Johannes Kanig <kanig@adacore.com>
3446
3447 * frontend.adb (Frontend): Exit after creating Standard package when
3448 -gnatd.H is present.
3449 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
3450 present.
3451
3452 2011-08-29 Robert Dewar <dewar@adacore.com>
3453
3454 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
3455 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
3456 snames.ads-tmpl: Minor reformatting.
3457
3458 2011-08-29 Philippe Gil <gil@adacore.com>
3459
3460 * prj.adb (Reset_Units_In_Table): New procedure.
3461 Reset units to avoid access to freed memory.
3462
3463 2011-08-29 Thomas Quinot <quinot@adacore.com>
3464
3465 * get_scos.adb: When reading a P statement SCO without a pragma name
3466 (from an older ALI file), ensure that the Pragma_Name component is set
3467 to Unknown_Pragma (not left uninitialized).
3468
3469 2011-08-29 Vincent Celier <celier@adacore.com>
3470
3471 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
3472 modified to compute correctly the object path of a SAL project that is
3473 extending another library project.
3474 (Write_Path_File): New procedure.
3475 * makeutl.ads (Directories): New table moved from Buildgpr
3476 (Get_Directories): New procedure moved from Buildgpr
3477 (Write_Path_File): New procedure
3478 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
3479 paths before binding SALs, instead of Set_Ada_Paths.
3480 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
3481 Prj.
3482 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
3483 (Current_Source_Path_File_Of): New function
3484 (Set_Current_Object_Path_File_Of): New procedure
3485 (Current_Source_Object_File_Of): New function
3486 (Set_Current_Object_Path_File_Of): New procedure
3487 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
3488 (Current_Source_Path_File_Of): New function
3489 (Set_Current_Object_Path_File_Of): New procedure
3490 (Current_Source_Object_File_Of): New function
3491 (Set_Current_Object_Path_File_Of): New procedure
3492
3493 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3494
3495 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
3496 packed entity, use a bit-field assignment only if there is no change of
3497 representation.
3498
3499 2011-08-29 Thomas Quinot <quinot@adacore.com>
3500
3501 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
3502 Is_RTU instead of using Chars comparisons.
3503
3504 2011-08-29 Thomas Quinot <quinot@adacore.com>
3505
3506 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
3507 temporary object if the actual is constrained, and the discriminants
3508 read from the stream don't match.
3509
3510 2011-08-29 Tristan Gingold <gingold@adacore.com>
3511
3512 * sem_attr.adb, exp_attr.adb: Add handling of
3513 Attribute_System_Allocator_Alignment
3514 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
3515 Attribute_System_Allocator_Alignment.
3516 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
3517 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
3518 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
3519 get_target_system_allocator_alignment.
3520
3521 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3522
3523 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3524 dependencies.
3525
3526 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3527
3528 * exp_ch3.adb (In_Runtime): Fix typo.
3529
3530 2011-08-29 Bob Duff <duff@adacore.com>
3531
3532 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
3533
3534 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3535
3536 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
3537 and a separate tag assignment is generated, ensure that the tag
3538 assignment is analyzed.
3539
3540 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3541
3542 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
3543 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
3544 of statement lists that may contain local declarations.
3545 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
3546 duplicate the triggering statements needed for the expansion of this
3547 construct, when the trigger is a dispatching call to a synchronized
3548 primitive.
3549
3550 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3551
3552 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
3553 * bindgen.adb: Add comments.
3554 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
3555 in CodePeer mode.
3556
3557 2011-08-29 Robert Dewar <dewar@adacore.com>
3558
3559 * exp_attr.adb: Minor reformatting.
3560 Minor code reorganization and commenting.
3561 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
3562 reformatting.
3563
3564 2011-08-29 Thomas Quinot <quinot@adacore.com>
3565
3566 * get_scos.adb: Ignore chaining indicators not currently supported
3567 by Ada.
3568
3569 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3570
3571 * system.ads: Minor editing.
3572
3573 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3574
3575 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
3576 CodePeer mode.
3577 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
3578 Attribute_Elab_Subp_Body.
3579 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
3580 * sem_util.adb: Update comments.
3581
3582 2011-08-29 Thomas Quinot <quinot@adacore.com>
3583
3584 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
3585 pragma name for each SCO statement corresponding to a pragma.
3586
3587 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3588
3589 * opt.ads: Minor editing.
3590
3591 2011-08-29 Yannick Moy <moy@adacore.com>
3592
3593 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
3594 that only made sense for CodePeer mode.
3595
3596 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3597
3598 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
3599 which is no longer used.
3600 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
3601 handling of the 64-bit division check.
3602 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
3603 division available.
3604 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
3605 longer used.
3606
3607 2011-08-29 Thomas Quinot <quinot@adacore.com>
3608
3609 * get_scos.adb: Minor reformatting.
3610
3611 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3612
3613 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
3614 statement list is wrapped in a block, the block is explicitly analyzed
3615 in order to properly redecorate the entities and create a servicing
3616 finalizer.
3617
3618 2011-08-29 Tristan Gingold <gingold@adacore.com>
3619
3620 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
3621 (Set_Zero_Cost_Handling): Remove.
3622
3623 2011-08-29 Thomas Quinot <quinot@adacore.com>
3624
3625 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
3626
3627 2011-08-29 Geert Bosch <bosch@adacore.com>
3628
3629 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
3630 instruction, as the latter may produce -0.0, which is not a valid VAX
3631 F float number.
3632 (Neg_G): Likewise for VAX F float.
3633
3634 2011-08-29 Robert Dewar <dewar@adacore.com>
3635
3636 * exp_util.adb: Minor reformatting.
3637
3638 2011-08-29 Yannick Moy <moy@adacore.com>
3639
3640 * sem_ch3.adb: Minor comment update.
3641
3642 2011-08-29 Thomas Quinot <quinot@adacore.com>
3643
3644 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
3645 the operand type.
3646
3647 2011-08-29 Thomas Quinot <quinot@adacore.com>
3648
3649 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
3650 current statement sequence on a generic instantiation or a subprogram
3651 declaration.
3652
3653 2011-08-29 Robert Dewar <dewar@adacore.com>
3654
3655 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
3656 Minor reformatting.
3657
3658 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3659
3660 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3661 Correct the check which involves the freeze node of a controlled or
3662 access-to-controlled type.
3663
3664 2011-08-29 Geert Bosch <bosch@adacore.com>
3665
3666 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
3667 statements.
3668 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
3669 Asm statements.
3670
3671 2011-08-29 Yannick Moy <moy@adacore.com>
3672
3673 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
3674 for every index type and component type that is not a subtype_mark.
3675 (Process_Subtype): Set Etype of subtype.
3676
3677 2011-08-29 Robert Dewar <dewar@adacore.com>
3678
3679 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
3680 reorganization. Minor reformatting.
3681
3682 2011-08-29 Steve Baird <baird@adacore.com>
3683
3684 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
3685 for CodePeer and ALFA modes.
3686
3687 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3688
3689 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
3690 that comes from an enclosing scope if it is not the renaming of an
3691 actual, to handle properly a spurious ambiguity in an instance.
3692
3693 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3694
3695 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
3696 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
3697 use it instead of the Esize of the first parameter.
3698 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
3699 above change.
3700 <Size>: Likewise. Call it for composite types on the RM size.
3701
3702 2011-08-29 Yannick Moy <moy@adacore.com>
3703
3704 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
3705 * sem_util.adb (Unique_Name): Correct behaviour for names of
3706 compilation units.
3707
3708 2011-08-29 Yannick Moy <moy@adacore.com>
3709
3710 * sem_prag.adb (Check_Precondition_Postcondition): In formal
3711 verification mode, analyze pragma expression for correctness, for
3712 pre/post on library-level subprogram, as it is not expanded later.
3713
3714 2011-08-29 Yannick Moy <moy@adacore.com>
3715
3716 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
3717 in formal verification.
3718
3719 2011-08-29 Thomas Quinot <quinot@adacore.com>
3720
3721 * sem_util.adb: Minor reformatting.
3722 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
3723 there's no pragma.
3724 * par_sco.ads, par_sco.adb: Update comments.
3725
3726 2011-08-29 Yannick Moy <moy@adacore.com>
3727
3728 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
3729 associated getter/setter.
3730 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
3731
3732 2011-08-29 Vincent Celier <celier@adacore.com>
3733
3734 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
3735 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
3736 with declarations for Language_Kind and Dependency_Kind for Ada.
3737 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
3738 (Process_Compiler): Take into account the new attributes Dependency_Kind
3739 and Language_Kind.
3740 (Check_Configuration): Check if language kind is unit based, not if the
3741 language name is Ada.
3742 (Process_Exceptions_Unit_Based): Ditto
3743 (Add_Language): Remove default additions of language and dependency kind
3744 * prj.ads: Minor comment change
3745 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
3746
3747 2011-08-29 Johannes Kanig <kanig@adacore.com>
3748
3749 * debug.adb: Update comments.
3750
3751 2011-08-24 Joseph Myers <joseph@codesourcery.com>
3752
3753 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
3754 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
3755 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
3756 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
3757 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
3758
3759 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3760
3761 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
3762 (GNATLIBCFLAGS_FOR_C): Replace
3763 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
3764 (gnatlib-shared-default, gnatlib-shared-dual-win32)
3765 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
3766 (gnatlib-sjlj, gnatlib-zcx): Likewise.
3767
3768 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
3769
3770 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
3771
3772 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
3773
3774 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
3775
3776 2011-08-05 Nicolas Roche <roche@adacore.com>
3777
3778 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
3779 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
3780 canadian cross.
3781 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3782
3783 2011-08-05 Matthew Heaney <heaney@adacore.com>
3784
3785 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3786 subprogram bodies declared out-of-order.
3787
3788 2011-08-05 Yannick Moy <moy@adacore.com>
3789
3790 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3791 entities directly in package Standard, otherwise skip the standard
3792 prefix.
3793
3794 2011-08-05 Robert Dewar <dewar@adacore.com>
3795
3796 * a-cbmutr.adb: Minor reformatting
3797 (Allocate_Node): refactor node allocation algorithm
3798
3799 2011-08-05 Robert Dewar <dewar@adacore.com>
3800
3801 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3802 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3803 mode.
3804 (Analyze_Pragma, case Check_Policy): Ditto.
3805 * sem_prag.ads (Check_Disabled): New function
3806 * snames.ads-tmpl: Add Name_Disable.
3807
3808 2011-08-05 Robert Dewar <dewar@adacore.com>
3809
3810 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3811 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3812
3813 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3814
3815 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3816 that appears in a generic formal part and applies to a formal
3817 subprogram.
3818
3819 2011-08-05 Robert Dewar <dewar@adacore.com>
3820
3821 * a-cbmutr.ads: Minor reformatting.
3822
3823 2011-08-05 Matthew Heaney <heaney@adacore.com>
3824
3825 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3826 to check count, check sign of value instead.
3827 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3828 (Copy_Subtree): allocate copy of source element
3829 (Equal_Subtree): compare elements, not access objects
3830
3831 2011-08-05 Vincent Celier <celier@adacore.com>
3832
3833 * gnat_ugn.texi: Fix VMS alternative.
3834
3835 2011-08-05 Thomas Quinot <quinot@adacore.com>
3836
3837 * sem_ch11.adb: Add comment.
3838
3839 2011-08-05 Robert Dewar <dewar@adacore.com>
3840
3841 * exp_util.adb: Minor comment fix.
3842
3843 2011-08-05 Robert Dewar <dewar@adacore.com>
3844
3845 * scng.adb (Error_Unterminated_String): Improve flag position when
3846 comma present.
3847
3848 2011-08-05 Matthew Heaney <heaney@adacore.com>
3849
3850 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3851 tree containers).
3852 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3853 multiway tree containers.
3854
3855 2011-08-05 Robert Dewar <dewar@adacore.com>
3856
3857 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3858 * stylesw.adb: Implement -gnatyC to control comment spacing
3859 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3860 -gnatyc/C).
3861 * usage.adb: Add line for -gnatyC.
3862
3863 2011-08-05 Robert Dewar <dewar@adacore.com>
3864
3865 * gnat_ugn.texi: Document -gnatyC.
3866 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3867 synonym for COMMENTS2).
3868
3869 2011-08-05 Robert Dewar <dewar@adacore.com>
3870
3871 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3872 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3873 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3874 a-comutr.ads, lib-xref.adb: Minor reformatting.
3875
3876 2011-08-05 Robert Dewar <dewar@adacore.com>
3877
3878 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3879 warning if there is an exception handler present.
3880
3881 2011-08-05 Pascal Obry <obry@adacore.com>
3882
3883 * a-iteint.ads: Fix copyright year.
3884
3885 2011-08-05 Thomas Quinot <quinot@adacore.com>
3886
3887 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3888 statement SCO for a USE clause or a representation clause.
3889
3890 2011-08-05 Yannick Moy <moy@adacore.com>
3891
3892 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3893 between body and spec for stub.
3894 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3895 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3896 pragma precondition or postcondition, for which the enclosing
3897 subprogram or package in the AST is not the desired one, return empty.
3898
3899 2011-08-05 Thomas Quinot <quinot@adacore.com>
3900
3901 * g-expect.adb: Minor reformatting.
3902
3903 2011-08-05 Bob Duff <duff@adacore.com>
3904
3905 * a-fihema.adb: Comment out OS_Lib.
3906
3907 2011-08-05 Matthew Heaney <heaney@adacore.com>
3908
3909 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3910 (unbounded multiway tree containers) and a-iteint.ads.
3911 * a-comutr.ads, a-comutr.adb:
3912 This is the new Ada 2012 unit for unbounded multiway tree containers
3913 * a-cimutr.ads, a-cimutr.adb
3914 This is the new Ada 2012 unit for indefinite multiway tree containers
3915 * a-iteint.ads: New file.
3916
3917 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3918
3919 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3920
3921 2011-08-05 Bob Duff <duff@adacore.com>
3922
3923 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3924 subpools.
3925 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3926
3927 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3928
3929 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3930 general indexing aspects of Ada2012. Called when analyzing indexed
3931 components when other interpretations fail.
3932 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3933 in an expression context where overloading is meaningful. This excludes
3934 the occurrence in an aspect specification (efficiency only).
3935 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3936 related to iterators can be set by an attribute specification, but
3937 cannot be queried.
3938 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3939 Constant_Indexing and Variable_Indexing.
3940 (Check_Indexing_Functions): New procedure to perform legality checks.
3941 Additional semantic checks at end of declarations.
3942
3943 2011-08-05 Sergey Rybin <rybin@adacore.com>
3944
3945 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3946 order of calling Tree_Write/Tree_Read routines made for aspects.
3947
3948 2011-08-05 Bob Duff <duff@adacore.com>
3949
3950 * a-fihema.adb (Finalize): Fix race condition.
3951
3952 2011-08-05 Yannick Moy <moy@adacore.com>
3953
3954 * sem_ch12.adb (Analyze_Package_Instantiation,
3955 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3956 mode.
3957
3958 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3959
3960 * sem_type.adb (Specific_Type): in an instance, the type-specific
3961 operand of an equality check that involves null may have a private
3962 type. Use full view to determine legality of construct.
3963
3964 2011-08-05 Vincent Celier <celier@adacore.com>
3965
3966 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3967 delete or close the file when the call to gnatmake was successful.
3968
3969 2011-08-05 Yannick Moy <moy@adacore.com>
3970
3971 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3972 Global_Discard_Names.
3973
3974 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3975
3976 * sinfo.ads: comments on use of entity field for aspect specifications.
3977
3978 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3979
3980 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3981 node is not itself an entity but a selected component, it is a
3982 rewritten parameterless call to an en enclosing synchronized operation,
3983 and this expansion will be performed again in the instance, so there is
3984 no global information to preserve.
3985
3986 2011-08-05 Javier Miranda <miranda@adacore.com>
3987
3988 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3989 for renamings of predefined primitives.
3990 (In_Predef_Prims_DT): New subprogram.
3991
3992 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3993
3994 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3995 possible interpretation of name is a reference type, add an
3996 interpretation that is the designated type of the reference
3997 discriminant of that type.
3998 * sem_res.adb (resolve): If the interpretation imposed by context is an
3999 implicit dereference, rewrite the node as the deference of the
4000 reference discriminant.
4001 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
4002 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
4003 parent type or base type.
4004 * sem_ch4.adb (Process_Indexed_Component,
4005 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
4006 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
4007 Check for implicit dereference.
4008 (List_Operand_Interps): Indicate when an implicit dereference is
4009 ambiguous.
4010 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
4011
4012 2011-08-05 Thomas Quinot <quinot@adacore.com>
4013
4014 * scos.ads: Update documentation of SCO table. Pragma statements can now
4015 be marked as disabled (using 'p' instead of 'P' as the statement kind).
4016 * par_sco.ads, par_sco.adb: Implement the above change.
4017 (Process_Decisions_Defer): Generate a P decision for the first parameter
4018 of a dyadic pragma Debug.
4019 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
4020 necessary.
4021 * put_scos.adb: Code simplification based on above change.
4022
4023 2011-08-05 Robert Dewar <dewar@adacore.com>
4024
4025 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
4026 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
4027 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
4028 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
4029
4030 2011-08-05 Bob Duff <duff@adacore.com>
4031
4032 * a-stunau.ads, g-spipat.adb: Update comments.
4033
4034 2011-08-05 Bob Duff <duff@adacore.com>
4035
4036 * a-fihema.ads: Minor comment fix.
4037 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
4038 correct.
4039 (Attach, Detach): Remove some unnecessary code.
4040 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
4041
4042 2011-08-05 Bob Duff <duff@adacore.com>
4043
4044 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
4045 allocation for Objects component. This simplifies the code somewhat. It
4046 is also a little more efficient in the not-so-unusual case where there
4047 are no controlled objects allocated.
4048 Make Finalization_Started flag atomic.
4049 (Finalize): Avoid unnecessary detachment of items from the list.
4050 (pcol): Minor cleanup.
4051
4052 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4053
4054 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
4055 package whose name is the same as that of the generic unit, or its
4056 ultimate prefix.
4057
4058 2011-08-05 Bob Duff <duff@adacore.com>
4059
4060 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
4061 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
4062 Minor comment fixes.
4063
4064 2011-08-05 Arnaud Charlet <charlet@adacore.com>
4065
4066 * make.adb (Linking_Phase): No longer need to set source search path
4067 before calling gnatlink in CodePeer mode.
4068 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
4069 gcc in CodePeer mode, since the binder generated file no longer has a
4070 'with Main'.
4071 * switch.ads, switch.adb (Is_Language_Switch): Removed.
4072 * switch-c.adb: Update comment.
4073
4074 2011-08-05 Thomas Quinot <quinot@adacore.com>
4075
4076 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
4077
4078 2011-08-05 Nicolas Roche <roche@adacore.com>
4079
4080 * gnat_ugn.texi: Fix minor syntax error issue.
4081
4082 2011-08-05 Vincent Celier <celier@adacore.com>
4083
4084 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
4085 delete or close the file when the call to gnatmake returns a non
4086 successful return code.
4087
4088 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4089
4090 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
4091 check, indicate that the copy of the original node does not come from
4092 source, to prevent an infinite recursion of the expansion.
4093
4094 2011-08-05 Johannes Kanig <kanig@adacore.com>
4095
4096 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
4097 VC generation for subprogram bodies.
4098
4099 2011-08-05 Yannick Moy <moy@adacore.com>
4100
4101 * einfo.ads: Typo.
4102 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
4103 the base type with the smallest allowed base type.
4104
4105 2011-08-05 Sergey Rybin <rybin@adacore.com>
4106
4107 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
4108 aspects.
4109
4110 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4111
4112 * sem_ch12.ads: minor comment updates.
4113
4114 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4115
4116 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
4117 instantiation and a formal package the compiler generates a package
4118 renaming declaration so that the generic name within the declaration
4119 is interpreted as a renaming of the instance. At the end of a formal
4120 package declaration, this renaming must become invisible.
4121
4122 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4123
4124 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
4125 comparison and rely on concrete entities instead.
4126
4127 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4128
4129 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
4130 and discriminants, to indicate that the type has an access discriminant
4131 that supports implicit dereference.
4132 * snames.ads-tmpl: Add names of aspects and attributes related to
4133 Ada2012 iterators: constant_indexing, default_iterator,
4134 iterator_element, implicit_dereference, variable_indexing.
4135 * aspects.ads, aspects.adb: entries for iterator-related aspects.
4136 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
4137 iterator-related aspects.
4138 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
4139
4140 2011-08-05 Sergey Rybin <rybin@adacore.com>
4141
4142 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
4143 metrics in gnatmetric to cover new kinds of coupling mentrics.
4144
4145 2011-08-05 Steve Baird <baird@adacore.com>
4146
4147 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
4148 of calling the user-defined main subprogram.
4149 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
4150 is set) Call_Main_Subprogram ahead of, as opposed to
4151 inside of, Main.
4152 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
4153 generation of a "with" of the user-defined main subprogram.
4154 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
4155 (which is now called from Gen_Main instead).
4156
4157 2011-08-05 Emmanuel Briot <briot@adacore.com>
4158
4159 * projects.texi: Added reference to the Makefile package.
4160
4161 2011-08-05 Thomas Quinot <quinot@adacore.com>
4162
4163 * exp_ch7.adb: Minor comment rewording.
4164
4165 2011-08-05 Ed Falis <falis@adacore.com>
4166
4167 * env.c: Fix comment.
4168
4169 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4170
4171 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
4172 character comparison and rely on concrete entities instead.
4173
4174 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4175
4176 * sem_ch3.adb: (Check_Private_Overriding): better error message,
4177 suggested by AI95-0068.
4178
4179 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4180
4181 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
4182 the two potential initialization calls. This accounts for any
4183 access-before-elaboration checks which may precede the initialization
4184 calls.
4185 (Next_Suitable_Statement): New routine. Returns the next real statement
4186 after the input node while skipping generated checks.
4187 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
4188 with comment on usage.
4189 Do not generate Elaborate_All when the trigger is a finalization call
4190 coming from a type init proc.
4191 (Check_Elab_Call): Propagate the initialization procedure context to
4192 subsequent calls to Check_A_Call.
4193 (Check_Internal_Call_Continue): Propagate the initialization procedure
4194 context to subsequent calls to Check_Elab_Call.
4195 (Is_Finalization_Procedure): New routine. Returns True if the input
4196 entity denotes a [Deep_]Finalize routine.
4197 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
4198 along with comment on usage.
4199
4200 2011-08-05 Vadim Godunko <godunko@adacore.com>
4201
4202 * s-atocou.ads: Add list of supported platforms.
4203
4204 2011-08-05 Yannick Moy <moy@adacore.com>
4205
4206 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
4207
4208 * opt.ads (Disable_ALI_File): new Boolean flag
4209 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
4210
4211 2011-08-05 Ed Falis <falis@adacore.com>
4212
4213 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
4214 environ is properly defined.
4215
4216 2011-08-05 Vincent Celier <celier@adacore.com>
4217
4218 * make.adb (Compilation_Phase): Exit immediately when all objects have
4219 been found up to date, to avoid multiple exit messages.
4220 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
4221 same project for languages with no compiler.
4222 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
4223 -eI.
4224 2011-08-05 Robert Dewar <dewar@adacore.com>
4225
4226 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
4227 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
4228 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
4229 s-atocou-builtin.adb: Minor reformatting.
4230
4231 2011-08-05 Yannick Moy <moy@adacore.com>
4232
4233 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
4234 if the node to wrap is a pragma check, this node and enclosed
4235 expression are not expanded, so do not apply any transformations here.
4236 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
4237 introducing transient scopes.
4238
4239 2011-08-05 Jose Ruiz <ruiz@adacore.com>
4240
4241 * adaint.c (__gnat_set_writable, __gnat_set_readable,
4242 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
4243 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
4244 routine is available, so we use the default implementation of these
4245 functions.
4246 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
4247 support for copying attributes on VxWorks 6.
4248
4249 2011-08-05 Yannick Moy <moy@adacore.com>
4250
4251 * debug.adb: Remove use of -gnatd.D.
4252 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
4253 * opt.ads: Simplify variables for ALFA mode, to keep one only
4254 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
4255 to ALFA mode.
4256
4257 2011-08-05 Vincent Celier <celier@adacore.com>
4258
4259 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
4260 Builder'Default_Switches.
4261
4262 2011-08-05 Vincent Celier <celier@adacore.com>
4263
4264 * makeusg.adb: Add lines for --create-map-file switches.
4265
4266 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4267
4268 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
4269 profile is incomplete and the full view is available, replace it with
4270 the full view.
4271 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
4272 incomplete, freezing the subprogram is delayed until the full view is
4273 frozen.
4274 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
4275 fixed-point multiplication operator and the predefined operator is
4276 resolved in favor of the user-defined one.
4277
4278 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4279
4280 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
4281 CONST_CAST.
4282
4283 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4284
4285 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
4286 whether a type lacks user-defined Read or Write operations, or has a
4287 component that lacks them.
4288 * sem_attr.adb (Check_Stream_Attribute): if restriction
4289 No_Default_Stream_Attributes is active, verify that all subcomponent
4290 types of the target have user-defined stream operations, and report
4291 error otherwise.
4292 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
4293 * exp_strm.adb: Build_Elementary_Input_Call,
4294 Build_Elementary_Write_Call): remove checks for restriction
4295 No_Default_Stream_Attributes, now checked in semantics.
4296
4297 2011-08-04 Vincent Celier <celier@adacore.com>
4298
4299 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
4300 switches on the command line, look for all valid --RTS switches in the
4301 Builder switches and for each language use the first runtime name found
4302 to invoke gprconfig.
4303 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
4304 command line and there is no auto-configuration.
4305 (Runtime_Name_Set_For): New function.
4306
4307 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4308
4309 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
4310 elaborate initialization expression for variable Abort when processing
4311 a package body or a declaration.
4312 (Create_Finalizer): Propagate the package context when creating the
4313 exception-related variables.
4314 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
4315 For_Package along with usage comment.
4316
4317 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4318
4319 * gcc-interface/Makefile.in: Clean up targets.
4320 Enable new package for atomic counters and copy-on-write implementation
4321 of unbounded strings on x86 platforms.
4322 * gcc-interface/Make-lang.in: Update dependencies.
4323
4324 2011-08-04 Robert Dewar <dewar@adacore.com>
4325
4326 * exp_ch7.adb: Minor reformatting.
4327
4328 2011-08-04 Robert Dewar <dewar@adacore.com>
4329
4330 * exp_strm.adb: Minor reformatting.
4331
4332 2011-08-04 Vadim Godunko <godunko@adacore.com>
4333
4334 * s-atocou.adb: Replace by dummy version and use on targets where atomic
4335 operations are not supported.
4336 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
4337 * s-atocou-x86.adb: New file.
4338 * Makefile.rtl: Add s-atocou.o file
4339
4340 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4341
4342 * make.adb (Compile): Move setting of CodePeer_Mode to ...
4343 (Compilation_Phase): ... here.
4344 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
4345
4346 2011-08-04 Thomas Quinot <quinot@adacore.com>
4347
4348 * Make-generated.in: Fix minor typo in comment.
4349
4350 2011-08-04 Thomas Quinot <quinot@adacore.com>
4351
4352 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
4353 the project path.
4354
4355 2011-08-04 Robert Dewar <dewar@adacore.com>
4356
4357 * a-coinho.adb: Minor reformatting.
4358
4359 2011-08-04 Robert Dewar <dewar@adacore.com>
4360
4361 * a-coinho.ads: Minor reformatting.
4362
4363 2011-08-04 Vadim Godunko <godunko@adacore.com>
4364
4365 * s-atocou.ads, s-atocou.adb: New files.
4366 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
4367 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
4368 direct use of GCC's atomic builtins and replace them by use of new
4369 atomic counter package.
4370
4371 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4372
4373 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
4374
4375 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4376
4377 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
4378 with a call to Get_External_Tag.
4379 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
4380 subprogram usage. Remove the guard against package declarations and
4381 bodies since Build_Cleanup_Statements is no longer invoked in that
4382 context.
4383 (Build_Components): Initialize Tagged_Type_Stmts when the context
4384 contains at least one library-level tagged type.
4385 (Build_Finalizer): New local variables Has_Tagged_Types and
4386 Tagged_Type_Stmts along with associated comments on usage. Update the
4387 logic to include tagged type processing.
4388 (Create_Finalizer): Insert all library-level tagged type unregistration
4389 code before the jump block circuitry.
4390 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
4391 (Expand_N_Package_Declaration): Remove the call to
4392 Build_Cleanup_Statements.
4393 (Process_Tagged_Type_Declaration): New routine. Generate a call to
4394 unregister the external tag of a tagged type.
4395 (Processing_Actions): Reimplemented to handle tagged types.
4396 (Process_Declarations): Detect the declaration of a library-level
4397 tagged type and carry out the appropriate actions.
4398 (Unregister_Tagged_Types): Removed. The machinery has been directly
4399 merged with Build_Finalizer.
4400
4401 2011-08-04 Robert Dewar <dewar@adacore.com>
4402
4403 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
4404 gnatls.adb, exp_ch3.adb: Minor reformatting.
4405
4406 2011-08-04 Marc Sango <sango@adacore.com>
4407
4408 * sem_attr.adb (Analyze_Attribute): Replace the message
4409 "invisible attribute of}" of the spark restriction violation in
4410 attribute reference by the simple message "invisible attribute of type".
4411 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
4412 two insertion characters: '&' and '}'.
4413
4414 2011-08-04 Vadim Godunko <godunko@adacore.com>
4415
4416 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
4417 * a-coinho.ads, a-coinho.adb: New file.
4418 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
4419
4420 2011-08-04 Nicolas Roche <roche@adacore.com>
4421
4422 * alfa_test.adb: Not all ali files are containing alfa information even
4423 if compiled with -gnatd.F. So suppress warning about missing ALFA
4424 information.
4425
4426 2011-08-04 Yannick Moy <moy@adacore.com>
4427
4428 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
4429 scope.
4430 * put_alfa.adb: Check that scope name is not empty.
4431
4432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4433
4434 * exp_ch3.adb (Stream_Operation_Ok): new predicate
4435 Needs_Elementary_Stream_Operation, to determine whether user-defined
4436 Read and Write attributes are available for the elementary components
4437 of the given type. If only the predefined attributes are available,
4438 then when restriction No_Default_Stream_Attributes is active the
4439 predefined stream attributes for the composite type cannot be created.
4440
4441 2011-08-04 Robert Dewar <dewar@adacore.com>
4442
4443 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
4444 Put routines in alpha order
4445
4446 2011-08-04 Jose Ruiz <ruiz@adacore.com>
4447
4448 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
4449 * gcc-interface/Make-lang.in: Update dependencies.
4450
4451 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4452
4453 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
4454 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
4455 gnat1why).
4456
4457 2011-08-04 Robert Dewar <dewar@adacore.com>
4458
4459 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
4460 lib-xref-alfa.adb: Minor reformatting.
4461
4462 2011-08-04 Marc Sango <sango@adacore.com>
4463
4464 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
4465 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
4466 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
4467 mode.
4468
4469 2011-08-04 Tristan Gingold <gingold@adacore.com>
4470
4471 * bindgen.adb (Gen_Adainit_C): Remove.
4472 (Gen_Adafinal_C): Ditto.
4473 (Gen_Elab_Externals_C): Ditto.
4474 (Gen_Elab_Calls_C): Ditto.
4475 (Gen_Elab_Order_C): Ditto.
4476 (Gen_Elab_Defs_C): Ditto.
4477 (Gen_Finalize_Library_C): Ditto.
4478 (Gen_Finalize_Library_Defs_C): Ditto.
4479 (Gen_Main_C): Ditto.
4480 (Gen_Output_File_C): Ditto.
4481 (Gen_Restrictions_C): Ditto.
4482 (Gen_Versions_C): Ditto.
4483 (Write_Info_Ada_C): Ditto.
4484 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
4485 (Gen_Output_File): Do not force Ada_Bind_File anymore.
4486 Always call Gen_Output_File_Ada.
4487 * gnatlink.adb (Begin_Info): Now a constant.
4488 (End_Info): Ditto.
4489 (Ada_Bind_File): Remove
4490 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
4491 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
4492 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
4493 * opt.ads (Ada_Bind_File): Remove.
4494
4495 2011-08-04 Thomas Quinot <quinot@adacore.com>
4496
4497 * projects.texi: Document target-specific directory in default project
4498 path for gnatmake.
4499
4500 2011-08-04 Thomas Quinot <quinot@adacore.com>
4501
4502 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
4503 path in all cases .
4504
4505 2011-08-04 Yannick Moy <moy@adacore.com>
4506
4507 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
4508 opt.ads, lib-xref.ads: Code clean up.
4509
4510 2011-08-04 Yannick Moy <moy@adacore.com>
4511
4512 * gnat_rm.texi: Update description of Test_Case
4513 * gnat_ugn.texi: Typo.
4514
4515 2011-08-04 Ed Falis <falis@adacore.com>
4516
4517 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
4518
4519 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4520
4521 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
4522 it is of type Root_Controlled. This action eliminates fields Prev and
4523 Next from type equality.
4524
4525 2011-08-04 Yannick Moy <moy@adacore.com>
4526
4527 * lib-xref-alfa.adb: Correct typo.
4528
4529 2011-08-04 Matthew Heaney <heaney@adacore.com>
4530
4531 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
4532 component.
4533
4534 2011-08-04 Yannick Moy <moy@adacore.com>
4535
4536 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
4537 (Analyze_Pragma): allow static string expression for name of Test_Case,
4538 instead of simply string literals.
4539 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
4540 expressions.
4541
4542 2011-08-04 Vincent Celier <celier@adacore.com>
4543
4544 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
4545 case suffixes to find truncated main sources.
4546
4547 2011-08-04 Tristan Gingold <gingold@adacore.com>
4548
4549 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
4550 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
4551 (Compute_Current_Task): Ditto.
4552
4553 2011-08-04 Tristan Gingold <gingold@adacore.com>
4554
4555 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
4556
4557 2011-08-04 Yannick Moy <moy@adacore.com>
4558
4559 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
4560 library-level constant.
4561 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
4562 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
4563 used as selector of parameter association, in ALFA mode.
4564
4565 2011-08-04 Robert Dewar <dewar@adacore.com>
4566
4567 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
4568 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
4569 reformatting.
4570
4571 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4572
4573 * make.adb (Linking_Phase): Set source search path before calling
4574 gnatlink in CodePeer mode.
4575
4576 2011-08-04 Javier Miranda <miranda@adacore.com>
4577
4578 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
4579 Remove code which takes care of building TSDs.
4580 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
4581 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
4582 the accessibility check in VM targets.
4583 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
4584 (Building_Static_DT): Now returns false for VM targets.
4585 (Build_VM_TSDs): Removed.
4586 (Expand_Interface_Conversion): Generate missing runtime check for
4587 conversions to interface types whose target type is unknown at compile
4588 time.
4589 (Make_VM_TSD): Add missing code to disable the generation of calls to
4590 Check_TSD if the tagged type is not defined at library level, or not
4591 has a representation clause specifying its external tag, or -gnatdQ is
4592 active.
4593 * exp_disp.ads (Build_VM_TSDs): Removed.
4594 (Make_VM_TSDs): Spec relocated from exp_disp.adb
4595 * sem_disp.adb (Check_Dispatching_Operation): No code required to
4596 register primitives in the dispatch tables in VM targets.
4597 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
4598 initialization of class-wide interface objects in VM targets.
4599 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
4600 of Make_DT).
4601
4602 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4603
4604 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
4605 when dotnet-ld cannot be found.
4606
4607 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4608
4609 * bindgen.adb: Simplify significantly generation of binder body file in
4610 CodePeer mode.
4611 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
4612 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
4613 not expanded).
4614
4615 2011-08-04 Yannick Moy <moy@adacore.com>
4616
4617 * sem_prag.adb, sem.ads: Code cleanup.
4618
4619 2011-08-04 Tristan Gingold <gingold@adacore.com>
4620
4621 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
4622 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
4623 results if possible.
4624 * s-stusta.adb (Print): Adjust after changes in s-stausa.
4625 * gnat_ugn.texi: Update dynamic stack usage section.
4626
4627 2011-08-04 Steve Baird <baird@adacore.com>
4628
4629 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
4630 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
4631 contains only a call to the user-defined main subprogram.
4632 (Gen_Main_Ada) - If CodePeer_Mode is set, then
4633 call the "wrapper" subprogram instead of directly
4634 calling the user-defined main subprogram.
4635
4636 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4637
4638 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
4639 alternatives of a case statement for controlled objects. Rename local
4640 variable A to Dead_Alt.
4641 (Expand_N_If_Statement): Check the then and else statements of an if
4642 statement for controlled objects. Check the then statements of all
4643 elsif parts of an if statement for controlled objects.
4644 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
4645 objects.
4646 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
4647 detects a loop associated with the expansion of an array object.
4648 Augment the processing of the loop statements to account for a possible
4649 wrap done by Process_Statements_For_Controlled_Objects.
4650 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
4651 statements and abortable part of an asynchronous select for controlled
4652 objects.
4653 (Expand_N_Conditional_Entry_Call): Check the else statements of a
4654 conditional entry call for controlled objects.
4655 (Expand_N_Selective_Accept): Check the alternatives of a selective
4656 accept for controlled objects.
4657 (Expand_N_Timed_Entry_Call): Check the entry call and delay
4658 alternatives of a timed entry call for controlled objects.
4659 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
4660 exception handler for controlled objects.
4661 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4662 Add formal parameter Nested_Constructs along with its associated
4663 comment.
4664 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
4665 Requires_Cleanup_Actions.
4666 (Process_Statements_For_Controlled_Objects): New routine.
4667 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
4668 routine. Inspect a node which contains a non-handled sequence of
4669 statements for controlled objects. If such an object is found, the
4670 statements are wrapped in a block.
4671
4672 2011-08-04 Bob Duff <duff@adacore.com>
4673
4674 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
4675 need to compare with Class_Wide_Type (T2), in order to get at the
4676 original class-wide type node.
4677 * sem_type.ads (Covers): Improve the comment.
4678 * einfo.ads (Class_Wide_Type): Improve the comment.
4679 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
4680 the type of the Deref.
4681
4682 2011-08-04 Yannick Moy <moy@adacore.com>
4683
4684 * gnat_rm.texi: Document that Test_Case pragma can only appear on
4685 separate declarations.
4686 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
4687 check identifier of pragma argument.
4688 (Chain_TC): check that no other test case associated to the same entity
4689 share the same name.
4690 (Check_Test_Case): disallow test case inside subprogram body
4691 (Analyze_Pragma): correct call to check identifier and not argument
4692 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
4693 function gets name from test case pragma.
4694
4695 2011-08-04 Yannick Moy <moy@adacore.com>
4696
4697 * gnat_rm.texi: Document new pragma and aspect.
4698 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
4699 (No_Duplicates_Allowed): new constant array defining whether duplicates
4700 aspects of each kind can appear on the same declaration.
4701 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
4702 field, which points to a node holding the previous Spec_PPC_List.
4703 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
4704 through the indirection with Contract.
4705 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
4706 * par-prag.adb (Prag): do nothing on Test_Case pragma
4707 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
4708 be called directly.
4709 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
4710 component Ensures of Test_Case.
4711 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
4712 (Analyze_Generic_Subprogram_Declaration,
4713 Analyze_Subprogram_Instantiation,
4714 Analyze_Abstract_Subprogram_Declaration,
4715 Analyze_Subprogram_Body_Helper,
4716 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
4717 insert contract in subprogram node at point of definition
4718 * sem_ch13.adb
4719 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
4720 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
4721 corresponding pragma
4722 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
4723 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
4724 similar to the analysis of pre/post
4725 (Derive_Subprogram): insert contract in subprogram node at point of
4726 derivation.
4727 * sem_prag.adb, sem_prag.ads
4728 (Check_Arg_Is_String_Literal, Check_Identifier):
4729 new checking procedures to be called in treatment of pragmas
4730 (Check_Test_Case): new procedure to check that a Test_Case aspect or
4731 pragma is well-formed. This does not check currently that 'Result is
4732 used only in the Ensures component of a Test_Case.
4733 (Analyze_Pragma): add case for Test_Case
4734 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
4735 components of a Test_Case.
4736 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
4737 expressions in the 3rd (and 4th if present) arguments of a Test_Case
4738 pragma, treated as spec expressions.
4739 (Sig_Flags): add value -1 for Test_Case.
4740 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
4741 Get_Requires_From_Test_Case_Pragma): getters for both expression
4742 components of a Test_Case.
4743 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
4744 indirection between an entry or [generic] subprogram entity and its
4745 pre/post + test-cases.
4746 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
4747 get/set for fields of an N_Contract node.
4748 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
4749 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
4750 names and pragma for Test_Case.
4751 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
4752
4753 2011-08-04 Vincent Celier <celier@adacore.com>
4754
4755 * gnat_ugn.texi: Improve documentation of gnatmake switch
4756 --source-info-file=.
4757
4758 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4759
4760 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
4761 type). Initialize Atyp to the appropriate type which is later checked
4762 for completion. Rewrite the assertion associated with private type
4763 completion.
4764
4765 2011-08-04 Ed Falis <falis@adacore.com>
4766
4767 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
4768 initialize the number of CPUs.
4769
4770 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4771
4772 * sem_type.adb (Disambiguate): New subsidiary routine
4773 In_Same_Declaration_List, to implement AI05-0020: a user-defined
4774 equality on an anonymous access type whose designated type is private
4775 does not lead to an ambiguity with the universal access equality
4776 operator in the body or child units of the defining package. The same
4777 is true for a multiplication operator on a private type completed with
4778 a fixed-point-type.
4779
4780 2011-08-04 Javier Miranda <miranda@adacore.com>
4781
4782 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4783 (Normalize_Scalars_Config): Removed.
4784 * opt.adb
4785 (Register_Opt_Config_Switches): Remove registering config values of
4786 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4787 (Restore_Opt_Config_Switches): Remove code which restores the values of
4788 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4789 Init_Or_Norm_Scalars.
4790 (Save_Opt_Config_Switches): Remove code which saves values of
4791 Init_Or_Norm_Scalars and Normalize_Scalars.
4792 (Set_Opt_Config_Switches): Remove code which restores config values of
4793 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4794 Init_Or_Norm_Scalars.
4795
4796 2011-08-04 Yannick Moy <moy@adacore.com>
4797
4798 * frontend.adb (Frontend): remove previous patch to avoid full
4799 qualification in ALFA mode.
4800 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4801 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4802 unique name for an entity, which could be used to identify the entity
4803 across compilation units.
4804
4805 2011-08-04 Thomas Quinot <quinot@adacore.com>
4806
4807 * prj-env.adb
4808 (Initialize_Default_Project_Path): Add target specific directory
4809 ($prefix/$target/lib/gnat) in front of project path in all cases
4810 (making gnatmake's behaviour consistent with gprbuild).
4811 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4812 Pass target name from Sdefault to project subsystem.
4813 * gnatls.adb: Show new target specific default project directory.
4814
4815 2011-08-04 Johannes Kanig <kanig@adacore.com>
4816
4817 * cstand.adb: Add Information to Identifier in Standard
4818 (Identifer_For): Set Entity to the corresponding entity
4819
4820 2011-08-04 Sergey Rybin <rybin@adacore.com>
4821
4822 * gnat_ugn.texi: Update doc on gnatcheck.
4823
4824 2011-08-04 Yannick Moy <moy@adacore.com>
4825
4826 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4827 xrefs in a scope.
4828
4829 2011-08-04 Yannick Moy <moy@adacore.com>
4830
4831 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4832 performing expansion.
4833 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4834 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4835 it is not called in ALFA mode.
4836
4837 2011-08-04 Emmanuel Briot <briot@adacore.com>
4838
4839 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4840 after all, so removed.
4841
4842 2011-08-04 Sergey Rybin <rybin@adacore.com>
4843
4844 * vms_data.ads: Add missing VMS qualifiers.
4845
4846 2011-08-04 Emmanuel Briot <briot@adacore.com>
4847
4848 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4849 the list of files on the command line after processing it through
4850 Complete_Mains.
4851
4852 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4853
4854 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4855 processing for .NET/JVM. These targets can now benefit from
4856 Raise_From_Controlled_Operation and they share the same processing with
4857 standard targets.
4858 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4859 These targets need transient scopes in order to properly finalize short
4860 lived controlled objects.
4861 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4862 NET/JVM. These targets can now benefit from
4863 Raise_From_Controlled_Operation and they share the same processing with
4864 standard targets.
4865
4866 2011-08-04 Geert Bosch <bosch@adacore.com>
4867
4868 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4869
4870 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4871
4872 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4873 Expand_Record_Aggregate, to determine whether aggregate must be
4874 expanded into assignments. This is the case if the ancestor part is
4875 private, regarless of the setting of the flag Has_Private_Ancestor.
4876
4877 2011-08-04 Ed Falis <falis@adacore.com>
4878
4879 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4880
4881 2011-08-04 Bob Duff <duff@adacore.com>
4882
4883 * sinfo.ads: Fix comment.
4884
4885 2011-08-04 Steve Baird <baird@adacore.com>
4886
4887 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4888 choose a package name in much the same way as is
4889 done for JGNAT when VM_Target /= No_VM, except that
4890 a slightly more distinctive prefix string is used.
4891
4892 2011-08-04 Emmanuel Briot <briot@adacore.com>
4893
4894 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4895 gnatmake command line.
4896 This behavior was never documented (and was supported only because of
4897 an early bug in the code). This case might lead to ambiguous cases
4898 (between unit names and truncated base names without suffixes).
4899
4900 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4901
4902 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4903 Remove the external tag of a tagged type from the internal hash table.
4904 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4905 expanded usage of the routine. Strenghten the check for Is_Master. Add
4906 processing for tagged types.
4907 (Build_Finalizer): Create all the necessary lists used in finalizer
4908 creation when the processed context is a package that may contain
4909 tagged types.
4910 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4911 Requires_Cleanup_Actions.
4912 (Expand_N_Package_Body): Package bodies may need clean up code
4913 depending on whether they contain tagged types.
4914 (Expand_N_Package_Declaration): Package declarations may need clean up
4915 code depending on whether they contain tagged types.
4916 (Unregister_Tagged_Types): New routine. Search through a list of
4917 declarations or statements, looking for non-abstract Ada tagged types.
4918 For each such type, generate code to unregister the external tag.
4919 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4920 Requires_Cleanup_Actions.
4921 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4922 through a list of declarations or statements looking for non-abstract
4923 Ada tagged types or controlled objects.
4924 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4925 Requires_Cleanup_Actions.
4926 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4927 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4928 RE_Unit_Table.
4929
4930 2011-08-04 Vincent Celier <celier@adacore.com>
4931
4932 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4933 has Ada sources, not project Project, because if the root project
4934 Project has no sources of its own, all projects will be deemed without
4935 sources.
4936
4937 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4938
4939 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4940 of the No_Param_Proc acc-to-subp type used for initialization of
4941 __gnat_finalize_library_objects so that it's declared at library level
4942 rather than nested inside of the adainit routine.
4943
4944 2011-08-04 Javier Miranda <miranda@adacore.com>
4945
4946 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4947 if the tagged type has a representation clause which specifies its
4948 external tag.
4949
4950 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4951
4952 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4953 Remove previous procedure with that name.
4954 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4955 when appropriate.
4956 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4957 subtype mark, the ancestor cannot have unknown discriminants.
4958 (Resolve_Record_Aggregate): if the type has invisible components
4959 because of a private ancestor, the aggregate is illegal.
4960
4961 2011-08-04 Vincent Celier <celier@adacore.com>
4962
4963 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4964 account switches -gnat2005, -gnat12 and -gnat2012.
4965
4966 2011-08-04 Bob Duff <duff@adacore.com>
4967
4968 * s-tasdeb.ads: Minor comment fix.
4969
4970 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4971
4972 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4973 CodePeer mode.
4974 * switch.ads, switch.adb (Is_Language_Switch): New function.
4975
4976 2011-08-04 Vincent Celier <celier@adacore.com>
4977
4978 * switch-c.adb: Minor comment addition.
4979
4980 2011-08-04 Vincent Celier <celier@adacore.com>
4981
4982 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4983 ending with '=' is followed by a space (missing file name).
4984
4985 2011-08-04 Pascal Obry <obry@adacore.com>
4986
4987 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4988
4989 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4990
4991 * sem_ch12.adb (Analyze_Associations): New routine
4992 Check_Overloaded_Formal_Subprogram to reject a formal package when
4993 there is a named association or a box initialisation for an overloaded
4994 formal subprogram of the corresponding generic.
4995
4996 2011-08-04 Yannick Moy <moy@adacore.com>
4997
4998 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4999 * get_alfa.adb, put_alfa.adb: Read and write new component of
5000 cross-reference.
5001 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
5002
5003 2011-08-04 Pascal Obry <obry@adacore.com>
5004
5005 * urealp.adb: Minor reformatting.
5006
5007 2011-08-04 Tristan Gingold <gingold@adacore.com>
5008
5009 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
5010 Handle the case when Cleanup_Protected_Object returns Empty.
5011
5012 2011-08-04 Yannick Moy <moy@adacore.com>
5013
5014 * frontend.adb (Frontend): only qualify names in non-ALFA mode
5015
5016 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5017
5018 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
5019 call, ignore functions.
5020
5021 2011-08-04 Geert Bosch <bosch@adacore.com>
5022
5023 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
5024 point.
5025
5026 2011-08-04 Emmanuel Briot <briot@adacore.com>
5027
5028 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
5029 as an index for Builder'Switches. This conforms to the documentation.
5030 * make.adb (Insert_Project_Sources): avoid duplicate code
5031
5032 2011-08-04 Emmanuel Briot <briot@adacore.com>
5033
5034 * makeutl.adb (Complete_Mains): if the user has passed a relative file
5035 name on the command line (for instance "../dummy"), never assume it can
5036 be a unit name.
5037
5038 2011-08-04 Tristan Gingold <gingold@adacore.com>
5039
5040 * bindgen.adb: Remove code the reference or create the
5041 Break_Start/__gnat_break_start procedure.
5042 * s-stalib.adb (Break_Start): Removed.
5043
5044 2011-08-04 Emmanuel Briot <briot@adacore.com>
5045
5046 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
5047 shared with gprbuild.
5048
5049 2011-08-04 Yannick Moy <moy@adacore.com>
5050
5051 * par-ch4.adb (P_Primary): preferentially issue an error message about
5052 a missing parenthesis arount a conditional or case expression in Ada
5053 2012 mode, if we detect that the alignment is not correct for a
5054 statement.
5055
5056 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5057
5058 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
5059 tag-to-class-wide conversion as needing finalization actions.
5060 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
5061 a tag-to-class-wide conversion as needing finalization actions.
5062 (Is_Finalizable_Transient): The result of a tag-to-class-wide
5063 conversion does not need finalization actions.
5064 (Is_Tag_To_CW_Conversion): New routine.
5065 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
5066 whether an object is the result of a tag-to-class-wide conversion.
5067
5068 2011-08-04 Yannick Moy <moy@adacore.com>
5069
5070 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
5071 the left-hand-side and right-hand-side of a conjunct are inserted when
5072 translating a pre- or postcondition
5073 * sem_ch6.adb: Correct typo in comment
5074
5075 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5076
5077 * gnat_rm.texi: Ravenscar does not prohibit dependence on
5078 Unchecked_Conversion and Unchecked_Deallocation.
5079
5080 2011-08-04 Thomas Quinot <quinot@adacore.com>
5081
5082 * make.adb: Minor reformatting.
5083
5084 2011-08-04 Emmanuel Briot <briot@adacore.com>
5085
5086 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
5087 sources in the project and its imported projects, but not in the whole
5088 tree.
5089
5090 2011-08-04 Emmanuel Briot <briot@adacore.com>
5091
5092 * make.adb: Remove debug trace.
5093
5094 2011-08-04 Vincent Celier <celier@adacore.com>
5095
5096 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
5097 path in canonical form, to be able to compare path names on platforms
5098 such as Windows or Darwin.
5099
5100 2011-08-04 Thomas Quinot <quinot@adacore.com>
5101
5102 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
5103 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
5104 * scos.ads: Update documentation accordingly.
5105 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
5106 pragmas.
5107
5108 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5109
5110 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
5111 attribute only if prefix type is scalar.
5112
5113 2011-08-04 Emmanuel Briot <briot@adacore.com>
5114
5115 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
5116 in gnatmake for specifying mains on the command line that do not belong
5117 to the main project. These mains must currently all belong to the same
5118 project, though.
5119 (Ultimate_Extension_Of): removed, since duplicated
5120 Ultimate_Extending_Project.
5121
5122 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5123
5124 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
5125 instead.
5126 (CodePeer_Mode_String): New.
5127 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
5128 CodePeer mode.
5129 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
5130 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
5131 mode, since no useful elaboration subprogram is needed by CodePeer.
5132 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
5133 In this mode, compile binder file with -gnatC and do stop after this
5134 step.
5135
5136 2011-08-04 Vincent Celier <celier@adacore.com>
5137
5138 * exp_ch7.adb: Minor comment fix.
5139
5140 2011-08-04 Robert Dewar <dewar@adacore.com>
5141
5142 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
5143 exp_ch4.adb, makeutl.adb: Minor reformatting.
5144
5145 2011-08-04 Emmanuel Briot <briot@adacore.com>
5146
5147 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
5148 Create several new subprograms to move code out of Make. This makes the
5149 code more readable, removes code duplication, and is a preparation work
5150 for adding support for aggregate projects.
5151
5152 2011-08-04 Tristan Gingold <gingold@adacore.com>
5153
5154 * s-po32gl.ads, s-po32gl.adb: New files.
5155 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
5156 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
5157 (Build_Finalization_Collection): Use it.
5158 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
5159 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
5160 literals.
5161 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
5162 * gcc-interface/Make-lang.in: Update dependencies.
5163
5164 2011-08-04 Emmanuel Briot <briot@adacore.com>
5165
5166 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
5167 the command line.
5168
5169 2011-08-04 Emmanuel Briot <briot@adacore.com>
5170
5171 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
5172 command line is not a file name, also check whether it could be a unit
5173 name.
5174
5175 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5176
5177 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
5178 the header of the finalization routine.
5179 If the unit has no finalizer but is a body whose spec has one, then
5180 generate the decrement of the elaboration entity only.
5181 If the unit has a finalizer and is a spec, then do not generate the
5182 decrement of the elaboration entity.
5183 (Gen_Finalize_Library_C): Likewise.
5184
5185 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5186
5187 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
5188 (Bounds_Size_Expression): Removed.
5189 (Double_Alignment_Of): New subsidiary routine.
5190 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
5191 for a hole in the dope vector of unconstrained arrays due to different
5192 index and element alignments.
5193
5194 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5195
5196 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
5197 raise program_error because body has not been seen yet.
5198
5199 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5200
5201 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
5202 an unresolved name.
5203
5204 2011-08-04 Vincent Celier <celier@adacore.com>
5205
5206 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
5207
5208 2011-08-04 Yannick Moy <moy@adacore.com>
5209
5210 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
5211 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
5212
5213 2011-08-04 Thomas Quinot <quinot@adacore.com>
5214
5215 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
5216 instantiation in RCI.
5217
5218 2011-08-04 Emmanuel Briot <briot@adacore.com>
5219
5220 * make.adb: Share more code with gprbuild
5221
5222 2011-08-04 Emmanuel Briot <briot@adacore.com>
5223
5224 * projects.texi: Added documentation for the IDE'Gnat project file
5225 attribute.
5226
5227 2011-08-04 Nicolas Roche <roche@adacore.com>
5228
5229 * gnat_rm.texi: Minor editing.
5230
5231 2011-08-04 Javier Miranda <miranda@adacore.com>
5232
5233 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
5234 and the library case for VM targets.
5235 (Gen_Adainit_Ada): Likewise.
5236
5237 2011-08-04 Robert Dewar <dewar@adacore.com>
5238
5239 * g-altive.ads: Minor comment updates.
5240 * prj-nmsc.adb: Minor reformatting.
5241
5242 2011-08-04 Javier Miranda <miranda@adacore.com>
5243
5244 * opt.ads
5245 (Normalize_Scalars_Config): Value of the configuration switch set by
5246 pragma Normalize_Scalars when it appears in the gnat.adc file.
5247 (Normalize_Scalars): New field for record Config_Switches_Type. Used
5248 to save and restore settings of this pragma.
5249 * opt.adb
5250 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
5251 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
5252
5253 2011-08-04 Vincent Celier <celier@adacore.com>
5254
5255 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
5256
5257 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5258
5259 * makeutl.adb: Minor reformatting.
5260
5261 2011-08-04 Olivier Hainque <hainque@adacore.com>
5262
5263 * g-altive.ads: Update comments to reflect that only the soft
5264 binding is available today.
5265
5266 2011-08-04 Robert Dewar <dewar@adacore.com>
5267
5268 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
5269 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
5270 * gcc-interface/Make-lang.in: Update dependencies.
5271
5272 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5273
5274 * prj-env.adb: Remove local debug traces.
5275
5276 2011-08-04 Yannick Moy <moy@adacore.com>
5277
5278 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
5279 was used instead of Hi_OK, which could cause a read of an uninitialized
5280 value later on. Detected while working on the new warning.
5281 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
5282 to local variable.
5283 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
5284 in more cases, in order to detect more unreferenced values.
5285 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
5286 object for expression, if any.
5287
5288 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5289
5290 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
5291 the operand types instead of the Esize.
5292
5293 2011-08-04 Steve Baird <baird@adacore.com>
5294
5295 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
5296 enable CodePeer_Mode.
5297 * bindusg.adb (Display): Add help message describing -P binder switch.
5298 * gnat_ugn.texi: Document -P binder switch.
5299 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
5300 user-defined main program directly.
5301 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
5302 user-defined main program in the context clause of the package body.
5303
5304 2011-08-04 Yannick Moy <moy@adacore.com>
5305
5306 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
5307 duplicate of Defining_Entity
5308 (Get_Unique_Entity_For_Decl): rename function into
5309 Unique_Defining_Entity
5310 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
5311 (Formal_Proof_On): remove synthesized flag
5312 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5313 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
5314 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
5315 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
5316 Annotate (Formal_Proof)
5317
5318 2011-08-04 Emmanuel Briot <briot@adacore.com>
5319
5320 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
5321 source files with non-standard naming schemes, in imported projects
5322
5323 2011-08-04 Emmanuel Briot <briot@adacore.com>
5324
5325 * makeutl.adb (Complete_Mains): when a multi-unit source file is
5326 specified on the gprbuild command line, we need to compile all units
5327 within that file, not just the first one we find
5328 Fix error message for mains that are not found.
5329
5330 2011-08-04 Thomas Quinot <quinot@adacore.com>
5331
5332 * sem_ch6.adb: Update comment.
5333 * sem_ch12.adb: Minor reformatting.
5334
5335 2011-08-04 Bob Duff <duff@adacore.com>
5336
5337 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
5338 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
5339 race condition whose symptom is to fail to lock Parent. That, in turn,
5340 causes Parent.Awake_Count to be accessed without locking Parent, which
5341 causes another race condition whose symptom is that Parent.Awake_Count
5342 can be off by 1 (either too high or too low). The solution is to lock
5343 Parent unconditionally, and then lock Acceptor, before reading
5344 Acceptor.Terminate_Alternative.
5345
5346 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5347
5348 * debug.adb: Update comment.
5349
5350 2011-08-04 Robert Dewar <dewar@adacore.com>
5351
5352 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
5353 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
5354 exp_ch6.adb: Minor reformatting.
5355
5356 2011-08-04 Gary Dismukes <dismukes@adacore.com>
5357
5358 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
5359 checks for -gnateE.
5360
5361 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5362
5363 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
5364
5365 2011-08-04 Thomas Quinot <quinot@adacore.com>
5366
5367 * sinfo.ads: Minor reformatting.
5368
5369 2011-08-04 Emmanuel Briot <briot@adacore.com>
5370
5371 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
5372 even if there is no location.
5373
5374 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5375
5376 * sem_res.adb, sem_ch4.adb: move check for restriction
5377 No_Task_Hierarchy to resolve_allocator.
5378
5379 2011-08-04 Thomas Quinot <quinot@adacore.com>
5380
5381 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
5382 This flag of N_Pragma nodes is not used, remove it as well as all of
5383 the associated circuitry.
5384
5385 2011-08-04 Javier Miranda <miranda@adacore.com>
5386
5387 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
5388 runtime check on duplicated externa tags
5389 * debug.adb Document switch -gnatdQ.
5390
5391 2011-08-04 Gary Dismukes <dismukes@adacore.com>
5392
5393 * a-fihema.ads: Minor typo fix.
5394
5395 2011-08-04 Yannick Moy <moy@adacore.com>
5396
5397 * sem_ch10.adb: Minor comment update.
5398
5399 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5400
5401 * einfo.adb: Update the node field usage to reflect the renaming of
5402 Return_Flag to Return_ Flag_Or_Transient_Decl.
5403 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
5404 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
5405 (Write_Field15_Name): Change Return_Flag to
5406 Return_Flag_Or_Transient_Decl.
5407 * einfo.ads: Rename node field Return_Flag to
5408 Return_Flag_Or_Transient_Decl. Update the associated comment and all
5409 occurrences in entities.
5410 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
5411 associated Inline pragma.
5412 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
5413 associated Inline pragma.
5414 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
5415 routine.
5416 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
5417 Return_Flag and Set_Return_Flag.
5418 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
5419 objects generated for controlled transients declared inside an
5420 Exception_With_Actions. Update the calls to Return_Flag.
5421 (Process_Object_Declaration): Add code to add a null guard for hook
5422 objects generated for controlled transients declared inside an
5423 Exception_With_Actions. Update related comment.
5424 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
5425 objects generated for controlled transients declared inside an
5426 Exception_With_Actions. Update the calls to Return_Flag.
5427 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
5428
5429 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5430
5431 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
5432 positional aggregate.
5433
5434 2011-08-04 Vincent Celier <celier@adacore.com>
5435
5436 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
5437 SLOC only for pragmas.
5438
5439 2011-08-04 Emmanuel Briot <briot@adacore.com>
5440
5441 * projects.texi: Minor typo fix.
5442
5443 2011-08-04 Emmanuel Briot <briot@adacore.com>
5444
5445 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
5446 on case-sensitive file systems.
5447
5448 2011-08-04 Thomas Quinot <quinot@adacore.com>
5449
5450 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
5451 nested in a disabled pragma.
5452 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
5453 enclosing pragma, if any, for X decisions.
5454
5455 2011-08-04 Thomas Quinot <quinot@adacore.com>
5456
5457 * sem_prag.adb: Minor reformatting.
5458
5459 2011-08-04 Vincent Celier <celier@adacore.com>
5460
5461 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
5462 allowed in no run time mode.
5463
5464 2011-08-04 Vincent Celier <celier@adacore.com>
5465
5466 * make.adb (Check): When -gnatc is used, check for the source file
5467 inside the ALI file with a canonical case file name.
5468
5469 2011-08-04 Emmanuel Briot <briot@adacore.com>
5470
5471 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
5472 overriding the separator.
5473
5474 2011-08-04 Robert Dewar <dewar@adacore.com>
5475
5476 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
5477 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
5478
5479 2011-08-04 Robert Dewar <dewar@adacore.com>
5480
5481 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
5482
5483 2011-08-04 Yannick Moy <moy@adacore.com>
5484
5485 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
5486 'Result only appears in postcondition of function.
5487
5488 2011-08-04 Thomas Quinot <quinot@adacore.com>
5489
5490 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
5491 external tag, include the value of the external tag in the exception
5492 message.
5493
5494 2011-08-04 Yannick Moy <moy@adacore.com>
5495
5496 * sem_attr.adb (Result): modify error message for misplaced 'Result
5497
5498 2011-08-04 Sergey Rybin <rybin@adacore.com>
5499
5500 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
5501 clear that the second argument must be an identifier.
5502
5503 2011-08-04 Thomas Quinot <quinot@adacore.com>
5504
5505 * exp_ch9.adb (Build_Barrier_Function): When compiling with
5506 -fpreserve-control-flow, insert an IF statement on the barrier
5507 condition to ensure that a conditional branch instruction is generated.
5508
5509 2011-08-04 Emmanuel Briot <briot@adacore.com>
5510
5511 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
5512 (Processing_Flags.Ignore_Missing_With): new flag.
5513
5514 2011-08-04 Emmanuel Briot <briot@adacore.com>
5515
5516 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
5517 Source_List_File on case-insensitive systems where the file is actually
5518 on a case-sensitive file system (NFS,...).
5519
5520 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5521
5522 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
5523 function return contains a controlled [extension] aggregate and the
5524 return statement is not part of a handled sequence of statements, wrap
5525 the return in a block. This ensures that all controlled temporaries
5526 generated during aggregate resolution will be picked up by the
5527 finalization machinery.
5528
5529 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5530
5531 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
5532 components, freeze type before resolution, to ensure that default
5533 initializations are present for all components.
5534 * sem_res.adb (Resolve_Actuals): the designated object of an
5535 accces-to-constant type is a legal actual in a call to an
5536 initialization procedure.
5537
5538 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5539
5540 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
5541 N_Unchecked_Type_Conversion to the possible containers of a renamed
5542 transient variable.
5543
5544 2011-08-04 Yannick Moy <moy@adacore.com>
5545
5546 * par-ch13.adb (Aspect_Specifications_Present): recognize
5547 "with Identifier'Class =>" as an aspect, so that a meaningful warning
5548 is issued in Strict mode.
5549 * par.adb: Fix typos in comments.
5550
5551 2011-08-04 Yannick Moy <moy@adacore.com>
5552
5553 * sem_attr.adb (Result): modify error message to take into account Post
5554 aspect when compiling Ada 2012 (or newer) code.
5555
5556 2011-08-04 Nicolas Roche <roche@adacore.com>
5557
5558 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
5559 remove need for GCC exceptions.
5560
5561 2011-08-04 Vincent Celier <celier@adacore.com>
5562
5563 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
5564 project, not the source file name.
5565 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
5566 excluded, continue looking. This excluded source will only be returned
5567 if there is no other source with the same base name that is not locally
5568 removed.
5569
5570 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5571
5572 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
5573 private and one of the operands is a real literal, use a qualified
5574 expression rather than a conversion which is not meaningful to the
5575 back-end.
5576
5577 2011-08-04 Yannick Moy <moy@adacore.com>
5578
5579 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
5580 corresponding aspect X'Class are allowed, proceed with analysis of the
5581 aspect instead of skipping it.
5582
5583 2011-08-04 Tristan Gingold <gingold@adacore.com>
5584
5585 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
5586 This will allow to have an Ada implementation for the subprogram.
5587
5588 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5589
5590 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
5591 completion and aspects are present, apply them to the entity for the
5592 type which is currently the partial view, but which is the one that
5593 will be frozen.
5594 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
5595 applies to a partial view, indicate that the full view has predicates
5596 and delayed aspects.
5597 (Replace_Type_Reference): Handle properly predicates that apply to the
5598 full view of a private completion.
5599
5600 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5601
5602 * layout.adb (Layout_Type): For composite types, do not set Esize.
5603 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
5604 set Esize.
5605 (Size_Known): Look at the RM size of components instead of the Esize.
5606 (Freeze_Record_Type): Look at the RM size instead of the Esize to
5607 issue warning and activate Implicit_Packing.
5608 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
5609 if the Esize is not known.
5610 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
5611 for elementary types only.
5612 (Analyze_Record_Representation_Clause): Look at the RM size instead
5613 of the Esize to issue errors.
5614 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
5615 is not known.
5616 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
5617 obsolete block.
5618 Look at the RM size instead of the Esize for types if the latter is
5619 not known.
5620 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
5621
5622 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5623
5624 * sem_type.adb: proper handling of equality not involving anonymous
5625 access types.
5626
5627 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5628
5629 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
5630 Vis_Decls. When creating a library-level finalizer for a package spec,
5631 both the declaration and body of the finalizer are inserted either in
5632 the visible or private declarations of the package spec.
5633
5634 2011-08-04 Javier Miranda <miranda@adacore.com>
5635
5636 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
5637 use of the full-view of a type when invoking Is_Ancestor.
5638 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
5639 the full-view of private parents is requested, then use also the
5640 full-view of the parent of the first derivation.
5641
5642 2011-08-04 Tristan Gingold <gingold@adacore.com>
5643
5644 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
5645 instead of the locally imported procedure.
5646 * s-taprop-mingw.adb (Enter_Task): Ditto.
5647 * s-valrea.adb (Scan_Real): Ditto.
5648 * s-imgrea.adb (Set_Image_Real): Ditto.
5649 * s-flocon.ads: Make the package pure.
5650
5651 2011-08-04 Thomas Quinot <quinot@adacore.com>
5652
5653 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
5654 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
5655 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
5656 New subprogram, moved here from...
5657 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
5658 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
5659 rewriting of the last argument into a procedure call statement here...
5660 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
5661 instead.
5662
5663 2011-08-04 Thomas Quinot <quinot@adacore.com>
5664
5665 * par_sco.adb: Minor reformatting.
5666
5667 2011-08-04 Robert Dewar <dewar@adacore.com>
5668
5669 * erroutc.adb: Minor reformatting.
5670
5671 2011-08-04 Thomas Quinot <quinot@adacore.com>
5672
5673 * par_sco.adb: Comment update.
5674
5675 2011-08-04 Tristan Gingold <gingold@adacore.com>
5676
5677 * s-flocon.ads: New file.
5678 * g-flocon.ads: Now a renaming of s-flocon.
5679 * Makefile.rtl: Add s-flocon.o
5680
5681 2011-08-04 Javier Miranda <miranda@adacore.com>
5682
5683 * exp_strm.adb (Build_Array_Input_Function): if the array type is
5684 constrained, do not attempt to build a subtype of it.
5685
5686 2011-08-04 Yannick Moy <moy@adacore.com>
5687
5688 * errout.ads Change comments: remove 'R'M as an example where quotes
5689 are needed; add ALFA as another case where quotes are not needed
5690 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
5691 case where quotes are not needed.
5692 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5693 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
5694 Remove all occurrences of 'A'L'F'A
5695
5696 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5697
5698 * sem_ch13.adb: check legality of invariant pragma.
5699
5700 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5701
5702 * bindgen.adb: Add comments.
5703
5704 2011-08-04 Yannick Moy <moy@adacore.com>
5705
5706 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
5707 synthesized flag.
5708 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
5709 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
5710
5711 2011-08-04 Robert Dewar <dewar@adacore.com>
5712
5713 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
5714 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
5715 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
5716
5717 2011-08-04 Thomas Quinot <quinot@adacore.com>
5718
5719 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
5720
5721 2011-08-04 Thomas Quinot <quinot@adacore.com>
5722
5723 PR ada/47880
5724 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
5725 allocated object.
5726
5727 2011-08-04 Robert Dewar <dewar@adacore.com>
5728
5729 * einfo.ads, exp_ch4.adb: Minor reformatting.
5730
5731 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5732
5733 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
5734
5735 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5736
5737 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
5738 type in all cases to compute list of primitive operations, because full
5739 view may be an itype that is not attached to the list of declarations.
5740
5741 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5742
5743 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
5744 library has already been finalized.
5745 (Gen_Adafinal_C): Likewise.
5746 (Gen_Adainit_Ada): Generate an early return if the library has
5747 already been elaborated.
5748 (Gen_Adainit_C): Likewise.
5749 (Gen_Output_File_Ada): Generate an elaboration flag.
5750 (Gen_Output_File_C): Likewise.
5751
5752 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5753
5754 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
5755 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
5756 built in the first place.
5757 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
5758 for CodePeer because Finalize_Address was not built to begin with.
5759 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
5760
5761 2011-08-04 Pascal Obry <obry@adacore.com>
5762
5763 * adaint.c (__gnat_tmp_name): Use current process id to create temp
5764 filenames, this ensures unicity of filenames across processes.
5765
5766 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5767
5768 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
5769 Raise_Controlled to Raise_From_Controlled_Operation. Update the
5770 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
5771 Add False as the actual to From_Abort in the generated call to
5772 Raise_From_Controlled_Operation.
5773
5774 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5775
5776 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
5777 so that the ali file name can be retrieved from outside of this package.
5778 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
5779 doing nothing in the general case, but used to update the object file
5780 timestamp if directly generated by the backend.
5781 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5782 to a later time than the ali file one.
5783
5784 2011-08-04 Yannick Moy <moy@adacore.com>
5785
5786 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5787 entities whose body contains an Annotate pragma which forces formal
5788 proof on this body.
5789 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5790 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5791 Mark_Non_ALFA_Subprogram to pass in a message and node.
5792 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5793 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5794 surrounding subprogram.
5795 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5796 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5797 as not in ALFA is annotated with Formal_Proof being On, then an error
5798 is issued based on the additional parameters for message and node.
5799 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5800 * gcc-interface/Make-lang.in: Update dependencies.
5801
5802 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5803
5804 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5805 Finalize_Address when CodePeer is enabled.
5806
5807 2011-08-04 Pascal Obry <obry@adacore.com>
5808
5809 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5810 the latter returns a pointer to a static buffer which is deallocated
5811 at the end of the routine.
5812
5813 2011-08-04 Yannick Moy <moy@adacore.com>
5814
5815 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5816 after index creation; mark unconstrained base array type generated as
5817 being in/not in ALFA as well
5818 (Make_Index): mark subtype created as in/not in ALFA
5819 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5820 over a loop as in/not in ALFA, depending on its type and form of loop
5821 iteration.
5822
5823 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5824
5825 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5826 directly to False on .NET and JVM.
5827
5828 2011-08-04 Yannick Moy <moy@adacore.com>
5829
5830 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5831 constraint that subtype must come from source code to be in ALFA, so
5832 that anonymous subtypes can be in ALFA too.
5833
5834 2011-08-04 Yannick Moy <moy@adacore.com>
5835
5836 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5837 reference for ALFA mode.
5838 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5839 procedure public so as to use it from formal verification back-end.
5840
5841 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5842
5843 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5844 invalid checks of the Parameter, making Remove_Switch not working
5845 correctly.
5846
5847 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5848
5849 * targparm.ads: Update header: no run-time exception is needed on this
5850 file.
5851
5852 2011-08-04 Vincent Celier <celier@adacore.com>
5853
5854 * a-fihema.adb: Use System.IO instead of GNAT.IO
5855
5856 2011-08-04 Thomas Quinot <quinot@adacore.com>
5857
5858 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5859 are forbidden in Compiler_Unit mode.
5860
5861 2011-08-04 Robert Dewar <dewar@adacore.com>
5862
5863 * sem_util.adb: Minor reformatting.
5864
5865 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5866
5867 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5868 library-level finalizers.
5869 (Gen_Finalize_Library_C): Update the import string for library-level
5870 finalizers.
5871 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5872 library-level finalizer.
5873 * exp_ch7.adb: Remove with and use clauses for Stringt.
5874 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5875 Spec_Decl. Add local variable Body_Id. The names of library-level
5876 finalizers are now manually fully qualified and are no longer external.
5877 A single name is now capable of servicing .NET, JVM and non-VM targets.
5878 Pragma Export is no longer required to provide visibility for the name.
5879 (Create_Finalizer_String): Removed.
5880 (New_Finalizer_Name): New routine which mimics New_..._Name.
5881
5882 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5883
5884 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5885 elaboration counter to Standard_Short_Integer.
5886 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5887 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5888 (Gen_Elab_Externals_C): Likewise.
5889
5890 2011-08-04 Ed Falis <falis@adacore.com>
5891
5892 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5893 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5894 system-vxworks-mips.ads, system-vxworks-x86.ads
5895 (Always_Compatible_Rep): set to False for all VxWorks targets.
5896
5897 2011-08-04 Robert Dewar <dewar@adacore.com>
5898
5899 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5900 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5901 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5902 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5903 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5904 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5905 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5906 Minor reformatting and code reorganization.
5907
5908 2011-08-04 Emmanuel Briot <briot@adacore.com>
5909
5910 * projects.texi: Added doc for aggregate projects.
5911
5912 2011-08-04 Emmanuel Briot <briot@adacore.com>
5913
5914 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5915 Add support for overriding the Project_Path in aggregate projects.
5916
5917 2011-08-04 Robert Dewar <dewar@adacore.com>
5918
5919 * a-cofove.ads: Minor reformatting.
5920
5921 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5922
5923 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5924 on the generated code.
5925 (Build_Finalize_Statements): Update the comment on the generated code.
5926 (Build_Initialize_Statements): Update the comment on the generated code.
5927 (Build_Object_Declarations): Add local variable Result. The object
5928 declarations are now built in sequence.
5929 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5930 RE_Unit_Table.
5931
5932 2011-08-04 Robert Dewar <dewar@adacore.com>
5933
5934 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5935
5936 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5937
5938 * einfo.ads (Elaboration_Entity): Document new definition and use.
5939 (Elaboration_Entity_Required): Adjust to above change.
5940 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5941 * exp_ch12.adb: And with and use for Snames.
5942 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5943 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5944 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5945 <Check_Unit_Name>: Deal with N_Expanded_Name.
5946 <Attribute_Elaborated>: Extend to all unit names.
5947 * sem_elab.adb: And with and use for Uintp.
5948 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5949 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5950 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5951 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5952 from Gen_Adainit_Ada.
5953 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5954 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5955 case, do not call System.Standard_Library.Adafinal; instead call
5956 finalize_library if needed.
5957 (Gen_Adafinal_C): Likewise.
5958 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5959 non-main program case.
5960 (Gen_Adainit_C): Generate a couple of external declarations here.
5961 In the main program case, set SSL.Finalize_Library_Objects.
5962 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5963 (Gen_Elab_Calls_C): Likewise.
5964 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5965 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5966 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5967 objects here.
5968 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5969 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5970 Gen_Adafinal_Ada.
5971 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5972 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5973 of external declarations. Call Gen_Finalize_Library_C.
5974
5975 2011-08-04 Emmanuel Briot <briot@adacore.com>
5976
5977 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5978 Compute_Compilation_Phases): new subprogram.
5979 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5980 The number of mains as well as the various compilation phases that
5981 need to be run are now project tree specific, since various
5982 aggregated trees might have different requirements. In particular,
5983 they do not all require bind or link phases.
5984
5985 2011-08-04 Emmanuel Briot <briot@adacore.com>
5986
5987 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5988 (Project_Tree_Appdata): New type.
5989 It is now possible to associate application-specific data to a project
5990 tree. In particular, this is used in the gprbuild builder to avoid a
5991 number of global tables and htables, especially now that there can be
5992 several project trees loaded at once because of aggregate projects.
5993 (Debug_Name): new procedure.
5994 * projects.texi: Clarify syntax of "**" for Source_Dirs
5995
5996 2011-08-03 Emmanuel Briot <briot@adacore.com>
5997
5998 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5999 the "roots" for a main.
6000 (Fill_From_Project): add support for aggregate projects. Main units
6001 in aggregated projects are now automatically added in the list of
6002 files to build (although this fails later on in gprbuild, because
6003 these files are not using the root proejct tree, so this needs
6004 further cleanup)
6005 * gcc-interface/Make-lang.in: Update dependencies.
6006
6007 2011-08-03 Yannick Moy <moy@adacore.com>
6008
6009 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
6010 conditional expression in ALFA.
6011 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
6012 expressions as not in ALFA.
6013
6014 2011-08-03 Robert Dewar <dewar@adacore.com>
6015
6016 * a-cofove.adb: Minor reformatting.
6017
6018 2011-08-03 Emmanuel Briot <briot@adacore.com>
6019
6020 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
6021 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
6022 gprbuild sources.
6023 These packages are more logically placed in the Queue package, since
6024 they manipulate the queue. It is also likely that they can be adapted
6025 for gnatmake, thus sharing more code.
6026 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
6027 that we could move the above.
6028
6029 2011-08-03 Emmanuel Briot <briot@adacore.com>
6030
6031 * errutil.adb (Finalize): clean up the list of error messages on exit.
6032 Calling this subprogram multiple times will no longer show duplicate
6033 error messages on stderr.
6034
6035 2011-08-03 Emmanuel Briot <briot@adacore.com>
6036
6037 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
6038 Getopt_Switches when we have already define a command line
6039 configuration.
6040
6041 2011-08-03 Yannick Moy <moy@adacore.com>
6042
6043 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
6044 in ALFA. Instead, they are considered as assertions to prove.
6045 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
6046 nodes as not in ALFA. Instead, include conditional expressions in ALFA
6047 if they have no ELSE part, or if they occur in pre- and postconditions,
6048 where the Condition cannot have side-effects in ALFA
6049 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
6050 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
6051 Instead, include type conversion between scalar types in ALFA.
6052 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
6053 if-and-only-if its type is in ALFA.
6054
6055 2011-08-03 Thomas Quinot <quinot@adacore.com>
6056
6057 * scos.adb, get_scos.adb, put_scos.adb
6058 New code letter for decisions: G (entry guard)
6059 * par_sco.adb
6060 (Traverse_Subprogram_Body): Rename to...
6061 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
6062 (Traverse_Protected_Body): New subprogram
6063 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
6064 protected bodies and entry bodies.
6065
6066 2011-08-03 Yannick Moy <moy@adacore.com>
6067
6068 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
6069 entities with get/set subprograms, which is set on procedure entities
6070 generated by the compiler for a postcondition.
6071 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
6072 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
6073 entity for a declaration
6074 (Get_Unique_Entity_For_Decl): new function returning an entity which
6075 represents a declaration, so that matching spec and body have the same
6076 entity.
6077
6078 2011-08-03 Robert Dewar <dewar@adacore.com>
6079
6080 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
6081 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
6082
6083 2011-08-03 Yannick Moy <moy@adacore.com>
6084
6085 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
6086 library-level because retriction No_Implicit_Dynamic_Code in the
6087 front-end prevents its definition as a local subprogram
6088 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
6089 for reuse in other contexts
6090 (Traverse_Declarations_Or_Statements,
6091 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6092 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
6093 procedures take a callback parameter to be called on all declarations
6094 * lib-xref.ads
6095 (Traverse_All_Compilation_Units): new generic function to traverse a
6096 compilation unit and call a callback parameter on all declarations
6097
6098 2011-08-03 Javier Miranda <miranda@adacore.com>
6099
6100 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
6101 in Java since they are always enclosed in a namespace that
6102 differentiates them, and overloaded entities are supported by the VM.
6103
6104 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6105
6106 * checks.adb (Determine_Range): If a computed bound of an operation is
6107 outside the range of the base type of the expression, and overflow
6108 checks are enabled, the result is unknown and cannot be used for any
6109 subsequent constant folding.
6110 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
6111 unknown, so is the result of the comparison.
6112
6113 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6114
6115 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
6116 From_Abort. When finalization was triggered by an abort, propagate
6117 Standard'Abort_Signal rather than Program_Error.
6118 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
6119 From_Abort.
6120 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
6121 From_Abort. When finalization was triggered by an abort, propagate
6122 Standard'Abort_Signal rather than Program_Error.
6123 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
6124 From_Abort.
6125 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
6126 Abort_Id. Update the calls to Build_Object_Declarations and
6127 Build_Raise_Statement to include Abort_Id.
6128 (Build_Adjust_Statements): New local variable Abort_Id. Update the
6129 calls to Build_Object_Declarations and Build_Raise_Statement to include
6130 Abort_Id.
6131 (Build_Finalize_Statements): New local variable Abort_Id. Update the
6132 calls to Build_Object_Declarations and Build_Raise_Statement to include
6133 Abort_Id.
6134 (Build_Components): Create an entity for Abort_Id when exceptions are
6135 allowed on the target.
6136 (Build_Finalizer): New local variable Abort_Id.
6137 (Build_Initialize_Statements): New local variable Abort_Id. Update the
6138 calls to Build_Object_Declarations and Build_Raise_Statement to include
6139 Abort_Id.
6140 (Build_Object_Declarations): Add new formal Abort_Id. Create the
6141 declaration of flag Abort_Id to preserve the original abort status
6142 before finalization code is executed.
6143 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
6144 runtime routine Raise_From_Controlled_Operation.
6145 (Create_Finalizer): Update the call to Build_Raise_Statement to include
6146 Abort_Id. Update the call to Build_Object_Declarations to include
6147 Abort_Id. Update the layout of the finalizer body.
6148 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
6149 (Process_Transient_Objects): New local variable Abort_Id. Remove the
6150 clunky code to create all flags and objects related to
6151 exception propagation and replace it with a call to
6152 Build_Object_Declarations. Update the call to Build_Raise_Statement to
6153 include Abort_Id.
6154 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
6155 Add new formal Abort_Id and associated comment on its use.
6156 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
6157 on its use.
6158 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
6159 Remove the clunky code to create all flags and objects related to
6160 exception propagation and replace it with a call to
6161 Build_Object_Declarations. Update the call to Build_Raise_Statement.
6162
6163 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6164
6165 * s-tassta.adb: Fix minor typos.
6166
6167 2011-08-03 Robert Dewar <dewar@adacore.com>
6168
6169 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
6170 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
6171
6172 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6173
6174 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
6175 to packages. This ensures that the finalizer body will not end up
6176 inside the freeze node.
6177 (Process_Declarations): Add code to detect whether a freeze node has a
6178 nested finalization collection.
6179
6180 2011-08-03 Pascal Obry <obry@adacore.com>
6181
6182 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
6183 (Current_Session): Return a not null access to Session_Type.
6184 (Default_Session): Likewise.
6185
6186 2011-08-03 Robert Dewar <dewar@adacore.com>
6187
6188 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
6189 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
6190
6191 2011-08-03 Pascal Obry <obry@adacore.com>
6192
6193 * g-awk.ads: Minor comment fix.
6194
6195 2011-08-03 Sergey Rybin <rybin@adacore.com>
6196
6197 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6198 the tree structure related to discriminant constraints.
6199 Original_Discriminant cannot be used any more for computing the
6200 defining name for the reference to a discriminant.
6201
6202 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6203
6204 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
6205 function is not visibly tagged, this is not a dispatching call and
6206 therfore is not Tag_Indeterminate, even if the function is marked as
6207 dispatching on result.
6208
6209 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6210
6211 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
6212 (Expand_N_Free_Statement): Add a guard to protect against run-times
6213 which do not support controlled types.
6214 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
6215 against run-times which do not support controlled types.
6216 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
6217 against run-times which do not support controlled types.
6218 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
6219 against run-times which do not support controlled types.
6220 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
6221 protect against run-times which do not support controlled types.
6222
6223 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6224
6225 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
6226 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
6227
6228 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6229
6230 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
6231 modified in the source, to prevent spurious warnings when compiling
6232 with -gnatg.
6233
6234 2011-08-03 Thomas Quinot <quinot@adacore.com>
6235
6236 * a-except-2005.adb: Minor reformatting.
6237
6238 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6239
6240 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
6241 is a renaming declaration in the private part of a package, do not emit
6242 a warning that the with_clause could be moved because the renaming may
6243 be used in the body or in a child unit.
6244
6245 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6246
6247 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6248 Propagate the Comes_From_Source attribute from the original return
6249 object to the renaming.
6250
6251 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6252
6253 * exp_ch7.adb (Build_Raise_Statement): Do not call
6254 Raise_From_Controlled_Operation when this routine is not present in
6255 the run-time library.
6256 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
6257 libraries (Ravenscar), tasks are non-terminating, and protected objects
6258 and tasks can only appear at library level, so we do not want
6259 finalization of protected objects nor tasks.
6260 * exp_intr.adb: Minor clarification in comment.
6261 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
6262 Gen_Output_File_C): Remove references to finalization of library-level
6263 objects when using restricted run-time libraries.
6264
6265 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6266
6267 * sem_ch3.adb (Build_Discriminant_Constraints): Set
6268 Original_Discriminant only if the parent type is a generic formal.
6269
6270 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6271
6272 * exp_ch13.adb: Add with and use clause for Targparm;
6273 (Expand_N_Free_Statement): Prevent the generation of a custom
6274 Deallocate on .NET/JVM targets since this requires pools and address
6275 arithmetic.
6276 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
6277 .NET/JVM targets, attach the newly allocated object to the access
6278 type's finalization collection. Do not generate a call to
6279 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
6280 exist in the runtime.
6281 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
6282 create a custom Allocate for object that do not require initialization.
6283 Attach a newly allocated object to the access type's finalization
6284 collection on .NET/JVM.
6285 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
6286 assignment of controlled types on .NET/JVM. The two hidden pointers
6287 Prev and Next and stored and later restored after the assignment takes
6288 place.
6289 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
6290 kludge for .NET/JVM to recognize a particular piece of code coming from
6291 Heap_Management and change the call to Finalize into Deep_Finalize.
6292 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
6293 finalization collections on .NET/JVM only for types derived from
6294 Controlled. Separate the association of storage pools with a collection
6295 and only allow it on non-.NET/JVM targets.
6296 (Make_Attach_Call): New routine.
6297 (Make_Detach_Call): New routine.
6298 (Process_Object_Declarations): Suppress the generation of
6299 build-in-place return object clean up code on .NET/JVM since it uses
6300 pools.
6301 * exp_ch7.ads (Make_Attach_Call): New routine.
6302 (Make_Detach_Call): New routine.
6303 * exp_intr.adb Add with and use clause for Targparm.
6304 (Expand_Unc_Deallocation): Detach a controlled object from a collection
6305 on .NET/JVM targets.
6306 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
6307 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
6308 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
6309 names used in finalization.
6310
6311 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6312
6313 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
6314 (Attach, Detach): Lock the current task when chaining an object onto a
6315 collection.
6316
6317 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6318
6319 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
6320 Rewritten to create the message strings when the exception is not
6321 raised by an abort during finalization.
6322 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
6323 Raise_From_Controlled_Operation and update its associated comment.
6324 * a-fihema.ads, a-fihema.adb: New GNAT unit.
6325 Ada.Finalization.Heap_Management provides key functionality
6326 associated with controlled objects on the heap, their creation,
6327 finalization and reclamation. Type Finalization_Collection is
6328 effectively a wrapper which sits ontop of a storage pool and performs
6329 all necessary bookkeeping for all the objects it contains. Each
6330 access-to-controlled or access-to-class-wide type receives a collection
6331 as part of its expansion. The compiler generates buffer code and
6332 invokes Allocate / Deallocate to create and destroy allocated
6333 controlled objects.
6334 * a-finali.adb ("="): Removed.
6335 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
6336 fields Prev and Next.
6337 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
6338 A library unit with at least one controlled object on the library level
6339 has a special finalizer which is invoked by the binder. To signal this,
6340 ali files carry field PF.
6341 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
6342 associated comment on field usage.
6343 * a-tags.adb (Get_RC_Offset): Removed.
6344 (Needs_Finalization): New routine.
6345 * a-tags.ads: Update the structure of the GNAT dispatch tables.
6346 Dispatch tables now carry field Needs_Finalization which provides
6347 runtime indication whether a type is controlled or has controlled
6348 components or both. Remove field RC_Offset.
6349 (Get_RC_Offset): Removed along with its associated pragma Export.
6350 Since tagged types with controlled components no longer carry hidden
6351 field _controller, the special mechanism to retrieve its location is no
6352 longer needed.
6353 (Needs_Finalization): New routine.
6354 * atree.ads, atree.adb (Elist24): New routine.
6355 (Set_Elist24): New routine.
6356 * atree.h: Add a define clause for Elist24.
6357 * bindgen.adb New library-level variable Lib_Final_Built.
6358 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
6359 presence of a VM target, the routine generates calls to the proper
6360 library finalization routine.
6361 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
6362 targets. Set the correct library finalization routine depending on
6363 whether the library has controlled objects or this is a VM compilation.
6364 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
6365 to library-level finalizers of compiled units in reverse order of
6366 elaboration. It also produces exception management code and reraises a
6367 potential exception after all units have been finalized.
6368 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
6369 library-level finalizers of compiled units in reverse order of
6370 elaboration.
6371 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
6372 definitions of all library-level finalizers available to the compilation
6373 (Gen_Main_Ada): Directly call Adafinal which now contails all target
6374 dependent code.
6375 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
6376 System.Standard_Library.Adafinal directly. If the library needs
6377 finalization actions, create the sequence of finalization calls.
6378 (Gen_Output_File_Ada): Alphabetize local variables and constants.
6379 Generate a with clause for System.Soft_Links when compiling for a VM.
6380 Remove the code which imports System.Standard_Library.Adafinal as
6381 Do_Finalize. Generate the library finalization routine.
6382 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
6383 If the library needs finalization actions, create all the definitions
6384 of library- level finalizers.
6385 (Has_Finalizer): New routine. Determines whether at least one compiled
6386 unit has a library-level finalizer.
6387 Add type Qualification_Mode.
6388 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
6389 * einfo.adb: New usage of field 15 as Return_Flag.
6390 Remove Finalization_Chain_Entity from the usages of field 19.
6391 Remove Associated_Final_Chain from the usages of field 23.
6392 New usage of field 23 as Associated_Collection.
6393 New usage of field 24 as Finalizer.
6394 New usage of flag 252 as Is_Processed_Transient.
6395 (Associated_Final_Chain): Removed.
6396 (Associated_Collection): New routine.
6397 (Finalization_Chain_Entity): Removed.
6398 (Finalizer): New routine.
6399 (Is_Finalizer): New routine.
6400 (Is_Processed_Transient): New routine.
6401 (Return_Flag): New routine.
6402 (Set_Associated_Final_Chain): Removed.
6403 (Set_Associated_Collection): New routine.
6404 (Set_Finalization_Chain_Entity): Removed.
6405 (Set_Finalizer): New routine.
6406 (Set_Is_Processed_Transient): New routine.
6407 (Set_Return_Flag): New routine.
6408 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
6409 displayed flags.
6410 (Write_Field8_Name): Alphabetize the output.
6411 (Write_Field11_Name): Alphabetize the output.
6412 (Write_Field12_Name): Alphabetize the output.
6413 (Write_Field13_Name): Alphabetize the output.
6414 (Write_Field14_Name): Alphabetize the output.
6415 (Write_Field15_Name): Alphabetize the output.
6416 (Write_Field16_Name): Alphabetize the output.
6417 (Write_Field17_Name): Alphabetize the output.
6418 (Write_Field18_Name): Alphabetize the output.
6419 (Write_Field19_Name): Alphabetize the output. Remove the output of
6420 Finalization_Chain_Entity.
6421 (Write_Field20_Name): Alphabetize the output.
6422 (Write_Field21_Name): Alphabetize the output.
6423 (Write_Field22_Name): Alphabetize the output.
6424 (Write_Field23_Name): Alphabetize the output. Remove the output of
6425 Associated_Final_Chain. Add output for Associated_Collection.
6426 (Write_Field24_Name): Alphabetize the output.
6427 (Write_Field25_Name): Add output for Finalizer.
6428 (Write_Field26_Name): Alphabetize the output.
6429 (Write_Field27_Name): Alphabetize the output.
6430 (Write_Field28_Name): Alphabetize the output.
6431 * einfo.ads: Add new field description for Associated_Collection and
6432 its uses in nodes.
6433 Remove Associated_Final_Chain and its uses in nodes.
6434 Remove Finalization_Chain_Entity and its uses in nodes.
6435 Add new field description for Finalizer and its uses in nodes.
6436 Add new synthesized attribute Is_Finalizer.
6437 Add new flag description for Is_Processed_Transient and its uses in
6438 nodes.
6439 Add new field description for Return_Flag and its uses in nodes.
6440 (Associated_Final_Chain): Removed along with its pragma Inline.
6441 (Associated_Collection): New routine and pragma Inline.
6442 (Finalization_Chain_Entity): Removed along with its pragma Inline.
6443 (Finalizer): New routine and pragma Inline.
6444 (Is_Finalizer): New routine and pragma Inline.
6445 (Is_Processed_Transient): New routine and pragma Inline.
6446 (Return_Flag): New routine and pragma Inline.
6447 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
6448 (Set_Associated_Collection): New routine and pragma Inline.
6449 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
6450 (Set_Finalizer): New routine and pragma Inline.
6451 (Set_Is_Processed_Transient): New routine and pragma Inline.
6452 (Set_Return_Flag): New routine and pragma Inline.
6453 * exp_aggr.adb: Alphabetize subprograms.
6454 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
6455 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
6456 associated comments. Remove local variables External_Final_List and
6457 Attach.
6458 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
6459 Ancestor. Remove the retrieval of finalization lists. Update the call to
6460 Make_Adjust_Call.
6461 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
6462 lists. Update the call to Late_Expansion.
6463 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
6464 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
6465 (Gen_Assign): Remove the retrieval of the finalization list used to
6466 build the assignment. Update the calls to Make_Init_Call and
6467 Make_Adjust_Call.
6468 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
6469 Remove the mechanism to determine attachment levels and finalization
6470 list retrieval. Remove the processing for coextensions.
6471 (Init_Controller): Removed. Controllers no longer exist.
6472 (Late_Expansion): Remove formals Flist and Obj along with their
6473 associated comments. Update the calls to Build_Record_Aggr_Code and
6474 Build_Array_Aggr_Code.
6475 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
6476 (Expand_N_Freeze_Entity): Add special processing for finalizers which
6477 appear in entry bodies, protected subprograms and task bodies.
6478 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
6479 * exp_ch3.adb (Add_Final_Chain): Removed.
6480 (Build_Array_Init_Proc): Alphabetize local variables.
6481 (Build_Assignment): Alphabetize local variables. Update the call to
6482 Maked_Adjust_Call.
6483 (Build_Class_Wide_Master): Rename local variables to better reflect
6484 their role.
6485 (Build_Discriminant_Assignments): Code reformatting.
6486 (Build_Init_Call_Thru): Code reformatting.
6487 (Build_Init_Procedure): Code reformatting. Generate a special version
6488 of Deep_Finalize which is capable of finalizing all initialized
6489 components and ignore the rest.
6490 (Build_Init_Statements): Rename local variables to better reflect their
6491 role.
6492 Reimplement the mechanism to include the creation and update of an index
6493 variable called a "counter". It is used as a bookmark for tracing
6494 initialized and non-initialized components.
6495 (Build_Initialization_Call): Remove local variable Controller_Typ.
6496 Alphabetize all local variables. Remove the initialization of the
6497 record controller and update the call to Make_Init_Call.
6498 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
6499 New local variable Counter.
6500 (Constrain_Array): Alphabetize.
6501 (Expand_Freeze_Array_Type): Create a collection instead of a
6502 finalization list.
6503 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
6504 Finalize_Address which is used in conjunction with allocated controlled
6505 objects.
6506 (Expand_N_Object_Declaration): Remove the creation of a finalization
6507 list for anonymous access types. Update the calls to Make_Init_Call and
6508 Make_Adjust_Call.
6509 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
6510 retrieval of finalization lists. Remove the expansion of the record
6511 controller. Create TSS primitive Finalize_Address used in conjunction
6512 with controlled objects on the heap. Create finalization collections
6513 for access-to-controlled record components.
6514 (Expand_Record_Controller): Removed.
6515 (Freeze_Type): Remove the freezing of record controllers. Freezing of
6516 class-wide types now requires additional processing. Create
6517 finalization collections for access-to-controlled types.
6518 (Increment_Counter): New routine.
6519 (Make_Counter): New routine.
6520 (Make_Eq_If): Remove the mention of Name_uController.
6521 (Make_Predefined_Primitive_Specs): There is no longer need to skip
6522 types coming from System.Finalization_Root.
6523 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
6524 (Predefined_Primitive_Bodies): There is no longer need to skip types
6525 coming from System.Finalization_Root.
6526 (Stream_Operation_OK): Do not generate stream routines for
6527 type Ada.Finalization.Heap_Management.Finalization_Collection.
6528 * exp_ch3.ads: Alphabetize subprograms.
6529 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
6530 Add with and use clause for Lib.
6531 (Complete_Coextension_Finalization): Removed.
6532 (Complete_Controlled_Allocation): New routine. Create a finalization
6533 collection for anonymous access-to-controlled types. Create a custom
6534 Allocate which interfaces with the back end and the machinery in
6535 Heap_Management.
6536 (Expand_Allocator_Expression): Add necessary calls to
6537 Complete_Controlled_Allocation. Remove the retrieval of finalization
6538 lists. Update the calls to Make_Adjust_Call. Generate a call to
6539 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6540 the associated collection.
6541 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
6542 Code clean up. Remove the retrieval of finalization lists and
6543 attachment levels.
6544 Update the call to Make_Init_Call. Generate a call to
6545 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6546 the associated collection.
6547 (Get_Allocator_Final_List): Removed. Finalization lists are not
6548 available.
6549 (Suitable_Element): Remove the mention of Name_uController.
6550 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
6551 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
6552 the left hand side, carry out the assignment and adjust the left hand
6553 side.
6554 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
6555 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
6556 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
6557 BIP_Collection and BIPcollection.
6558 (Build_Heap_Allocator): New routine used to allocate the return object
6559 of a build-in-place function onto a collection.
6560 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
6561 (Expand_Call): Do not replace direct calls to Deep routines with their
6562 aliases.
6563 (Expand_N_Extended_Return_Statement): Give all variables shorter names
6564 and update their occurrences. Add a special return flag to monitor the
6565 [ab]normal execution of the function. The flag is set right before the
6566 return statement.
6567 Rewrite the mechanism used to allocate a build-in-place return object
6568 on the heap or on a storage pool.
6569 (Is_Direct_Deep_Call): New routine.
6570 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
6571 build-in-place function call instead of a final list. Build a call to
6572 Set_Finalize_Address_Ptr to decorate the associated collection.
6573 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
6574 order to name the build-in-place function call's result for later
6575 finalization. Add a collection to a build-in-place function call
6576 instead of a final list.
6577 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
6578 build-in-place function call instead of a final list. Remove the code
6579 which moves one final list and transforms it into the actual in a
6580 nested build-in-place call.
6581 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
6582 build-in-place function call instead of a final list.
6583 (Move_Final_List): Removed.
6584 (Needs_BIP_Collection): New routine.
6585 (Needs_BIP_Final_List): Removed.
6586 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
6587 enumeration type BIP_Formal_Kind.
6588 Update the related comment.
6589 (Needs_BIP_Collection): New routine.
6590 (Needs_BIP_Final_List): Removed.
6591 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
6592 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
6593 majority of subprograms in this unit. Add Name_Finalize_Address to
6594 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
6595 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
6596 statements for an array type.
6597 (Build_Adjust_Statements): Create the adjust statements for a record
6598 type.
6599 (Build_Cleanup_Statements): New routine. A procedure which given any
6600 construct containing asynchronous calls, references to _master, or is a
6601 task body, a task allocation or a protected body produces the necessary
6602 runtime calls to clean up these constructs.
6603 (Build_Exception_Handler): New routine.
6604 (Build_Final_List): Removed.
6605 (Build_Finalization_Collection): New routine. A core procedure which
6606 creates a collection to service heap allocated controlled objects
6607 associated with an access-to-controlled type.
6608 (Build_Finalize_Statements): Create the finalization statements for a
6609 record types.
6610 (Build_Finalizer): New routine. A core procedure which given any
6611 construct with declarations and/or statements detects all objects which
6612 need any type of clean up (controlled objects, protected objects) and
6613 generates all necessary code to clean up the said objects in the proper
6614 order.
6615 (Build_Finalizer_Call): New routine.
6616 (Build_Initialize_Statements): Create the initialization statements for
6617 an array type. The generated routine contains code to finalize partially
6618 initialized arrays.
6619 (Build_Object_Declarations): New routine.
6620 (Build_Raise_Statement): New routine.
6621 (Clean_Simple_Protected_Objects): Removed.
6622 (Controller_Component): Removed.
6623 (Enclosing_Function): New routine.
6624 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
6625 either declarations or statements or both.
6626 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
6627 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
6628 package.
6629 (Find_Final_List): Removed.
6630 (Global_Flist_Ref): Removed.
6631 (In_Finalization_Root): Removed.
6632 (Insert_Actions_In_Scope_Around): Determine the range of the transient
6633 scope in terms of tree nodes. Process all transient variables within
6634 that range.
6635 (Make_Adjust_Call): Rewritten. There is no longer an attach call
6636 generated after the adjust.
6637 (Make_Attach_Call): Removed.
6638 (Make_Call): New routine.
6639 (Make_Clean): Removed.
6640 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
6641 build routines.
6642 (Make_Deep_Proc): Rewritten to generate the new profile signature used
6643 in Deep routines.
6644 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
6645 build routines.
6646 (Make_Final_Call): Modified to simply create a call to either
6647 Deep_Finalize or Finalize.
6648 (Make_Finalize_Address_Body): New routine.
6649 (Make_Finalize_Address_Stmts): New routine. A function which produces
6650 TSS primitive Finalize_Address used in conjunction with heap allocated
6651 controlled objects.
6652 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
6653 (Make_Init_Call): Rewritten. There is no longer an attach call
6654 generated after initialization.
6655 (Make_Local_Deep_Finalize): New routine.
6656 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6657 (Make_Transient_Block): Remove the finalization list retrieval and
6658 manipulation.
6659 (Needs_Finalization): Moved to Exp_Util.
6660 (Parent_Field_Type): New routine.
6661 (Preprocess_Components): New routine.
6662 (Process_Transient_Objects): New routine.
6663 (Wrap_HSS_In_Block): New routine.
6664 (Wrap_Transient_Declaration): Remove finalization list management and
6665 controller insertion.
6666 (Wrap_Transient_Expression): Code reformatting.
6667 (Wrap_Transient_Statement): Code reformatting.
6668 * exp_ch7.ads (Build_Final_List): Removed.
6669 (Build_Finalization_Collection): New routine.
6670 (Build_Raise_Statement): New routine.
6671 (Controller_Component): Removed.
6672 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
6673 (Find_Final_List): Removed.
6674 (In_Finalization_Root): Removed.
6675 (Is_Simple_Protected_Type): Update related comment.
6676 (Make_Adjust_Call): New parameter profile and associated comments.
6677 (Make_Attach_Call): Removed.
6678 (Make_Final_Call): New parameter profile and associated comments.
6679 (Make_Finalize_Address_Body): New routine.
6680 (Make_Init_Call): New parameter profile and associated comments.
6681 (Make_Local_Deep_Finalize): New routine.
6682 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6683 (Needs_Finalization): Moved to Exp_Util.
6684 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
6685 (Expand_N_Protected_Body): Remove the handling of finalization lists.
6686 (Find_Protection_Type): Moved to Exp_Util.
6687 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
6688 (Make_DT): Update sequence of dispatch table initialization. Remove the
6689 initialization of field RC_Offset. Add initialization of field Needs_
6690 Finalization.
6691 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
6692 Reimplement how an object is first finalized, then deallocated.
6693 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
6694 Code reformatting.
6695 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
6696 Register TSS_Finalize_Address with type TSS_Names.
6697 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
6698 procedure provides the interface between an allocation / deallocation
6699 and the support machinery in Ada.Finalization.Heap_Management.
6700 (Find_Init_Call): Code reformatting.
6701 (Find_Init_Call_In_List): Code reformatting.
6702 (Find_Protection_Type): Moved from Exp_Ch9.
6703 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
6704 (Has_Controlled_Coextensions): Removed.
6705 (Has_Controlled_Objects): New routine.
6706 (In_Library_Level_Package_Body): New routine.
6707 (Insert_Action_After): New routine.
6708 (Is_Finalizable_Transient): New routine. This predicate determines
6709 whether an object declaration is one of the many variants of controlled
6710 transients.
6711 (Is_Null_Access_BIP_Func_Call): New routine.
6712 (Is_Non_BIP_Func_Call): New routine.
6713 (Is_Related_To_Func_Return): New routine.
6714 (Needs_Finalization): Moved from Exp_Ch7.
6715 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
6716 (Find_Protection_Type): Moved from Exp_Ch9.
6717 (Has_Controlled_Coextensions): Removed.
6718 (Has_Controlled_Objects): New routine.
6719 (In_Library_Level_Package_Body): New routine.
6720 (Insert_Action_After): New routine.
6721 (Is_Finalizable_Transient): New routine.
6722 (Is_Null_Access_BIP_Func_Call): New routine.
6723 (Is_Non_BIP_Func_Call): New routine.
6724 (Is_Related_To_Func_Return): New routine.
6725 (Needs_Finalization): Moved from Exp_ch7.
6726 * expander.adb (Expand): Add a case for N_Free_Statement.
6727 * freeze.adb (Freeze_All): Replace the generation of a finalization
6728 list with a collection for access-to-controlled types.
6729 (Freeze_Entity): Code reformatting.
6730 (Freeze_Record_Type): Remove the freezing of a record controller
6731 component.
6732 (Freeze_Subprogram): Code reformatting.
6733 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
6734 finalization list.
6735 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
6736 has a library-level finalizer.
6737 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
6738 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
6739 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
6740 files. Add a-fihema to the list of object files.
6741 * par-ch4.adb:
6742 Alphabetize the associations in type Is_Parameterless_Attribute.
6743 * rtsfind.ads: Ada.Finalization_List.Controller and
6744 System.Finalization_Implementation are no longer a GNAT unit.
6745 Update the range of type Ada_Finalization_Child. Remove the following
6746 recoverable entities:
6747
6748 RE_Attach_To_Final_List
6749 RE_Deep_Tag_Attach
6750 RE_Finalize_List
6751 RE_Finalize_One
6752 RE_Finalizable_Ptr_Ptr
6753 RE_Global_Final_List
6754 RE_Limited_Record_Controller
6755 RE_List_Controller
6756 RE_Move_Final_List
6757 RE_Record_Controller
6758 RE_Simple_List_Controller
6759
6760 Add the following recoverable entities:
6761
6762 RE_Add_Offset_To_Address
6763 RE_Allocate
6764 RE_Base_Pool
6765 RE_Deallocate
6766 RE_Exception_Identity
6767 RE_Finalization_Collection
6768 RE_Finalization_Collection_Ptr
6769 RE_Needs_Finalization
6770 RE_Save_Library_Occurrence
6771 RE_Set_Finalize_Address_Ptr
6772 RE_Set_Storage_Pool_Ptr
6773 RE_Storage_Count
6774 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
6775 Name_uController.
6776 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
6777 (First_Stored_Discriminant): Remove the mention of Name_uController.
6778 * sem_aux.ads: Comment reformatting.
6779 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
6780 to redecorate an already existing class-wide type.
6781 (Decorate_Tagged_Type): New parameter profile and associated comment.
6782 Create a "shadow class-wide type" for a shadow entity.
6783 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6784 of the final chain along with the associated comment.
6785 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6786 Full_Desig and set it to the full view of the designated type.
6787 Initialize the finalization collection to empty.
6788 (Build_Derived_Record_Type): Alphabetize local variables. Code
6789 reformatting.
6790 (Collect_Fixed_Components): Remove the mention of Name_uController.
6791 (Create_Constrained_Components): Remove the mention of Name_uController.
6792 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6793 class-wide type of a shadow entity.
6794 (Process_Full_View): Update the machinery which marks type
6795 Limited_Controlled's entity as limited.
6796 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6797 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6798 list, instead make a collection build-in-place formal.
6799 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6800 a designated type in order to establish a match between the renaming
6801 and the renamed entity.
6802 (Find_Selected_Component): Add guard to prevent spurious exceptions
6803 from being raised on .NET/JVM.
6804 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6805 to the list of primitive that need special processing. Update arrays
6806 C_Names and D_Names.
6807 (Replace_Types): Handle class-wide types.
6808 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6809 different parameter profile, look at the first formal.
6810 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6811 use clauses for Exp_Util.
6812 * sem_res.adb: Remove with and use clauses for Elists.
6813 (Propagate_Coextensions): Removed.
6814 (Resolve_Allocator): Do not propagate the list of coextensions from one
6815 allocator to another.
6816 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6817 Deaccessed_T to Desig_Typ.
6818 (Enter_Name): Remove the mention of Name_uController.
6819 (Gather_Components): Remove the mention of Name_uController.
6820 (Incomplete_Or_Private_View): New routine.
6821 (Is_Coextension_Root): Removed.
6822 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6823 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6824 (Is_Coextension_Root): Removed.
6825 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6826 Controlled types are now derived from a null tagged record. Remove
6827 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6828 * sinfo.adb (Coextensions): Removed.
6829 (Set_Coextensions): Removed.
6830 * sinfo.ads: Remove Coextensions from the explanation of node fields
6831 and its uses in nodes.
6832 Update the field usage of N_Allocator.
6833 (Coextensions): Removed along with its pragma Inline.
6834 (Set_Coextensions): Removed along with its pragma Inline.
6835 * snames.ads-tmpl: Remove names
6836
6837 Name_uClean
6838 Name_uController
6839 Name_uFinal_List
6840 Name_uLocal_Final_List
6841 Name_Finalization_Root
6842 Name_Next
6843 Name_Prev
6844
6845 Add names
6846
6847 Name_uFinalizer
6848 Name_Finalize_Address
6849 * s-pooglo.adb (Allocate): Add overriding indicator.
6850 (Deallocate): Add overriding indicator.
6851 (Storage_Size): Add overriding indicator.
6852 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6853 than Finalize_Global_List.
6854 (Null_Finalize_Global_List): Removed.
6855 (Save_Library_Occurrence): New routine.
6856 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6857 initialization. Add variable Finalize_Library_Objects along with its
6858 pragma Export. Add variables Library_Exception and
6859 Library_Exception_Set along with their pragma Export.
6860 (Null_Finalize_Global_List): Removed.
6861 (Save_Library_Occurrence): New routine.
6862 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6863 rather than Finalize_Global_List.
6864 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6865 of the constructed node.
6866
6867 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6868
6869 * link.c: Include "auto-host.h" before system headers.
6870
6871 2011-08-03 Vincent Celier <celier@adacore.com>
6872
6873 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6874 that are not extended. Do not check if a library project that is
6875 extended should be regenerated. Do not add to table Library_Paths the
6876 libraries that are in extended projects. Link only with libraries that
6877 are in libray projects that are not extended.
6878 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6879 for a library project that is extended.
6880
6881 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6882
6883 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6884 conforming subprogram renamings that appear to be completions if they
6885 are not fully conformant.
6886 Such renamings are homographs but not completions.
6887 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6888 names in a subprogram renaming that appears in an instance.
6889
6890 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6891
6892 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6893 not immutably limited, build actual subtype from expression to provide
6894 proper bounds to caller.
6895
6896 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6897
6898 * sem_ch8.adb: Minor comment correction.
6899
6900 2011-08-03 Thomas Quinot <quinot@adacore.com>
6901
6902 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6903 returning a limited array, use an extended return statement.
6904
6905 2011-08-03 Vincent Celier <celier@adacore.com>
6906
6907 * make.adb (Initialize): If --subdirs= is used, but no project file is
6908 specified, attempt to create the specify subdir if it does not already
6909 exist and use it as the object directory as if -D had been specified.
6910
6911 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6912
6913 * s-tpopsp-vms.adb: New file.
6914 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6915 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6916
6917 2011-08-03 Emmanuel Briot <briot@adacore.com>
6918
6919 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6920 package.
6921
6922 2011-08-03 Yannick Moy <moy@adacore.com>
6923
6924 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6925 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6926 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6927 detect that an array has static bounds.
6928
6929 2011-08-03 Thomas Quinot <quinot@adacore.com>
6930
6931 * exp_dist.adb: Minor reformatting.
6932
6933 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6934
6935 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6936 (ATCB_Key): Removed, not always used.
6937
6938 2011-08-03 Emmanuel Briot <briot@adacore.com>
6939
6940 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6941 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6942 most remaining global variables.
6943
6944 2011-08-03 Robert Dewar <dewar@adacore.com>
6945
6946 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6947 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6948 reformatting.
6949
6950 2011-08-03 Javier Miranda <miranda@adacore.com>
6951
6952 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6953 that must be passed by copy in VM targets.
6954
6955 2011-08-03 Emmanuel Briot <briot@adacore.com>
6956
6957 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6958 duplicates a similar htable now in the project tree.
6959
6960 2011-08-03 Claire Dross <dross@adacore.com>
6961
6962 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6963 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6964 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6965 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6966 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6967 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6968 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6969 update.
6970
6971 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6972
6973 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6974 (ATCB_Key): Removed, not always used.
6975 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6976 s-taprop-posix.adb.
6977 * s-tpopsp-tls.adb: New file.
6978 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6979 x86/x64/ia64/powerpc/sparc Linux.
6980
6981 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6982
6983 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6984 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6985
6986 2011-08-03 Thomas Quinot <quinot@adacore.com>
6987
6988 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6989 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6990 Fix type selection for mapping integer types to PolyORB types.
6991
6992 2011-08-03 Bob Duff <duff@adacore.com>
6993
6994 * sem_ch7.adb: Minor comment clarification.
6995
6996 2011-08-03 Bob Duff <duff@adacore.com>
6997
6998 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6999 an error analyzing a choice, skip further processing. Further
7000 processing could cause a crash or cascade errors.
7001
7002 2011-08-03 Emmanuel Briot <briot@adacore.com>
7003
7004 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
7005 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
7006 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
7007 prj-env.ads (Shared_Project_Tree_Data): new type
7008 An aggregate project and its aggregated trees need to share the common
7009 data structures used for lists of strings, packages,... This makes the
7010 code simpler since otherwise we have to pass the root tree (also used
7011 for the configuration file data) in addition to the current project
7012 tree. This also avoids ambiguities as to which tree should be used.
7013 And finally this saves a bit of memory.
7014 (For_Every_Project_Imported): new parameter Tree.
7015 Since aggregated projects are using a different tree, we need to let
7016 the caller know which tree to use to manipulate the returned project.
7017
7018 2011-08-03 Robert Dewar <dewar@adacore.com>
7019
7020 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
7021 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
7022 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
7023 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
7024
7025 2011-08-03 Javier Miranda <miranda@adacore.com>
7026
7027 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
7028 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
7029
7030 2011-08-03 Bob Duff <duff@adacore.com>
7031
7032 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
7033 the Base_Type.
7034
7035 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
7036
7037 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
7038 g-sehash.ads: Fix typo. Update header.
7039
7040 2011-08-03 Thomas Quinot <quinot@adacore.com>
7041
7042 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
7043 expansion.
7044
7045 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7046
7047 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
7048 prefixes of private types along with records, since the selector may be
7049 a discriminant.
7050 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
7051 private types along with records, since the selector may be a
7052 discriminant.
7053
7054 2011-08-03 Emmanuel Briot <briot@adacore.com>
7055
7056 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
7057
7058 2011-08-03 Javier Miranda <miranda@adacore.com>
7059
7060 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
7061 Tagged_Type_Expansion.
7062
7063 2011-08-03 Yannick Moy <moy@adacore.com>
7064
7065 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
7066 violation when the argument of concatenation is the name of a
7067 constant.
7068
7069 2011-08-03 Emmanuel Briot <briot@adacore.com>
7070
7071 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
7072 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
7073 (Process_Declarative_Items): new parameter Child_Env.
7074
7075 2011-08-03 Yannick Moy <moy@adacore.com>
7076
7077 * alfa.ads: Update format of ALFA section in ALI file in order to
7078 add a mapping from bodies to specs when both are present.
7079 (ALFA_Scope_Record): Add components for spec file/scope.
7080 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
7081 present.
7082 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
7083 collected, fill in the spec information when relevant.
7084 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
7085 present.
7086
7087 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7088
7089 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
7090 code unit to decide whether to add internally generated subprograms.
7091
7092 2011-08-03 Javier Miranda <miranda@adacore.com>
7093
7094 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
7095 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
7096 be handled by copy in VM targets.
7097
7098 2011-08-03 Emmanuel Briot <briot@adacore.com>
7099
7100 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
7101 code with Makeutl.Get_Switches.
7102 * prj-tree.adb: Update comment.
7103
7104 2011-08-03 Thomas Quinot <quinot@adacore.com>
7105
7106 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
7107 subprogram with a limited formal that does not support external
7108 streaming.
7109
7110 2011-08-03 Yannick Moy <moy@adacore.com>
7111
7112 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
7113 continuation line
7114 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
7115 not from current unit in two phases, because it is not possible to
7116 change the table while iterating over its content.
7117 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
7118
7119 2011-08-03 Sergey Rybin <rybin@adacore.com>
7120
7121 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
7122 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
7123
7124 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7125
7126 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
7127 and the component type is composite, this is ambiguous for predefined
7128 concatenation, but if the node is not overloaded and the entity is a use
7129 -defined function its profile can be used to resolve that aggregate.
7130
7131 2011-08-03 Robert Dewar <dewar@adacore.com>
7132
7133 * exp_ch4.adb: Minor code cleanup.
7134
7135 2011-08-03 Thomas Quinot <quinot@adacore.com>
7136
7137 * exp_dist.adb: Do not generate distribution stubs if serious errors
7138 have been diagnosed.
7139
7140 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7141
7142 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
7143 the first formal of a primitive operation, go to the base type to
7144 handle properly an access to a derived type with constrained
7145 discriminants.
7146 * sem_type.adb (Disambiguate): an immediately visible operator hides a
7147 user-defined function that is only use-visible.
7148
7149 2011-08-03 Robert Dewar <dewar@adacore.com>
7150
7151 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
7152 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
7153 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
7154 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
7155 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
7156 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
7157 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
7158 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
7159
7160 2011-08-03 Robert Dewar <dewar@adacore.com>
7161
7162 * repinfo.adb (List_Mechanism): Add handling of
7163 Convention_Ada_Pass_By_XXX.
7164 * sem_mech.adb (Set_Mechanism): Ditto.
7165 * sem_prag.adb (Process_Convention): Add entries for
7166 Convention_Ada_Pass_By_XXX.
7167 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
7168
7169 2011-08-03 Pascal Obry <obry@adacore.com>
7170
7171 * makeutl.adb: Minor reformatting.
7172
7173 2011-08-03 Vincent Celier <celier@adacore.com>
7174
7175 * fname-uf.adb
7176 (Get_File_Name) If the file cannot be found when there are no config
7177 pragmas file and May_Fail is True, return No_File instead of the file
7178 name, to be consistent.
7179
7180 2011-08-03 Pascal Obry <obry@adacore.com>
7181
7182 * adaint.c (__gnat_is_executable_file_attr): Avoid access
7183 to null pointer.
7184
7185 2011-08-03 Javier Miranda <miranda@adacore.com>
7186
7187 * sem_ch13.adb
7188 (Same_Representation): In VM targets the representation of arrays with
7189 aliased components differs from arrays with non-aliased components.
7190
7191 2011-08-03 Emmanuel Briot <briot@adacore.com>
7192
7193 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
7194 not systematically lower case attribute indexes that contain no "."
7195 Fix definition of several Naming attributes, which take
7196 a unit name as index and therefore should be case insensitive.
7197 Minor refactoring (reduce length of variable names).
7198
7199 2011-08-03 Emmanuel Briot <briot@adacore.com>
7200
7201 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
7202
7203 2011-08-03 Emmanuel Briot <briot@adacore.com>
7204
7205 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
7206 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
7207 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
7208 prj-tree.ads (Prj.Tree.Environment): new type.
7209
7210 2011-08-03 Emmanuel Briot <briot@adacore.com>
7211
7212 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
7213 prj-tree.adb, prj-tree.ads (Environment): new type.
7214
7215 2011-08-03 Emmanuel Briot <briot@adacore.com>
7216
7217 * prj-tree.ads: Remove unused variable.
7218
7219 2011-08-03 Yannick Moy <moy@adacore.com>
7220
7221 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
7222 issuing messages related to SPARK restriction violation.
7223
7224 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7225
7226 * sem_ch6.adb: guard against error nodes in return statements.
7227
7228 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7229
7230 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
7231 a warning can only appear on a configuration file, so emit warning
7232 without further checks.
7233
7234 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7235
7236 * s-interr.ads: add overriding keyword.
7237
7238 2011-08-03 Geert Bosch <bosch@adacore.com>
7239
7240 * exp_attr.adb: Fix minor typo.
7241
7242 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7243
7244 * par-ch4.adb: improve error recovery.
7245
7246 2011-08-03 Emmanuel Briot <briot@adacore.com>
7247
7248 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
7249 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
7250 to Errout_Handling.
7251
7252 2011-08-03 Emmanuel Briot <briot@adacore.com>
7253
7254 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
7255 "external" as an attribute name in aggregate projects.
7256
7257 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7258
7259 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
7260 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
7261 from 0, so we need to adjust.
7262
7263 2011-08-03 Emmanuel Briot <briot@adacore.com>
7264
7265 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
7266 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
7267
7268 2011-08-03 Yannick Moy <moy@adacore.com>
7269
7270 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
7271 restriction on overloaded entity if the entity is not an operator.
7272
7273 2011-08-03 Yannick Moy <moy@adacore.com>
7274
7275 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
7276 restrict.ads: Rename remaining Check_Formal_Restriction* into
7277 Check_SPARK_Restriction*.
7278
7279 2011-08-03 Emmanuel Briot <briot@adacore.com>
7280
7281 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
7282 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
7283 qualifier.
7284 (Project_Empty): removed
7285 (Empty_Project): new parameter Qualifier
7286 This is used to have fields specific to aggregate projects, cleaner
7287 New field to store the list of aggregated projects.
7288 (Check_Aggregate_Project): removed
7289 (Process_Aggregated_Projects, Free): new subprograms.
7290
7291 2011-08-03 Olivier Hainque <hainque@adacore.com>
7292
7293 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
7294
7295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7296
7297 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
7298 explicit dereference of an unconstrained type, create a constrained
7299 subtype for it, as is done for function calls that return an
7300 unconstrained type.
7301
7302 2011-08-03 Thomas Quinot <quinot@adacore.com>
7303
7304 * g-pehage.adb (Finalize): Avoid possible double-free.
7305
7306 2011-08-03 Steve Baird <baird@adacore.com>
7307
7308 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
7309 Elab_Spec/Body attrs in CodePeer_Mode.
7310
7311 2011-08-03 Javier Miranda <miranda@adacore.com>
7312
7313 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
7314 low bound is not known at compile time but they have no others choice.
7315 Done because in this case the bounds can be obtained directly from the
7316 aggregate.
7317
7318 2011-08-03 Ed Falis <falis@adacore.com>
7319
7320 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
7321 on VxWorks SMP. Remove unusable constant ANY_CPU.
7322
7323 2011-08-03 Emmanuel Briot <briot@adacore.com>
7324
7325 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
7326 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
7327 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
7328 Prj.Env.Initialize_Empty): new subprograms
7329 (Get_Env, Find_Project): remove parameter Target_Name.
7330
7331 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7332
7333 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
7334 as a condition for the delayed call to Derived_Subprograms done for the
7335 case of the rewriting of a derived type that constrains the
7336 discriminants of its parent type.
7337 Avoids redundant subprogram derivations for private subtype derivations.
7338
7339 2011-08-03 Javier Miranda <miranda@adacore.com>
7340
7341 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
7342 Build_Record_Aggr_Code.
7343 (Build_Record_Aggr_Code): Add missing support to initialize hidden
7344 discriminants in extension aggregates.
7345
7346 2011-08-03 Emmanuel Briot <briot@adacore.com>
7347
7348 * prj-pp.adb (Print): also output project qualifiers, since in
7349 particular "aggregate" is mandatory in an aggregate project.
7350
7351 2011-08-03 Emmanuel Briot <briot@adacore.com>
7352
7353 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
7354 (Debug_Output): new function.
7355
7356 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7357
7358 * gnat_ugn.texi: Document -Wstack-usage.
7359 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
7360
7361 2011-08-03 Thomas Quinot <quinot@adacore.com>
7362
7363 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
7364 have keyword LIMITED.
7365
7366 2011-08-03 Yannick Moy <moy@adacore.com>
7367
7368 * alfa.adb, alfa.ads, alfa_test.adb: New files.
7369 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
7370 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
7371 section (does not happen in compiler, only if code directly calls
7372 Scan_ALI).
7373 * get_alfa.adb, get_alfa.ads: New files.
7374 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
7375 needed.
7376 * lib-xref-alfa.adb: New file.
7377 * lib-xref.adb, lib-xref.ads
7378 (Xref_Entry): redefine information needed in cross-references for ALFA.
7379 Push ALFA treatments in separated local package.
7380 (Enclosing_Subpragram_Or_Package): treat specially subprogram
7381 identifiers. Return entity of package body instead of spec. Return
7382 Empty for a scope with no location.
7383 (Generate_Reference): adapt to new components for ALFA information.
7384 Remove the need for D references on definitions.
7385 (Is_Local_Reference): moved to ALFA local package
7386 (Output_References): extract subfunction as Extract_Source_Name
7387 (Output_Local_References): remove procedure, replaced by filtering of
7388 cross-references in package ALFA and printing in Put_ALFA.
7389 (Write_Entity_Name): remove procedure
7390 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
7391 print exact name of entity as it appears in source file
7392 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
7393 * put_alfa.adb, put_alfa.ads: New files.
7394 * xref_lib.adb (Search_Xref): protect read of cross-references against
7395 reading other sections of the ALI file, in gnatxref
7396 (Search): protect read of cross-references against reading other
7397 sections of the ALI file, in gnatfind.
7398 * gcc-interface/Make-lang.in: Update dependencies.
7399
7400 2011-08-03 Thomas Quinot <quinot@adacore.com>
7401
7402 * sem_ch3.adb: Minor reformatting.
7403
7404 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7405
7406 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
7407 raising an exception.
7408
7409 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7410
7411 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
7412 type, always use 1 as the lower bound or string, even if lower bound of
7413 context is not static, to handle properly null strings in a non-static
7414 context.
7415
7416 2011-08-03 Bob Duff <duff@adacore.com>
7417
7418 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
7419 always legal on the right-hand side of an assignment statement; there
7420 is always an applicable index constraint in this case. Therefore, the
7421 check for Pkind = N_Assignment_Statement is now unconditional -- it
7422 doesn't depend on whether Is_Constrained (Typ).
7423
7424 2011-08-03 Robert Dewar <dewar@adacore.com>
7425
7426 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
7427
7428 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7429
7430 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
7431 for an itype created within a generic unit.
7432
7433 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7434
7435 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
7436 suppresses all inlining.
7437
7438 2011-08-03 Robert Dewar <dewar@adacore.com>
7439
7440 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
7441 exp_aggr.adb: Minor reformatting.
7442
7443 2011-08-03 Thomas Quinot <quinot@adacore.com>
7444
7445 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
7446 tagged assignment when discriminant checks are suppressed. This is
7447 useless and extremely costly in terms of static stack usage.
7448
7449 2011-08-03 Bob Duff <duff@adacore.com>
7450
7451 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
7452 of generics, because this leads to the wrong entity in the wrong scope,
7453 causing (e.g.) pragma Export_Procedure to get an error if the entity is
7454 an instance.
7455 (Process_Interface_Name): Follow Alias for instances of generics, to
7456 correct for the above change.
7457
7458 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7459
7460 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
7461 is an integer literal it is always safe to replace the reference. In
7462 addition, if the reference appears in the generated code for an object
7463 declaration it is necessary to copy because otherwise the reference
7464 might be to the uninitilized value of the discriminant of the object
7465 itself.
7466
7467 2011-08-03 Pascal Obry <obry@adacore.com>
7468
7469 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
7470 ACL used, in this case we want to check for ending .exe, not .exe
7471 anywhere in the path.
7472
7473 2011-08-03 Sergey Rybin <rybin@adacore.com>
7474
7475 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7476 the tree structure (semantic decoration of references to record
7477 discriminants).
7478
7479 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7480
7481 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
7482 choices of a named array aggregate, bail out when any choices are
7483 marked as Errors_Posted.
7484
7485 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7486
7487 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
7488 in which entity is frozen, to handle properly loop variables in
7489 iterators.
7490
7491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7492
7493 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
7494 subtype is not static, compute the upper bound using attributes, to
7495 handle properly index types that are not integer types.
7496
7497 2011-08-03 Bob Duff <duff@adacore.com>
7498
7499 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
7500 Update copyright notice.
7501
7502 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7503
7504 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
7505 Original_Discriminant if within an instance.
7506 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7507
7508 2011-08-03 Thomas Quinot <quinot@adacore.com>
7509
7510 * einfo.ads: Minor reformatting.
7511
7512 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7513
7514 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
7515 composite type with an unfrozen subcomponent, in the profile of a
7516 primitive operation.
7517
7518 2011-08-03 Robert Dewar <dewar@adacore.com>
7519
7520 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
7521
7522 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7523
7524 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
7525 unconstrained type with discriminants is initialized with an aggregate,
7526 use the constrained subtype of the aggregate as the type of the object,
7527 because it is immutable, and this allows the back-end to generate no
7528 code for the object declaration.
7529
7530 2011-08-03 Robert Dewar <dewar@adacore.com>
7531
7532 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
7533 comparison operand is variable, and turns out to be zero or negative.
7534
7535 2011-08-03 Javier Miranda <miranda@adacore.com>
7536
7537 * exp_intr.adb
7538 (Expand_Dispatching_Constructor_Call): Disable expansion of
7539 code required for native targets. Done to avoid generating
7540 references to unavailable runtime entities in VM targets.
7541 * exp_ch3.adb
7542 (Expand_N_Object_Declaration): Add missing support to handle
7543 the explicit initialization of class-wide interface objects.
7544 Fix documentation.
7545
7546 2011-08-03 Matthew Heaney <heaney@adacore.com>
7547
7548 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
7549
7550 2011-08-03 Matthew Heaney <heaney@adacore.com>
7551
7552 * a-cbdlli.adb (Splice): move source items from first to last
7553
7554 2011-08-03 Yannick Moy <moy@adacore.com>
7555
7556 * sem_util.ads: comment added.
7557
7558 2011-08-03 Javier Miranda <miranda@adacore.com>
7559
7560 * exp_aggr.adb
7561 (Expand_Record_Aggregate): In VM targets disable the expansion into
7562 assignments of aggregates whose type is not known at compile time.
7563
7564 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7565
7566 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
7567 protected entries and task entries, to build the proper renaming
7568 declaration for entry formals, used in debugging.
7569 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
7570 parameters in the same way.
7571
7572 2011-08-02 Robert Dewar <dewar@adacore.com>
7573
7574 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
7575 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
7576 code reorganization.
7577
7578 2011-08-02 Robert Dewar <dewar@adacore.com>
7579
7580 * debug.adb: Debug flag d.P to suppress length comparison optimization
7581 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
7582 comparison of Length by comparing First/Last instead.
7583
7584 2011-08-02 Matthew Heaney <heaney@adacore.com>
7585
7586 * a-cobove.ads: Code clean up.
7587
7588 2011-08-02 Vincent Celier <celier@adacore.com>
7589
7590 * adaint.c (file_names_case_sensitive_cache): New static int.
7591 (__gnat_get_file_names_case_sensitive): Cache the return value in
7592 file_names_case_sensitive_cache at the first invocation, to avoid
7593 multiple calls to getenv.
7594
7595 2011-08-02 Bob Duff <duff@adacore.com>
7596
7597 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
7598
7599 2011-08-02 Yannick Moy <moy@adacore.com>
7600
7601 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
7602 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
7603 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
7604 indicate that we are in a precondition or postcondition. This is used in
7605 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
7606 decide whether to flag the spec or body of the current subprogram as
7607 not in ALFA.
7608
7609 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
7610
7611 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
7612 list.
7613 * a-extiin.ads: New file.
7614
7615 2011-08-02 Bob Duff <duff@adacore.com>
7616
7617 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
7618 now raises Name_Error instead of Use_Error in certain cases. The other
7619 parts of this AI were already implemented properly.
7620
7621 2011-08-02 Vincent Celier <celier@adacore.com>
7622
7623 * link.c: Only import "auto-host.h" when building the gnattools.
7624
7625 2011-08-02 Yannick Moy <moy@adacore.com>
7626
7627 * sem_util.adb: Inter-unit inlining does not work for a subprogram
7628 which calls a local subprogram, so extract subprogram
7629 from Mark_Non_ALFA_Subprogram_Body.
7630
7631 2011-08-02 Javier Miranda <miranda@adacore.com>
7632
7633 * exp_ch9.adb
7634 (Extract_Dispatching_Call): If the type of the dispatching object is an
7635 access type then return an explicit dereference in the Object out-mode
7636 parameter.
7637
7638 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7639
7640 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
7641 compatibility checks for all indexes of an array subtype, not just the
7642 first. Reset Has_Dynamic_Range_Check on the subtype before each
7643 potential check to ensure that Insert_Range_Checks will not elide any
7644 of the dynamic checks.
7645
7646 2011-08-02 Yannick Moy <moy@adacore.com>
7647
7648 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
7649 SPARK restriction at parsing time.
7650 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
7651 directive only if the SPARK restriction is set for this unit.
7652
7653 2011-08-02 Yannick Moy <moy@adacore.com>
7654
7655 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
7656 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
7657 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
7658 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
7659 Mark_Non_ALFA_Subprogram_Body.
7660 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
7661 inlined.
7662
7663 2011-08-02 Yannick Moy <moy@adacore.com>
7664
7665 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
7666 might be costly.
7667
7668 2011-08-02 Robert Dewar <dewar@adacore.com>
7669
7670 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
7671 exp_ch3.adb: Minor reformatting.
7672
7673 2011-08-02 Emmanuel Briot <briot@adacore.com>
7674
7675 * adaint.c (__gnat_locate_exec_on_path): only returns executable
7676 files, not any regular file.
7677 (__gnat_locate_file_with_predicate): new subprogram.
7678
7679 2011-08-02 Yannick Moy <moy@adacore.com>
7680
7681 * sinfo.adb, sinfo.ads: Restrict the use of flags
7682 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
7683 nodes, plus N_Subtype_Declaration for the 2nd one.
7684
7685 2011-08-02 Sergey Rybin <rybin@adacore.com>
7686
7687 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7688 - fix bugs in the description of Source_Trace;
7689 - get rid of UNIT_NAME;
7690
7691 2011-08-02 Javier Miranda <miranda@adacore.com>
7692
7693 * exp_ch9.adb
7694 (Build_Dispatching_Requeue): Adding support for VM targets
7695 since we cannot directly reference the Tag entity.
7696 * exp_sel.adb (Build_K): Adding support for VM targets.
7697 (Build_S_Assignment): Adding support for VM targets.
7698 * exp_disp.adb
7699 (Default_Prim_Op_Position): In VM targets do not restrict availability
7700 of predefined interface primitives to compiling in Ada 2005 mode.
7701 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7702 restricted to compiling in Ada 2005 mode.
7703 (Make_VM_TSD): Generate code that declares and initializes the OSD
7704 record. Needed to support dispatching calls through synchronized
7705 interfaces.
7706 * exp_ch3.adb
7707 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7708 primitives associated with synchronized interfaces.
7709 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7710 primitives associated with synchronized interfaces.
7711
7712 2011-08-02 Yannick Moy <moy@adacore.com>
7713
7714 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7715 statements hidden in SPARK if preceded by the HIDE directive
7716 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7717 exception handlers as hidden in SPARK if preceded by the HIDE directive
7718 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7719 if starting with the HIDE directive
7720 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7721 starting with the HIDE directive; mark the declarations in a private
7722 part as hidden in SPARK if the private part starts with the HIDE
7723 directive
7724 * restrict.adb, restrict.ads
7725 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7726 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7727 argument node belongs to a part which is hidden in SPARK
7728 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7729 parts in SPARK; protect the possibly costly call to
7730 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7731 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7732 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7733 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7734 Tok_SPARK_Hide.
7735 (Scan): recognize special comment starting with '#' and followed by
7736 SPARK keyword "hide" as a HIDE directive.
7737
7738 2011-08-02 Yannick Moy <moy@adacore.com>
7739
7740 * types.ads, erroutc.ads: Minor reformatting.
7741
7742 2011-08-02 Vincent Celier <celier@adacore.com>
7743
7744 * link.c: Add response file support for cross platforms.
7745
7746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7747
7748 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7749 in an association, set parent field of copy before partial analysis.
7750 * sem_res.adb (Resolve_Slice): create reference to itype only when
7751 expansion is enabled.
7752
7753 2011-08-02 Yannick Moy <moy@adacore.com>
7754
7755 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7756 for new flag denoting which subprogram bodies are in ALFA
7757 * restrict.adb, sem_ch7.adb: Update comment
7758 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7759 sem_ch9.adb, sem_res.adb: Add calls to
7760 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7761 * sem_ch6.adb (Analyze_Function_Return): add calls to
7762 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7763 middle of the body, and extended return.
7764 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7765 False when missing return.
7766 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7767 to True for subprograms whose spec is in ALFA. Remove later on the flag
7768 on the entity used for a subprogram body when there exists a separate
7769 declaration.
7770 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7771 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7772 False, otherwise do nothing.
7773
7774 2011-08-02 Robert Dewar <dewar@adacore.com>
7775
7776 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7777
7778 2011-08-02 Yannick Moy <moy@adacore.com>
7779
7780 * sem_ch4.ads: minor formatting.
7781
7782 2011-08-02 Yannick Moy <moy@adacore.com>
7783
7784 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7785 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7786 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7787 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7788 opt.ads: cleanup of SPARK mode
7789
7790 2011-08-02 Yannick Moy <moy@adacore.com>
7791
7792 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7793 types.
7794 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7795 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7796 * sem_ch3.adb
7797 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7798 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7799 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7800 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7801 types.
7802 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7803 non-static range.
7804 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7805 functions whose return type is not in ALFA.
7806 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7807 specifications.
7808 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7809 parameter's type is not in ALFA.
7810 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7811 types are in ALFA.
7812
7813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7814
7815 * sem_ch6 (Analyze_Expression_Function): treat the function as
7816 Inline_Always, and introduce a subprogram declaration for it when it is
7817 not a completion.
7818 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7819 expression functions, so that the back-end can determine whether they
7820 can in fact be inlined.
7821 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7822 a function body comes from an expression function.
7823
7824 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7825
7826 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7827 null exclusions to test Can_Never_Be_Null on the anonymous access types
7828 of the formals rather than testing the formals themselves. Exclude this
7829 check in cases where the Old_Formal is marked as a controlling formal,
7830 to avoid issuing spurious errors for bodies completing dispatching
7831 operations (due to the flag not getting set on controlling access
7832 formals in body specs).
7833 (Find_Corresponding_Spec): When checking full and subtype conformance of
7834 subprogram bodies in instances, pass Designated and E in that order, for
7835 consistency with the expected order of the formals (New_Id followed by
7836 Old_Id).
7837
7838 2011-08-02 Robert Dewar <dewar@adacore.com>
7839
7840 * sem_ch8.adb: Minor reformatting.
7841
7842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7843
7844 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7845 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7846 primitive operations of class-wide actuals.
7847
7848 2011-08-02 Javier Miranda <miranda@adacore.com>
7849
7850 * exp_atag.ads, exp_atag.adb
7851 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7852 since its value is implicitly passed in argument Typ.
7853 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7854 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7855 Build_Common_Dispatching_Select_Statements.
7856
7857 2011-08-02 Robert Dewar <dewar@adacore.com>
7858
7859 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7860 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7861 Minor reformatting.
7862
7863 2011-08-02 Robert Dewar <dewar@adacore.com>
7864
7865 * sem_res.adb: Minor reformatting.
7866 * sem_prag.adb: Minor reformatting.
7867
7868 2011-08-02 Javier Miranda <miranda@adacore.com>
7869
7870 * exp_atag.adb, exp_atags.ads
7871 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7872 by the tagged type Entity. Required to use this routine in the VM
7873 targets since we do not have available the Tag entity in the VM
7874 platforms.
7875 * exp_ch6.adb
7876 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7877 Ada.Tags has not been previously loaded.
7878 * exp_ch7.adb
7879 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7880 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7881 * sem_aux.adb
7882 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7883 view of enclosing scopes. Required to handle enclosing scopes that
7884 are synchronized types whose full view is a task type.
7885 * exp_disp.adb
7886 (Build_VM_TSDs): Minor code improvement to avoid generating and
7887 analyzing lists with empty nodes.
7888 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7889 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7890 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7891 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7892 (Make_Select_Specific_Data_Table): Add support for VM targets.
7893 (Make_VM_TSD): Generate code to initialize the SSD structure of
7894 the TSD.
7895
7896 2011-08-02 Yannick Moy <moy@adacore.com>
7897
7898 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7899 cross-references section in ALI.
7900 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7901 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7902 Sub).
7903 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7904 subprogram or package entity of a node
7905 (Is_Local_Reference_Type): new function returns True for references
7906 selected in local cross-references.
7907 (Lt): function extracted from Lt in Output_References
7908 (Write_Entity_Name): function extracted from Output_References
7909 (Generate_Definition): generate reference with type 'D' for definition
7910 of objects (object declaration and parameter specification), with
7911 appropriate locations and units, for use in local cross-references.
7912 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7913 references of type 'I' for initialization in object definition.
7914 (Output_References): move part of function Lt and procedure
7915 Write_Entity_Name outside of the body. Ignore references of types 'D'
7916 and 'I' introduced for local cross-references.
7917 (Output_Local_References): new procedure to output the local
7918 cross-references sections.
7919 (Lref_Entity_Status): new array defining whether an entity is a local
7920 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7921 with 'I' type when initialization expression is present.
7922 * get_scos.adb, get_scos.ads: Correct comments and typos
7923
7924 2011-08-02 Javier Miranda <miranda@adacore.com>
7925
7926 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7927 the JVM target.
7928 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7929 the JVM target.
7930 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7931 TSD support.
7932
7933 2011-08-02 Vincent Celier <celier@adacore.com>
7934
7935 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7936 (No_Space_Img): New function
7937 (Find_Excluded_Sources): When reading from a file, record the file name
7938 and the line number for each excluded source.
7939 (Mark_Excluded_Sources): When reporting an error, if the excluded
7940 sources were read from a file, include file name and line number in
7941 the error message.
7942
7943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7944
7945 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7946
7947 2011-08-02 Robert Dewar <dewar@adacore.com>
7948
7949 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7950
7951 2011-08-02 Javier Miranda <miranda@adacore.com>
7952
7953 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7954 generation of TSDs to the DOTNET compiler.
7955 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7956 generation of TSDs to the DOTNET compiler.
7957
7958 2011-08-02 Javier Miranda <miranda@adacore.com>
7959
7960 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7961 record of all the tagged types declared inside library level package
7962 declarations, library level package bodies or library level subprograms.
7963 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7964 associated with a given tagged type.
7965 (Build_VM_TSDs): New subprogram.
7966 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7967 compilation units that are subprograms.
7968 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7969 compilation units that are package bodies.
7970 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7971 units that are a package declaration or a package instantiation.
7972 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7973 reorganization to improve the error generated by the frontend when the
7974 function Ada.Tags.Secondary_Tag is not available.
7975 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7976 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7977
7978 2011-08-02 Javier Miranda <miranda@adacore.com>
7979
7980 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7981
7982 2011-08-02 Robert Dewar <dewar@adacore.com>
7983
7984 * s-imenne.ads: Minor reformatting.
7985
7986 2011-08-02 Robert Dewar <dewar@adacore.com>
7987
7988 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7989 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7990 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7991
7992 2011-08-02 Robert Dewar <dewar@adacore.com>
7993
7994 * einfo.ads (Materialize_Entity): Document this is only for renamings
7995 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7996 required debug information in the case where we transform the object
7997 declaration into a renaming declaration.
7998 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7999 object
8000 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8001 Materialize_Entity.
8002
8003 2011-08-02 Robert Dewar <dewar@adacore.com>
8004
8005 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8006 Suppress_Init_Procs.
8007 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8008 Suppress_Initialization/Initialization_Suppressed.
8009 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8010 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8011 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8012 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8013
8014 2011-08-02 Robert Dewar <dewar@adacore.com>
8015
8016 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8017 Minor reformatting.
8018
8019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8020
8021 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8022 only have inheritable classwide pre/postconditions.
8023
8024 2011-08-02 Javier Miranda <miranda@adacore.com>
8025
8026 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8027 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8028 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8029 checks if the external tag of a type is the same as the external tag
8030 of some other declaration.
8031
8032 2011-08-02 Thomas Quinot <quinot@adacore.com>
8033
8034 * s-taskin.ads: Minor reformatting.
8035
8036 2011-08-02 Emmanuel Briot <briot@adacore.com>
8037
8038 * g-comlin.adb (Display_Help): swap the order in which it prints the
8039 short help and the general usage.
8040
8041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8042
8043 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8044 the aspect declarations and attach them to the generic copy for
8045 subsequent analysis.
8046 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8047 declarations of the generic tree to the new subprogram declarations.
8048 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8049 conditions that apply to a subprogram instance.
8050
8051 2011-08-02 Robert Dewar <dewar@adacore.com>
8052
8053 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8054
8055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8056
8057 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8058 private type with a tagged full view is not derived in the immediate
8059 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8060
8061 2011-08-02 Robert Dewar <dewar@adacore.com>
8062
8063 * exp_ch4.adb: Minor reformatting.
8064
8065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8066
8067 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8068 Ada2012 iterator, the loop will be rewritten during expansion into a
8069 while loop with a cursor and an element declaration. Do not analyze the
8070 body in this case, because if the container is for indefinite types the
8071 actual subtype of the elements will only be determined when the cursor
8072 declaration is analyzed.
8073
8074 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8075
8076 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8077 size/alignment related attributes in CodePeer_Mode.
8078
8079 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8080
8081 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8082 Prepend_Element, since this can result in the operation getting the
8083 wrong slot in the full type's dispatch table if the full type has
8084 inherited operations. The incomplete type's operation will get added
8085 to the proper position in the full type's primitives
8086 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8087 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8088 dispatching operations, since there are cases where nonprimitive
8089 subprograms can get added to the list of incomplete dependents (such
8090 as subprograms in nested packages).
8091 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8092 private part when determining whether to add a primitive with a
8093 parameter of a tagged incomplete type to the Private_Dependents list.
8094 Such primitives can also occur in the visible part, and should not have
8095 been excluded from being private dependents.
8096 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8097 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8098 list of a Taft-amendment incomplete type is a primitive before issuing
8099 an error that the full type must appear in the same unit. There are
8100 cases where nonprimitives can be in the list (such as subprograms in
8101 nested packages).
8102 * sem_disp.adb (Derives_From): Use correct condition for checking that
8103 a formal's type is derived from the type of the corresponding formal in
8104 the parent subprogram (the condition was completely wrong). Add
8105 checking that was missing for controlling result types being derived
8106 from the result type of the parent operation.
8107
8108 2011-08-02 Yannick Moy <moy@adacore.com>
8109
8110 * errout.adb (First_Node): minor renaming
8111 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8112 first node.
8113
8114 2011-08-02 Yannick Moy <moy@adacore.com>
8115
8116 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8117 before accessing operands.
8118 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8119 decide whether an initialization expression respects SPARK rules, as
8120 the plain node is the expanded one. This allows for more valid warnings
8121 to be issued.
8122 * gnat_rm.texi: Minor update.
8123
8124 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8125
8126 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8127 previous change.
8128
8129 2011-08-02 Robert Dewar <dewar@adacore.com>
8130
8131 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8132
8133 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8134
8135 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8136 loop statements and the element renaming declaration with a block when
8137 the element type is controlled.
8138
8139 2011-08-02 Yannick Moy <moy@adacore.com>
8140
8141 * sinfo.ads: Minor formatting.
8142
8143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8144
8145 * sem_aggr.adb (Add_Association): if the association has a box and no
8146 expression, use the Sloc of the aggregate itself for the new
8147 association.
8148 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8149 the Original_Node.
8150
8151 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8152
8153 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8154 When a container is provided via a function call, generate a renaming
8155 of the function result. This avoids the creation of a transient scope
8156 and the premature finalization of the container.
8157 * exp_ch7.adb (Is_Container_Cursor): Removed.
8158 (Wrap_Transient_Declaration): Remove the supression of the finalization
8159 of the list controller when the declaration denotes a container cursor,
8160 it is not needed.
8161
8162 2011-08-02 Yannick Moy <moy@adacore.com>
8163
8164 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8165 node is from source, instead of the original node being from source.
8166 * sem_aggr.adb
8167 (Resolve_Array_Aggregate): refine the check for a static expression, to
8168 recognize also static ranges
8169 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8170 Array_Type_Declaration): postpone the test for the type being a subtype
8171 mark after the type has been resolved, so that component-selection and
8172 expanded-name are discriminated.
8173 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8174 to distinguish the case of an iteration scheme, so that an error is
8175 issed on a non-static range in SPARK except in an iteration scheme.
8176 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8177 In_Iter_Schm = True.
8178 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8179 user-defined operators so that they are allowed in renaming
8180 * sem_ch8.adb
8181 (Find_Selected_Component): refine the check for prefixing of operators
8182 so that they are allowed in renaming. Move the checks for restrictions
8183 on selector name after analysis discriminated between
8184 component-selection and expanded-name.
8185 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8186 concatenation argument of string type if it is static.
8187 * sem_util.adb, sem_util.ads
8188 (Check_Later_Vs_Basic_Declarations): add a new function
8189 Is_Later_Declarative_Item to decice which declarations are allowed as
8190 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8191 mode, add that renamings are considered as later items.
8192 (Enclosing_Package): new function to return the enclosing package
8193 (Enter_Name): correct the rule for homonyms in SPARK
8194 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8195 from source (result of expansion) to avoid issuing wrong warnings.
8196
8197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8198
8199 * errout.adb: On anything but an expression First_Node returns its
8200 argument.
8201
8202 2011-08-02 Pascal Obry <obry@adacore.com>
8203
8204 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8205
8206 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8207
8208 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8209 Set the associated loop as the related expression of internally
8210 generated cursors.
8211 * exp_ch7.adb (Is_Container_Cursor): New routine.
8212 (Wrap_Transient_Declaration): Supress the finalization of the list
8213 controller when the declaration denotes a container cursor.
8214
8215 2011-08-02 Yannick Moy <moy@adacore.com>
8216
8217 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8218 command line now.
8219 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8220 expression is a simple expression. This check cannot be performed in
8221 the semantics, so just drop it.
8222 (P_Index_Or_Discriminant_Constraint): move check that the index or
8223 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8224 semantics. Other cases were previously checked in the semantics.
8225 * par-ch4.adb (P_Name): move checks that a selector name is not
8226 character literal or an operator symbol to Find_Selected_Component in
8227 the semantics
8228 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8229 declarations are not placed after later declarations in a separate
8230 procedure in Sem_Util (possibly not the best choice?), to be used both
8231 during parsing, for Ada 83 mode, and during semantic analysis, for
8232 SPARK mode.
8233 * par-endh.adb (Check_End): move check that end label is not missing
8234 to Process_End_Label in the semantics
8235 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8236 the special case for SPARK restriction
8237 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8238 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8239 parameter Force to issue the error message even on internal node (used
8240 for generated end label). Call Check_Restriction to check when an error
8241 must be issued. In SPARK mode, issue an error message even if the
8242 restriction is not set.
8243 (Check_Restriction): new procedure with an additional out parameter to
8244 inform the caller that a message has been issued
8245 * sem_aggr.adb: Minor modification of message
8246 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8247 instead of issuing an error message directly
8248 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8249 declarations are not placed after later declarations, by calling
8250 Check_Later_Vs_Basic_Declarations
8251 (Analyze_Subtype_Declaration): move here the check that an index or
8252 discriminant constraint must be a subtype mark. Change the check that
8253 a subtype of String must start at one so that it works on subtype marks.
8254 * sem_ch4.adb (Analyze_Call): move here the check that a named
8255 association cannot follow a positional one in a call
8256 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8257 instead of issuing an error message directly
8258 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8259 selector name is not a character literal or an operator symbol. Move
8260 here the check that the prefix of an expanded name cannot be a
8261 subprogram or a loop statement.
8262 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8263 procedure called from parsing and semantics to check that basic
8264 declarations are not placed after later declarations
8265 (Process_End_Label): move here the check that end label is not missing
8266
8267 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8268
8269 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8270 representation clause in codepeer mode, since it confuses CodePeer and
8271 does not bring useful info.
8272
8273 2011-08-02 Ed Falis <falis@adacore.com>
8274
8275 * init.c: initialize fp hw on MILS.
8276
8277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8278
8279 * errout.adb (First_Node): for bodies, return the node itself (small
8280 optimization). For other nodes, do not check source_unit if the node
8281 comes from Standard.
8282
8283 2011-08-02 Robert Dewar <dewar@adacore.com>
8284
8285 * exp_ch3.adb: Minor comment additions.
8286 * sem_ch13.adb: Minor reformatting.
8287
8288 2011-08-02 Pascal Obry <obry@adacore.com>
8289
8290 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8291
8292 2011-08-02 Robert Dewar <dewar@adacore.com>
8293
8294 * sem_attr.adb: Minor reformatting.
8295
8296 2011-08-02 Robert Dewar <dewar@adacore.com>
8297
8298 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8299 (Has_Default_Component_Value): Removed
8300 * einfo.ads Comment updates
8301 (Has_Default_Aspect): Replaces Has_Default_Value
8302 (Has_Default_Component_Value): Removed
8303 * exp_ch13.adb
8304 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8305 * exp_ch3.adb
8306 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8307 (Get_Simple_Init_Val): Handle Default_Value aspect
8308 (Needs_Simple_Initialization): Handle Default_Value aspect
8309 * exp_ch3.ads: Needs_Simple_Initialization
8310 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8311 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8312 * sem_ch13.adb
8313 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8314 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8315 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8316
8317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8318
8319 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8320 package containing iteration primitives.
8321 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8322
8323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8324
8325 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8326 "of", pre-analyze expression in case it is a function call with
8327 finalization actions that must be placed ahead of the loop.
8328 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8329 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8330
8331 2011-08-02 Geert Bosch <bosch@adacore.com>
8332
8333 * cstand.adb (Create_Float_Types): Only consider C's long double for
8334 Long_Long_Float, in addition to double.
8335
8336 2011-08-02 Robert Dewar <dewar@adacore.com>
8337
8338 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8339 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8340 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8341 Minor reformatting.
8342
8343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8344
8345 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8346 indexed component.
8347
8348 2011-08-02 Javier Miranda <miranda@adacore.com>
8349
8350 * einfo.ads, einfo.adb
8351 (Original_Access_Type): Move this attribute to Node26 since there was
8352 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8353 which causes conflicts and breaks the generation of the .NET compiler.
8354 (Interface_Name): Add missing documentation on JGNAT only uses of
8355 this attribute.
8356
8357 2011-08-02 Geert Bosch <bosch@adacore.com>
8358
8359 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8360 (Find_Back_End_Float_Type): Likewise
8361 (Create_Back_End_Float_Types): Likewise
8362 (Create_Float_Types): Likewise
8363 (Register_Float_Type): Likewise
8364 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8365 Nlist and split out type selection in new local Find_Base_Type function.
8366 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8367 Nlist
8368 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8369
8370 2011-08-02 Robert Dewar <dewar@adacore.com>
8371
8372 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8373 alpha order).
8374 * opt.ads: Minor comment change.
8375 * sem_ch12.adb: Minor code reorganization.
8376
8377 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8378
8379 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8380 subtype's list of rep items to the list on the full subtype in the case
8381 where the lists are the same.
8382
8383 2011-08-02 Geert Bosch <bosch@adacore.com>
8384
8385 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8386 using the one from System.Strings, which also deallocates all strings.
8387
8388 2011-08-02 Geert Bosch <bosch@adacore.com>
8389
8390 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8391 function.
8392 * gcc-interface/Make-lang.in: Update dependencies.
8393
8394 2011-08-02 Olivier Hainque <hainque@adacore.com>
8395
8396 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8397 end_locus.
8398
8399 2011-08-02 Javier Miranda <miranda@adacore.com>
8400
8401 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8402 associated with anonymous access to subprograms.
8403
8404 2011-08-02 Geert Bosch <bosch@adacore.com>
8405
8406 * opt.ads
8407 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8408 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8409 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8410 (Add_Symbol_Definition): Move to switch-c.adb
8411 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8412 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8413 (Add_Symbol_Definition): Move to switch-c.adb.
8414 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8415 * sem_warn.adb
8416 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8417 Move to warnsw.adb.
8418 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8419 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8420 Move to warnsw.adb.
8421 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8422 (Add_Symbol_Definition): Moved from Prepcomp.
8423 * switch-c.ads: Update copyright notice. Use String_List instead of
8424 Argument_List, removing dependency on System.OS_Lib.
8425
8426 2011-08-02 Yannick Moy <moy@adacore.com>
8427
8428 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8429 mode on initialization expression which does not respect SPARK
8430 restrictions.
8431 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8432 if the tree referenced by its argument represents an initialization
8433 expression in SPARK, suitable for initializing an object in an object
8434 declaration.
8435
8436 2011-08-02 Javier Miranda <miranda@adacore.com>
8437
8438 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8439 internally generated access to subprogram with its associated protected
8440 subprogram type.
8441 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8442
8443 2011-08-02 Geert Bosch <bosch@adacore.com>
8444
8445 * cstand.adb (Register_Float_Type): Print information about type to
8446 register, if the Debug_Flag_Dot_B is set.
8447 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8448 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8449 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8450 with a requested precision of more than Max_Digits digits and no more
8451 than Max_Base_Digits digits, if a range specification is present and the
8452 Predefined_Float_Types list has a suitable type to derive from.
8453 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8454 case of type completion with pragma Import
8455 * sem_prag.adb
8456 (Process_Import_Predefined_Type): Processing to complete a type
8457 with pragma Import. Currently supports floating point types only.
8458 (Set_Convention_From_Pragma): Do nothing without underlying type.
8459 (Process_Convention): Guard against absence of underlying type,
8460 which may happen when importing incomplete types.
8461 (Process_Import_Or_Interface): Handle case of importing predefined
8462 types. Tweak error message.
8463
8464 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8465
8466 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8467 functions to previous change. Reorganize code slightly.
8468
8469 2011-08-02 Geert Bosch <bosch@adacore.com>
8470
8471 * back_end.ads (Register_Type_Proc): New call back procedure type for
8472 allowing the back end to provide information about available types.
8473 (Register_Back_End_Types): New procedure to register back end types.
8474 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8475 available types.
8476 * cstand.adb (Back_End_Float_Types): New list for floating point types
8477 supported by the back end.
8478 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8479 (Copy_Float_Type): New procedure to make new copies of predefined types.
8480 (Register_Float_Type): New call back procedure to populate the BEFT list
8481 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8482 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8483 (Create_Float_Types): New procedure to create entities for floating
8484 point types predefined in Standard, and put these and any remaining
8485 BEFTs on the Predefined_Float_Types list.
8486 * stand.ads (Predefined_Float_Types): New list for predefined floating
8487 point types that do not have declarations in package Standard.
8488
8489 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8490
8491 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8492 entity node for the unit containing the parameter.
8493 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8494 (Add_Inlined_Subprogram): Likewise.
8495 * gcc-interface/Make-lang.in: Update dependencies.
8496
8497 2011-08-02 Thomas Quinot <quinot@adacore.com>
8498
8499 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8500 suitable value.
8501
8502 2011-08-02 Geert Bosch <bosch@adacore.com>
8503
8504 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8505
8506 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8507
8508 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8509 computed value of Base_Type.
8510
8511 2011-08-02 Yannick Moy <moy@adacore.com>
8512
8513 * restrict.adb (Check_Restriction): issue an error for any use of
8514 class-wide, even if the No_Dispatch restriction is not set.
8515 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8516 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8517 when completing a private extension, the type named in the private part
8518 is not the same as that named in the visible part.
8519 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8520 of an inherited primitive operations of a tagged type or type extension
8521 that returns the tagged type.
8522 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8523 function which returns True for an implicit operation inherited by the
8524 derived type declaration for the argument type.
8525 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8526 order.
8527
8528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8529
8530 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8531 Process_Bounds, to perform analysis with expansion of a range or an
8532 expression that is the iteration scheme for a loop.
8533 (Analyze_Iterator_Specification): If domain of iteration is given by a
8534 function call with a controlled result, as is the case if call returns
8535 a predefined container, ensure that finalization actions are properly
8536 generated.
8537 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8538
8539 2011-08-02 Javier Miranda <miranda@adacore.com>
8540
8541 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8542 * gcc-interface/Make-lang.in: Update dependencies.
8543
8544 2011-08-02 Javier Miranda <miranda@adacore.com>
8545
8546 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8547 determine if the analysis is performed using N or Original_Node (N).
8548 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8549 functionality of routine Is_Variable avoids code duplication.
8550 * checks.adb (Determine_Range): Handle temporaries generated by
8551 Remove_Side_Effects.
8552
8553 2011-08-02 Javier Miranda <miranda@adacore.com>
8554
8555 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8556 expansion of the condition. Required since the previous analysis was
8557 done with expansion disabled (see Resolve_Quantified_Expression) and
8558 hence checks were not inserted and record comparisons have not been
8559 expanded.
8560
8561 2011-08-02 Ed Falis <falis@adacore.com>
8562
8563 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8564 Update header.
8565
8566 2011-08-02 Bob Duff <duff@adacore.com>
8567
8568 * opt.ads: Minor comment fix.
8569
8570 2011-08-02 Bob Duff <duff@adacore.com>
8571
8572 * sem_ch12.adb (Analyze_Package_Instantiation,
8573 Analyze_Subprogram_Instantiation): Turn off style checking while
8574 analyzing an instance. Whatever style checks that apply to the generic
8575 unit should apply, so it makes no sense to apply them in an instance.
8576 This was causing trouble when compiling an instance of a runtime
8577 unit that violates the -gnatyO switch.
8578 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8579 one of the two case statements, causing spurious errors.
8580
8581 2011-08-02 Robert Dewar <dewar@adacore.com>
8582
8583 * uname.adb: Minor reformatting.
8584 * gnatcmd.adb: Minor reformatting.
8585 * exp_attr.adb: Minor reformatting.
8586
8587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8588
8589 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8590 No_Dispatching_Calls, do not look for the Assign primitive, because
8591 predefined primitives are not created in this case.
8592
8593 2011-08-02 Bob Duff <duff@adacore.com>
8594
8595 * stylesw.ads: Minor comment fixes.
8596
8597 2011-08-02 Robert Dewar <dewar@adacore.com>
8598
8599 * freeze.adb (Add_To_Result): New procedure.
8600
8601 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8602
8603 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8604 time, if the specific run-time routines for handling streams of strings
8605 are not available, use the default mechanism.
8606
8607 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8608
8609 * s-regpat.ads: Fix typo.
8610
8611 2011-08-02 Vincent Celier <celier@adacore.com>
8612
8613 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8614 not null, call it to create the in memory config project file without
8615 parsing an existing default config project file.
8616
8617 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8618
8619 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8620
8621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8622
8623 * sem_elim.adb: an abstract subprogram does not need an eliminate
8624 pragma for its descendant to be eliminable.
8625
8626 2011-08-02 Ed Falis <falis@adacore.com>
8627
8628 * init.c: revert to handling before previous checkin for VxWorks
8629 * s-intman-vxworks.adb: delete unnecessary declarations related to
8630 using Ada interrupt facilities for handling signals.
8631 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8632 * s-intman-vxworks.ads: Import __gnat_install_handler as
8633 Initialize_Interrupts.
8634 * s-taprop-vxworks.adb: Delete Signal_Mask.
8635 (Abort_Handler): change construction of mask to unblock exception
8636 signals.
8637
8638 2011-08-02 Jerome Guitton <guitton@adacore.com>
8639
8640 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8641 Debug_Raise_Exception before propagation starts.
8642
8643 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8644
8645 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8646 to Restriction_Check_Required.
8647 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8648 * sem_res.adb (Resolve_Call): Likewise.
8649 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8650
8651 2011-08-02 Bob Duff <duff@adacore.com>
8652
8653 * stylesw.ads: Update comment.
8654 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8655 * errout.ads: Remove obsolete comment.
8656
8657 2011-08-02 Javier Miranda <miranda@adacore.com>
8658
8659 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8660 (Set_Is_Safe_To_Reevaluate): new procedure.
8661 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8662 assignment is allowed on safe-to-reevaluate variables.
8663 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8664 temporary created to remove side effects in expressions that use
8665 the secondary stack as safe-to-reevaluate.
8666 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8667 variables that are not true constants.
8668
8669 2011-08-02 Robert Dewar <dewar@adacore.com>
8670
8671 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8672 sem_res.adb, sem_ch6.adb: Minor reformatting.
8673
8674 2011-08-02 Jerome Guitton <guitton@adacore.com>
8675
8676 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8677
8678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8679
8680 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8681 not set Overridden_Operation if subprogram is an initialization
8682 procedure.
8683
8684 2011-08-02 Yannick Moy <moy@adacore.com>
8685
8686 * par-ch6.adb: Correct obsolete name in comments
8687 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8688 which takes two message arguments (existing function takes one), with
8689 second message used for continuation.
8690 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8691 block statements that originate from a source block statement, not
8692 generated block statements
8693 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8694 symmetry with procedure case
8695 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8696 function to issue an error in formal mode if a package specification
8697 contains more than one tagged type or type extension.
8698 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8699 parameters matching formals of tagged types are objects (or ancestor
8700 type conversions of objects), not general expressions. Issue an error
8701 on view conversions that are not involving ancestor conversion of an
8702 extended type.
8703 (Resolve_Type_Conversion): in formal mode, issue an error on the
8704 operand of an ancestor type conversion which is not an object
8705 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8706 procedure so that it works also for actuals of function calls
8707 (Is_Actual_Tagged_Parameter): new function which determines if its
8708 argument is an actual parameter of a formal of tagged type in a
8709 subprogram call
8710 (Is_SPARK_Object_Reference): new function which determines if the tree
8711 referenced by its argument represents an object in SPARK
8712
8713 2011-08-02 Robert Dewar <dewar@adacore.com>
8714
8715 * sem_ch3.adb: Minor reformatting
8716 Minor comment addition
8717 Minor error msg text change
8718
8719 2011-08-02 Javier Miranda <miranda@adacore.com>
8720
8721 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8722 function. Used to be more precise when we generate a variable plus one
8723 assignment to remove side effects in the evaluation of the Bound
8724 expressions.
8725 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8726 of the bound expression to force its re-analysis and thus expand the
8727 associated transient scope (if required). Code cleanup replacing the
8728 previous code that declared the constant entity by an invocation to
8729 routine Force_Evaluation which centralizes this work in the frontend.
8730
8731 2011-08-02 Robert Dewar <dewar@adacore.com>
8732
8733 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8734 (Base_Type): Now uses improved Is_Base_Type function
8735 * einfo.ads (Base_Type): Inline this function
8736
8737 2011-08-02 Robert Dewar <dewar@adacore.com>
8738
8739 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8740 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8741
8742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8743
8744 * gcc-interface/Make-lang.in: Update dependencies.
8745 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8746 targets.
8747
8748 2011-08-02 Yannick Moy <moy@adacore.com>
8749
8750 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8751 non-simple expression used in delta constraint
8752 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8753 index constraint which is not a subtype mark
8754 * par.adb: With and use Restrict
8755 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8756 mode on component type which is not a subtype mark and default
8757 expression on component
8758 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8759 of string which does not have a lower index bound equal to 1
8760 (Array_Type_Declaration): issue an error in formal mode on index or
8761 component type which is not a subtype mark, and on aliased keyword on
8762 component
8763 (Derived_Type_Declaration): issue an error in formal mode on interface,
8764 limited or abstract type
8765 (Record_Type_Declaration): issue an error in formal mode on interface
8766 (Record_Type_Definition): issue an error in formal mode on tagged types
8767 and type extensions not declared in the specification of a library unit
8768 package; on null non-tagged record; on variant part
8769
8770 2011-08-02 Vincent Celier <celier@adacore.com>
8771
8772 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8773 not declared for qualified library project when Library_Name is not
8774 declared, but Library_Dir is.
8775
8776 2011-08-02 Robert Dewar <dewar@adacore.com>
8777
8778 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8779 pragmas (affects aspects [Component_]Default_Value
8780 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8781 component type for the resolution
8782
8783 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8784
8785 * einfo.adb (Base_Type): Tune implementation for speed.
8786
8787 2011-08-02 Robert Dewar <dewar@adacore.com>
8788
8789 * freeze.adb: Minor reformatting.
8790
8791 2011-08-02 Thomas Quinot <quinot@adacore.com>
8792
8793 * scos.ads: Update comments.
8794
8795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8796
8797 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8798 base type, because the parent may be a subtype of a private type whose
8799 convention is established in a private part.
8800
8801 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8802
8803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8804 statement in a block when the expansion of the return expression has
8805 created a finalization chain.
8806 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8807 with the parent node.
8808 Add N_Extended_Return_Statement to handle the case where a transient
8809 object declaration appears in the Return_Object_Declarations list of
8810 an extended return statement.
8811
8812 2011-08-02 Matthew Gingell <gingell@adacore.com>
8813
8814 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8815 unused parameter 'name'.
8816
8817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8818
8819 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8820 inherited operation, check whether its alias, which is the source
8821 operastion that it renames, has been marked eliminated.
8822
8823 2011-08-02 Javier Miranda <miranda@adacore.com>
8824
8825 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8826 in-mode parameter whose type is an access type since it can be used to
8827 modify its designated object. Enforce code that handles as safe an
8828 access type that is not access-to-constant but it is the result of a
8829 previous removal of side-effects.
8830 (Remove_Side_Effects): Minor code reorganization of cases which require
8831 no action. Done to incorporate documentation on new cases uncovered
8832 working in this ticket: no action needed if this routine was invoked
8833 too early and the nodes are not yet decorated.
8834 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8835 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8836 were issued with actuals that are implicitly provided by
8837 Force_Evaluation.
8838
8839 2011-08-02 Robert Dewar <dewar@adacore.com>
8840
8841 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8842
8843 2011-08-02 Yannick Moy <moy@adacore.com>
8844
8845 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8846 to issue an error in formal mode on attribute not supported in this mode
8847 (Analyze_Attribute): issue errors on standard attributes not supported
8848 in formal mode.
8849 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8850 comment, and issue error in formal mode on modulus which is not a power
8851 of 2.
8852 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8853 range.
8854 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8855 subtype mark.
8856 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8857 operator on modular type (except 'not').
8858
8859 2011-08-02 Robert Dewar <dewar@adacore.com>
8860
8861 * gnat_rm.texi: Minor reformatting.
8862
8863 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8864
8865 * s-osinte-linux.ads: Minor comment update and reformatting.
8866 * i-cexten.ads: Make this unit pure, as for its parent.
8867 Will allow its usage in more contexts if needed.
8868
8869 2011-08-02 Robert Dewar <dewar@adacore.com>
8870
8871 * s-utf_32.ads: Minor comment fix.
8872
8873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8874
8875 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8876 operation of a tagged synchronized type, handle the case where the
8877 controlling argument is overloaded.
8878
8879 2011-08-02 Yannick Moy <moy@adacore.com>
8880
8881 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8882 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8883 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8884 SPARK mode and formal verification mode on processing SPARK restriction
8885 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8886 requiring consistency checking.
8887
8888 2011-08-02 Robert Dewar <dewar@adacore.com>
8889
8890 * sem_res.adb: Minor reformatting.
8891
8892 2011-08-02 Robert Dewar <dewar@adacore.com>
8893
8894 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8895 a-cforse.ads: Remove unneeded with of Ada.Containers
8896 Remove commented out pragma Inline's
8897 Move specifications of new subprograms to the actual specs
8898
8899 2011-08-02 Yannick Moy <moy@adacore.com>
8900
8901 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8902 a-cforse.ads: Update comments.
8903
8904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8905
8906 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8907
8908 2011-08-02 Robert Dewar <dewar@adacore.com>
8909
8910 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8911 a-cforse.ads, a-cofove.ads: Minor reformatting.
8912
8913 2011-08-02 Claire Dross <dross@adacore.com>
8914
8915 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8916 a-cofove.ads: Add comments.
8917
8918 2011-08-02 Yannick Moy <moy@adacore.com>
8919
8920 * gnat_rm.texi: Document formal containers.
8921
8922 2011-08-02 Emmanuel Briot <briot@adacore.com>
8923
8924 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8925 are empty sections.
8926
8927 2011-08-02 Robert Dewar <dewar@adacore.com>
8928
8929 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8930 reformatting.
8931
8932 2011-08-02 Robert Dewar <dewar@adacore.com>
8933
8934 * aspects.adb: New aspects Default_Value and Default_Component_Value
8935 New format of Aspect_Names table checks for omitted entries
8936 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8937 handling of boolean aspects for derived types.
8938 New aspects Default_Value and Default_Component_Value
8939 New format of Aspect_Names table checks for omitted entries
8940 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8941 (Has_Default_Value): New flag
8942 (Has_Default_Component_Value): New flag
8943 (Has_Default_Value): New flag
8944 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8945 table.
8946 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8947 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8948 Default_Value and Default_Component_Value
8949 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8950 New aspects Default_Value and Default_Component_Value
8951 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8952 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8953
8954 2011-08-02 Vincent Celier <celier@adacore.com>
8955
8956 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8957 inherit library kind.
8958
8959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8960
8961 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8962 Minor reformatting.
8963
8964 2011-08-02 Robert Dewar <dewar@adacore.com>
8965
8966 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8967
8968 2011-08-02 Yannick Moy <moy@adacore.com>
8969
8970 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8971
8972 2011-08-02 Robert Dewar <dewar@adacore.com>
8973
8974 * impunit.adb: Add comment.
8975
8976 2011-08-02 Yannick Moy <moy@adacore.com>
8977
8978 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8979 qualification of aggregates in formal mode
8980 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8981 another aggregate
8982 (Resolve_Aggregate): complete the test that an aggregate is adequately
8983 qualified in formal mode
8984
8985 2011-08-02 Pascal Obry <obry@adacore.com>
8986
8987 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8988 * mlib-prj.adb: Supress warning when compiling binder generated file.
8989 (Build_Library): Supress all warnings when compiling the binder
8990 generated file.
8991
8992 2011-08-02 Yannick Moy <moy@adacore.com>
8993
8994 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8995 from here...
8996 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8997 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8998 Add with/use clauses to make Check_Formal_Restriction visible
8999
9000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9001
9002 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9003 in-parameters when type of the generic formal is private in the generic
9004 spec and non-private in the body.
9005
9006 2011-08-02 Claire Dross <dross@adacore.com>
9007
9008 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9009 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9010 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9011 * impunit.adb, Makefile.rtl: Take new files into account.
9012
9013 2011-08-02 Robert Dewar <dewar@adacore.com>
9014
9015 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9016 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9017
9018 2011-08-02 Yannick Moy <moy@adacore.com>
9019
9020 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9021 formal mode
9022 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9023 matching static array bounds, taking into account the special case of
9024 string literals
9025 * sem_ch3.adb: Typo in comment.
9026
9027 2011-08-02 Yannick Moy <moy@adacore.com>
9028
9029 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9030 which issues an error in formal mode if its argument node is originally
9031 from source
9032 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9033 has a discriminant specification so that it does not include the case
9034 of derived types
9035 (Derived_Type_Declaration): move here the test that a derived type has a
9036 discriminant specification
9037 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9038 first element of a component association before accessing its choices
9039 (presence of component association is not enough)
9040 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9041 declaration is a library item before accessing the next element in a
9042 list, as library items are not member of lists
9043 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9044 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9045 Check_Formal_Restriction whenever possible.
9046
9047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9048
9049 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9050 reference when needed.
9051
9052 2011-08-02 Bob Duff <duff@adacore.com>
9053
9054 * gnat_ugn.texi: Fix typo.
9055
9056 2011-08-02 Vincent Celier <celier@adacore.com>
9057
9058 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9059 archive file name. Do not use the full path name of archives for Open
9060 VMS.
9061
9062 2011-08-02 Robert Dewar <dewar@adacore.com>
9063
9064 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9065 Analyze_Aspect_Specifications
9066 * sem_ch13.adb
9067 (Analyze_Aspect_Specifications): New handling for boolean aspects
9068 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9069 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9070 sequence for Analyze_Aspect_Specifications
9071 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9072 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9073
9074 2011-08-02 Robert Dewar <dewar@adacore.com>
9075
9076 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9077 aspects, since these no longer exist.
9078
9079 2011-08-02 Robert Dewar <dewar@adacore.com>
9080
9081 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9082 semicolon, do not try to see if there are aspects following it.
9083 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9084 aspect spec.
9085
9086 2011-08-02 Robert Dewar <dewar@adacore.com>
9087
9088 * sem_ch8.adb, aspects.ads: Minor reformatting.
9089
9090 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9091
9092 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9093 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9094 extracted from...
9095 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9096
9097 2011-08-02 Yannick Moy <moy@adacore.com>
9098
9099 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9100 mode on subprogram declaration outside of package specification, unless
9101 it is followed by a pragma Import
9102 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9103 Access_Type_Declaration): issue error in formal mode on access type
9104 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9105 incomplete type
9106 (Analyze_Object_Declaration): issue error in formal mode on object
9107 declaration which does not respect SPARK restrictions
9108 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9109 declaration which does not respect SPARK restrictions
9110 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9111 error in formal mode on digits or delta constraint
9112 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9113 decimal fixed point type
9114 (Derived_Type_Declaration): issue error in formal mode on derived type
9115 other than type extensions of tagged record types
9116 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9117 with check on access definition
9118 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9119 mode on protected definition.
9120 (Analyze_Task_Definition): issue error in formal mode on task definition
9121
9122 2011-08-02 Robert Dewar <dewar@adacore.com>
9123
9124 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9125
9126 2011-08-02 Javier Miranda <miranda@adacore.com>
9127
9128 * sem_ch6.adb (Can_Override_Operator): New function.
9129 (Verify_Overriding_Indicator): Add missing code to check overriding
9130 indicator in operators. Fixes regression.
9131 (Check_Overriding_Indicator): Minor reformating after replacing the
9132 code that evaluates if the subprogram can override an operator by
9133 invocations to the above new function.
9134 * einfo.adb
9135 (Write_Field26_Name): Add missing code to ensure that, following
9136 the documentation in einfo.ads, this field is not shown as attribute
9137 "Static_Initialization" on non-dispatching functions.
9138
9139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9140
9141 * sem_res.adb (Resolve_Call): A call to
9142 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9143 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9144 i.e., when the second parameter is of type Time_Span.
9145
9146 2011-08-02 Vincent Celier <celier@adacore.com>
9147
9148 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9149 with an archive instead of -L<library dir> -l<library name>.
9150
9151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9152
9153 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9154 mark the base types In_Use in addition to making the operations
9155 use_visible.
9156
9157 2011-08-02 Ed Falis <falis@adacore.com>
9158
9159 * init.c: add and setup __gnat_signal_mask for the exception signals
9160 * s-inmaop-vxworks.adb: new file.
9161 * s-intman-vxworks.adb: remove unnecessary initializations and
9162 simplify remaining
9163 * s-intman-vxworks.ads: remove unnecessary variable
9164 * s-taprop-vxworks.adb: simplify signal initialization
9165
9166 2011-08-02 Robert Dewar <dewar@adacore.com>
9167
9168 * sem_ch8.adb: Minor code reorganization, comment updates.
9169
9170 2011-08-02 Robert Dewar <dewar@adacore.com>
9171
9172 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9173 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9174 here from Sem_Res.
9175 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9176 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9177
9178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9179
9180 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9181 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9182 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9183 use_type_clauses, to handle more efficiently use_type and use_all_type
9184 constructs.
9185 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9186 Ada2012 Use_All_Type clause.
9187 (Use_Class_Wide_Operations): new procedure.
9188
9189 2011-08-02 Robert Dewar <dewar@adacore.com>
9190
9191 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9192 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9193 expression to expression function.
9194
9195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9196
9197 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9198 if types are compatible.
9199
9200 2011-08-02 Yannick Moy <moy@adacore.com>
9201
9202 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9203 returns True if its argument array types have same dimension and same
9204 static bounds at each index.
9205 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9206 OUT or IN OUT paramaters which are not view conversions in SPARK.
9207 (Resolve_Arithmetic_Op): issue an error in formal mode on
9208 multiplication or division with operands of fixed point types which are
9209 not qualified or explicitly converted.
9210 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9211 Boolean or array type (except String) operands.
9212 (Resolve_Equality_Op): issue an error in formal mode on equality
9213 operators for array types other than String with non-matching static
9214 bounds.
9215 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9216 for array types with non-matching static bounds. Factorize the code in
9217 Matching_Static_Array_Bounds.
9218 (Resolve_Qualified_Expression): issue an error in formal mode on
9219 qualified expressions for array types with non-matching static bounds.
9220 (Resolve_Type_Conversion): issue an error in formal mode on type
9221 conversion for array types with non-matching static bounds
9222
9223 2011-08-02 Robert Dewar <dewar@adacore.com>
9224
9225 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9226
9227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9228
9229 * par-ch9.adb: save location of entry for proper error message.
9230
9231 2011-08-02 Javier Miranda <miranda@adacore.com>
9232
9233 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9234 (Use_Full_View) which permits this routine to climb through the
9235 ancestors using the full-view of private parents.
9236 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9237 Use_Full_View to true in calls to Is_Ancestor.
9238 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9239 true in call to Is_Ancestor.
9240 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9241 Use_Full_View to true in call to Is_Ancestor.
9242 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9243 call to Is_Ancestor.
9244 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9245 Use_Full_View to true in calls to Is_Ancestor.
9246 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9247 Make_Select_Specific_Data_Table, Register_Primitive,
9248 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9249 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9250 to true in call to Is_Ancestor.
9251 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9252 Use_Full_View to true in calls to Is_Ancestor.
9253 * exp_cg.adb
9254 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9255 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9256
9257 2011-08-02 Robert Dewar <dewar@adacore.com>
9258
9259 * gnat_rm.texi: Minor reformatting.
9260 * sem_prag.adb: Minor reformatting.
9261
9262 2011-08-02 Tristan Gingold <gingold@adacore.com>
9263
9264 * vms_data.ads: Add VMS qualifier for -gnateP.
9265
9266 2011-08-02 Robert Dewar <dewar@adacore.com>
9267
9268 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9269 * par-ch7.adb (P_Package): Proper placement of aspects for package
9270 decl/instantiation.
9271 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9272 (End_Statements): Add Is_Sloc parameterr
9273 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9274 (Check_End): Ad Is_Sloc parameter
9275 (End_Statements): Add Is_Sloc parameterr
9276
9277 2011-08-02 Vincent Celier <celier@adacore.com>
9278
9279 * ug_words: Add VMS qualifier equivalent to -gnateP:
9280 /SYMBOL_PREPROCESSING.
9281
9282 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9283
9284 * gnat-style.texi: For hexadecimal numeric literals the typical
9285 grouping of digits is 4 to represent 2 bytes.
9286 A procedure spec which is split into several lines is indented two
9287 characters.
9288
9289 2011-08-02 Yannick Moy <moy@adacore.com>
9290
9291 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9292 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9293 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9294 properly qualified
9295 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9296 choice in array aggregate
9297 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9298 mark as ancestor
9299 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9300 positional and named aggregate for record, or others in record
9301 aggregate, or multiple choice in record aggregate
9302 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9303 array operands to logical operations AND, OR and XOR do not have the
9304 same static lower and higher bounds
9305 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9306
9307 2011-08-01 Robert Dewar <dewar@adacore.com>
9308
9309 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9310 Replaces Last_Source_Node_In_Sequence.
9311 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9312 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9313 parens and blank in string (this was inconsistently implemented).
9314 * errout.ads
9315 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9316 blank in string (this was inconsistently implemented).
9317 * gnat1drv.adb
9318 (Set_Global_Switches): Set formal mode switches appropriately
9319 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9320 * par-prag.adb
9321 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9322 call Set_Error_Msg_Lang to set "spark" as language name.
9323 * par.adb: Remove unnecessary call to set formal language for errout
9324 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9325 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9326 name.
9327 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9328 calls to it, moved after resolution so that types are known
9329 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9330 result of concatenation is not of type String
9331 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9332 concatenation is not properly restricted
9333 * gnat_rm.texi: Add doc on pragma Spark_95.
9334 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9335 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9336 * gcc-interface/Make-lang.in: Update dependencies.
9337
9338 2011-08-01 Javier Miranda <miranda@adacore.com>
9339
9340 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9341 condition that detects if the overridden operation must replace an
9342 existing entity.
9343
9344 2011-08-01 Javier Miranda <miranda@adacore.com>
9345
9346 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9347 code declarations inserted by Insert_Actions in each alternative of the
9348 N_Case_Expression node.
9349
9350 2011-08-01 Robert Dewar <dewar@adacore.com>
9351
9352 * sem_ch6.adb: Minor code reorganization.
9353 * sem_util.adb: Minor reformatting.
9354
9355 2011-08-01 Pascal Obry <obry@adacore.com>
9356
9357 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9358 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9359
9360 2011-08-01 Yannick Moy <moy@adacore.com>
9361
9362 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9363 literal or operator symbol which is prefixed
9364 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9365 mode on access attributes.
9366 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9367 that concatenation operands are properly restricted in formal mode
9368 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9369 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9370 result of the concatenation has a type different from String.
9371 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9372 Analyze_Quantified_Expression, Analyze_Slice,
9373 Analyze_Null): issue an error in formal mode on unsupported constructs
9374 * sem_ch5.adb
9375 (Analyze_Block_Statement): only issue error on source block statement
9376 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9377 function which returns the last node in a list of nodes for which
9378 Comes_From_Source returns True, if any
9379 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9380 Last_Source_Node_In_Sequence
9381 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9382 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9383 mode on unsupported constructs
9384 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9385 rest of the actions may be needed later on since the error is marked as
9386 not serious.
9387 * sinfo.ads: Typos in comments.
9388
9389 2011-08-01 Pascal Obry <obry@adacore.com>
9390
9391 * projects.texi: Minor editing.
9392
9393 2011-08-01 Yannick Moy <moy@adacore.com>
9394
9395 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9396 insertion character ~~
9397 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9398 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9399 with insertion character ~~
9400 (Set_Msg_Text): treat insertion character ~~
9401 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9402 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9403 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9404 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9405 errors related to the formal language restriction not serious
9406 (insertion character |).
9407 * par.adb (Par): set formal language for error messages if needed
9408 * sem_ch6.adb (Check_Missing_Return): take into account possible
9409 generated statements at the end of the function
9410 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9411 enumeration value to define a new pragma SPARK_95
9412 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9413 SPARK_Version): new type and variables to store the SPARK version
9414 (none by default).
9415 (SPARK_Mode): return True when SPARK_Version is set
9416 * par-prag.adb: Correct indentation
9417 (Prag): take Pragma_SPARK_95 into account
9418 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9419 into account.
9420
9421 2011-08-01 Robert Dewar <dewar@adacore.com>
9422
9423 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9424 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9425 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9426
9427 2011-08-01 Pascal Obry <obry@adacore.com>
9428
9429 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9430 Target_Name to Get_Path call.
9431 (Parse_Single_Project): Likewise.
9432 (Post_Parse_Context_Clause): Likewise.
9433 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9434 Call Initialise_Project_Path with the proper Target_Name.
9435 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9436 search path.
9437 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9438 with the proper Target_Name.
9439 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9440 Part.Parse routine.
9441 (Parse_Project_And_Apply_Config): Likewise.
9442 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9443 This is fine as this part of the code is supporting only native
9444 compilation.
9445 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9446 is fine as this part of the code is supporting only native compilation.
9447
9448 2011-08-01 Yannick Moy <moy@adacore.com>
9449
9450 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9451 of homonym, unless the homonym is one of the cases allowed in SPARK
9452 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9453 package declaration occurring after a body.
9454
9455 2011-08-01 Robert Dewar <dewar@adacore.com>
9456
9457 * checks.adb, exp_ch4.adb: Minor reformatting.
9458
9459 2011-08-01 Javier Miranda <miranda@adacore.com>
9460
9461 * einfo.ads (Access_Disp_Table): Fix documentation.
9462 (Dispatch_Table_Wrappers): Fix documentation.
9463
9464 2011-08-01 Pascal Obry <obry@adacore.com>
9465
9466 * prj-env.adb, prj-env.ads: Minor reformatting.
9467
9468 2011-08-01 Yannick Moy <moy@adacore.com>
9469
9470 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9471 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9472 procedures out of these packages.
9473 * errout.ads, errout.adb
9474 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9475 procedures in of this package
9476 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9477 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9478 on misplaced later vs initial declarations, like in Ada 83
9479 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9480 formal mode on attribute of private type whose full type declaration
9481 is not visible
9482 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9483 package declaration inside a package specification
9484 (Analyze_Full_Type_Declaration): issue error in formal mode on
9485 controlled type or discriminant type
9486 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9487 user-defined operator means that it should come from the source
9488 (New_Overloaded_Entity): issue error in formal mode on overloaded
9489 entity.
9490 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9491
9492 2011-08-01 Thomas Quinot <quinot@adacore.com>
9493
9494 * atree.adb: Minor reformatting.
9495 * checks.adb: Minor reformatting.
9496
9497 2011-08-01 Vincent Celier <celier@adacore.com>
9498
9499 * s-parame-vms-ia64.ads: Fix typo in comment
9500 Minor reformatting
9501 * s-parame-vms-restrict.ads: Removed, unused.
9502
9503 2011-08-01 Javier Miranda <miranda@adacore.com>
9504
9505 * exp_ch3.adb
9506 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9507 * sem_ch3.adb
9508 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9509 * sem_ch3.ads, sem_ch3.adb
9510 (Is_Constant_Bound): New extended version of the subprogram that was
9511 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9512 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9513 * sem_aux.ads (Constant_Value): Fix typo in comment.
9514 * checks.adb (Generate_Index_Checks): New implementation which, for
9515 array objects with constant bounds, generates the runtime check
9516 referencing the bounds of the array type. For other cases this routine
9517 provides its previous behavior obtaining such values from the array
9518 object.
9519 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9520 parent type.
9521 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9522 we cannot have semantic interpretations of the new node.
9523
9524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9525
9526 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9527 expressions.
9528
9529 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9530
9531 * sem_ch8.adb: Minor code editing.
9532 * s-vxwext.adb: Remove trailing space.
9533 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9534 consistency with other files.
9535
9536 2011-08-01 Thomas Quinot <quinot@adacore.com>
9537
9538 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9539
9540 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9541
9542 * par-ch10.adb: reject parameterized expressions as compilation unit.
9543 * sem_ch4.adb: handle properly conditional expression with overloaded
9544 then_clause and no else_clause.
9545
9546 2011-08-01 Tristan Gingold <gingold@adacore.com>
9547
9548 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9549 like done by System.Aux_DEC.
9550 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9551
9552 2011-08-01 Yannick Moy <moy@adacore.com>
9553
9554 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9555 missing label at end of declaration (subprogram or package)
9556 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9557 of positional and named parameter association
9558 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9559 Error_Msg_SP which adds a prefix to the error message giving the name
9560 of the formal language analyzed
9561 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9562 access result type in subprogram, unconstrained array as result type,.
9563 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9564 procedure
9565 * sem_ch8.adb: Code clean up.
9566
9567 2011-08-01 Javier Miranda <miranda@adacore.com>
9568
9569 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9570 * einfo.ads (Access_Disp_Table): Fix documentation.
9571 (Dispatch_Table_Wrappers): Fix documentation.
9572 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9573 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9574 to enforce the documentation of this attribute.
9575 (Set_Is_Interface): Cleanup the assertion.
9576 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9577 the Underlying_Type entity before reading attribute Access_Disp_Table.
9578 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9579 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9580 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9581 the Underlying_Type entity before reading attribute Access_Disp_Table.
9582 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9583 Locate the Underlying_Type entity before reading attribute
9584 Access_Disp_Table.
9585
9586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9587
9588 * s-poosiz.ads: Additional overriding indicators.
9589
9590 2011-08-01 Yannick Moy <moy@adacore.com>
9591
9592 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9593 formal mode.
9594 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9595 parameter specification does not include a subtype mark.
9596 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9597 formal mode on abstract subprogram.
9598 (Analyze_Subprogram_Specification): issue error in formal mode on
9599 user-defined operator.
9600 (Process_Formals): issue error in formal mode on access parameter and
9601 default expression.
9602 * sem_ch9.adb (Analyze_Abort_Statement,
9603 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9604 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9605 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9606 Analyze_Requeue, Analyze_Selective_Accept,
9607 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9608 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9609 issue error in formal mode on user-defined raise statement.
9610
9611 2011-08-01 Thomas Quinot <quinot@adacore.com>
9612
9613 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9614 declaration being hidden when overriding an implicit inherited
9615 subprogram.
9616 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9617 (-gnats), do not complain about a source file that contains only a
9618 pragma No_Body.
9619
9620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9621
9622 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9623 variable if already set.
9624
9625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9626
9627 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9628 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9629 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9630 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9631 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9632 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9633 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9634 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9635 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9636 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9637 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9638 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9639 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9640 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9641 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9642 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9643 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9644 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9645 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9646 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9647 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9648 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9649 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9650 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9651 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9652 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9653 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9654 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9655 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9656 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9657 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9658 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9659 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9660 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9661 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9662 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9663 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9664 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9665 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9666 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9667 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9668 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9669 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9670 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9671 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9672 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9673 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9674 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9675 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9676 Use GNAT instead of GNARL.
9677
9678 2011-08-01 Bob Duff <duff@adacore.com>
9679
9680 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9681 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9682 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9683 reformatting.
9684
9685 2011-08-01 Yannick Moy <moy@adacore.com>
9686
9687 * debug.adb (d.D) reverve flag for the SPARK mode
9688 (d.E) reverve flag for SPARK generation mode
9689 (d.F) reverve flag for Why generation mode
9690 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9691 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9692 functions which return True when the corresponding modes are set
9693 (Formal_Language): return "spark" or "alfa" when in formal verification
9694 mode.
9695 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9696 Error_Msg to prefix the error message with a tag giving the formal
9697 language
9698 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9699 message with a tag giving the formal language
9700 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9701 block statement
9702 (Analyze_Case_Statement): issue error in formal mode on case statement
9703 with a single "others" case alternative
9704 (Analyze_Exit_Statement): issue errors in formal mode on exit
9705 statements which do not respect SPARK restrictions
9706 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9707 (Check_Unreachable_Code): always issue an error (not a warning) in
9708 formal mode on unreachable code (concerns both code after an infinite
9709 loop and after an unconditional jump, both not allowed in SPARK)
9710 * sem_ch6.adb (Analyze_Return_Statement): add call to
9711 Set_Return_Present for a procedure containing a return statement
9712 (already done for functions in Analyze_Function_Return)
9713 (Analyze_Function_Return): issue error in formal mode on extended
9714 return or if return is not last statement in function
9715 (Check_Missing_Return): issue error in formal mode if function does
9716 not end with return or if procedure contains a return
9717 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9718 function to detect if there is an inner scope of its parameter S which
9719 is a loop.
9720
9721 2011-08-01 Thomas Quinot <quinot@adacore.com>
9722
9723 * sem_ch6.ads: Minor reformatting.
9724
9725 2011-08-01 Javier Miranda <miranda@adacore.com>
9726
9727 * sem_util.adb (Abstract_Interface_List): Complete condition when
9728 processing private type declarations to avoid reading unavailable
9729 attribute.
9730 (Is_Synchronized_Tagged_Type): Complete condition when processing
9731 private extension declaration nodes to avoid reading unavailable
9732 attribute.
9733
9734 2011-08-01 Thomas Quinot <quinot@adacore.com>
9735
9736 * sem_ch3.adb: Minor reformatting.
9737
9738 2011-08-01 Thomas Quinot <quinot@adacore.com>
9739
9740 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9741 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9742 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9743 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9744 for VMS, instead parametrize the common implementation with
9745 System.Parameters declarations.
9746
9747 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9748
9749 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9750
9751 2011-08-01 Tristan Gingold <gingold@adacore.com>
9752
9753 * seh_init.c: Fix SEH handler installation on win64.
9754
9755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9756
9757 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9758 double analysis of an anonymous access to subprogram, because it can
9759 lead to improper sharing of profiles and a back-end crash.
9760
9761 2011-08-01 Robert Dewar <dewar@adacore.com>
9762
9763 * make.adb, sem_ch4.adb: Minor reformatting.
9764 * gcc-interface/Make-lang.in: Update dependencies.
9765 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9766
9767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9768
9769 * gnat_rm.texi: Fix definition of Long_Integer.
9770
9771 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9772
9773 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9774 to prevent storage exhaustion.
9775 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9776 finalized is a function body, insert the cleanup code before the final
9777 return statement, to prevent spurious warnings.
9778 * s-pooglo.ads: add overriding indicator.
9779
9780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9781
9782 * sem_ch4.adb (Operator_Check): improve error message when both a
9783 with_clause and a use_clause are needed to make operator usage legal.
9784 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9785 determine whether a compilation unit is visible within an other,
9786 either through a with_clause in the current unit, or a with_clause in
9787 its library unit or one one of its parents.
9788
9789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9790
9791 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9792 over an arbitrary expression of an array or container type.
9793 * lib-xref.adb: clarify comment.
9794
9795 2011-08-01 Bob Duff <duff@adacore.com>
9796
9797 * einfo.ads: Minor reformatting.
9798 * debug.adb: Minor comment improvement.
9799
9800 2011-08-01 Javier Miranda <miranda@adacore.com>
9801
9802 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9803 consider hidden subprograms as valid candidates.
9804
9805 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9806
9807 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9808
9809 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9810
9811 * gnat_ugn.texi: Fix typo.
9812
9813 2011-08-01 Robert Dewar <dewar@adacore.com>
9814
9815 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9816 lib-xref.adb: Minor reformatting
9817
9818 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9819
9820 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9821 when to generate a call to Move_Final_List.
9822 (Has_Controlled_Parts): Remove this function.
9823
9824 2011-08-01 Geert Bosch <bosch@adacore.com>
9825
9826 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9827 "," in choice list.
9828
9829 2011-08-01 Thomas Quinot <quinot@adacore.com>
9830
9831 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9832 explicit raise of a predefined exception as Comes_From_Source if the
9833 original N_Raise_Statement comes from source.
9834
9835 2011-08-01 Robert Dewar <dewar@adacore.com>
9836
9837 * sinfo.ads: Add comment.
9838 * sem_ch6.adb: Minor reformatting.
9839
9840 2011-08-01 Robert Dewar <dewar@adacore.com>
9841
9842 * freeze.adb (Freeze_Entity): Refine check for bad component size
9843 clause to avoid rejecting confirming clause when atomic/aliased present.
9844
9845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9846
9847 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9848 better determine whether an entity reference is a write.
9849 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9850 subcomponent.
9851 * lib-xref.adb (Output_References): Do no suppress a read reference at
9852 the same location as an immediately preceeding modify-reference, to
9853 handle properly in-out actuals.
9854
9855 2011-08-01 Tristan Gingold <gingold@adacore.com>
9856
9857 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9858
9859 2011-08-01 Quentin Ochem <ochem@adacore.com>
9860
9861 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9862 heap to compute the result.
9863
9864 2011-08-01 Robert Dewar <dewar@adacore.com>
9865
9866 * atree.ads: Minor reformatting.
9867
9868 2011-08-01 Emmanuel Briot <briot@adacore.com>
9869
9870 * g-expect.adb (Get_Command_Output): Fix memory leak.
9871
9872 2011-08-01 Geert Bosch <bosch@adacore.com>
9873
9874 * cstand.adb (P_Float_Type): New procedure to print the definition of
9875 predefined fpt types.
9876 (P_Mixed_Name): New procedure to print a name using mixed case
9877 (Print_Standard): Use P_Float_Type for printing floating point types
9878 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9879 precision IEEE float.
9880
9881 2011-08-01 Thomas Quinot <quinot@adacore.com>
9882
9883 * sem_ch3.adb: Minor reformatting.
9884
9885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9886
9887 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9888 the completion of a generic function, insert the new body rather than
9889 rewriting the original.
9890
9891 2011-08-01 Yannick Moy <moy@adacore.com>
9892
9893 * sinfo.ads, errout.ads: Typos in comments.
9894
9895 2011-08-01 Robert Dewar <dewar@adacore.com>
9896
9897 * par-endh.adb: Minor reformatting.
9898
9899 2011-08-01 Robert Dewar <dewar@adacore.com>
9900
9901 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9902 (Pre_Post_Aspects): New subtype.
9903 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9904 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9905 * par-ch7.adb (P_Package): Remove Decl parameter
9906 (P_Package): Handle new syntax for aspects (before IS)
9907 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9908 new aspect syntax
9909 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9910 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9911 (P_Package): Remove Decl parameter
9912 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9913 aspects
9914 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9915 specs
9916 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9917 * sinfo.ads: Document new syntax for aspects in packages etc.
9918 * sprint.adb: Handle new syntax of aspects before IS in package
9919
9920 2011-08-01 Thomas Quinot <quinot@adacore.com>
9921
9922 * atree.ads: Minor reformatting.
9923 * sem_prag.adb: Minor reformatting.
9924
9925 2011-08-01 Robert Dewar <dewar@adacore.com>
9926
9927 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9928 case expr alternative.
9929
9930 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9931
9932 * sem_ch12.adb: Fix typo.
9933
9934 2011-08-01 Geert Bosch <bosch@adacore.com>
9935
9936 * sem_prag.adb (Check_No_Link_Name): New procedure.
9937 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9938 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9939 instead of Standard_Long_Long_Float_Size global. Preparation for
9940 eventual removal of per type constants.
9941 * exp_util.ads (Get_Stream_Size): New function returning the stream
9942 size value of subtype E.
9943 * exp_util.adb (Get_Stream_Size): Implement new function.
9944 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9945 function.
9946 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9947 * einfo.adb:
9948 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9949
9950 2011-08-01 Geert Bosch <bosch@adacore.com>
9951
9952 * cstand.adb: Fix comments.
9953 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9954 count of arguments.
9955
9956 2011-08-01 Robert Dewar <dewar@adacore.com>
9957
9958 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9959
9960 2011-08-01 Geert Bosch <bosch@adacore.com>
9961
9962 * atree.ads: Fix comment.
9963
9964 2011-08-01 Robert Dewar <dewar@adacore.com>
9965
9966 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9967 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9968 * par.adb: Add with for Namet.Sp.
9969 * par-tchk.adb: Minor reformatting.
9970
9971 2011-08-01 Vincent Celier <celier@adacore.com>
9972
9973 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9974 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9975 of the init procedure of a SAL.
9976 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9977 New procedure.
9978
9979 2011-08-01 Thomas Quinot <quinot@adacore.com>
9980
9981 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9982 reformatting.
9983
9984 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9985
9986 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9987
9988 2011-08-01 Thomas Quinot <quinot@adacore.com>
9989
9990 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9991 conformant with its spec (return True only for types that have
9992 an overriding Initialize primitive operation that prevents them from
9993 having preelaborable initialization).
9994 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9995 initialization for controlled types in Ada 2005 or later mode.
9996
9997 2011-08-01 Robert Dewar <dewar@adacore.com>
9998
9999 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10000 Postcondition.
10001 (Same_Aspect): New function.
10002 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10003 Type_Invariant, Precondition, Postcondition.
10004 * snames.ads-tmpl: Add Name_Type_Invariant.
10005
10006 2011-08-01 Robert Dewar <dewar@adacore.com>
10007
10008 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10009 here.
10010 (Freeze_All_Ent): Fix error in handling inherited aspects.
10011 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10012 already analyzed, but don't skip entire processing of a declaration,
10013 that's wrong in some cases of declarations being rewritten.
10014 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10015 Don't delay for integer, string literals
10016 Treat predicates in usual manner for delay, remove special case code,
10017 not needed.
10018 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10019 (Build_Predicate_Function): Update saved expression in aspect
10020 (Build_Invariant_Procedure): Update saved expression in aspect
10021 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10022 of replacement of discriminant references if the reference is simple.
10023
10024 2011-08-01 Robert Dewar <dewar@adacore.com>
10025
10026 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10027 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10028 Static_Predicate and Dynamic_Predicate.
10029 (Build_Predicate_Function): Add processing for Static_Predicate
10030 and Dynamic_Predicate.
10031 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10032 (From_Static_Predicate): New flag
10033 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10034
10035 2011-08-01 Robert Dewar <dewar@adacore.com>
10036
10037 * usage.adb: Documentation cleanup for Ada version modes in usage.
10038 * expander.adb: Minor reformatting.
10039
10040 2011-08-01 Robert Dewar <dewar@adacore.com>
10041
10042 * atree.ads: Minor comment fix.
10043 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10044 a-witeio.ads, sem_prag.adb: Minor reformatting.
10045
10046 2011-08-01 Doug Rupp <rupp@adacore.com>
10047
10048 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10049 pointers. Use descrip.h header file for convenience. Add some
10050 comments.
10051
10052 2011-08-01 Robert Dewar <dewar@adacore.com>
10053
10054 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10055 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10056 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10057 New procedure.
10058 (Check_Aspect_At_End_Of_Declarations): New procedure
10059 (Analye_Aspect_Specification): Minor changes for above procedures
10060 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10061 specification node as well.
10062
10063 2011-08-01 Pascal Obry <obry@adacore.com>
10064
10065 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10066 Windows files. Use GetFilesAttributes() in this case to check for file
10067 existence instead of returning with an error code.
10068
10069 2011-08-01 Vincent Celier <celier@adacore.com>
10070
10071 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10072 High is above Source length.
10073
10074 2011-08-01 Robert Dewar <dewar@adacore.com>
10075
10076 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10077
10078 2011-08-01 Robert Dewar <dewar@adacore.com>
10079
10080 * aspects.ads (Boolean_Aspects): New subtype.
10081 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10082 for derived types in cases where the parent type and derived type have
10083 aspects.
10084 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10085 with aspects when parent type also has aspects.
10086 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10087 boolean expression at this point).
10088 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10089 accordance with final decision on the Ada 2012 feature.
10090 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10091
10092 2011-08-01 Matthew Heaney <heaney@adacore.com>
10093
10094 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10095
10096 2011-08-01 Pascal Obry <obry@adacore.com>
10097
10098 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10099 Fix Replace_Slice when High is above current string size.
10100 (Replace_Slice): Fix DL computation when High is above current
10101 string length.
10102
10103 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10104
10105 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10106
10107 2011-08-01 Matthew Heaney <heaney@adacore.com>
10108
10109 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10110 of node.
10111
10112 2011-08-01 Pascal Obry <obry@adacore.com>
10113
10114 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10115 reformatting.
10116
10117 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10118
10119 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10120 access to protected subprograms in generic bodies.
10121 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10122 protected type, indicate that the convention of the subprogram is
10123 Convention_Protected, because it may be used in subsequent declarations
10124 within the protected declaration.
10125
10126 2011-08-01 Vincent Celier <celier@adacore.com>
10127
10128 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10129 and "final" procedures when the name of the library is "ada", to avoid
10130 duplicate symbols "adainit" and "adafinal" in executables.
10131
10132 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10133
10134 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10135 quantified expression that appears within a postcondition and uses the
10136 Ada2012 'Result attribute.
10137
10138 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10139
10140 * init.c (__gnat_error_handler): Cast reason to int.
10141 (__gnat_install_handler): Explain sa_sigaction use.
10142
10143 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10144
10145 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10146 subprogram has copy-in copy-out parameters, try to promote the mode of
10147 the return type if it is passed in registers.
10148
10149 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10150
10151 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10152 left operand as addressable.
10153
10154 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10155
10156 * gcc-interface/gigi.h (build_function_stub): Remove.
10157 (build_return_expr): Likewise.
10158 (convert_vms_descriptor): Declare.
10159 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10160 (build_function_stub): Move to...
10161 * gcc-interface/utils2.c (build_return_expr): Move to...
10162 * gcc-interface/trans.c (build_function_stub): ...here.
10163 (build_return_expr): ...here.
10164 (Subprogram_Body_to_gnu): Add local variable for language_function.
10165 Disconnect the parameter attributes cache, if any, once done with it.
10166 Call end_subprog_body only after setting the end_locus.
10167 Build the stub associated with the function, if any, at the very end.
10168 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10169 variables and streamline control flow.
10170
10171 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10172
10173 PR ada/49819
10174 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10175 g-trasym-dwarf.adb.
10176
10177 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10178
10179 PR bootstrap/49794
10180 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10181 Assign to act.sa_sigaction.
10182 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10183 current->return_address to char * before arithmetic.
10184
10185 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10186
10187 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10188 Correct argument types.
10189 Extract code from reason.
10190 (__gnat_install_handler): Assign to act.sa_sigaction.
10191
10192 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10193
10194 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10195 (GNAT1_OBJS): ...here.
10196
10197 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10198
10199 PR ada/48711
10200 * g-socthi-mingw.adb (Fill): Fix formatting.
10201
10202 * gcc-interface/gigi.h: Move around comment.
10203
10204 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10205
10206 PR ada/46350
10207 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10208
10209 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10210
10211 PR ada/48711
10212 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10213
10214 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10215
10216 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10217 range comparison if Pmode is SImode.
10218
10219 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10220 Eric Botcazou <ebotcazou@adacore.com>
10221
10222 * adadecode.c: Wrap up in extern "C" block.
10223 * adadecode.h: Likewise.
10224 * adaint.c: Likewise. Remove 'const' keyword.
10225 * adaint.h: Likewise.
10226 * argv.c: Likewise.
10227 * atree.h: Likewise.
10228 * cio.c: Likewise.
10229 * cstreams.c: Likewise.
10230 * env.c: Likewise.
10231 * exit.c: Likewise.
10232 * fe.h: Likewise.
10233 * final.c: Likewise.
10234 * init.c: Likewise.
10235 * initialize.c: Likewise.
10236 * link.c: Likewise.
10237 * namet.h: Likewise.
10238 * nlists.h: Likewise.
10239 * raise.c: Likewise.
10240 * raise.h: Likewise.
10241 * repinfo.h: Likewise.
10242 * seh_init.c: Likewise.
10243 * targext.c: Likewise.
10244 * tracebak.c: Likewise.
10245 * uintp.h: Likewise.
10246 * urealp.h: Likewise.
10247 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10248 * xsinfo.adb: Likewise.
10249 * xsnamest.adb: Likewise.
10250 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10251 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10252 * gcc-interface/misc.c: Likewise.
10253 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10254 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10255 ada/targext.o here...
10256 (GNAT_ADA_OBJS): ...and not here.
10257 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10258 (GNATBIND_OBJS): Reorder.
10259
10260 2011-07-07 Richard Henderson <rth@redhat.com>
10261
10262 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10263 dwarf2out_frame_init.
10264
10265 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10266
10267 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10268
10269 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10270
10271 PR target/39150
10272 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10273
10274 2011-07-06 Richard Guenther <rguenther@suse.de>
10275
10276 * gcc-interface/misc.c (gnat_init): Merge calls to
10277 build_common_tree_nodes and build_common_tree_nodes_2.
10278 Re-initialize boolean_false_node.
10279
10280 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10281 Olivier Hainque <hainque@adacore.com>
10282 Nicolas Setton <setton@adacore.com>
10283
10284 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10285 the type according to the ARTIFICIAL_P parameter.
10286 (create_type_decl): Likewise.
10287 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10288
10289 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10290
10291 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10292 (gnatbind): Likewise.
10293
10294 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10295
10296 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10297
10298 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10299
10300 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10301 local variable throughout. Remove useless call to Base_Type.
10302 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10303 Take it also into account for the volatileness of the field. Set the
10304 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10305
10306 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10307
10308 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10309 on a dereference built for a by-ref object if it has an address clause.
10310
10311 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10312
10313 * einfo.ads (Address_Taken): Document use for the second argument of
10314 Asm_Input and Asm_Output attributes.
10315 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10316 argument is an entity name, then set Address_Taken on it.
10317 <Attribute_Asm_Output>: Likewise.
10318 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10319 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10320 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10321 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10322
10323 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10324
10325 PR middle-end/46500
10326 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10327
10328 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10329
10330 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10331 (ada/utils.o): Update dependencies.
10332 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10333 ../../../libcpp/libcpp.a.
10334 * gcc-interface/utils.c: Include common/common-target.h.
10335 (process_attributes): Use targetm_common.have_named_sections.
10336
10337 2011-06-07 Richard Guenther <rguenther@suse.de>
10338
10339 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10340 set_sizetype.
10341
10342 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10343
10344 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10345 TREE_THIS_NOTRAP flag.
10346
10347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10348
10349 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10350 Fix thinko.
10351
10352 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10353
10354 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10355 constants whose full view has discriminants specially.
10356
10357 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10358
10359 * gcc-interface/utils.c: Include diagnostic.h.
10360 (gnat_write_global_declarations): Output debug information for all
10361 global type declarations before finalizing the compilation unit.
10362 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10363
10364 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10365
10366 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10367
10368 2011-05-25 Kai Tietz <ktietz@redhat.com>
10369
10370 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10371 initialization instead of const/none-const pointer assignment.
10372
10373 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10374
10375 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10376 $(EXTRA_GNAT1_OBJS).
10377 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10378 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10379 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10380 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10381 libcommon-target.a instead of prefix.o.
10382
10383 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10384
10385 PR ada/49097
10386 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10387
10388 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10389
10390 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10391 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10392 instead of version.o.
10393
10394 2011-05-18 Kai Tietz <ktietz@redhat.com>
10395
10396 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10397 boolean_false_node instead of integer_zero_node.
10398 (convert_with_check): Likewise.
10399 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10400
10401 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10402
10403 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10404 type of the parameter is an unconstrained array, convert the actual to
10405 the type of the formal in the In Out and Out cases as well.
10406
10407 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10408
10409 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10410 call build_function_type_array or build_varargs_function_type_array
10411 instead.
10412 (create_subprog_type): Don't call build_function_type; call
10413 build_function_type_vec instead.
10414
10415 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10416
10417 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10418 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10419 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10420
10421 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10422
10423 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10424
10425 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10426 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10427
10428 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10429
10430 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10431
10432 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10433
10434 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10435 instead of accessing TYPE_ARG_TYPES directly.
10436 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10437
10438 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10439
10440 PR ada/48844
10441 * gcc-interface/gigi.h (get_variant_part): Declare.
10442 * gcc-interface/decl.c (get_variant_part): Make global.
10443 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10444 types have the same constant size, are record types and T1 has a
10445 variant part while T2 doesn't.
10446
10447 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10448
10449 * gcc-interface/utils.c (begin_subprog_body): Do not call
10450 get_pending_sizes.
10451 (end_subprog_body): Likewise.
10452
10453 2011-05-04 Richard Guenther <rguenther@suse.de>
10454
10455 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10456 int_const_binop.
10457 (pos_to_constructor): Likewise.
10458
10459 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10460 Eric Botcazou <ebotcazou@adacore.com>
10461
10462 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10463 of build_function_type. Adjust calls to...
10464 (build_raise_check): ...this. Do not take a void_tree parameter.
10465 Call build_function_type_list instead of build_function_type.
10466 Fix head comment and swap couple of conditional blocks.
10467
10468 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10469
10470 * gnatvsn.ads (Library_Version): Bump to 4.7.
10471 (Current_Year): Bump to 2011.
10472
10473 2011-04-29 Michael Matz <matz@suse.de>
10474
10475 * gcc-interface/misc.c (gnat_handle_option): Set
10476 warn_maybe_uninitialized.
10477
10478 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10479
10480 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10481 the Watson/McCabe paper.
10482
10483 2011-04-23 Jim Meyering <meyering@redhat.com>
10484
10485 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10486
10487 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10488
10489 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10490 onto the new type.
10491
10492 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10493
10494 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10495 parameter.
10496 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10497 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10499 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10500 <all>: Do not set flags on the reused DECL node coming from an alias.
10501 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10502 don't need debug info here...
10503 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10504 (gigi): Adjust calls to create_subprog_decl.
10505 (build_raise_check): Likewise.
10506 (establish_gnat_vms_condition_handler): Likewise.
10507 (Compilation_Unit_to_gnu): Likewise.
10508 (gnat_to_gnu): Likewise.
10509
10510 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10511
10512 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10513 (NO_REORDER_ADAFLAGS): New variable.
10514 (EXTRA_GNATTOOLS): Always define.
10515 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10516 Clean up and adjust list of files compiled with special options.
10517 * gcc-interface/Make-lang.in: Likewise.
10518 (ada/decl.o): Cosmetical change.
10519 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10520
10521 2011-04-20 Jim Meyering <meyering@redhat.com>
10522
10523 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10524
10525 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10526
10527 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10528 $(CFLAGS) on the link line.
10529
10530 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10531
10532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10533 padded type built for the return type if it is unconstrained.
10534
10535 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10536
10537 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10538
10539 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10540
10541 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10542 before calling TREE_CHAIN.
10543 * gcc-interface/misc.c (gnat_init_ts): New function.
10544 (LANG_HOOKS_INIT_TS): Define.
10545
10546 2011-04-12 Martin Jambor <mjambor@suse.cz>
10547
10548 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10549 instead of cgraph_node.
10550
10551 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10552
10553 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10554 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10555 mechanism.
10556
10557 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10558
10559 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10560 of aggregate types that contain a placeholder.
10561
10562 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10563
10564 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10565 TYPE_ARG_TYPES.
10566 (handle_type_generic_attribute): Likewise.
10567
10568 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10569
10570 PR ada/47163
10571 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10572
10573 2011-04-04 Kai Tietz <ktietz@redhat.com>
10574
10575 PR ada/47163
10576 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10577 to flag value.
10578
10579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10580
10581 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10582 type case, do not strip a padding type around the array type.
10583
10584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10585
10586 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10587 types.
10588
10589 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10590
10591 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10592 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10593 code for -feliminate-unused-debug-types.
10594 (gnat_post_options): Likewise.
10595
10596 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10597
10598 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10599 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10600 distinct copy.
10601
10602 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10603
10604 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10605 DECL_ARTIFICIAL flag on enumeration types.
10606
10607 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10608
10609 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10610 fat pointer types artificial unconditionally.
10611 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10612 isn't artificial.
10613
10614 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10615
10616 * gcc-interface/gigi.h (get_dummy_type): Declare.
10617 (build_dummy_unc_pointer_types): Likewise.
10618 (finish_fat_pointer_type): Likewise.
10619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10620 fat pointer type has been built, complete it in place.
10621 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10622 and thin pointers. Remove useless variable.
10623 (finish_fat_pointer_type): Make global and move to...
10624 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10625 (get_dummy_type): New function.
10626 (build_dummy_unc_pointer_types): Likewise.
10627 (gnat_pushdecl): Propage the name to the anonymous variants only.
10628 (update_pointer_to): Only adjust the pointer types in the unconstrained
10629 array case.
10630
10631 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10632
10633 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10635 if this is a Taft amendment type and the full declaration is available.
10636 * gcc-interface/trans.c (process_type): Likewise.
10637 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10638 (process_freeze_entity): Likewise.
10639 * gcc-interface/utils.c (dummy_global): New static variable.
10640 (gnat_write_global_declarations): If there are types declared as used
10641 at the global level, insert them in the global hash table.
10642
10643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10644
10645 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10646 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10647 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10648 copy.
10649 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10650 flag of the type accordingly.
10651 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10652
10653 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10654
10655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10656 finalizing types when updating the pointers to the designated type.
10657 <all>: Finalize the deferred types even if we didn't defer processing
10658 of incomplete types in this invocation.
10659
10660 2011-04-01 Olivier Hainque <hainque@adacore.com>
10661 Nicolas Setton <setton@adacore.com>
10662 Eric Botcazou <ebotcazou@adacore.com>
10663
10664 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10665 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10666
10667 2011-03-28 Kai Tietz <ktietz@redhat.com>
10668
10669 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10670 Windows targets.
10671 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10672 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10673
10674 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10675
10676 2011-03-28 Tristan Gingold <gingold@adacore.com>
10677
10678 PR ada/44431
10679 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10680 Use ada output of gnatbind.
10681 (ada/b_gnatb.adb): Ditto.
10682 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10683 (ada.mostlyclean, ada.stage1)
10684 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10685 (ada.stagefeedback): Adjust.
10686 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10687 Use ada output of gnatbind.
10688 (b_gnatm.adb): Ditto.
10689 (b_gnatl.o, b_gnatm.o): New rules.
10690
10691 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10692
10693 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10694 for the padded type built to support a specified size or alignment.
10695
10696 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10697
10698 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10700 unconditionally to the end of the unit when the designated type is
10701 limited_with'ed.
10702 <all>: Rename local variable. Attempt to un-defer types only and do it
10703 for limited_with'ed types as well.
10704 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10705 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10706 consistently and remove redundant call to finalize_from_with_types.
10707
10708 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10709
10710 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10711 subprograms without a previous spec declared in the same unit.
10712 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10713 subprograms at the end of the unit instead of at the beginning.
10714 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10715 isn't public for the special handling of non-inline functions nested
10716 inside inline external functions.
10717
10718 2011-03-25 Jeff Law <law@redhat.com>
10719
10720 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10721
10722 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10723
10724 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10725 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10726 to compute Set_Size_Depends_On_Discriminant.
10727 (Layout_Type): Call it on array types in back-end layout mode.
10728 * sem_util.adb (Requires_Transient_Scope): Return true for array
10729 types only if the size depends on the value of discriminants.
10730 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10731 type if the RHS is a call to a function that returns an unconstrained
10732 type with default discriminant.
10733
10734 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10735
10736 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10737 non-conversion to the nominal result type at the end.
10738
10739 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10740
10741 * gcc-interface/trans.c (create_temporary): New function taken from...
10742 (create_init_temporary): ...here. Call it.
10743 (call_to_gnu): Create the temporary for the return value early, if any.
10744 Create it for a function with copy-in/copy-out parameters if there is
10745 no target; in other cases of copy-in/copy-out, use another temporary.
10746 Push the new binding level lazily. Add and rename local variables.
10747
10748 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10749
10750 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10751 error message.
10752 (set_rm_size): Likewise.
10753
10754 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10755
10756 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10757 for the padded type built in order to support a specified alignment.
10758 Fix incorrect formatting.
10759
10760 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10761
10762 PR bootstrap/48216
10763 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10764
10765 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10766
10767 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10768 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10769 to the end of the list. Adjust recursive call. Rename local variable.
10770 If REORDER is true, reorder components of the record type.
10771 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10772 components_to_record and adjust the parameter list.
10773
10774 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10775
10776 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10777 disabled, use the variable for bounds of loop iteration scheme.
10778
10779 2011-03-21 Kai Tietz <ktietz@redhat.com>
10780
10781 PR target/12171
10782 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10783
10784 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10785
10786 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10787 out whether the expression is read-only. Short-circuit placeholder
10788 case and rename a couple of local variables.
10789
10790 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10791
10792 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10793 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10794 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10795 (convert): Deal with conversions from a smaller form type specially.
10796
10797 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10798
10799 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10800 its argument, except for the special -I- switch.
10801
10802 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10803
10804 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10805 "Ada Issues".
10806
10807 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10808
10809 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10810
10811 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10812
10813 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10814 GNAT_FORMAL.
10815 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10816 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10817 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10818 Do not generate the check directly, instead instantiate the template
10819 check present in the descriptor.
10820 (make_descriptor_field): Move around.
10821 (build_vms_descriptor32): Build a template check in the POINTER field.
10822 (build_vms_descriptor): Remove useless suffixes.
10823 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10824
10825 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10826
10827 PR bootstrap/47467
10828 * targext.c: Include target files if IN_RTS is defined.
10829
10830 2011-01-26 Richard Guenther <rguenther@suse.de>
10831
10832 PR bootstrap/47467
10833 * targext.c: Include config.h.
10834 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10835 dependency.
10836
10837 2011-01-04 Pascal Obry <obry@adacore.com>
10838 Eric Botcazou <ebotcazou@adacore.com>
10839
10840 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10841
10842 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10843
10844 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10845 end-of-case on the end label and its associated gotos, if any.
10846
10847 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10848
10849 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10850 expressions of the parameter cache within the statement group of
10851 the CICO mechanism.
10852
10853 2011-01-04 Olivier Hainque <hainque@adacore.com>
10854 Eric Botcazou <ebotcazou@adacore.com>
10855
10856 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10857 (set_end_locus_from_node): New function.
10858 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10859 make and the function end_locus.
10860 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10861 for the elaboration subprogram.
10862 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10863 set the end_locus of the expression as well.
10864
10865 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10866
10867 PR ada/47131
10868 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10869 variables that are referenced in exception handlers volatile.
10870
10871
10872 \f
10873 Copyright (C) 2011 Free Software Foundation, Inc.
10874
10875 Copying and distribution of this file, with or without modification,
10876 are permitted in any medium without royalty provided the copyright
10877 notice and this notice are preserved.
10878
10879 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10880 - fix bugs in the description of Source_Trace;
10881 - get rid of UNIT_NAME;
10882
10883 2011-08-02 Javier Miranda <miranda@adacore.com>
10884
10885 * exp_ch9.adb
10886 (Build_Dispatching_Requeue): Adding support for VM targets
10887 since we cannot directly reference the Tag entity.
10888 * exp_sel.adb (Build_K): Adding support for VM targets.
10889 (Build_S_Assignment): Adding support for VM targets.
10890 * exp_disp.adb
10891 (Default_Prim_Op_Position): In VM targets do not restrict availability
10892 of predefined interface primitives to compiling in Ada 2005 mode.
10893 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10894 restricted to compiling in Ada 2005 mode.
10895 (Make_VM_TSD): Generate code that declares and initializes the OSD
10896 record. Needed to support dispatching calls through synchronized
10897 interfaces.
10898 * exp_ch3.adb
10899 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10900 primitives associated with synchronized interfaces.
10901 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10902 primitives associated with synchronized interfaces.
10903
10904 2011-08-02 Yannick Moy <moy@adacore.com>
10905
10906 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10907 statements hidden in SPARK if preceded by the HIDE directive
10908 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10909 exception handlers as hidden in SPARK if preceded by the HIDE directive
10910 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10911 if starting with the HIDE directive
10912 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10913 starting with the HIDE directive; mark the declarations in a private
10914 part as hidden in SPARK if the private part starts with the HIDE
10915 directive
10916 * restrict.adb, restrict.ads
10917 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10918 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10919 argument node belongs to a part which is hidden in SPARK
10920 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10921 parts in SPARK; protect the possibly costly call to
10922 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10923 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10924 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10925 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10926 Tok_SPARK_Hide.
10927 (Scan): recognize special comment starting with '#' and followed by
10928 SPARK keyword "hide" as a HIDE directive.
10929
10930 2011-08-02 Yannick Moy <moy@adacore.com>
10931
10932 * types.ads, erroutc.ads: Minor reformatting.
10933
10934 2011-08-02 Vincent Celier <celier@adacore.com>
10935
10936 * link.c: Add response file support for cross platforms.
10937
10938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10939
10940 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10941 in an association, set parent field of copy before partial analysis.
10942 * sem_res.adb (Resolve_Slice): create reference to itype only when
10943 expansion is enabled.
10944
10945 2011-08-02 Yannick Moy <moy@adacore.com>
10946
10947 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10948 for new flag denoting which subprogram bodies are in ALFA
10949 * restrict.adb, sem_ch7.adb: Update comment
10950 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10951 sem_ch9.adb, sem_res.adb: Add calls to
10952 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10953 * sem_ch6.adb (Analyze_Function_Return): add calls to
10954 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10955 middle of the body, and extended return.
10956 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10957 False when missing return.
10958 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10959 to True for subprograms whose spec is in ALFA. Remove later on the flag
10960 on the entity used for a subprogram body when there exists a separate
10961 declaration.
10962 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10963 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10964 False, otherwise do nothing.
10965
10966 2011-08-02 Robert Dewar <dewar@adacore.com>
10967
10968 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10969
10970 2011-08-02 Yannick Moy <moy@adacore.com>
10971
10972 * sem_ch4.ads: minor formatting.
10973
10974 2011-08-02 Yannick Moy <moy@adacore.com>
10975
10976 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10977 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10978 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10979 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10980 opt.ads: cleanup of SPARK mode
10981
10982 2011-08-02 Yannick Moy <moy@adacore.com>
10983
10984 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10985 types.
10986 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10987 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10988 * sem_ch3.adb
10989 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10990 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10991 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10992 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10993 types.
10994 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10995 non-static range.
10996 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10997 functions whose return type is not in ALFA.
10998 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10999 specifications.
11000 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11001 parameter's type is not in ALFA.
11002 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11003 types are in ALFA.
11004
11005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11006
11007 * sem_ch6 (Analyze_Expression_Function): treat the function as
11008 Inline_Always, and introduce a subprogram declaration for it when it is
11009 not a completion.
11010 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11011 expression functions, so that the back-end can determine whether they
11012 can in fact be inlined.
11013 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11014 a function body comes from an expression function.
11015
11016 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11017
11018 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11019 null exclusions to test Can_Never_Be_Null on the anonymous access types
11020 of the formals rather than testing the formals themselves. Exclude this
11021 check in cases where the Old_Formal is marked as a controlling formal,
11022 to avoid issuing spurious errors for bodies completing dispatching
11023 operations (due to the flag not getting set on controlling access
11024 formals in body specs).
11025 (Find_Corresponding_Spec): When checking full and subtype conformance of
11026 subprogram bodies in instances, pass Designated and E in that order, for
11027 consistency with the expected order of the formals (New_Id followed by
11028 Old_Id).
11029
11030 2011-08-02 Robert Dewar <dewar@adacore.com>
11031
11032 * sem_ch8.adb: Minor reformatting.
11033
11034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11035
11036 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11037 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11038 primitive operations of class-wide actuals.
11039
11040 2011-08-02 Javier Miranda <miranda@adacore.com>
11041
11042 * exp_atag.ads, exp_atag.adb
11043 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11044 since its value is implicitly passed in argument Typ.
11045 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11046 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11047 Build_Common_Dispatching_Select_Statements.
11048
11049 2011-08-02 Robert Dewar <dewar@adacore.com>
11050
11051 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11052 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11053 Minor reformatting.
11054
11055 2011-08-02 Robert Dewar <dewar@adacore.com>
11056
11057 * sem_res.adb: Minor reformatting.
11058 * sem_prag.adb: Minor reformatting.
11059
11060 2011-08-02 Javier Miranda <miranda@adacore.com>
11061
11062 * exp_atag.adb, exp_atags.ads
11063 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11064 by the tagged type Entity. Required to use this routine in the VM
11065 targets since we do not have available the Tag entity in the VM
11066 platforms.
11067 * exp_ch6.adb
11068 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11069 Ada.Tags has not been previously loaded.
11070 * exp_ch7.adb
11071 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11072 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11073 * sem_aux.adb
11074 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11075 view of enclosing scopes. Required to handle enclosing scopes that
11076 are synchronized types whose full view is a task type.
11077 * exp_disp.adb
11078 (Build_VM_TSDs): Minor code improvement to avoid generating and
11079 analyzing lists with empty nodes.
11080 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11081 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11082 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11083 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11084 (Make_Select_Specific_Data_Table): Add support for VM targets.
11085 (Make_VM_TSD): Generate code to initialize the SSD structure of
11086 the TSD.
11087
11088 2011-08-02 Yannick Moy <moy@adacore.com>
11089
11090 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11091 cross-references section in ALI.
11092 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11093 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11094 Sub).
11095 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11096 subprogram or package entity of a node
11097 (Is_Local_Reference_Type): new function returns True for references
11098 selected in local cross-references.
11099 (Lt): function extracted from Lt in Output_References
11100 (Write_Entity_Name): function extracted from Output_References
11101 (Generate_Definition): generate reference with type 'D' for definition
11102 of objects (object declaration and parameter specification), with
11103 appropriate locations and units, for use in local cross-references.
11104 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11105 references of type 'I' for initialization in object definition.
11106 (Output_References): move part of function Lt and procedure
11107 Write_Entity_Name outside of the body. Ignore references of types 'D'
11108 and 'I' introduced for local cross-references.
11109 (Output_Local_References): new procedure to output the local
11110 cross-references sections.
11111 (Lref_Entity_Status): new array defining whether an entity is a local
11112 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11113 with 'I' type when initialization expression is present.
11114 * get_scos.adb, get_scos.ads: Correct comments and typos
11115
11116 2011-08-02 Javier Miranda <miranda@adacore.com>
11117
11118 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11119 the JVM target.
11120 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11121 the JVM target.
11122 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11123 TSD support.
11124
11125 2011-08-02 Vincent Celier <celier@adacore.com>
11126
11127 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11128 (No_Space_Img): New function
11129 (Find_Excluded_Sources): When reading from a file, record the file name
11130 and the line number for each excluded source.
11131 (Mark_Excluded_Sources): When reporting an error, if the excluded
11132 sources were read from a file, include file name and line number in
11133 the error message.
11134
11135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11136
11137 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11138
11139 2011-08-02 Robert Dewar <dewar@adacore.com>
11140
11141 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11142
11143 2011-08-02 Javier Miranda <miranda@adacore.com>
11144
11145 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11146 generation of TSDs to the DOTNET compiler.
11147 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11148 generation of TSDs to the DOTNET compiler.
11149
11150 2011-08-02 Javier Miranda <miranda@adacore.com>
11151
11152 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11153 record of all the tagged types declared inside library level package
11154 declarations, library level package bodies or library level subprograms.
11155 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11156 associated with a given tagged type.
11157 (Build_VM_TSDs): New subprogram.
11158 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11159 compilation units that are subprograms.
11160 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11161 compilation units that are package bodies.
11162 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11163 units that are a package declaration or a package instantiation.
11164 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11165 reorganization to improve the error generated by the frontend when the
11166 function Ada.Tags.Secondary_Tag is not available.
11167 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11168 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11169
11170 2011-08-02 Javier Miranda <miranda@adacore.com>
11171
11172 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11173
11174 2011-08-02 Robert Dewar <dewar@adacore.com>
11175
11176 * s-imenne.ads: Minor reformatting.
11177
11178 2011-08-02 Robert Dewar <dewar@adacore.com>
11179
11180 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11181 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11182 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11183
11184 2011-08-02 Robert Dewar <dewar@adacore.com>
11185
11186 * einfo.ads (Materialize_Entity): Document this is only for renamings
11187 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11188 required debug information in the case where we transform the object
11189 declaration into a renaming declaration.
11190 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11191 object
11192 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11193 Materialize_Entity.
11194
11195 2011-08-02 Robert Dewar <dewar@adacore.com>
11196
11197 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11198 Suppress_Init_Procs.
11199 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11200 Suppress_Initialization/Initialization_Suppressed.
11201 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11202 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11203 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11204 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11205
11206 2011-08-02 Robert Dewar <dewar@adacore.com>
11207
11208 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11209 Minor reformatting.
11210
11211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11212
11213 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11214 only have inheritable classwide pre/postconditions.
11215
11216 2011-08-02 Javier Miranda <miranda@adacore.com>
11217
11218 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11219 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11220 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11221 checks if the external tag of a type is the same as the external tag
11222 of some other declaration.
11223
11224 2011-08-02 Thomas Quinot <quinot@adacore.com>
11225
11226 * s-taskin.ads: Minor reformatting.
11227
11228 2011-08-02 Emmanuel Briot <briot@adacore.com>
11229
11230 * g-comlin.adb (Display_Help): swap the order in which it prints the
11231 short help and the general usage.
11232
11233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11234
11235 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11236 the aspect declarations and attach them to the generic copy for
11237 subsequent analysis.
11238 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11239 declarations of the generic tree to the new subprogram declarations.
11240 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11241 conditions that apply to a subprogram instance.
11242
11243 2011-08-02 Robert Dewar <dewar@adacore.com>
11244
11245 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11246
11247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11248
11249 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11250 private type with a tagged full view is not derived in the immediate
11251 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11252
11253 2011-08-02 Robert Dewar <dewar@adacore.com>
11254
11255 * exp_ch4.adb: Minor reformatting.
11256
11257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11258
11259 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11260 Ada2012 iterator, the loop will be rewritten during expansion into a
11261 while loop with a cursor and an element declaration. Do not analyze the
11262 body in this case, because if the container is for indefinite types the
11263 actual subtype of the elements will only be determined when the cursor
11264 declaration is analyzed.
11265
11266 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11267
11268 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11269 size/alignment related attributes in CodePeer_Mode.
11270
11271 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11272
11273 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11274 Prepend_Element, since this can result in the operation getting the
11275 wrong slot in the full type's dispatch table if the full type has
11276 inherited operations. The incomplete type's operation will get added
11277 to the proper position in the full type's primitives
11278 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11279 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11280 dispatching operations, since there are cases where nonprimitive
11281 subprograms can get added to the list of incomplete dependents (such
11282 as subprograms in nested packages).
11283 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11284 private part when determining whether to add a primitive with a
11285 parameter of a tagged incomplete type to the Private_Dependents list.
11286 Such primitives can also occur in the visible part, and should not have
11287 been excluded from being private dependents.
11288 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11289 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11290 list of a Taft-amendment incomplete type is a primitive before issuing
11291 an error that the full type must appear in the same unit. There are
11292 cases where nonprimitives can be in the list (such as subprograms in
11293 nested packages).
11294 * sem_disp.adb (Derives_From): Use correct condition for checking that
11295 a formal's type is derived from the type of the corresponding formal in
11296 the parent subprogram (the condition was completely wrong). Add
11297 checking that was missing for controlling result types being derived
11298 from the result type of the parent operation.
11299
11300 2011-08-02 Yannick Moy <moy@adacore.com>
11301
11302 * errout.adb (First_Node): minor renaming
11303 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11304 first node.
11305
11306 2011-08-02 Yannick Moy <moy@adacore.com>
11307
11308 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11309 before accessing operands.
11310 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11311 decide whether an initialization expression respects SPARK rules, as
11312 the plain node is the expanded one. This allows for more valid warnings
11313 to be issued.
11314 * gnat_rm.texi: Minor update.
11315
11316 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11317
11318 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11319 previous change.
11320
11321 2011-08-02 Robert Dewar <dewar@adacore.com>
11322
11323 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11324
11325 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11326
11327 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11328 loop statements and the element renaming declaration with a block when
11329 the element type is controlled.
11330
11331 2011-08-02 Yannick Moy <moy@adacore.com>
11332
11333 * sinfo.ads: Minor formatting.
11334
11335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11336
11337 * sem_aggr.adb (Add_Association): if the association has a box and no
11338 expression, use the Sloc of the aggregate itself for the new
11339 association.
11340 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11341 the Original_Node.
11342
11343 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11344
11345 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11346 When a container is provided via a function call, generate a renaming
11347 of the function result. This avoids the creation of a transient scope
11348 and the premature finalization of the container.
11349 * exp_ch7.adb (Is_Container_Cursor): Removed.
11350 (Wrap_Transient_Declaration): Remove the supression of the finalization
11351 of the list controller when the declaration denotes a container cursor,
11352 it is not needed.
11353
11354 2011-08-02 Yannick Moy <moy@adacore.com>
11355
11356 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11357 node is from source, instead of the original node being from source.
11358 * sem_aggr.adb
11359 (Resolve_Array_Aggregate): refine the check for a static expression, to
11360 recognize also static ranges
11361 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11362 Array_Type_Declaration): postpone the test for the type being a subtype
11363 mark after the type has been resolved, so that component-selection and
11364 expanded-name are discriminated.
11365 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11366 to distinguish the case of an iteration scheme, so that an error is
11367 issed on a non-static range in SPARK except in an iteration scheme.
11368 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11369 In_Iter_Schm = True.
11370 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11371 user-defined operators so that they are allowed in renaming
11372 * sem_ch8.adb
11373 (Find_Selected_Component): refine the check for prefixing of operators
11374 so that they are allowed in renaming. Move the checks for restrictions
11375 on selector name after analysis discriminated between
11376 component-selection and expanded-name.
11377 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11378 concatenation argument of string type if it is static.
11379 * sem_util.adb, sem_util.ads
11380 (Check_Later_Vs_Basic_Declarations): add a new function
11381 Is_Later_Declarative_Item to decice which declarations are allowed as
11382 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11383 mode, add that renamings are considered as later items.
11384 (Enclosing_Package): new function to return the enclosing package
11385 (Enter_Name): correct the rule for homonyms in SPARK
11386 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11387 from source (result of expansion) to avoid issuing wrong warnings.
11388
11389 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11390
11391 * errout.adb: On anything but an expression First_Node returns its
11392 argument.
11393
11394 2011-08-02 Pascal Obry <obry@adacore.com>
11395
11396 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11397
11398 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11399
11400 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11401 Set the associated loop as the related expression of internally
11402 generated cursors.
11403 * exp_ch7.adb (Is_Container_Cursor): New routine.
11404 (Wrap_Transient_Declaration): Supress the finalization of the list
11405 controller when the declaration denotes a container cursor.
11406
11407 2011-08-02 Yannick Moy <moy@adacore.com>
11408
11409 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11410 command line now.
11411 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11412 expression is a simple expression. This check cannot be performed in
11413 the semantics, so just drop it.
11414 (P_Index_Or_Discriminant_Constraint): move check that the index or
11415 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11416 semantics. Other cases were previously checked in the semantics.
11417 * par-ch4.adb (P_Name): move checks that a selector name is not
11418 character literal or an operator symbol to Find_Selected_Component in
11419 the semantics
11420 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11421 declarations are not placed after later declarations in a separate
11422 procedure in Sem_Util (possibly not the best choice?), to be used both
11423 during parsing, for Ada 83 mode, and during semantic analysis, for
11424 SPARK mode.
11425 * par-endh.adb (Check_End): move check that end label is not missing
11426 to Process_End_Label in the semantics
11427 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11428 the special case for SPARK restriction
11429 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11430 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11431 parameter Force to issue the error message even on internal node (used
11432 for generated end label). Call Check_Restriction to check when an error
11433 must be issued. In SPARK mode, issue an error message even if the
11434 restriction is not set.
11435 (Check_Restriction): new procedure with an additional out parameter to
11436 inform the caller that a message has been issued
11437 * sem_aggr.adb: Minor modification of message
11438 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11439 instead of issuing an error message directly
11440 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11441 declarations are not placed after later declarations, by calling
11442 Check_Later_Vs_Basic_Declarations
11443 (Analyze_Subtype_Declaration): move here the check that an index or
11444 discriminant constraint must be a subtype mark. Change the check that
11445 a subtype of String must start at one so that it works on subtype marks.
11446 * sem_ch4.adb (Analyze_Call): move here the check that a named
11447 association cannot follow a positional one in a call
11448 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11449 instead of issuing an error message directly
11450 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11451 selector name is not a character literal or an operator symbol. Move
11452 here the check that the prefix of an expanded name cannot be a
11453 subprogram or a loop statement.
11454 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11455 procedure called from parsing and semantics to check that basic
11456 declarations are not placed after later declarations
11457 (Process_End_Label): move here the check that end label is not missing
11458
11459 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11460
11461 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11462 representation clause in codepeer mode, since it confuses CodePeer and
11463 does not bring useful info.
11464
11465 2011-08-02 Ed Falis <falis@adacore.com>
11466
11467 * init.c: initialize fp hw on MILS.
11468
11469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11470
11471 * errout.adb (First_Node): for bodies, return the node itself (small
11472 optimization). For other nodes, do not check source_unit if the node
11473 comes from Standard.
11474
11475 2011-08-02 Robert Dewar <dewar@adacore.com>
11476
11477 * exp_ch3.adb: Minor comment additions.
11478 * sem_ch13.adb: Minor reformatting.
11479
11480 2011-08-02 Pascal Obry <obry@adacore.com>
11481
11482 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11483
11484 2011-08-02 Robert Dewar <dewar@adacore.com>
11485
11486 * sem_attr.adb: Minor reformatting.
11487
11488 2011-08-02 Robert Dewar <dewar@adacore.com>
11489
11490 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11491 (Has_Default_Component_Value): Removed
11492 * einfo.ads Comment updates
11493 (Has_Default_Aspect): Replaces Has_Default_Value
11494 (Has_Default_Component_Value): Removed
11495 * exp_ch13.adb
11496 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11497 * exp_ch3.adb
11498 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11499 (Get_Simple_Init_Val): Handle Default_Value aspect
11500 (Needs_Simple_Initialization): Handle Default_Value aspect
11501 * exp_ch3.ads: Needs_Simple_Initialization
11502 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11503 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11504 * sem_ch13.adb
11505 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11506 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11507 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11508
11509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11510
11511 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11512 package containing iteration primitives.
11513 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11514
11515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11516
11517 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11518 "of", pre-analyze expression in case it is a function call with
11519 finalization actions that must be placed ahead of the loop.
11520 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11521 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11522
11523 2011-08-02 Geert Bosch <bosch@adacore.com>
11524
11525 * cstand.adb (Create_Float_Types): Only consider C's long double for
11526 Long_Long_Float, in addition to double.
11527
11528 2011-08-02 Robert Dewar <dewar@adacore.com>
11529
11530 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11531 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11532 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11533 Minor reformatting.
11534
11535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11536
11537 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11538 indexed component.
11539
11540 2011-08-02 Javier Miranda <miranda@adacore.com>
11541
11542 * einfo.ads, einfo.adb
11543 (Original_Access_Type): Move this attribute to Node26 since there was
11544 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11545 which causes conflicts and breaks the generation of the .NET compiler.
11546 (Interface_Name): Add missing documentation on JGNAT only uses of
11547 this attribute.
11548
11549 2011-08-02 Geert Bosch <bosch@adacore.com>
11550
11551 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11552 (Find_Back_End_Float_Type): Likewise
11553 (Create_Back_End_Float_Types): Likewise
11554 (Create_Float_Types): Likewise
11555 (Register_Float_Type): Likewise
11556 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11557 Nlist and split out type selection in new local Find_Base_Type function.
11558 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11559 Nlist
11560 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11561
11562 2011-08-02 Robert Dewar <dewar@adacore.com>
11563
11564 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11565 alpha order).
11566 * opt.ads: Minor comment change.
11567 * sem_ch12.adb: Minor code reorganization.
11568
11569 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11570
11571 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11572 subtype's list of rep items to the list on the full subtype in the case
11573 where the lists are the same.
11574
11575 2011-08-02 Geert Bosch <bosch@adacore.com>
11576
11577 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11578 using the one from System.Strings, which also deallocates all strings.
11579
11580 2011-08-02 Geert Bosch <bosch@adacore.com>
11581
11582 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11583 function.
11584 * gcc-interface/Make-lang.in: Update dependencies.
11585
11586 2011-08-02 Olivier Hainque <hainque@adacore.com>
11587
11588 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11589 end_locus.
11590
11591 2011-08-02 Javier Miranda <miranda@adacore.com>
11592
11593 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11594 associated with anonymous access to subprograms.
11595
11596 2011-08-02 Geert Bosch <bosch@adacore.com>
11597
11598 * opt.ads
11599 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11600 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11601 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11602 (Add_Symbol_Definition): Move to switch-c.adb
11603 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11604 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11605 (Add_Symbol_Definition): Move to switch-c.adb.
11606 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11607 * sem_warn.adb
11608 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11609 Move to warnsw.adb.
11610 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11611 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11612 Move to warnsw.adb.
11613 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11614 (Add_Symbol_Definition): Moved from Prepcomp.
11615 * switch-c.ads: Update copyright notice. Use String_List instead of
11616 Argument_List, removing dependency on System.OS_Lib.
11617
11618 2011-08-02 Yannick Moy <moy@adacore.com>
11619
11620 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11621 mode on initialization expression which does not respect SPARK
11622 restrictions.
11623 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11624 if the tree referenced by its argument represents an initialization
11625 expression in SPARK, suitable for initializing an object in an object
11626 declaration.
11627
11628 2011-08-02 Javier Miranda <miranda@adacore.com>
11629
11630 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11631 internally generated access to subprogram with its associated protected
11632 subprogram type.
11633 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11634
11635 2011-08-02 Geert Bosch <bosch@adacore.com>
11636
11637 * cstand.adb (Register_Float_Type): Print information about type to
11638 register, if the Debug_Flag_Dot_B is set.
11639 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11640 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11641 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11642 with a requested precision of more than Max_Digits digits and no more
11643 than Max_Base_Digits digits, if a range specification is present and the
11644 Predefined_Float_Types list has a suitable type to derive from.
11645 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11646 case of type completion with pragma Import
11647 * sem_prag.adb
11648 (Process_Import_Predefined_Type): Processing to complete a type
11649 with pragma Import. Currently supports floating point types only.
11650 (Set_Convention_From_Pragma): Do nothing without underlying type.
11651 (Process_Convention): Guard against absence of underlying type,
11652 which may happen when importing incomplete types.
11653 (Process_Import_Or_Interface): Handle case of importing predefined
11654 types. Tweak error message.
11655
11656 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11657
11658 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11659 functions to previous change. Reorganize code slightly.
11660
11661 2011-08-02 Geert Bosch <bosch@adacore.com>
11662
11663 * back_end.ads (Register_Type_Proc): New call back procedure type for
11664 allowing the back end to provide information about available types.
11665 (Register_Back_End_Types): New procedure to register back end types.
11666 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11667 available types.
11668 * cstand.adb (Back_End_Float_Types): New list for floating point types
11669 supported by the back end.
11670 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11671 (Copy_Float_Type): New procedure to make new copies of predefined types.
11672 (Register_Float_Type): New call back procedure to populate the BEFT list
11673 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11674 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11675 (Create_Float_Types): New procedure to create entities for floating
11676 point types predefined in Standard, and put these and any remaining
11677 BEFTs on the Predefined_Float_Types list.
11678 * stand.ads (Predefined_Float_Types): New list for predefined floating
11679 point types that do not have declarations in package Standard.
11680
11681 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11682
11683 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11684 entity node for the unit containing the parameter.
11685 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11686 (Add_Inlined_Subprogram): Likewise.
11687 * gcc-interface/Make-lang.in: Update dependencies.
11688
11689 2011-08-02 Thomas Quinot <quinot@adacore.com>
11690
11691 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11692 suitable value.
11693
11694 2011-08-02 Geert Bosch <bosch@adacore.com>
11695
11696 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11697
11698 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11699
11700 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11701 computed value of Base_Type.
11702
11703 2011-08-02 Yannick Moy <moy@adacore.com>
11704
11705 * restrict.adb (Check_Restriction): issue an error for any use of
11706 class-wide, even if the No_Dispatch restriction is not set.
11707 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11708 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11709 when completing a private extension, the type named in the private part
11710 is not the same as that named in the visible part.
11711 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11712 of an inherited primitive operations of a tagged type or type extension
11713 that returns the tagged type.
11714 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11715 function which returns True for an implicit operation inherited by the
11716 derived type declaration for the argument type.
11717 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11718 order.
11719
11720 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11721
11722 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11723 Process_Bounds, to perform analysis with expansion of a range or an
11724 expression that is the iteration scheme for a loop.
11725 (Analyze_Iterator_Specification): If domain of iteration is given by a
11726 function call with a controlled result, as is the case if call returns
11727 a predefined container, ensure that finalization actions are properly
11728 generated.
11729 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11730
11731 2011-08-02 Javier Miranda <miranda@adacore.com>
11732
11733 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11734 * gcc-interface/Make-lang.in: Update dependencies.
11735
11736 2011-08-02 Javier Miranda <miranda@adacore.com>
11737
11738 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11739 determine if the analysis is performed using N or Original_Node (N).
11740 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11741 functionality of routine Is_Variable avoids code duplication.
11742 * checks.adb (Determine_Range): Handle temporaries generated by
11743 Remove_Side_Effects.
11744
11745 2011-08-02 Javier Miranda <miranda@adacore.com>
11746
11747 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11748 expansion of the condition. Required since the previous analysis was
11749 done with expansion disabled (see Resolve_Quantified_Expression) and
11750 hence checks were not inserted and record comparisons have not been
11751 expanded.
11752
11753 2011-08-02 Ed Falis <falis@adacore.com>
11754
11755 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11756 Update header.
11757
11758 2011-08-02 Bob Duff <duff@adacore.com>
11759
11760 * opt.ads: Minor comment fix.
11761
11762 2011-08-02 Bob Duff <duff@adacore.com>
11763
11764 * sem_ch12.adb (Analyze_Package_Instantiation,
11765 Analyze_Subprogram_Instantiation): Turn off style checking while
11766 analyzing an instance. Whatever style checks that apply to the generic
11767 unit should apply, so it makes no sense to apply them in an instance.
11768 This was causing trouble when compiling an instance of a runtime
11769 unit that violates the -gnatyO switch.
11770 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11771 one of the two case statements, causing spurious errors.
11772
11773 2011-08-02 Robert Dewar <dewar@adacore.com>
11774
11775 * uname.adb: Minor reformatting.
11776 * gnatcmd.adb: Minor reformatting.
11777 * exp_attr.adb: Minor reformatting.
11778
11779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11780
11781 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11782 No_Dispatching_Calls, do not look for the Assign primitive, because
11783 predefined primitives are not created in this case.
11784
11785 2011-08-02 Bob Duff <duff@adacore.com>
11786
11787 * stylesw.ads: Minor comment fixes.
11788
11789 2011-08-02 Robert Dewar <dewar@adacore.com>
11790
11791 * freeze.adb (Add_To_Result): New procedure.
11792
11793 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11794
11795 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11796 time, if the specific run-time routines for handling streams of strings
11797 are not available, use the default mechanism.
11798
11799 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11800
11801 * s-regpat.ads: Fix typo.
11802
11803 2011-08-02 Vincent Celier <celier@adacore.com>
11804
11805 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11806 not null, call it to create the in memory config project file without
11807 parsing an existing default config project file.
11808
11809 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11810
11811 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11812
11813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11814
11815 * sem_elim.adb: an abstract subprogram does not need an eliminate
11816 pragma for its descendant to be eliminable.
11817
11818 2011-08-02 Ed Falis <falis@adacore.com>
11819
11820 * init.c: revert to handling before previous checkin for VxWorks
11821 * s-intman-vxworks.adb: delete unnecessary declarations related to
11822 using Ada interrupt facilities for handling signals.
11823 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11824 * s-intman-vxworks.ads: Import __gnat_install_handler as
11825 Initialize_Interrupts.
11826 * s-taprop-vxworks.adb: Delete Signal_Mask.
11827 (Abort_Handler): change construction of mask to unblock exception
11828 signals.
11829
11830 2011-08-02 Jerome Guitton <guitton@adacore.com>
11831
11832 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11833 Debug_Raise_Exception before propagation starts.
11834
11835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11836
11837 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11838 to Restriction_Check_Required.
11839 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11840 * sem_res.adb (Resolve_Call): Likewise.
11841 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11842
11843 2011-08-02 Bob Duff <duff@adacore.com>
11844
11845 * stylesw.ads: Update comment.
11846 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11847 * errout.ads: Remove obsolete comment.
11848
11849 2011-08-02 Javier Miranda <miranda@adacore.com>
11850
11851 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11852 (Set_Is_Safe_To_Reevaluate): new procedure.
11853 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11854 assignment is allowed on safe-to-reevaluate variables.
11855 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11856 temporary created to remove side effects in expressions that use
11857 the secondary stack as safe-to-reevaluate.
11858 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11859 variables that are not true constants.
11860
11861 2011-08-02 Robert Dewar <dewar@adacore.com>
11862
11863 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11864 sem_res.adb, sem_ch6.adb: Minor reformatting.
11865
11866 2011-08-02 Jerome Guitton <guitton@adacore.com>
11867
11868 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11869
11870 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11871
11872 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11873 not set Overridden_Operation if subprogram is an initialization
11874 procedure.
11875
11876 2011-08-02 Yannick Moy <moy@adacore.com>
11877
11878 * par-ch6.adb: Correct obsolete name in comments
11879 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11880 which takes two message arguments (existing function takes one), with
11881 second message used for continuation.
11882 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11883 block statements that originate from a source block statement, not
11884 generated block statements
11885 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11886 symmetry with procedure case
11887 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11888 function to issue an error in formal mode if a package specification
11889 contains more than one tagged type or type extension.
11890 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11891 parameters matching formals of tagged types are objects (or ancestor
11892 type conversions of objects), not general expressions. Issue an error
11893 on view conversions that are not involving ancestor conversion of an
11894 extended type.
11895 (Resolve_Type_Conversion): in formal mode, issue an error on the
11896 operand of an ancestor type conversion which is not an object
11897 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11898 procedure so that it works also for actuals of function calls
11899 (Is_Actual_Tagged_Parameter): new function which determines if its
11900 argument is an actual parameter of a formal of tagged type in a
11901 subprogram call
11902 (Is_SPARK_Object_Reference): new function which determines if the tree
11903 referenced by its argument represents an object in SPARK
11904
11905 2011-08-02 Robert Dewar <dewar@adacore.com>
11906
11907 * sem_ch3.adb: Minor reformatting
11908 Minor comment addition
11909 Minor error msg text change
11910
11911 2011-08-02 Javier Miranda <miranda@adacore.com>
11912
11913 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11914 function. Used to be more precise when we generate a variable plus one
11915 assignment to remove side effects in the evaluation of the Bound
11916 expressions.
11917 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11918 of the bound expression to force its re-analysis and thus expand the
11919 associated transient scope (if required). Code cleanup replacing the
11920 previous code that declared the constant entity by an invocation to
11921 routine Force_Evaluation which centralizes this work in the frontend.
11922
11923 2011-08-02 Robert Dewar <dewar@adacore.com>
11924
11925 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11926 (Base_Type): Now uses improved Is_Base_Type function
11927 * einfo.ads (Base_Type): Inline this function
11928
11929 2011-08-02 Robert Dewar <dewar@adacore.com>
11930
11931 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11932 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11933
11934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11935
11936 * gcc-interface/Make-lang.in: Update dependencies.
11937 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11938 targets.
11939
11940 2011-08-02 Yannick Moy <moy@adacore.com>
11941
11942 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11943 non-simple expression used in delta constraint
11944 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11945 index constraint which is not a subtype mark
11946 * par.adb: With and use Restrict
11947 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11948 mode on component type which is not a subtype mark and default
11949 expression on component
11950 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11951 of string which does not have a lower index bound equal to 1
11952 (Array_Type_Declaration): issue an error in formal mode on index or
11953 component type which is not a subtype mark, and on aliased keyword on
11954 component
11955 (Derived_Type_Declaration): issue an error in formal mode on interface,
11956 limited or abstract type
11957 (Record_Type_Declaration): issue an error in formal mode on interface
11958 (Record_Type_Definition): issue an error in formal mode on tagged types
11959 and type extensions not declared in the specification of a library unit
11960 package; on null non-tagged record; on variant part
11961
11962 2011-08-02 Vincent Celier <celier@adacore.com>
11963
11964 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11965 not declared for qualified library project when Library_Name is not
11966 declared, but Library_Dir is.
11967
11968 2011-08-02 Robert Dewar <dewar@adacore.com>
11969
11970 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11971 pragmas (affects aspects [Component_]Default_Value
11972 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11973 component type for the resolution
11974
11975 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11976
11977 * einfo.adb (Base_Type): Tune implementation for speed.
11978
11979 2011-08-02 Robert Dewar <dewar@adacore.com>
11980
11981 * freeze.adb: Minor reformatting.
11982
11983 2011-08-02 Thomas Quinot <quinot@adacore.com>
11984
11985 * scos.ads: Update comments.
11986
11987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11988
11989 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11990 base type, because the parent may be a subtype of a private type whose
11991 convention is established in a private part.
11992
11993 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11994
11995 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11996 statement in a block when the expansion of the return expression has
11997 created a finalization chain.
11998 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11999 with the parent node.
12000 Add N_Extended_Return_Statement to handle the case where a transient
12001 object declaration appears in the Return_Object_Declarations list of
12002 an extended return statement.
12003
12004 2011-08-02 Matthew Gingell <gingell@adacore.com>
12005
12006 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12007 unused parameter 'name'.
12008
12009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12010
12011 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12012 inherited operation, check whether its alias, which is the source
12013 operastion that it renames, has been marked eliminated.
12014
12015 2011-08-02 Javier Miranda <miranda@adacore.com>
12016
12017 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12018 in-mode parameter whose type is an access type since it can be used to
12019 modify its designated object. Enforce code that handles as safe an
12020 access type that is not access-to-constant but it is the result of a
12021 previous removal of side-effects.
12022 (Remove_Side_Effects): Minor code reorganization of cases which require
12023 no action. Done to incorporate documentation on new cases uncovered
12024 working in this ticket: no action needed if this routine was invoked
12025 too early and the nodes are not yet decorated.
12026 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12027 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12028 were issued with actuals that are implicitly provided by
12029 Force_Evaluation.
12030
12031 2011-08-02 Robert Dewar <dewar@adacore.com>
12032
12033 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12034
12035 2011-08-02 Yannick Moy <moy@adacore.com>
12036
12037 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12038 to issue an error in formal mode on attribute not supported in this mode
12039 (Analyze_Attribute): issue errors on standard attributes not supported
12040 in formal mode.
12041 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12042 comment, and issue error in formal mode on modulus which is not a power
12043 of 2.
12044 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12045 range.
12046 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12047 subtype mark.
12048 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12049 operator on modular type (except 'not').
12050
12051 2011-08-02 Robert Dewar <dewar@adacore.com>
12052
12053 * gnat_rm.texi: Minor reformatting.
12054
12055 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12056
12057 * s-osinte-linux.ads: Minor comment update and reformatting.
12058 * i-cexten.ads: Make this unit pure, as for its parent.
12059 Will allow its usage in more contexts if needed.
12060
12061 2011-08-02 Robert Dewar <dewar@adacore.com>
12062
12063 * s-utf_32.ads: Minor comment fix.
12064
12065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12066
12067 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12068 operation of a tagged synchronized type, handle the case where the
12069 controlling argument is overloaded.
12070
12071 2011-08-02 Yannick Moy <moy@adacore.com>
12072
12073 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12074 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12075 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12076 SPARK mode and formal verification mode on processing SPARK restriction
12077 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12078 requiring consistency checking.
12079
12080 2011-08-02 Robert Dewar <dewar@adacore.com>
12081
12082 * sem_res.adb: Minor reformatting.
12083
12084 2011-08-02 Robert Dewar <dewar@adacore.com>
12085
12086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12087 a-cforse.ads: Remove unneeded with of Ada.Containers
12088 Remove commented out pragma Inline's
12089 Move specifications of new subprograms to the actual specs
12090
12091 2011-08-02 Yannick Moy <moy@adacore.com>
12092
12093 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12094 a-cforse.ads: Update comments.
12095
12096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12097
12098 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12099
12100 2011-08-02 Robert Dewar <dewar@adacore.com>
12101
12102 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12103 a-cforse.ads, a-cofove.ads: Minor reformatting.
12104
12105 2011-08-02 Claire Dross <dross@adacore.com>
12106
12107 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12108 a-cofove.ads: Add comments.
12109
12110 2011-08-02 Yannick Moy <moy@adacore.com>
12111
12112 * gnat_rm.texi: Document formal containers.
12113
12114 2011-08-02 Emmanuel Briot <briot@adacore.com>
12115
12116 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12117 are empty sections.
12118
12119 2011-08-02 Robert Dewar <dewar@adacore.com>
12120
12121 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12122 reformatting.
12123
12124 2011-08-02 Robert Dewar <dewar@adacore.com>
12125
12126 * aspects.adb: New aspects Default_Value and Default_Component_Value
12127 New format of Aspect_Names table checks for omitted entries
12128 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12129 handling of boolean aspects for derived types.
12130 New aspects Default_Value and Default_Component_Value
12131 New format of Aspect_Names table checks for omitted entries
12132 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12133 (Has_Default_Value): New flag
12134 (Has_Default_Component_Value): New flag
12135 (Has_Default_Value): New flag
12136 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12137 table.
12138 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12139 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12140 Default_Value and Default_Component_Value
12141 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12142 New aspects Default_Value and Default_Component_Value
12143 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12144 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12145
12146 2011-08-02 Vincent Celier <celier@adacore.com>
12147
12148 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12149 inherit library kind.
12150
12151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12152
12153 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12154 Minor reformatting.
12155
12156 2011-08-02 Robert Dewar <dewar@adacore.com>
12157
12158 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12159
12160 2011-08-02 Yannick Moy <moy@adacore.com>
12161
12162 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12163
12164 2011-08-02 Robert Dewar <dewar@adacore.com>
12165
12166 * impunit.adb: Add comment.
12167
12168 2011-08-02 Yannick Moy <moy@adacore.com>
12169
12170 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12171 qualification of aggregates in formal mode
12172 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12173 another aggregate
12174 (Resolve_Aggregate): complete the test that an aggregate is adequately
12175 qualified in formal mode
12176
12177 2011-08-02 Pascal Obry <obry@adacore.com>
12178
12179 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12180 * mlib-prj.adb: Supress warning when compiling binder generated file.
12181 (Build_Library): Supress all warnings when compiling the binder
12182 generated file.
12183
12184 2011-08-02 Yannick Moy <moy@adacore.com>
12185
12186 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12187 from here...
12188 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12189 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12190 Add with/use clauses to make Check_Formal_Restriction visible
12191
12192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12193
12194 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12195 in-parameters when type of the generic formal is private in the generic
12196 spec and non-private in the body.
12197
12198 2011-08-02 Claire Dross <dross@adacore.com>
12199
12200 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12201 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12202 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12203 * impunit.adb, Makefile.rtl: Take new files into account.
12204
12205 2011-08-02 Robert Dewar <dewar@adacore.com>
12206
12207 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12208 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12209
12210 2011-08-02 Yannick Moy <moy@adacore.com>
12211
12212 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12213 formal mode
12214 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12215 matching static array bounds, taking into account the special case of
12216 string literals
12217 * sem_ch3.adb: Typo in comment.
12218
12219 2011-08-02 Yannick Moy <moy@adacore.com>
12220
12221 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12222 which issues an error in formal mode if its argument node is originally
12223 from source
12224 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12225 has a discriminant specification so that it does not include the case
12226 of derived types
12227 (Derived_Type_Declaration): move here the test that a derived type has a
12228 discriminant specification
12229 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12230 first element of a component association before accessing its choices
12231 (presence of component association is not enough)
12232 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12233 declaration is a library item before accessing the next element in a
12234 list, as library items are not member of lists
12235 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12236 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12237 Check_Formal_Restriction whenever possible.
12238
12239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12240
12241 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12242 reference when needed.
12243
12244 2011-08-02 Bob Duff <duff@adacore.com>
12245
12246 * gnat_ugn.texi: Fix typo.
12247
12248 2011-08-02 Vincent Celier <celier@adacore.com>
12249
12250 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12251 archive file name. Do not use the full path name of archives for Open
12252 VMS.
12253
12254 2011-08-02 Robert Dewar <dewar@adacore.com>
12255
12256 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12257 Analyze_Aspect_Specifications
12258 * sem_ch13.adb
12259 (Analyze_Aspect_Specifications): New handling for boolean aspects
12260 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12261 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12262 sequence for Analyze_Aspect_Specifications
12263 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12264 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12265
12266 2011-08-02 Robert Dewar <dewar@adacore.com>
12267
12268 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12269 aspects, since these no longer exist.
12270
12271 2011-08-02 Robert Dewar <dewar@adacore.com>
12272
12273 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12274 semicolon, do not try to see if there are aspects following it.
12275 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12276 aspect spec.
12277
12278 2011-08-02 Robert Dewar <dewar@adacore.com>
12279
12280 * sem_ch8.adb, aspects.ads: Minor reformatting.
12281
12282 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12283
12284 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12285 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12286 extracted from...
12287 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12288
12289 2011-08-02 Yannick Moy <moy@adacore.com>
12290
12291 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12292 mode on subprogram declaration outside of package specification, unless
12293 it is followed by a pragma Import
12294 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12295 Access_Type_Declaration): issue error in formal mode on access type
12296 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12297 incomplete type
12298 (Analyze_Object_Declaration): issue error in formal mode on object
12299 declaration which does not respect SPARK restrictions
12300 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12301 declaration which does not respect SPARK restrictions
12302 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12303 error in formal mode on digits or delta constraint
12304 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12305 decimal fixed point type
12306 (Derived_Type_Declaration): issue error in formal mode on derived type
12307 other than type extensions of tagged record types
12308 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12309 with check on access definition
12310 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12311 mode on protected definition.
12312 (Analyze_Task_Definition): issue error in formal mode on task definition
12313
12314 2011-08-02 Robert Dewar <dewar@adacore.com>
12315
12316 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12317
12318 2011-08-02 Javier Miranda <miranda@adacore.com>
12319
12320 * sem_ch6.adb (Can_Override_Operator): New function.
12321 (Verify_Overriding_Indicator): Add missing code to check overriding
12322 indicator in operators. Fixes regression.
12323 (Check_Overriding_Indicator): Minor reformating after replacing the
12324 code that evaluates if the subprogram can override an operator by
12325 invocations to the above new function.
12326 * einfo.adb
12327 (Write_Field26_Name): Add missing code to ensure that, following
12328 the documentation in einfo.ads, this field is not shown as attribute
12329 "Static_Initialization" on non-dispatching functions.
12330
12331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12332
12333 * sem_res.adb (Resolve_Call): A call to
12334 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12335 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12336 i.e., when the second parameter is of type Time_Span.
12337
12338 2011-08-02 Vincent Celier <celier@adacore.com>
12339
12340 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12341 with an archive instead of -L<library dir> -l<library name>.
12342
12343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12344
12345 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12346 mark the base types In_Use in addition to making the operations
12347 use_visible.
12348
12349 2011-08-02 Ed Falis <falis@adacore.com>
12350
12351 * init.c: add and setup __gnat_signal_mask for the exception signals
12352 * s-inmaop-vxworks.adb: new file.
12353 * s-intman-vxworks.adb: remove unnecessary initializations and
12354 simplify remaining
12355 * s-intman-vxworks.ads: remove unnecessary variable
12356 * s-taprop-vxworks.adb: simplify signal initialization
12357
12358 2011-08-02 Robert Dewar <dewar@adacore.com>
12359
12360 * sem_ch8.adb: Minor code reorganization, comment updates.
12361
12362 2011-08-02 Robert Dewar <dewar@adacore.com>
12363
12364 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12365 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12366 here from Sem_Res.
12367 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12368 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12369
12370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12371
12372 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12373 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12374 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12375 use_type_clauses, to handle more efficiently use_type and use_all_type
12376 constructs.
12377 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12378 Ada2012 Use_All_Type clause.
12379 (Use_Class_Wide_Operations): new procedure.
12380
12381 2011-08-02 Robert Dewar <dewar@adacore.com>
12382
12383 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12384 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12385 expression to expression function.
12386
12387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12388
12389 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12390 if types are compatible.
12391
12392 2011-08-02 Yannick Moy <moy@adacore.com>
12393
12394 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12395 returns True if its argument array types have same dimension and same
12396 static bounds at each index.
12397 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12398 OUT or IN OUT paramaters which are not view conversions in SPARK.
12399 (Resolve_Arithmetic_Op): issue an error in formal mode on
12400 multiplication or division with operands of fixed point types which are
12401 not qualified or explicitly converted.
12402 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12403 Boolean or array type (except String) operands.
12404 (Resolve_Equality_Op): issue an error in formal mode on equality
12405 operators for array types other than String with non-matching static
12406 bounds.
12407 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12408 for array types with non-matching static bounds. Factorize the code in
12409 Matching_Static_Array_Bounds.
12410 (Resolve_Qualified_Expression): issue an error in formal mode on
12411 qualified expressions for array types with non-matching static bounds.
12412 (Resolve_Type_Conversion): issue an error in formal mode on type
12413 conversion for array types with non-matching static bounds
12414
12415 2011-08-02 Robert Dewar <dewar@adacore.com>
12416
12417 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12418
12419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12420
12421 * par-ch9.adb: save location of entry for proper error message.
12422
12423 2011-08-02 Javier Miranda <miranda@adacore.com>
12424
12425 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12426 (Use_Full_View) which permits this routine to climb through the
12427 ancestors using the full-view of private parents.
12428 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12429 Use_Full_View to true in calls to Is_Ancestor.
12430 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12431 true in call to Is_Ancestor.
12432 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12433 Use_Full_View to true in call to Is_Ancestor.
12434 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12435 call to Is_Ancestor.
12436 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12437 Use_Full_View to true in calls to Is_Ancestor.
12438 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12439 Make_Select_Specific_Data_Table, Register_Primitive,
12440 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12441 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12442 to true in call to Is_Ancestor.
12443 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12444 Use_Full_View to true in calls to Is_Ancestor.
12445 * exp_cg.adb
12446 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12447 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12448
12449 2011-08-02 Robert Dewar <dewar@adacore.com>
12450
12451 * gnat_rm.texi: Minor reformatting.
12452 * sem_prag.adb: Minor reformatting.
12453
12454 2011-08-02 Tristan Gingold <gingold@adacore.com>
12455
12456 * vms_data.ads: Add VMS qualifier for -gnateP.
12457
12458 2011-08-02 Robert Dewar <dewar@adacore.com>
12459
12460 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12461 * par-ch7.adb (P_Package): Proper placement of aspects for package
12462 decl/instantiation.
12463 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12464 (End_Statements): Add Is_Sloc parameterr
12465 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12466 (Check_End): Ad Is_Sloc parameter
12467 (End_Statements): Add Is_Sloc parameterr
12468
12469 2011-08-02 Vincent Celier <celier@adacore.com>
12470
12471 * ug_words: Add VMS qualifier equivalent to -gnateP:
12472 /SYMBOL_PREPROCESSING.
12473
12474 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12475
12476 * gnat-style.texi: For hexadecimal numeric literals the typical
12477 grouping of digits is 4 to represent 2 bytes.
12478 A procedure spec which is split into several lines is indented two
12479 characters.
12480
12481 2011-08-02 Yannick Moy <moy@adacore.com>
12482
12483 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12484 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12485 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12486 properly qualified
12487 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12488 choice in array aggregate
12489 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12490 mark as ancestor
12491 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12492 positional and named aggregate for record, or others in record
12493 aggregate, or multiple choice in record aggregate
12494 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12495 array operands to logical operations AND, OR and XOR do not have the
12496 same static lower and higher bounds
12497 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12498
12499 2011-08-01 Robert Dewar <dewar@adacore.com>
12500
12501 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12502 Replaces Last_Source_Node_In_Sequence.
12503 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12504 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12505 parens and blank in string (this was inconsistently implemented).
12506 * errout.ads
12507 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12508 blank in string (this was inconsistently implemented).
12509 * gnat1drv.adb
12510 (Set_Global_Switches): Set formal mode switches appropriately
12511 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12512 * par-prag.adb
12513 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12514 call Set_Error_Msg_Lang to set "spark" as language name.
12515 * par.adb: Remove unnecessary call to set formal language for errout
12516 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12517 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12518 name.
12519 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12520 calls to it, moved after resolution so that types are known
12521 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12522 result of concatenation is not of type String
12523 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12524 concatenation is not properly restricted
12525 * gnat_rm.texi: Add doc on pragma Spark_95.
12526 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12527 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12528 * gcc-interface/Make-lang.in: Update dependencies.
12529
12530 2011-08-01 Javier Miranda <miranda@adacore.com>
12531
12532 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12533 condition that detects if the overridden operation must replace an
12534 existing entity.
12535
12536 2011-08-01 Javier Miranda <miranda@adacore.com>
12537
12538 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12539 code declarations inserted by Insert_Actions in each alternative of the
12540 N_Case_Expression node.
12541
12542 2011-08-01 Robert Dewar <dewar@adacore.com>
12543
12544 * sem_ch6.adb: Minor code reorganization.
12545 * sem_util.adb: Minor reformatting.
12546
12547 2011-08-01 Pascal Obry <obry@adacore.com>
12548
12549 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12550 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12551
12552 2011-08-01 Yannick Moy <moy@adacore.com>
12553
12554 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12555 literal or operator symbol which is prefixed
12556 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12557 mode on access attributes.
12558 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12559 that concatenation operands are properly restricted in formal mode
12560 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12561 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12562 result of the concatenation has a type different from String.
12563 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12564 Analyze_Quantified_Expression, Analyze_Slice,
12565 Analyze_Null): issue an error in formal mode on unsupported constructs
12566 * sem_ch5.adb
12567 (Analyze_Block_Statement): only issue error on source block statement
12568 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12569 function which returns the last node in a list of nodes for which
12570 Comes_From_Source returns True, if any
12571 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12572 Last_Source_Node_In_Sequence
12573 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12574 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12575 mode on unsupported constructs
12576 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12577 rest of the actions may be needed later on since the error is marked as
12578 not serious.
12579 * sinfo.ads: Typos in comments.
12580
12581 2011-08-01 Pascal Obry <obry@adacore.com>
12582
12583 * projects.texi: Minor editing.
12584
12585 2011-08-01 Yannick Moy <moy@adacore.com>
12586
12587 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12588 insertion character ~~
12589 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12590 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12591 with insertion character ~~
12592 (Set_Msg_Text): treat insertion character ~~
12593 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12594 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12595 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12596 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12597 errors related to the formal language restriction not serious
12598 (insertion character |).
12599 * par.adb (Par): set formal language for error messages if needed
12600 * sem_ch6.adb (Check_Missing_Return): take into account possible
12601 generated statements at the end of the function
12602 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12603 enumeration value to define a new pragma SPARK_95
12604 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12605 SPARK_Version): new type and variables to store the SPARK version
12606 (none by default).
12607 (SPARK_Mode): return True when SPARK_Version is set
12608 * par-prag.adb: Correct indentation
12609 (Prag): take Pragma_SPARK_95 into account
12610 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12611 into account.
12612
12613 2011-08-01 Robert Dewar <dewar@adacore.com>
12614
12615 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12616 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12617 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12618
12619 2011-08-01 Pascal Obry <obry@adacore.com>
12620
12621 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12622 Target_Name to Get_Path call.
12623 (Parse_Single_Project): Likewise.
12624 (Post_Parse_Context_Clause): Likewise.
12625 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12626 Call Initialise_Project_Path with the proper Target_Name.
12627 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12628 search path.
12629 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12630 with the proper Target_Name.
12631 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12632 Part.Parse routine.
12633 (Parse_Project_And_Apply_Config): Likewise.
12634 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12635 This is fine as this part of the code is supporting only native
12636 compilation.
12637 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12638 is fine as this part of the code is supporting only native compilation.
12639
12640 2011-08-01 Yannick Moy <moy@adacore.com>
12641
12642 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12643 of homonym, unless the homonym is one of the cases allowed in SPARK
12644 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12645 package declaration occurring after a body.
12646
12647 2011-08-01 Robert Dewar <dewar@adacore.com>
12648
12649 * checks.adb, exp_ch4.adb: Minor reformatting.
12650
12651 2011-08-01 Javier Miranda <miranda@adacore.com>
12652
12653 * einfo.ads (Access_Disp_Table): Fix documentation.
12654 (Dispatch_Table_Wrappers): Fix documentation.
12655
12656 2011-08-01 Pascal Obry <obry@adacore.com>
12657
12658 * prj-env.adb, prj-env.ads: Minor reformatting.
12659
12660 2011-08-01 Yannick Moy <moy@adacore.com>
12661
12662 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12663 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12664 procedures out of these packages.
12665 * errout.ads, errout.adb
12666 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12667 procedures in of this package
12668 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12669 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12670 on misplaced later vs initial declarations, like in Ada 83
12671 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12672 formal mode on attribute of private type whose full type declaration
12673 is not visible
12674 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12675 package declaration inside a package specification
12676 (Analyze_Full_Type_Declaration): issue error in formal mode on
12677 controlled type or discriminant type
12678 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12679 user-defined operator means that it should come from the source
12680 (New_Overloaded_Entity): issue error in formal mode on overloaded
12681 entity.
12682 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12683
12684 2011-08-01 Thomas Quinot <quinot@adacore.com>
12685
12686 * atree.adb: Minor reformatting.
12687 * checks.adb: Minor reformatting.
12688
12689 2011-08-01 Vincent Celier <celier@adacore.com>
12690
12691 * s-parame-vms-ia64.ads: Fix typo in comment
12692 Minor reformatting
12693 * s-parame-vms-restrict.ads: Removed, unused.
12694
12695 2011-08-01 Javier Miranda <miranda@adacore.com>
12696
12697 * exp_ch3.adb
12698 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12699 * sem_ch3.adb
12700 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12701 * sem_ch3.ads, sem_ch3.adb
12702 (Is_Constant_Bound): New extended version of the subprogram that was
12703 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12704 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12705 * sem_aux.ads (Constant_Value): Fix typo in comment.
12706 * checks.adb (Generate_Index_Checks): New implementation which, for
12707 array objects with constant bounds, generates the runtime check
12708 referencing the bounds of the array type. For other cases this routine
12709 provides its previous behavior obtaining such values from the array
12710 object.
12711 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12712 parent type.
12713 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12714 we cannot have semantic interpretations of the new node.
12715
12716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12717
12718 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12719 expressions.
12720
12721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12722
12723 * sem_ch8.adb: Minor code editing.
12724 * s-vxwext.adb: Remove trailing space.
12725 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12726 consistency with other files.
12727
12728 2011-08-01 Thomas Quinot <quinot@adacore.com>
12729
12730 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12731
12732 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12733
12734 * par-ch10.adb: reject parameterized expressions as compilation unit.
12735 * sem_ch4.adb: handle properly conditional expression with overloaded
12736 then_clause and no else_clause.
12737
12738 2011-08-01 Tristan Gingold <gingold@adacore.com>
12739
12740 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12741 like done by System.Aux_DEC.
12742 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12743
12744 2011-08-01 Yannick Moy <moy@adacore.com>
12745
12746 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12747 missing label at end of declaration (subprogram or package)
12748 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12749 of positional and named parameter association
12750 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12751 Error_Msg_SP which adds a prefix to the error message giving the name
12752 of the formal language analyzed
12753 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12754 access result type in subprogram, unconstrained array as result type,.
12755 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12756 procedure
12757 * sem_ch8.adb: Code clean up.
12758
12759 2011-08-01 Javier Miranda <miranda@adacore.com>
12760
12761 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12762 * einfo.ads (Access_Disp_Table): Fix documentation.
12763 (Dispatch_Table_Wrappers): Fix documentation.
12764 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12765 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12766 to enforce the documentation of this attribute.
12767 (Set_Is_Interface): Cleanup the assertion.
12768 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12769 the Underlying_Type entity before reading attribute Access_Disp_Table.
12770 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12771 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12772 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12773 the Underlying_Type entity before reading attribute Access_Disp_Table.
12774 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12775 Locate the Underlying_Type entity before reading attribute
12776 Access_Disp_Table.
12777
12778 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12779
12780 * s-poosiz.ads: Additional overriding indicators.
12781
12782 2011-08-01 Yannick Moy <moy@adacore.com>
12783
12784 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12785 formal mode.
12786 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12787 parameter specification does not include a subtype mark.
12788 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12789 formal mode on abstract subprogram.
12790 (Analyze_Subprogram_Specification): issue error in formal mode on
12791 user-defined operator.
12792 (Process_Formals): issue error in formal mode on access parameter and
12793 default expression.
12794 * sem_ch9.adb (Analyze_Abort_Statement,
12795 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12796 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12797 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12798 Analyze_Requeue, Analyze_Selective_Accept,
12799 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12800 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12801 issue error in formal mode on user-defined raise statement.
12802
12803 2011-08-01 Thomas Quinot <quinot@adacore.com>
12804
12805 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12806 declaration being hidden when overriding an implicit inherited
12807 subprogram.
12808 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12809 (-gnats), do not complain about a source file that contains only a
12810 pragma No_Body.
12811
12812 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12813
12814 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12815 variable if already set.
12816
12817 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12818
12819 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12820 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12821 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12822 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12823 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12824 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12825 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12826 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12827 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12828 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12829 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12830 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12831 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12832 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12833 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12834 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12835 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12836 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12837 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12838 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12839 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12840 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12841 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12842 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12843 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12844 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12845 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12846 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12847 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12848 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12849 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12850 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12851 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12852 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12853 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12854 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12855 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12856 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12857 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12858 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12859 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12860 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12861 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12862 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12863 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12864 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12865 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12866 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12867 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12868 Use GNAT instead of GNARL.
12869
12870 2011-08-01 Bob Duff <duff@adacore.com>
12871
12872 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12873 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12874 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12875 reformatting.
12876
12877 2011-08-01 Yannick Moy <moy@adacore.com>
12878
12879 * debug.adb (d.D) reverve flag for the SPARK mode
12880 (d.E) reverve flag for SPARK generation mode
12881 (d.F) reverve flag for Why generation mode
12882 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12883 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12884 functions which return True when the corresponding modes are set
12885 (Formal_Language): return "spark" or "alfa" when in formal verification
12886 mode.
12887 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12888 Error_Msg to prefix the error message with a tag giving the formal
12889 language
12890 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12891 message with a tag giving the formal language
12892 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12893 block statement
12894 (Analyze_Case_Statement): issue error in formal mode on case statement
12895 with a single "others" case alternative
12896 (Analyze_Exit_Statement): issue errors in formal mode on exit
12897 statements which do not respect SPARK restrictions
12898 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12899 (Check_Unreachable_Code): always issue an error (not a warning) in
12900 formal mode on unreachable code (concerns both code after an infinite
12901 loop and after an unconditional jump, both not allowed in SPARK)
12902 * sem_ch6.adb (Analyze_Return_Statement): add call to
12903 Set_Return_Present for a procedure containing a return statement
12904 (already done for functions in Analyze_Function_Return)
12905 (Analyze_Function_Return): issue error in formal mode on extended
12906 return or if return is not last statement in function
12907 (Check_Missing_Return): issue error in formal mode if function does
12908 not end with return or if procedure contains a return
12909 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12910 function to detect if there is an inner scope of its parameter S which
12911 is a loop.
12912
12913 2011-08-01 Thomas Quinot <quinot@adacore.com>
12914
12915 * sem_ch6.ads: Minor reformatting.
12916
12917 2011-08-01 Javier Miranda <miranda@adacore.com>
12918
12919 * sem_util.adb (Abstract_Interface_List): Complete condition when
12920 processing private type declarations to avoid reading unavailable
12921 attribute.
12922 (Is_Synchronized_Tagged_Type): Complete condition when processing
12923 private extension declaration nodes to avoid reading unavailable
12924 attribute.
12925
12926 2011-08-01 Thomas Quinot <quinot@adacore.com>
12927
12928 * sem_ch3.adb: Minor reformatting.
12929
12930 2011-08-01 Thomas Quinot <quinot@adacore.com>
12931
12932 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12933 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12934 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12935 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12936 for VMS, instead parametrize the common implementation with
12937 System.Parameters declarations.
12938
12939 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12940
12941 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12942
12943 2011-08-01 Tristan Gingold <gingold@adacore.com>
12944
12945 * seh_init.c: Fix SEH handler installation on win64.
12946
12947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12948
12949 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12950 double analysis of an anonymous access to subprogram, because it can
12951 lead to improper sharing of profiles and a back-end crash.
12952
12953 2011-08-01 Robert Dewar <dewar@adacore.com>
12954
12955 * make.adb, sem_ch4.adb: Minor reformatting.
12956 * gcc-interface/Make-lang.in: Update dependencies.
12957 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12958
12959 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12960
12961 * gnat_rm.texi: Fix definition of Long_Integer.
12962
12963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12964
12965 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12966 to prevent storage exhaustion.
12967 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12968 finalized is a function body, insert the cleanup code before the final
12969 return statement, to prevent spurious warnings.
12970 * s-pooglo.ads: add overriding indicator.
12971
12972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12973
12974 * sem_ch4.adb (Operator_Check): improve error message when both a
12975 with_clause and a use_clause are needed to make operator usage legal.
12976 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12977 determine whether a compilation unit is visible within an other,
12978 either through a with_clause in the current unit, or a with_clause in
12979 its library unit or one one of its parents.
12980
12981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12982
12983 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12984 over an arbitrary expression of an array or container type.
12985 * lib-xref.adb: clarify comment.
12986
12987 2011-08-01 Bob Duff <duff@adacore.com>
12988
12989 * einfo.ads: Minor reformatting.
12990 * debug.adb: Minor comment improvement.
12991
12992 2011-08-01 Javier Miranda <miranda@adacore.com>
12993
12994 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12995 consider hidden subprograms as valid candidates.
12996
12997 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12998
12999 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13000
13001 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13002
13003 * gnat_ugn.texi: Fix typo.
13004
13005 2011-08-01 Robert Dewar <dewar@adacore.com>
13006
13007 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13008 lib-xref.adb: Minor reformatting
13009
13010 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13011
13012 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13013 when to generate a call to Move_Final_List.
13014 (Has_Controlled_Parts): Remove this function.
13015
13016 2011-08-01 Geert Bosch <bosch@adacore.com>
13017
13018 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13019 "," in choice list.
13020
13021 2011-08-01 Thomas Quinot <quinot@adacore.com>
13022
13023 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13024 explicit raise of a predefined exception as Comes_From_Source if the
13025 original N_Raise_Statement comes from source.
13026
13027 2011-08-01 Robert Dewar <dewar@adacore.com>
13028
13029 * sinfo.ads: Add comment.
13030 * sem_ch6.adb: Minor reformatting.
13031
13032 2011-08-01 Robert Dewar <dewar@adacore.com>
13033
13034 * freeze.adb (Freeze_Entity): Refine check for bad component size
13035 clause to avoid rejecting confirming clause when atomic/aliased present.
13036
13037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13038
13039 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13040 better determine whether an entity reference is a write.
13041 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13042 subcomponent.
13043 * lib-xref.adb (Output_References): Do no suppress a read reference at
13044 the same location as an immediately preceeding modify-reference, to
13045 handle properly in-out actuals.
13046
13047 2011-08-01 Tristan Gingold <gingold@adacore.com>
13048
13049 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13050
13051 2011-08-01 Quentin Ochem <ochem@adacore.com>
13052
13053 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13054 heap to compute the result.
13055
13056 2011-08-01 Robert Dewar <dewar@adacore.com>
13057
13058 * atree.ads: Minor reformatting.
13059
13060 2011-08-01 Emmanuel Briot <briot@adacore.com>
13061
13062 * g-expect.adb (Get_Command_Output): Fix memory leak.
13063
13064 2011-08-01 Geert Bosch <bosch@adacore.com>
13065
13066 * cstand.adb (P_Float_Type): New procedure to print the definition of
13067 predefined fpt types.
13068 (P_Mixed_Name): New procedure to print a name using mixed case
13069 (Print_Standard): Use P_Float_Type for printing floating point types
13070 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13071 precision IEEE float.
13072
13073 2011-08-01 Thomas Quinot <quinot@adacore.com>
13074
13075 * sem_ch3.adb: Minor reformatting.
13076
13077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13078
13079 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13080 the completion of a generic function, insert the new body rather than
13081 rewriting the original.
13082
13083 2011-08-01 Yannick Moy <moy@adacore.com>
13084
13085 * sinfo.ads, errout.ads: Typos in comments.
13086
13087 2011-08-01 Robert Dewar <dewar@adacore.com>
13088
13089 * par-endh.adb: Minor reformatting.
13090
13091 2011-08-01 Robert Dewar <dewar@adacore.com>
13092
13093 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13094 (Pre_Post_Aspects): New subtype.
13095 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13096 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13097 * par-ch7.adb (P_Package): Remove Decl parameter
13098 (P_Package): Handle new syntax for aspects (before IS)
13099 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13100 new aspect syntax
13101 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13102 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13103 (P_Package): Remove Decl parameter
13104 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13105 aspects
13106 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13107 specs
13108 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13109 * sinfo.ads: Document new syntax for aspects in packages etc.
13110 * sprint.adb: Handle new syntax of aspects before IS in package
13111
13112 2011-08-01 Thomas Quinot <quinot@adacore.com>
13113
13114 * atree.ads: Minor reformatting.
13115 * sem_prag.adb: Minor reformatting.
13116
13117 2011-08-01 Robert Dewar <dewar@adacore.com>
13118
13119 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13120 case expr alternative.
13121
13122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13123
13124 * sem_ch12.adb: Fix typo.
13125
13126 2011-08-01 Geert Bosch <bosch@adacore.com>
13127
13128 * sem_prag.adb (Check_No_Link_Name): New procedure.
13129 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13130 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13131 instead of Standard_Long_Long_Float_Size global. Preparation for
13132 eventual removal of per type constants.
13133 * exp_util.ads (Get_Stream_Size): New function returning the stream
13134 size value of subtype E.
13135 * exp_util.adb (Get_Stream_Size): Implement new function.
13136 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13137 function.
13138 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13139 * einfo.adb:
13140 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13141
13142 2011-08-01 Geert Bosch <bosch@adacore.com>
13143
13144 * cstand.adb: Fix comments.
13145 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13146 count of arguments.
13147
13148 2011-08-01 Robert Dewar <dewar@adacore.com>
13149
13150 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13151
13152 2011-08-01 Geert Bosch <bosch@adacore.com>
13153
13154 * atree.ads: Fix comment.
13155
13156 2011-08-01 Robert Dewar <dewar@adacore.com>
13157
13158 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13159 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13160 * par.adb: Add with for Namet.Sp.
13161 * par-tchk.adb: Minor reformatting.
13162
13163 2011-08-01 Vincent Celier <celier@adacore.com>
13164
13165 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13166 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13167 of the init procedure of a SAL.
13168 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13169 New procedure.
13170
13171 2011-08-01 Thomas Quinot <quinot@adacore.com>
13172
13173 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13174 reformatting.
13175
13176 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13177
13178 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13179
13180 2011-08-01 Thomas Quinot <quinot@adacore.com>
13181
13182 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13183 conformant with its spec (return True only for types that have
13184 an overriding Initialize primitive operation that prevents them from
13185 having preelaborable initialization).
13186 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13187 initialization for controlled types in Ada 2005 or later mode.
13188
13189 2011-08-01 Robert Dewar <dewar@adacore.com>
13190
13191 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13192 Postcondition.
13193 (Same_Aspect): New function.
13194 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13195 Type_Invariant, Precondition, Postcondition.
13196 * snames.ads-tmpl: Add Name_Type_Invariant.
13197
13198 2011-08-01 Robert Dewar <dewar@adacore.com>
13199
13200 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13201 here.
13202 (Freeze_All_Ent): Fix error in handling inherited aspects.
13203 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13204 already analyzed, but don't skip entire processing of a declaration,
13205 that's wrong in some cases of declarations being rewritten.
13206 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13207 Don't delay for integer, string literals
13208 Treat predicates in usual manner for delay, remove special case code,
13209 not needed.
13210 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13211 (Build_Predicate_Function): Update saved expression in aspect
13212 (Build_Invariant_Procedure): Update saved expression in aspect
13213 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13214 of replacement of discriminant references if the reference is simple.
13215
13216 2011-08-01 Robert Dewar <dewar@adacore.com>
13217
13218 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13219 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13220 Static_Predicate and Dynamic_Predicate.
13221 (Build_Predicate_Function): Add processing for Static_Predicate
13222 and Dynamic_Predicate.
13223 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13224 (From_Static_Predicate): New flag
13225 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13226
13227 2011-08-01 Robert Dewar <dewar@adacore.com>
13228
13229 * usage.adb: Documentation cleanup for Ada version modes in usage.
13230 * expander.adb: Minor reformatting.
13231
13232 2011-08-01 Robert Dewar <dewar@adacore.com>
13233
13234 * atree.ads: Minor comment fix.
13235 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13236 a-witeio.ads, sem_prag.adb: Minor reformatting.
13237
13238 2011-08-01 Doug Rupp <rupp@adacore.com>
13239
13240 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13241 pointers. Use descrip.h header file for convenience. Add some
13242 comments.
13243
13244 2011-08-01 Robert Dewar <dewar@adacore.com>
13245
13246 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13247 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13248 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13249 New procedure.
13250 (Check_Aspect_At_End_Of_Declarations): New procedure
13251 (Analye_Aspect_Specification): Minor changes for above procedures
13252 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13253 specification node as well.
13254
13255 2011-08-01 Pascal Obry <obry@adacore.com>
13256
13257 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13258 Windows files. Use GetFilesAttributes() in this case to check for file
13259 existence instead of returning with an error code.
13260
13261 2011-08-01 Vincent Celier <celier@adacore.com>
13262
13263 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13264 High is above Source length.
13265
13266 2011-08-01 Robert Dewar <dewar@adacore.com>
13267
13268 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13269
13270 2011-08-01 Robert Dewar <dewar@adacore.com>
13271
13272 * aspects.ads (Boolean_Aspects): New subtype.
13273 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13274 for derived types in cases where the parent type and derived type have
13275 aspects.
13276 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13277 with aspects when parent type also has aspects.
13278 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13279 boolean expression at this point).
13280 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13281 accordance with final decision on the Ada 2012 feature.
13282 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13283
13284 2011-08-01 Matthew Heaney <heaney@adacore.com>
13285
13286 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13287
13288 2011-08-01 Pascal Obry <obry@adacore.com>
13289
13290 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13291 Fix Replace_Slice when High is above current string size.
13292 (Replace_Slice): Fix DL computation when High is above current
13293 string length.
13294
13295 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13296
13297 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13298
13299 2011-08-01 Matthew Heaney <heaney@adacore.com>
13300
13301 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13302 of node.
13303
13304 2011-08-01 Pascal Obry <obry@adacore.com>
13305
13306 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13307 reformatting.
13308
13309 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13310
13311 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13312 access to protected subprograms in generic bodies.
13313 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13314 protected type, indicate that the convention of the subprogram is
13315 Convention_Protected, because it may be used in subsequent declarations
13316 within the protected declaration.
13317
13318 2011-08-01 Vincent Celier <celier@adacore.com>
13319
13320 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13321 and "final" procedures when the name of the library is "ada", to avoid
13322 duplicate symbols "adainit" and "adafinal" in executables.
13323
13324 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13325
13326 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13327 quantified expression that appears within a postcondition and uses the
13328 Ada2012 'Result attribute.
13329
13330 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13331
13332 * init.c (__gnat_error_handler): Cast reason to int.
13333 (__gnat_install_handler): Explain sa_sigaction use.
13334
13335 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13336
13337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13338 subprogram has copy-in copy-out parameters, try to promote the mode of
13339 the return type if it is passed in registers.
13340
13341 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13342
13343 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13344 left operand as addressable.
13345
13346 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13347
13348 * gcc-interface/gigi.h (build_function_stub): Remove.
13349 (build_return_expr): Likewise.
13350 (convert_vms_descriptor): Declare.
13351 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13352 (build_function_stub): Move to...
13353 * gcc-interface/utils2.c (build_return_expr): Move to...
13354 * gcc-interface/trans.c (build_function_stub): ...here.
13355 (build_return_expr): ...here.
13356 (Subprogram_Body_to_gnu): Add local variable for language_function.
13357 Disconnect the parameter attributes cache, if any, once done with it.
13358 Call end_subprog_body only after setting the end_locus.
13359 Build the stub associated with the function, if any, at the very end.
13360 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13361 variables and streamline control flow.
13362
13363 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13364
13365 PR ada/49819
13366 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13367 g-trasym-dwarf.adb.
13368
13369 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13370
13371 PR bootstrap/49794
13372 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13373 Assign to act.sa_sigaction.
13374 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13375 current->return_address to char * before arithmetic.
13376
13377 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13378
13379 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13380 Correct argument types.
13381 Extract code from reason.
13382 (__gnat_install_handler): Assign to act.sa_sigaction.
13383
13384 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13385
13386 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13387 (GNAT1_OBJS): ...here.
13388
13389 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13390
13391 PR ada/48711
13392 * g-socthi-mingw.adb (Fill): Fix formatting.
13393
13394 * gcc-interface/gigi.h: Move around comment.
13395
13396 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13397
13398 PR ada/46350
13399 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13400
13401 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13402
13403 PR ada/48711
13404 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13405
13406 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13407
13408 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13409 range comparison if Pmode is SImode.
13410
13411 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13412 Eric Botcazou <ebotcazou@adacore.com>
13413
13414 * adadecode.c: Wrap up in extern "C" block.
13415 * adadecode.h: Likewise.
13416 * adaint.c: Likewise. Remove 'const' keyword.
13417 * adaint.h: Likewise.
13418 * argv.c: Likewise.
13419 * atree.h: Likewise.
13420 * cio.c: Likewise.
13421 * cstreams.c: Likewise.
13422 * env.c: Likewise.
13423 * exit.c: Likewise.
13424 * fe.h: Likewise.
13425 * final.c: Likewise.
13426 * init.c: Likewise.
13427 * initialize.c: Likewise.
13428 * link.c: Likewise.
13429 * namet.h: Likewise.
13430 * nlists.h: Likewise.
13431 * raise.c: Likewise.
13432 * raise.h: Likewise.
13433 * repinfo.h: Likewise.
13434 * seh_init.c: Likewise.
13435 * targext.c: Likewise.
13436 * tracebak.c: Likewise.
13437 * uintp.h: Likewise.
13438 * urealp.h: Likewise.
13439 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13440 * xsinfo.adb: Likewise.
13441 * xsnamest.adb: Likewise.
13442 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13443 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13444 * gcc-interface/misc.c: Likewise.
13445 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13446 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13447 ada/targext.o here...
13448 (GNAT_ADA_OBJS): ...and not here.
13449 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13450 (GNATBIND_OBJS): Reorder.
13451
13452 2011-07-07 Richard Henderson <rth@redhat.com>
13453
13454 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13455 dwarf2out_frame_init.
13456
13457 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13458
13459 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13460
13461 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13462
13463 PR target/39150
13464 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13465
13466 2011-07-06 Richard Guenther <rguenther@suse.de>
13467
13468 * gcc-interface/misc.c (gnat_init): Merge calls to
13469 build_common_tree_nodes and build_common_tree_nodes_2.
13470 Re-initialize boolean_false_node.
13471
13472 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13473 Olivier Hainque <hainque@adacore.com>
13474 Nicolas Setton <setton@adacore.com>
13475
13476 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13477 the type according to the ARTIFICIAL_P parameter.
13478 (create_type_decl): Likewise.
13479 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13480
13481 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13482
13483 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13484 (gnatbind): Likewise.
13485
13486 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13487
13488 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13489
13490 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13491
13492 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13493 local variable throughout. Remove useless call to Base_Type.
13494 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13495 Take it also into account for the volatileness of the field. Set the
13496 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13497
13498 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13499
13500 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13501 on a dereference built for a by-ref object if it has an address clause.
13502
13503 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13504
13505 * einfo.ads (Address_Taken): Document use for the second argument of
13506 Asm_Input and Asm_Output attributes.
13507 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13508 argument is an entity name, then set Address_Taken on it.
13509 <Attribute_Asm_Output>: Likewise.
13510 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13511 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13512 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13513 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13514
13515 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13516
13517 PR middle-end/46500
13518 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13519
13520 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13521
13522 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13523 (ada/utils.o): Update dependencies.
13524 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13525 ../../../libcpp/libcpp.a.
13526 * gcc-interface/utils.c: Include common/common-target.h.
13527 (process_attributes): Use targetm_common.have_named_sections.
13528
13529 2011-06-07 Richard Guenther <rguenther@suse.de>
13530
13531 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13532 set_sizetype.
13533
13534 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13535
13536 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13537 TREE_THIS_NOTRAP flag.
13538
13539 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13540
13541 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13542 Fix thinko.
13543
13544 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13545
13546 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13547 constants whose full view has discriminants specially.
13548
13549 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13550
13551 * gcc-interface/utils.c: Include diagnostic.h.
13552 (gnat_write_global_declarations): Output debug information for all
13553 global type declarations before finalizing the compilation unit.
13554 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13555
13556 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13557
13558 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13559
13560 2011-05-25 Kai Tietz <ktietz@redhat.com>
13561
13562 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13563 initialization instead of const/none-const pointer assignment.
13564
13565 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13566
13567 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13568 $(EXTRA_GNAT1_OBJS).
13569 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13570 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13571 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13572 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13573 libcommon-target.a instead of prefix.o.
13574
13575 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13576
13577 PR ada/49097
13578 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13579
13580 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13581
13582 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13583 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13584 instead of version.o.
13585
13586 2011-05-18 Kai Tietz <ktietz@redhat.com>
13587
13588 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13589 boolean_false_node instead of integer_zero_node.
13590 (convert_with_check): Likewise.
13591 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13592
13593 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13594
13595 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13596 type of the parameter is an unconstrained array, convert the actual to
13597 the type of the formal in the In Out and Out cases as well.
13598
13599 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13600
13601 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13602 call build_function_type_array or build_varargs_function_type_array
13603 instead.
13604 (create_subprog_type): Don't call build_function_type; call
13605 build_function_type_vec instead.
13606
13607 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13608
13609 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13610 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13611 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13612
13613 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13614
13615 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13616
13617 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13618 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13619
13620 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13621
13622 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13623
13624 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13625
13626 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13627 instead of accessing TYPE_ARG_TYPES directly.
13628 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13629
13630 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13631
13632 PR ada/48844
13633 * gcc-interface/gigi.h (get_variant_part): Declare.
13634 * gcc-interface/decl.c (get_variant_part): Make global.
13635 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13636 types have the same constant size, are record types and T1 has a
13637 variant part while T2 doesn't.
13638
13639 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13640
13641 * gcc-interface/utils.c (begin_subprog_body): Do not call
13642 get_pending_sizes.
13643 (end_subprog_body): Likewise.
13644
13645 2011-05-04 Richard Guenther <rguenther@suse.de>
13646
13647 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13648 int_const_binop.
13649 (pos_to_constructor): Likewise.
13650
13651 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13652 Eric Botcazou <ebotcazou@adacore.com>
13653
13654 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13655 of build_function_type. Adjust calls to...
13656 (build_raise_check): ...this. Do not take a void_tree parameter.
13657 Call build_function_type_list instead of build_function_type.
13658 Fix head comment and swap couple of conditional blocks.
13659
13660 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13661
13662 * gnatvsn.ads (Library_Version): Bump to 4.7.
13663 (Current_Year): Bump to 2011.
13664
13665 2011-04-29 Michael Matz <matz@suse.de>
13666
13667 * gcc-interface/misc.c (gnat_handle_option): Set
13668 warn_maybe_uninitialized.
13669
13670 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13671
13672 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13673 the Watson/McCabe paper.
13674
13675 2011-04-23 Jim Meyering <meyering@redhat.com>
13676
13677 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13678
13679 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13680
13681 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13682 onto the new type.
13683
13684 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13685
13686 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13687 parameter.
13688 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13689 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13691 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13692 <all>: Do not set flags on the reused DECL node coming from an alias.
13693 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13694 don't need debug info here...
13695 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13696 (gigi): Adjust calls to create_subprog_decl.
13697 (build_raise_check): Likewise.
13698 (establish_gnat_vms_condition_handler): Likewise.
13699 (Compilation_Unit_to_gnu): Likewise.
13700 (gnat_to_gnu): Likewise.
13701
13702 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13703
13704 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13705 (NO_REORDER_ADAFLAGS): New variable.
13706 (EXTRA_GNATTOOLS): Always define.
13707 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13708 Clean up and adjust list of files compiled with special options.
13709 * gcc-interface/Make-lang.in: Likewise.
13710 (ada/decl.o): Cosmetical change.
13711 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13712
13713 2011-04-20 Jim Meyering <meyering@redhat.com>
13714
13715 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13716
13717 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13718
13719 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13720 $(CFLAGS) on the link line.
13721
13722 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13723
13724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13725 padded type built for the return type if it is unconstrained.
13726
13727 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13728
13729 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13730
13731 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13732
13733 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13734 before calling TREE_CHAIN.
13735 * gcc-interface/misc.c (gnat_init_ts): New function.
13736 (LANG_HOOKS_INIT_TS): Define.
13737
13738 2011-04-12 Martin Jambor <mjambor@suse.cz>
13739
13740 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13741 instead of cgraph_node.
13742
13743 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13744
13745 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13746 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13747 mechanism.
13748
13749 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13750
13751 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13752 of aggregate types that contain a placeholder.
13753
13754 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13755
13756 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13757 TYPE_ARG_TYPES.
13758 (handle_type_generic_attribute): Likewise.
13759
13760 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13761
13762 PR ada/47163
13763 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13764
13765 2011-04-04 Kai Tietz <ktietz@redhat.com>
13766
13767 PR ada/47163
13768 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13769 to flag value.
13770
13771 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13772
13773 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13774 type case, do not strip a padding type around the array type.
13775
13776 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13777
13778 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13779 types.
13780
13781 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13782
13783 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13784 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13785 code for -feliminate-unused-debug-types.
13786 (gnat_post_options): Likewise.
13787
13788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13789
13790 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13791 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13792 distinct copy.
13793
13794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13795
13796 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13797 DECL_ARTIFICIAL flag on enumeration types.
13798
13799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13800
13801 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13802 fat pointer types artificial unconditionally.
13803 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13804 isn't artificial.
13805
13806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13807
13808 * gcc-interface/gigi.h (get_dummy_type): Declare.
13809 (build_dummy_unc_pointer_types): Likewise.
13810 (finish_fat_pointer_type): Likewise.
13811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13812 fat pointer type has been built, complete it in place.
13813 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13814 and thin pointers. Remove useless variable.
13815 (finish_fat_pointer_type): Make global and move to...
13816 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13817 (get_dummy_type): New function.
13818 (build_dummy_unc_pointer_types): Likewise.
13819 (gnat_pushdecl): Propage the name to the anonymous variants only.
13820 (update_pointer_to): Only adjust the pointer types in the unconstrained
13821 array case.
13822
13823 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13824
13825 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13827 if this is a Taft amendment type and the full declaration is available.
13828 * gcc-interface/trans.c (process_type): Likewise.
13829 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13830 (process_freeze_entity): Likewise.
13831 * gcc-interface/utils.c (dummy_global): New static variable.
13832 (gnat_write_global_declarations): If there are types declared as used
13833 at the global level, insert them in the global hash table.
13834
13835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13836
13837 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13838 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13839 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13840 copy.
13841 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13842 flag of the type accordingly.
13843 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13844
13845 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13846
13847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13848 finalizing types when updating the pointers to the designated type.
13849 <all>: Finalize the deferred types even if we didn't defer processing
13850 of incomplete types in this invocation.
13851
13852 2011-04-01 Olivier Hainque <hainque@adacore.com>
13853 Nicolas Setton <setton@adacore.com>
13854 Eric Botcazou <ebotcazou@adacore.com>
13855
13856 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13857 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13858
13859 2011-03-28 Kai Tietz <ktietz@redhat.com>
13860
13861 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13862 Windows targets.
13863 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13864 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13865
13866 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13867
13868 2011-03-28 Tristan Gingold <gingold@adacore.com>
13869
13870 PR ada/44431
13871 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13872 Use ada output of gnatbind.
13873 (ada/b_gnatb.adb): Ditto.
13874 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13875 (ada.mostlyclean, ada.stage1)
13876 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13877 (ada.stagefeedback): Adjust.
13878 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13879 Use ada output of gnatbind.
13880 (b_gnatm.adb): Ditto.
13881 (b_gnatl.o, b_gnatm.o): New rules.
13882
13883 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13884
13885 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13886 for the padded type built to support a specified size or alignment.
13887
13888 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13889
13890 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13892 unconditionally to the end of the unit when the designated type is
13893 limited_with'ed.
13894 <all>: Rename local variable. Attempt to un-defer types only and do it
13895 for limited_with'ed types as well.
13896 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13897 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13898 consistently and remove redundant call to finalize_from_with_types.
13899
13900 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13901
13902 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13903 subprograms without a previous spec declared in the same unit.
13904 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13905 subprograms at the end of the unit instead of at the beginning.
13906 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13907 isn't public for the special handling of non-inline functions nested
13908 inside inline external functions.
13909
13910 2011-03-25 Jeff Law <law@redhat.com>
13911
13912 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13913
13914 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13915
13916 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13917 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13918 to compute Set_Size_Depends_On_Discriminant.
13919 (Layout_Type): Call it on array types in back-end layout mode.
13920 * sem_util.adb (Requires_Transient_Scope): Return true for array
13921 types only if the size depends on the value of discriminants.
13922 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13923 type if the RHS is a call to a function that returns an unconstrained
13924 type with default discriminant.
13925
13926 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13927
13928 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13929 non-conversion to the nominal result type at the end.
13930
13931 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13932
13933 * gcc-interface/trans.c (create_temporary): New function taken from...
13934 (create_init_temporary): ...here. Call it.
13935 (call_to_gnu): Create the temporary for the return value early, if any.
13936 Create it for a function with copy-in/copy-out parameters if there is
13937 no target; in other cases of copy-in/copy-out, use another temporary.
13938 Push the new binding level lazily. Add and rename local variables.
13939
13940 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13941
13942 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13943 error message.
13944 (set_rm_size): Likewise.
13945
13946 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13947
13948 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13949 for the padded type built in order to support a specified alignment.
13950 Fix incorrect formatting.
13951
13952 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13953
13954 PR bootstrap/48216
13955 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13956
13957 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13958
13959 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13960 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13961 to the end of the list. Adjust recursive call. Rename local variable.
13962 If REORDER is true, reorder components of the record type.
13963 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13964 components_to_record and adjust the parameter list.
13965
13966 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13967
13968 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13969 disabled, use the variable for bounds of loop iteration scheme.
13970
13971 2011-03-21 Kai Tietz <ktietz@redhat.com>
13972
13973 PR target/12171
13974 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13975
13976 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13977
13978 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13979 out whether the expression is read-only. Short-circuit placeholder
13980 case and rename a couple of local variables.
13981
13982 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13983
13984 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13985 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13986 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13987 (convert): Deal with conversions from a smaller form type specially.
13988
13989 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13990
13991 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13992 its argument, except for the special -I- switch.
13993
13994 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13995
13996 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13997 "Ada Issues".
13998
13999 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14000
14001 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14002
14003 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14004
14005 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14006 GNAT_FORMAL.
14007 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14008 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14009 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14010 Do not generate the check directly, instead instantiate the template
14011 check present in the descriptor.
14012 (make_descriptor_field): Move around.
14013 (build_vms_descriptor32): Build a template check in the POINTER field.
14014 (build_vms_descriptor): Remove useless suffixes.
14015 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14016
14017 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14018
14019 PR bootstrap/47467
14020 * targext.c: Include target files if IN_RTS is defined.
14021
14022 2011-01-26 Richard Guenther <rguenther@suse.de>
14023
14024 PR bootstrap/47467
14025 * targext.c: Include config.h.
14026 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14027 dependency.
14028
14029 2011-01-04 Pascal Obry <obry@adacore.com>
14030 Eric Botcazou <ebotcazou@adacore.com>
14031
14032 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14033
14034 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14035
14036 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14037 end-of-case on the end label and its associated gotos, if any.
14038
14039 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14040
14041 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14042 expressions of the parameter cache within the statement group of
14043 the CICO mechanism.
14044
14045 2011-01-04 Olivier Hainque <hainque@adacore.com>
14046 Eric Botcazou <ebotcazou@adacore.com>
14047
14048 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14049 (set_end_locus_from_node): New function.
14050 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14051 make and the function end_locus.
14052 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14053 for the elaboration subprogram.
14054 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14055 set the end_locus of the expression as well.
14056
14057 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14058
14059 PR ada/47131
14060 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14061 variables that are referenced in exception handlers volatile.
14062
14063
14064 \f
14065 Copyright (C) 2011 Free Software Foundation, Inc.
14066
14067 Copying and distribution of this file, with or without modification,
14068 are permitted in any medium without royalty provided the copyright
14069 notice and this notice are preserved.
This page took 0.572318 seconds and 4 git commands to generate.