]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
Makefile.in (common-tools, [...]): Speed up by using -j0.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
e8e38f35
AC
12011-09-06 Arnaud Charlet <charlet@adacore.com>
2
3 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
4 gnatlink-re): Speed up by using -j0.
5
ba759acd
AC
62011-09-06 Yannick Moy <moy@adacore.com>
7
8 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
9 Set_Corresponding_Aspect when creating pragma from aspect.
10 (Add_Predicates): Use new field Corresponding_Aspect.
11 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
12 name when present, for the purpose of issuing error messages;
13 remove local procedure Error_Pragma_Arg_Alternate_Name.
14 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
15 N_Pragma node.
16 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
17 N_Pragma node.
18
192011-09-06 Robert Dewar <dewar@adacore.com>
20
21 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
22
232011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
24
25 * exp_ch6.adb (Build_Heap_Allocator): Add new
26 local variable Desig_Typ. Code and comment reformatting. Add
27 machinery to ensure that the allocation uses a fat pointer when
28 the type of the return object is a constrained array and the
29 function return type is an unconstrained array.
30
312011-09-06 Vincent Celier <celier@adacore.com>
32
33 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
34 parameters in subprograms.
35
362011-09-06 Arnaud Charlet <charlet@adacore.com>
37
38 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
39
402011-09-06 Thomas Quinot <quinot@adacore.com>
41
42 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
43 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
44 subprogram.
45 (System.Tasking.Primitive_Operations.Specific.Set): If argument
46 is null, destroy task specific data, to make API consistent with
47 other platforms, and thus compatible with the shared version
48 of s-tpoaal.adb.
49 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
50 Document the above assumption.
51
f4f92d9d
AC
522011-09-06 Ed Schonberg <schonberg@adacore.com>
53
54 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
55 variable for type of return value when return type is
56 unconstrained and context is an assignment.
57
582011-09-06 Ed Schonberg <schonberg@adacore.com>
59
60 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
61 class-wide operation if expansion is not enabled.
62
632011-09-06 Eric Botcazou <ebotcazou@adacore.com>
64
65 * checks.adb (Apply_Scalar_Range_Check): Deal with access
66 type prefix.
67
682011-09-06 Yannick Moy <moy@adacore.com>
69
70 * sem_ch13.adb (Analyze_Aspect_Specifications, case
71 Aspect_Invariant): Do not issue error at this point on illegal
72 pragma placement, as this is checked later on when analyzing
73 the corresponding pragma.
74 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
75 similar to Error_Pragma_Arg, except the source name of the
76 aspect/pragma to use in warnings may be equal to parameter
77 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
78 message to distinguish source name of pragma/aspect, and whether
79 the illegality resides in the type being public, or being private
80 without a public declaration
81
822011-09-06 Thomas Quinot <quinot@adacore.com>
83
84 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
85 size check (fd_set is implemented differently on that platform).
86
872011-09-06 Thomas Quinot <quinot@adacore.com>
88
89 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
90 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
91 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
92 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
93 (ATCB_Allocation): New subpackage of
94 System.Tasking.Primitive_Operations, shared across all targets
95 with full tasking runtime.
96 (ATCB_Allocation.New_ATCB): Moved there (from target specific
97 s-taprop bodies).
98 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
99 taking care of establishing a local temporary ATCB if the one
100 being deallocated is Self, to avoid a reference to the freed
101 ATCB in Abort_Undefer.
102
1032011-09-06 Thomas Quinot <quinot@adacore.com>
104
105 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
106 terminated, mark it for deallocation upon termination.
107 (Terminate_Task): Call Free_Task again if the task is marked
108 for automatic deallocation upon termination.
109
df177175
RD
1102011-09-06 Robert Dewar <dewar@adacore.com>
111
112 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
113 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
114 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
115 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
116 a-intnam-solaris.ads, a-intnam-tru64.ads,
117 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
118 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
119 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
120 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
121 * s-rident.ads: Add new restriction No_Implementation_Identifiers
122 Add new profile No_Implementation_Extensions
123 * sem_prag.adb: Implement pragma Implementation_Defined Implement
124 profile No_Implementation_Extensions
125 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
126 Check violation of restriction No_Implementation_Identifiers
127 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
128 Add entry for Name_No_Implementation_Extensions
129
1302011-09-06 Robert Dewar <dewar@adacore.com>
131
132 * impunit.ads: Minor reformatting.
133
b991dd43
AC
1342011-09-06 Robert Dewar <dewar@adacore.com>
135
136 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
137
1382011-09-06 Pascal Obry <obry@adacore.com>
139
140 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
141 types.
142
516785cc
AC
1432011-09-06 Robert Dewar <dewar@adacore.com>
144
145 * g-socket.adb: Minor reformatting
146
1472011-09-06 Javier Miranda <miranda@adacore.com>
148
149 * ali.adb (Scan_ALI): Add missing support to load references of
150 entities imported from other languages.
151 * ali.ads (Xref_Record): Adding new fields to store the language and
152 name of an imported entity.
153 * lib-xref.adb (Output_Import_Export_Info): Fix typo
154 in comment.
155
1562011-09-06 Ed Schonberg <schonberg@adacore.com>
157
158 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
159 is allowed on a full type declaration if it is the completion of
160 a private declarations.
161 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
162 aspect is allowed on a full type declaration in the private part
163 of a package.
164
96691943
AC
1652011-09-06 Robert Dewar <dewar@adacore.com>
166
167 * sem_ch8.ads: Minor reformatting
168
1692011-09-06 Thomas Quinot <quinot@adacore.com>
170
171 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
172 Guard against socket values that are not in [0;FD_SETSIZE[
173
54bf19e4
AC
1742011-09-06 Robert Dewar <dewar@adacore.com>
175
176 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
177 reformatting.
178
1792011-09-06 Arnaud Charlet <charlet@adacore.com>
180
181 * s-linux-alpha.ads: Minor reformatting
182 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
183 Use sizeof instead of corresponding C defines in s-oscons template.
184
5d42cba1
VG
1852011-09-06 Vadim Godunko <godunko@adacore.com>
186
187 * a-convec.ads, a-iteint.ads: Minor reformatting.
188
77aa62e7
AC
1892011-09-06 Vincent Celier <celier@adacore.com>
190
191 * projects.texi: Add menus and @node lines.
192
1932011-09-06 Ed Schonberg <schonberg@adacore.com>
194
195 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
196 where the return type is an unconstrained array and the context
197 is an assignment. Optimize the case when the target of the
198 assignment is a selected component.
199
2002011-09-06 Arnaud Charlet <charlet@adacore.com>
201
202 * s-solita.adb: Update comments.
203
2042011-09-06 Pascal Obry <obry@adacore.com>
205
206 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
207 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
208 * s-oscons-tmplt.c: Add support for generating pthread related
209 types size on GNU/Linux as done for Darwin.
210 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
211
886b5a18
AC
2122011-09-06 Robert Dewar <dewar@adacore.com>
213
214 * exp_ch6.adb: Fix minor typo.
215
2162011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
217
218 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
219 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
220 (Double_Size_Of): Alphabetized. Update the comment on usage.
221 (Make_Finalize_Address_Stmts): Update comments and reformat code.
222 (Nearest_Multiple_Rounded_Up): New routine.
223 (Size_Of): Update comment on usage. The generated expression now
224 accounts for alignment gaps by rounding the size of the type to the
225 nearest multiple rounded up of the type's alignment.
226
57a3fca9
AC
2272011-09-06 Robert Dewar <dewar@adacore.com>
228
229 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
230
2312011-09-06 Steve Baird <baird@adacore.com>
232
233 * exp_ch4.adb (Expand_Allocator_Expression): Look through
234 derived subprograms in checking for presence of an
235 Extra_Accessibility_Of_Result formal parameter.
236 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
237 checking for presence of an Extra_Accessibility_Of_Result formal
238 parameter.
239 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
240 case where the Parameter_Associatiations attribute is already set,
241 but set to an empty list.
242 (Needs_Result_Accessibility_Level):
243 Unconditionally return False. This is a temporary
244 change, disabling the Extra_Accessibility_Of_Result
245 mechanism.
246 (Expand_Simple_Function_Return): Check for
247 Extra_Accessibility_Of_Result parameter's presence instead of
248 testing Ada_Version when generating a runtime accessibility
249 check which makes use of the parameter.
250
eaed0c37
AC
2512011-09-06 Ed Schonberg <schonberg@adacore.com>
252
253 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
254 expression in a given case alternative must be attached to the
255 statement list of the ccrresponding case statement alternative
256 They cannot be propagated ahead of the case statement, because
257 the validity of the expression that generated the action may
258 hold only for that alternative.
259
2602011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
261
262 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
263 (Alignment_Of): Remove the code for strict alignment targets.
264 (Double_Alignment_Of): Removed.
265 (Double_Size_Of): New routine.
266 (Make_Finalize_Address_Stmts): Change the
267 calculation of the dope's size. Update relevant comments.
268 (Size_Of): New routine.
269
b8a93198
AC
2702011-09-06 Steve Baird <baird@adacore.com>
271
272 * einfo.ads (Extra_Accessibility): Update associated comment to use
273 the term "present" correctly ("present" just means that it is not
274 an error to query the value of the attribute - it does not imply
275 that the value must be non-null).
276 (Extra_Constrained): Ditto.
277 (Is_Visible_Formal): Ditto.
278 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
279 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
280 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
281 * exp_ch6.adb (Expand_Call): The callee may require an
282 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
283 < Ada_2012. This can occur if the callee is exported from a Gnat
284 runtimes unit. Also improve a comment.
285
2862011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
287
288 * exp_ch7.adb: Add with and use clauses for Get_Targ.
289 (Alignment_Of): Rename formal parameter Some_Typ
290 to Typ, update related comment. Use the allocator alignment on
291 strict alignment targets such as SPARC.
292 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
293 related comment.
294
2952011-09-06 Gary Dismukes <dismukes@adacore.com>
296
297 * sem_ch9.adb (Check_Interfaces): Test
298 Is_Limited_Type rather than Is_Limited_Record when checking that
299 the partial view of a synchronized full view must be limited.
300
3012011-09-06 Emmanuel Briot <briot@adacore.com>
302
303 * g-comlin.adb (Free): Fix memory leak.
304
ebf494ec
RD
3052011-09-06 Robert Dewar <dewar@adacore.com>
306
307 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
308
63585f75
SB
3092011-09-06 Steve Baird <baird@adacore.com>
310
311 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
312 (Ada2012) cases described in AI05-0234 where the accessibility
313 level of a function result is "determined by the point of
314 call", an implicit parameter representing that accessibility
315 level is passed in. Extra_Accessibilty_Of_Result yields this
316 additional formal parameter. Extra_Accessibility_Of_Result
317 is analogous to the existing Extra_Accessibility
318 function used in the implementation of access parameters.
319 (Set_Extra_Accessibility_Of_Result): New procedure; sets
320 Extra_Accessibility_Of_Result attribute.
321 * einfo.adb (Extra_Accessibility_Of_Result): New function.
322 (Set_Extra_Accessibility_Of_Result): New procedure.
323 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
324 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
325 an accessibility level literal to Natural; introduce a nested
326 function, Make_Level_Literal, to do this.
327 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
328 determines whether a given function (or access-to-function
329 type) needs to have an implicitly-declared accessibility-level
330 parameter added to its profile.
331 (Add_Extra_Actual_To_Call): Export an existing procedure which was
332 previously declared in the body of Exp_Ch6.
333 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
334 it to exp_ch6.ads.
335 (Has_Unconstrained_Access_Discriminants): New Function; a
336 predicate on subtype entities which returns True if the given
337 subtype is unconstrained and has one or more access discriminants.
338 (Expand_Call): When expanding a call to a function which takes an
339 Extra_Accessibility_Of_Result parameter, pass in the appropriate
340 actual parameter value. In the case of a function call which is
341 used to initialize an allocator, this may not be possible because
342 the Etype of the allocator may not have been set yet. In this
343 case, we defer passing in the parameter and handle it later in
344 Expand_Allocator_Expression.
345 (Expand_Simple_Function_Return): When returning from a function which
346 returns an unconstrained subtype having at least one access
347 discriminant, generate the accessibility check needed to ensure that
348 the function result will not outlive any objects designated by its
349 discriminants.
350 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
351 description.
352 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
353 is used to initialize an allocator, we may need to pass in "the
354 accessibility level determined by the point of call" (AI05-0234)
355 to the function. Expand_Call, where such actual parameters are
356 usually generated, is too early in this case because the Etype of
357 the allocator (which is used in determining the level to be passed
358 in) may not have been set yet when Expand_Call executes. Instead,
359 we generate code to pass in the appropriate actual parameter
360 in Expand_Allocator_Expression.
361 * sem_ch6.adb (Create_Extra_Formals): Create
362 the new Extra_Accessibility_Of_Result formal if
363 Needs_Result_Accessibility_Level returns True. This includes the
364 introduction of a nested procedure, Check_Against_Result_Level.
365
1a982c6e
AC
3662011-09-06 Arnaud Charlet <charlet@adacore.com>
367
368 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
369 declaration.
370
e42bcfa3
AC
3712011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
372
373 * s-finmas.adb (Set_Finalize_Address): Explain the reason
374 for the synchronization. Move the test for null from
375 s-stposu.Allocate_Any_Controlled to this routine since the check
376 needs to be protected too.
377 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
378 synchronization code.
379 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
380 explaining the context in which this routine is used.
381 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
382 to s-finmas.Set_Finalize_Address.
383
3842011-09-05 Ed Schonberg <schonberg@adacore.com>
385
386 * einfo.ads: Document that itypes have no parent field.
387
3882011-09-05 Robert Dewar <dewar@adacore.com>
389
390 * rtsfind.adb (Check_CRT): Check for overloaded entity
391 * rtsfind.ads: Document that entities to be found by rtsfind
392 cannot be overloaded
393 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
394 (Lock_Entries_With_Status): New name for Lock_Entries with two
395 arguments (changed to meet rtsfind no overloading rule).
396
544e7c17
AC
3972011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
398
399 * s-finmas.adb (Set_Finalize_Address (Address,
400 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
401 (Set_Finalize_Address (in out Finalization_Master,
402 Finalize_Address_Ptr): Add synchronization code.
403 * s-finmas.ads (Set_Finalize_Address (Address,
404 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
405 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
406 Set_Finalize_Address for the heterogeneous case.
407
4082011-09-05 Ed Schonberg <schonberg@adacore.com>
409
410 * sem_ch3.adb: Undo previous change, not suitable after all.
411
4122011-09-05 Robert Dewar <dewar@adacore.com>
413
414 * einfo.ads: Minor comment clarification.
415
0613fb33
AC
4162011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
417
418 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
419 no longer needs to search through the entities of the return
420 statement scope to find the _chain.
421 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
422 (Analyze_Block_Statement): Add local variable
423 Is_BIP_Return_Statement. Add machinery to install all entities
424 produced by the expansion of the return object declaration.
425 (Install_Return_Entities): New routine.
426 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
427
4282011-09-05 Ed Schonberg <schonberg@adacore.com>
429
430 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
431 of subunit is incomplete.
432 (Analyze_Proper_Body): If parent spec is not available, do not
433 attempt analysis.
434
5dcab3ca
AC
4352011-09-05 Ed Schonberg <schonberg@adacore.com>
436
437 * sem_disp.adb (Find_Controlling_Arg): Add checks for
438 interface type conversions, that are expanded into dereferences.
439
4402011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
441
442 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
443 Examine the parameter and return profile of a subprogram and swap
444 any incomplete types coming from a limited context with their
445 corresponding non-limited views.
446 (Exchange_Limited_Views): New routine.
447
4482011-09-05 Ed Schonberg <schonberg@adacore.com>
449
450 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
451 of internal entity to the subtype declaration, so that when
452 entities are subsequently exchanged in a package body, the tree
453 remains properly formatted for ASIS.
454
8da1a312
AC
4552011-09-05 Johannes Kanig <kanig@adacore.com>
456
457 * g-comlin.adb (Set_Usage): Additional optional argument to set help
458 message.
459 (Display_Help): display the user given help message, if available.
460
4612011-09-05 Ed Schonberg <schonberg@adacore.com>
462
463 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
464 is legal if the original node is an identifier that is a
465 parameterless function call.
466
69b73847
PO
4672011-09-05 Pascal Obry <obry@adacore.com>
468
469 * prj-nmsc.adb: Minor reformatting.
470 Add support for standalone aggregate library.
471 (Check_Stand_Alone_Library): Handle standalone aggregate library.
472 * projects.texi: Fix documentation for aggregate library projects.
473
81bf2382
AC
4742011-09-05 Robert Dewar <dewar@adacore.com>
475
476 * sem_ch6.adb: Minor reformatting.
477
4782011-09-05 Matthew Gingell <gingell@adacore.com>
479
480 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
481 stack guard page on PPC Linux. This patch ensures the 64K guard page at
482 the bottom of the stack is not overwritten.
483
13a0b1e8
AC
4842011-09-05 Thomas Quinot <quinot@adacore.com>
485
486 * exp_intr.adb, s-tasini.adb: Minor reformatting.
487
4882011-09-05 Ed Schonberg <schonberg@adacore.com>
489
490 * sem_ch3.adb (Access_Definition): If an access type declaration
491 appears in a child unit, the scope of whatever anonymous type
492 may be generated is the child unit itself.
493
4942011-09-05 Ed Schonberg <schonberg@adacore.com>
495
496 * sem_ch6.adb (Analyze_Expression_Function): Do not set
497 Comes_From_Source on rewritten body.
498 (Analyze_Subprogram_Body_Helper): Check that the original node for
499 the body comes from source, when determining whether expansion
500 of a protected operation is needed.
501
20428725
AC
5022011-09-05 Ed Schonberg <schonberg@adacore.com>
503
504 * exp_aggr.adb (Replace_Type): If the target of the assignment is
505 a selected component and the right-hand side is a self-referential
506 access, the proper prefix of the rewritten attribute is a copy
507 of the left-hand side, not of its prefix.
508
5092011-09-05 Robert Dewar <dewar@adacore.com>
510
511 * sem_ch5.adb: Minor reformatting.
512 * sem_ch3.adb: Minor code clean up.
513
5142011-09-05 Jose Ruiz <ruiz@adacore.com>
515
516 * exp_ch9.adb (Make_Initialize_Protection): The fact that
517 restriction No_Dynamic_Attachment is in effect or not should
518 not influence the default priority associated to a protected
519 object. With this change, when the restriction is in effect (as
520 is the case for the Ravenscar profile) the default priority of
521 a protected object with an interrupt handler is in the range of
522 interrupt priorities (Default_Interrupt_Priority) as required
523 by D.3(10).
524
5252011-09-05 Arnaud Charlet <charlet@adacore.com>
526
527 * a-iteint.ads: Fix header.
528
5292011-09-05 Vincent Celier <celier@adacore.com>
530
531 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
532 with a directory separator to avoid output such as:
533 "/path/to/objauto.cgpr" has been deleted.
534
4a1bfefb
AC
5352011-09-05 Robert Dewar <dewar@adacore.com>
536
537 * sem_ch3.adb: Minor reformatting.
538
5392011-09-05 Ed Schonberg <schonberg@adacore.com>
540
541 * sem_ch5.adb: Better error message.
542
5432011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
544
545 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
546 (Expand_Array_Aggregate): Detect a special case of an aggregate
547 which contains tasks in the context of an unexpanded return
548 statement of a build-in-place function.
549 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
550 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
551 which contains tasks and expand it now that the original simple
552 return statement has been rewritten.
553 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
554 reformatting. Do not create a chain for an extended return
555 statement if one is already available.
556 (Has_Activation_Chain): New routine.
557
9ec080cb
AC
5582011-09-05 Marc Sango <sango@adacore.com>
559
560 * sem_ch3.adb (Analyze_Object_Declaration): Remove
561 the wrong test and add the correct test to detect the violation
562 of illegal use of unconstrained string type in SPARK mode.
563
5642011-09-05 Ed Schonberg <schonberg@adacore.com>
565
566 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
567 message on an iterator over an array.
568
5692011-09-05 Robert Dewar <dewar@adacore.com>
570
571 * lib-xref-alfa.adb: Minor reformatting.
572
aeae67ed
RD
5732011-09-05 Robert Dewar <dewar@adacore.com>
574
575 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
576 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
577
d72e7628
AC
5782011-09-05 Gary Dismukes <dismukes@adacore.com>
579
580 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
581
5822011-09-05 Johannes Kanig <kanig@adacore.com>
583
584 * lib-xref-alfa.adb: Update comments.
585
5862011-09-05 Thomas Quinot <quinot@adacore.com>
587
588 * sem_res.adb: Minor reformatting
589
0d566e01
ES
5902011-09-05 Ed Schonberg <schonberg@adacore.com>
591
592 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
593 present, create them now. Needed in case the return type was
594 a limited view in the function declaration.
595 (Make_Build_In_Place_Call_In_Allocator): If return type contains
596 tasks, build the activation chain for it. Pass a reference to
597 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
598 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
599 with build_in_place calls.
600 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
601 incomplete, inatialize its Corresponding_Record_Type component.
602 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
603 of limited views.
604
ec09f261
AC
6052011-09-05 Johannes Kanig <kanig@adacore.com>
606
607 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
608 information.
609
6102011-09-05 Ed Schonberg <schonberg@adacore.com>
611
612 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
613 appears within a package specification and the token after "IS"
614 is not a parenthesis, assume that this is an unparenthesized
615 expression function, even if the token appears in a line by
616 itself.
617 * par.adb: Clarify use of Labl field of scope stack in error
618 recovery.
619
7109f4f5
AC
6202011-09-05 Bob Duff <duff@adacore.com>
621
622 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
623 conversions instead of normal type conversions in all cases where a
624 type conversion would be illegal. In particular, use unchecked
625 conversions when the operand types are private.
626
6272011-09-05 Johannes Kanig <kanig@adacore.com>
628
629 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
630 objects of task type or protected type.
631
66dc8075
AC
6322011-09-05 Ed Schonberg <schonberg@adacore.com>
633
634 * sem_ch6.adb (Analyze_Expression_Function): If the expression
635 function comes from source, indicate that so does its rewriting,
636 so it is compatible with any subsequent expansion of the
637 subprogram body (e.g. when it is a protected operation).
638 * sem_ch4.adb: minor reformatting
639
6402011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
641
642 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
643 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
644 may lead to wrong ancestor package in the case of instantiated subunit
645 bodies. If a subunit is instantiated, follow the chain of instantiations
646 rather than the stub structure.
647
bd38b431
AC
6482011-09-02 Robert Dewar <dewar@adacore.com>
649
650 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
651 * gcc-interface/Make-lang.in: Update dependencies.
652
6532011-09-02 Marc Sango <sango@adacore.com>
654
655 * sem_ch3.adb (Analyze_Object_Declaration): Change
656 comment and add additional check to differentiate constant of
657 type string from others unconstrained type.
658
99d520ad
ES
6592011-09-02 Ed Schonberg <schonberg@adacore.com>
660
661 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
662 present in incomplete type declarations to refine the error
663 message the full declaration is in the same unit.
664 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
665 an incomplete type, set the Premature_Use for additional message.
666 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
667 and Premature_Use is set, place additional information at the
668 point of premature use.
669
5b5588dd
AC
6702011-09-02 Bob Duff <duff@adacore.com>
671
672 * sem_ch6.adb: (Check_Post_State): Suppress warning
673 "postcondition refers only to pre-state" when the expression has not
674 yet been analyzed, because it causes false alarms. This can happen when
675 the postcondition contains a quantified expression, because those are
676 analyzed later. This is a temporary/partial fix.
677 (Process_Post_Conditions): Minor: change wording of warning.
678
6792011-09-02 Marc Sango <sango@adacore.com>
680
681 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
682 illegal use of unconstrained string type in SPARK mode.
683 * sem_res.adb (Analyze_Operator_Symbol): Set the
684 right place where the string operand of concatenation should be
685 violate in SPARK mode.
686
bd603506
RD
6872011-09-02 Robert Dewar <dewar@adacore.com>
688
689 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
690 exp_ch3.adb: Minor reformatting.
691
24a120ac
AC
6922011-09-02 Vincent Celier <celier@adacore.com>
693
694 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
695 as the compiler driver so Is_Compilable returns True for sources.
696 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
697 for the body.
698
6992011-09-02 Ed Schonberg <schonberg@adacore.com>
700
701 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
702 condition, a reference to a controlling formal must be interpreted
703 as having the class-wide type (or an access to such) so that the
704 inherited condition can be properly applied to any overriding
705 operation (see ARM12 6.6.1 (7)).
706
7072011-09-02 Tristan Gingold <gingold@adacore.com>
708
709 * init.c (__gnat_is_vms_v7): Fix case and add prototype
710 for LIB$GETSYI.
711
7122011-09-02 Javier Miranda <miranda@adacore.com>
713
714 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
715 initializing expression of a class-wide interface object declaration
716 if its type is limited.
717
7182011-09-02 Johannes Kanig <kanig@adacore.com>
719
720 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
721 literals, take into account the type name; the type is *not*
722 the scope for an enumeration literal.
723
7242011-09-02 Ed Schonberg <schonberg@adacore.com>
725
726 * sem_ch6.adb (Check_Overriding_Indicator): add special check
727 to reject an overriding indicator on a user-defined Adjust
728 subprogram for a limited controlled type.
729
7302011-09-02 Ed Schonberg <schonberg@adacore.com>
731
732 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
733 for an actual that is a function call returning an unconstrained
734 limited controlled type.
735
7362011-09-02 Tristan Gingold <gingold@adacore.com>
737
738 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
739
7402011-09-02 Johannes Kanig <kanig@adacore.com>
741
742 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
743 from "HEAP" to __HEAP Change comment that refers to that variable
744 * put_alfa.adb: Change comment that refers to that variable
745
c5f5123f
AC
7462011-09-02 Robert Dewar <dewar@adacore.com>
747
748 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
749
7502011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
751
752 * exp_util.adb (Extract_Renamed_Object): Renamed to
753 Find_Renamed_Object. This routine has been reimplemented and now uses
754 tree traversal to locate a renamed object.
755 (Is_Aliased): Replace call to Extract_Renamed_Object with
756 Find_Renamed_Object.
757
7582011-09-02 Tristan Gingold <gingold@adacore.com>
759
760 * init.c: (__gnat_is_vms_v7): New function.
761
7622011-09-02 Olivier Hainque <hainque@adacore.com>
763
764 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
765 that have a misaligned backchain, necessarily bogus.
766
2bfa5484
HK
7672011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
768
769 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
770 TSS routine Finalize_Address when compiling in Alfa mode.
771 (Expand_Freeze_Record_Type): Do not create TSS routine
772 Finalize_Address when compiling in Alfa mode.
773 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
774 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
775 not built.
776 (Expand_N_Allocator): Do not produce a call to
777 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
778 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
779 produce a call to primitive Set_Finalize_Address in Alfa mode because
780 Finalize_Address is not built.
781 * exp_ch7.adb (Build_Finalization_Master): Do not create
782 finalization masters in Afa mode since they are not needed.
783 (Build_Finalizer): Do not create scope and library-level
784 finalizers in Alfa mode since they are not needed.
785 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
786 "new" and "free" when applied to controlled objects in Alfa mode since
787 this is not needed.
788
7a0ddd20
AC
7892011-09-02 Vincent Celier <celier@adacore.com>
790
791 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
792 only library names with the syntax of Ada identifiers, to avoid errors
793 when compiling the binder generated files.
794 * projects.texi: Document restriction on SAL library names
795
7962011-09-02 Thomas Quinot <quinot@adacore.com>
797
798 * a-chtgbo.adb: Minor comment fix.
799
439b6dfa
AC
8002011-09-02 Robert Dewar <dewar@adacore.com>
801
802 * lib-xref.adb: Minor reformatting
803
8042011-09-02 Vincent Celier <celier@adacore.com>
805
806 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
807 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
808 --version and --help in usage.
809 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
810
f2404867
AC
8112011-09-02 Bob Duff <duff@adacore.com>
812
813 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
814 compilers don't understand it.
815
8162011-09-02 Gary Dismukes <dismukes@adacore.com>
817
818 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
819 underlying subtype rather than its base type on the call to
820 Build_Record_Or_Elementary_Input_Function, so that any
821 constraints on a discriminated subtype will be available for
822 doing the check required by AI05-0192.
823 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
824 If the prefix subtype of the 'Input attribute is a constrained
825 discriminated subtype, then check each constrained discriminant value
826 against the corresponding value read from the stream.
827
029b67ba
YM
8282011-09-02 Yannick Moy <moy@adacore.com>
829
830 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
831 warnings on suspicious contracts, and enable them with -gnatwa.
832
dc36a7e3
RD
8332011-09-02 Robert Dewar <dewar@adacore.com>
834
835 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
836 reformatting.
837
d5aa443c
AC
8382011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
839
840 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
841 which ensure that restriction No_Dynamic_Attachment has not been
842 violated.
843 (Make_Initialize_Protection): Protected types with attach or
844 interrupt handlers must not violate restriction No_Dynamic_Attachment.
845 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
846 which ensures that restriction No_Dynamic_Attachment has not been
847 violated.
848 * sem_attr.adb: (Eval_Attribute): Transform
849 VAX_Float_Type'First and 'Last into references to
850 the temporaries which store the corresponding bounds. The
851 transformation is needed since the back end cannot evaluate
852 'First and 'Last on VAX.
853 (Is_VAX_Float): New routine.
854
8552011-09-02 Ed Schonberg <schonberg@adacore.com>
856
857 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
858 generic unit is not intrinsic and has an explicit convention,
859 the instance inherits it.
860
67c86178
AC
8612011-09-02 Robert Dewar <dewar@adacore.com>
862
863 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
864 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
865
8662011-09-02 Thomas Quinot <quinot@adacore.com>
867
868 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
869 Guard against a prefix that is an N_Has_Entity but has no
870 associated entity.
871
8722011-09-02 Yannick Moy <moy@adacore.com>
873
874 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
875 references.
876
8772011-09-02 Yannick Moy <moy@adacore.com>
878
879 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
880 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
881 contracts.
882 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
883 procedure looking for suspicious postconditions.
884 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
885 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
886 options -gnatw.t and -gnatw.T.
887
735ca1b9
PO
8882011-09-02 Pascal Obry <obry@adacore.com>
889
890 * prj.adb: Minor code refactoring. Move check for null project in
891 Project_Changed.
892 * projects.texi: Fix minor typos.
893
86828d40
AC
8942011-09-02 Ed Schonberg <schonberg@adacore.com>
895
896 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
897 of iteration is an expression, its value must be captured in a
898 renaming declaration, so that modification of the elements is
899 propagated to the original container.
900
9012011-09-02 Pascal Obry <obry@adacore.com>
902
903 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
904 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
905 prj-tree.adb: Minor reformatting and style fixes.
906
83de674b
AC
9072011-09-02 Robert Dewar <dewar@adacore.com>
908
909 * s-rident.ads: Add new restriction No_Implicit_Aliasing
910 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
911 No_Implicit_Aliasing
912 (Analyze_Attribute, case Address): ditto
913 (Analyze_Attribute, case Unrestricted_Access): ditto
914 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
915 No_Implicit_Aliasing restriction.
916 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
917
9182011-09-02 Ed Schonberg <schonberg@adacore.com>
919
920 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
921 is an unchecked conversion, apply test to its expression.
922
9232011-09-02 Javier Miranda <miranda@adacore.com>
924
925 * sem_ch3.adb (Check_Abstract_Overriding): When
926 traversing the chain of aliased subprograms avoid reporting a
927 redundant error on the current entity.
928
9292011-09-02 Sergey Rybin <rybin@adacore.com>
930
931 * gnat_ugn.texi: Minor clean up.
932
9332011-09-02 Bob Duff <duff@adacore.com>
934
935 * s-htable.adb (Set_If_Not_Present): Use renaming
936 instead of ":=", because the type Key is limited in the generic (even
937 if not in the instances).
938
2c17ca0a
AC
9392011-09-02 Robert Dewar <dewar@adacore.com>
940
941 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
942 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
943 reformatting.
944
9452011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
946
947 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
948 inherited component with the enclosing derived type. Code reformatting.
949
9502011-09-02 Gary Dismukes <dismukes@adacore.com>
951
952 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
953 return done when overflow checks are enabled, since comparisons against
954 Lor and Hir should not be done when OK1 is False.
955
9562011-09-02 Gary Dismukes <dismukes@adacore.com>
957
958 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
959 Add new formal Master_Exp. When present, add that expression to the
960 call as an extra actual.
961 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
962 Fmaster_Actual and in the case of a BIP call initializing a return
963 object of an enclosing BIP function set it to a
964 new reference to the implicit finalization master
965 formal of the enclosing function. Fmaster_Actual is
966 then passed to the new formal Master_Exp on the call to
967 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
968 initializations of Enclosing_Func to its declaration.
969
9702011-09-02 Thomas Quinot <quinot@adacore.com>
971
972 * csets.ads: Minor reformatting
973
9742011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
975
976 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
977 the full view of a private type coming from an instantiation.
978 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
979 loop to iterate over the declarations rather than use the
980 First_Entity / Next_Entity scheme.
981
ed32b82e
ES
9822011-09-02 Ed Schonberg <schonberg@adacore.com>
983
984 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
985 X'range (N) into X'First (N) .. X'Last (N), do not share the
986 dimension indicator N, if present. Even though it is a static
987 constant, its source location may be modified when printing
988 expanded code under -gnatDL, and node sharing will lead to chaos
989 in Sprint on large files, by generating a sloc value that does
990 not correspond to any source file.
991
f7bb41af
AC
9922011-09-02 Bob Duff <duff@adacore.com>
993
994 * einfo.adb: (Has_Xref_Entry): Do not call
995 Implementation_Base_Type. Lib.Xref has been
996 rewritten to avoid the need for it, and it was costly.
997 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
998 functions in support of efficient xref.
999 * lib-xref-alfa.adb: Misc changes related to Key component of
1000 type Xref_Entry.
1001 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
1002 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
1003 no longer does. This is the one place where it is needed.
1004
10052011-09-02 Johannes Kanig <kanig@adacore.com>
1006
1007 * g-comlin.adb (Getopt): New optional argument Concatenate to have
1008 similar interface as the other Getopt function.
1009
10102011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1011
1012 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
1013 a call to Set_Finalize_Address if there is no allocator available.
1014 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
1015 a case of allocator expansion where the allocator is not expanded but
1016 needs a custom allocate routine. Code reformatting.
1017 (Is_Finalizable_Transient): Remove local variables Has_Rens and
1018 Ren_Obj. Code reformatting.
1019 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
1020 through the use of 'reference.
1021 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
1022 as part of build-in-place expansion. They are intentionally marked as
1023 coming from source, but their parents are not.
1024
bd0bc43e
AC
10252011-09-02 Ed Schonberg <schonberg@adacore.com>
1026
1027 * sem_ch10.adb (Analyze_With_Clause): If the library unit
1028 is the generated subprogram declaration for a child unit body
1029 that acts as spec, use the original body in the with_clause,
1030 to prevent binding errors.
1031
10322011-09-02 Vincent Celier <celier@adacore.com>
1033
1034 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
1035 qualifier /MULTI_UNIT_INDEX=
1036
10372011-09-02 Johannes Kanig <kanig@adacore.com>
1038
1039 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
1040 instead of calling the callback function
1041
9fdb5d21
RD
10422011-09-02 Robert Dewar <dewar@adacore.com>
1043
1044 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
1045 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
1046
c6d5d1ac
AC
10472011-09-02 Vincent Celier <celier@adacore.com>
1048
1049 * prj-nmsc.adb: (Find_Sources): When the list of sources is
1050 explicitly declared in an extending project, do not warn if a source
1051 for an inherited naming exception is not found.
1052
10532011-09-02 Gary Dismukes <dismukes@adacore.com>
1054
1055 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
1056 expansion is inactive.
1057
10582011-09-02 Ed Schonberg <schonberg@adacore.com>
1059
1060 * sem_util.adb (Note_Possible_Modification): If the entity
1061 being modified is the renaming generated for an Ada2012 iterator
1062 element, the enclosing container or array is modified as well.
1063
2ba1a7c7
AC
10642011-09-02 Jose Ruiz <ruiz@adacore.com>
1065
1066 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
1067 Initialize): Define and initialize the
1068 mutex attributes and condition variable attributes locally.
1069
10702011-09-02 Vincent Celier <celier@adacore.com>
1071
1072 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
1073 exception replaced in an extending project.
1074 (Check_Object): No error when the other source is locally removed.
1075
10762011-09-02 Yannick Moy <moy@adacore.com>
1077
1078 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
1079 unresolved calls.
1080
d51813db
AC
10812011-08-31 Arnaud Charlet <charlet@adacore.com>
1082
1083 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
1084 run-time files.
1085 * gcc-interface/Make-lang.in: Update dependencies.
1086
9f55bc62
AC
10872011-09-01 Robert Dewar <dewar@adacore.com>
1088
1089 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
1090
10912011-09-01 Jose Ruiz <ruiz@adacore.com>
1092
1093 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
1094 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
1095 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
1096 specific for systems where their glibc version does not define the
1097 routines to handle dynamically allocated CPU sets.
1098
10992011-09-01 Vincent Celier <celier@adacore.com>
1100
1101 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
1102 prj-env.adb: Implement inheritance of naming exceptions in extending
1103 projects.
1104
d7386a7a
AC
11052011-09-01 Romain Berrendonner <berrendo@adacore.com>
1106
1107 * gnatls.adb: Display simple message instead of content of
1108 gnatlic.adl.
1109
11102011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1111
1112 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
1113 access discriminant and anonymous access component scopes.
1114 (Inherit_Component): Reuse the itype of an access discriminant
1115 or anonymous access component by copying it in order to set the proper
1116 scope. This is done only when the parent and the derived type
1117 are in different scopes.
1118 (Set_Anonymous_Etype): New routine.
1119
11202011-09-01 Robert Dewar <dewar@adacore.com>
1121
1122 * a-convec.adb: Minor reformatting throughout.
1123
9d1e0e72
JR
11242011-09-01 Jose Ruiz <ruiz@adacore.com>
1125
1126 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
1127 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
1128 CPU_ALLOC_SIZE and CPU_FREE linux macros.
1129 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
1130 CPU_SET_S respectively because we are now using dynamically allocated
1131 CPU sets which are more portable across different glibc versions.
1132 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
1133 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
1134 masks dynamically according to the number of processors in the target
1135 platform.
1136 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
1137 respectively, so we need to pass the size of the masks as
1138 parameters.
1139 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
1140 created cpu_set_t masks
1141 with the number of processors available in the target platform,
1142 instead of static bit arrays. It enhances portability because
1143 it uses the information from the target platform.
1144 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
1145 are using a restricted run-time library, use the flag
1146 Configurable_Run_Time_Mode instead of Restricted_Profile.
1147
a95be2d4
AC
11482011-09-01 Vincent Celier <celier@adacore.com>
1149
1150 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
1151 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
1152
11532011-09-01 Nicolas Roche <roche@adacore.com>
1154
1155 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
1156 on VxWorks in kernel mode.
1157
6b81741c
AC
11582011-09-01 Jose Ruiz <ruiz@adacore.com>
1159
1160 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
1161 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
1162 directly the bit array.
1163 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
1164 the linux macros with the same name.
1165 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
1166 wrappers around the CPU_ZERO and CPU_SET linux macros.
1167
11682011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1169
1170 * exp_ch7.adb (Find_Insertion_List): Removed.
1171 (Process_Transient_Objects): Insert the declarations of the hook
1172 access type and the hook object before the associated transient object.
1173
11742011-09-01 Jose Ruiz <ruiz@adacore.com>
1175
1176 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
1177 package System.Aux_Dec when using restricted run-time libraries which
1178 do not have this package.
1179
11802011-09-01 Tristan Gingold <gingold@adacore.com>
1181
1182 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
1183
11842011-09-01 Bob Duff <duff@adacore.com>
1185
1186 * sem_attr.adb (Analyze_Access_Attribute): Do not call
1187 Kill_Current_Values for P'Unrestricted_Access, where P is library level
1188
11892011-09-01 Thomas Quinot <quinot@adacore.com>
1190
1191 * exp_ch5.adb: Minor reformatting
1192 * gnat_ugn.texi: Fix minor typos.
1193 * gcc-interface/Make-lang.in: Update dependencies.
1194
8256c1bf
AC
11952011-09-01 Robert Dewar <dewar@adacore.com>
1196
1197 * inline.adb, sem_aggr.adb: Minor reformatting.
1198
11992011-09-01 Ed Schonberg <schonberg@adacore.com>
1200
1201 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
1202
d1c5f424
AC
12032011-09-01 Robert Dewar <dewar@adacore.com>
1204
1205 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
1206
12072011-09-01 Bob Duff <duff@adacore.com>
1208
1209 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
1210 body" the same as "in inlined body", because visibility shouldn't
1211 apply there.
1212
12132011-09-01 Eric Botcazou <ebotcazou@adacore.com>
1214
1215 * inline.adb (Add_Inlined_Body): Refine previous change.
1216
1bb6e262
AC
12172011-09-01 Gary Dismukes <dismukes@adacore.com>
1218
1219 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
1220 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1221 Test for case where call
1222 initializes an object of a return statement before testing for
1223 a constrained call, to ensure that all such cases get handled
1224 by simply passing on the caller's parameters. Also, in that
1225 case call Needs_BIP_Alloc_Form to determine whether to pass on
1226 the BIP_Alloc_Form parameter of the enclosing function rather
1227 than testing Is_Constrained. Add similar tests for the return
1228 of a BIP call to later processing to ensure consistent handling.
1229 (Needs_BIP_Alloc_Form): New utility function.
1230 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
1231 a BIP_Alloc_Form formal with call to new utility function
1232 Needs_BIP_Alloc_Form.
1233
12342011-09-01 Pascal Obry <obry@adacore.com>
1235
1236 * prj-part.adb: Minor reformatting.
1237
12382011-09-01 Vincent Celier <celier@adacore.com>
1239
1240 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
1241 half character in the unit name.
1242
db15225a
AC
12432011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1244
1245 * exp_ch4.adb: Minor code and comment reformatting.
1246
12472011-09-01 Thomas Quinot <quinot@adacore.com>
1248
1249 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
1250 for Is_Limited_Type and Is_Tagged_Type in condition checking
1251 for by-reference type.
1252 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
1253 subprograms may have a completion because of a previous
1254 Inline_Always clause, but the enclosing package must be marked
1255 inlined for the subprogram body to become visible to the backend.
1256
9d641fc0
TQ
12572011-09-01 Thomas Quinot <quinot@adacore.com>
1258
1259 * sem_aux.adb, exp_ch4.adb: Minor reformatting
1260
dbe36d67
AC
12612011-09-01 Pascal Obry <obry@adacore.com>
1262
1263 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
1264
12652011-09-01 Ed Schonberg <schonberg@adacore.com>
1266
1267 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
1268 the formals of a subprogram stub that acts as a spec.
1269
12702011-09-01 Ed Schonberg <schonberg@adacore.com>
1271
1272 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
1273 type, declare a renaming for it, not an object declaration.
1274
f5037886
AC
12752011-09-01 Yannick Moy <moy@adacore.com>
1276
1277 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
1278 Ignore_Errors to ignore failures to read ALI files when True.
1279
12802011-09-01 Javier Miranda <miranda@adacore.com>
1281
1282 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
1283 constructor calls associated with non-tagged record types.
1284
12852011-09-01 Robert Dewar <dewar@adacore.com>
1286
1287 * g-socthi-vms.adb: Minor reformatting.
1288
12892011-09-01 Nicolas Roche <roche@adacore.com>
1290
1291 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
1292 in order to avoid impact of imcompatible changes.
1293 * cstreams.c: Likewise
1294 * cio.c: Likewise
1295 * aux-io.c: Likewise
1296
12972011-09-01 Yannick Moy <moy@adacore.com>
1298
1299 * lib-writ.adb (Write_With_Lines): Always output complete information
1300 on "with" line in Alfa mode, as this is required by formal verification
1301 back-end.
1302
549e4558
AC
13032011-09-01 Tristan Gingold <gingold@adacore.com>
1304
1305 * g-socthi-vms.adb: Add comments.
1306
13072011-09-01 Pascal Obry <obry@adacore.com>
1308
1309 * prj.ads: Minor reformatting.
1310
70c0422d
AC
13112011-09-01 Vincent Celier <celier@adacore.com>
1312
1313 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
1314 exceptions in the config pragmas file.
1315
13162011-09-01 Tristan Gingold <gingold@adacore.com>
1317
1318 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
1319
8c5b03a0
AC
13202011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1321
1322 * exp_ch7.adb (Find_Insertion_List): New routine.
1323 (Process_Transient_Objects): Add code to handle the abnormal
1324 finalization of a controlled transient associated with a subprogram
1325 call. Since transients are cleaned up right after the associated
1326 context, an exception raised during a subprogram call may bypass the
1327 finalization code.
1328
13292011-09-01 Robert Dewar <dewar@adacore.com>
1330
1331 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
1332 aliased.
1333
3040dbd4
RD
13342011-09-01 Robert Dewar <dewar@adacore.com>
1335
1336 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
1337
fecbd779
AC
13382011-09-01 Robert Dewar <dewar@adacore.com>
1339
1340 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
1341
13422011-09-01 Thomas Quinot <quinot@adacore.com>
1343
1344 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
1345 GNATRTL_NONTASKING_OBJS.
1346
13472011-09-01 Robert Dewar <dewar@adacore.com>
1348
1349 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
1350 possibility of this flag being set for formals in Ada 2012 mode.
1351 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
1352 2012.
1353 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
1354 mode.
1355 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
1356 Ada 2012.
1357 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
1358 Ada 2012.
1359
13602011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1361
1362 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
1363 insertion node in a tree of nested Expression_With_Actions nodes.
1364 (Process_Transient_Object): In the case where a complex if statement
1365 has been converted into nested Expression_With_Actions nodes, the
1366 "hook" object and the associated access type must be inserted before
1367 the top most Expression_With_Actions.
1368
516f608f
AC
13692011-09-01 Robert Dewar <dewar@adacore.com>
1370
1371 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
1372 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
1373
13742011-09-01 Ed Schonberg <schonberg@adacore.com>
1375
1376 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
1377
13782011-09-01 Jose Ruiz <ruiz@adacore.com>
1379
1380 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
1381 aspect.
1382 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
1383 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
1384 in a similar way as we do for the Priority or Dispatching_Domain aspect.
1385 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
1386 Dispatching_Domains_Frozen): Move this local data to package
1387 System.Tasking because with the CPU aspect we need to have access
1388 to this data when creating the task in System.Tasking.Stages.Create_Task
1389 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
1390 Move these variables from the body of
1391 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
1392 we need to have access to this data when creating the task in
1393 System.Tasking.Stages.Create_Task.
1394 * s-taskin.adb (Initialize): Signal the allocation of the environment
1395 task to a CPU, if any, so that we know whether the CPU can be
1396 transferred to a different dispatching domain.
1397 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
1398 is being allocated belongs to the dispatching domain where the task
1399 lives. Signal the allocation of the task to a CPU, if any, so that we
1400 know whether the CPU can be transferred to a different dispatching
1401 domain.
1402
2d42e881
ES
14032011-09-01 Ed Schonberg <schonberg@adacore.com>
1404
1405 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
1406 attributes Same_Storage and Overlaps_Storage.
1407
579fda56
AC
14082011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1409
1410 * exp_strm.adb: Remove with and use clause for Opt.
1411 (Build_Array_Input_Function): Remove the version-dependent generation
1412 of the return statement. The Ada 2005 tree is now the default.
1413
14142011-09-01 Yannick Moy <moy@adacore.com>
1415
1416 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
1417 it is never empty when compiling in Alfa mode.
1418
14192011-09-01 Robert Dewar <dewar@adacore.com>
1420
1421 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
1422 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
1423 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
1424 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
1425
14262011-09-01 Matthew Heaney <heaney@adacore.com>
1427
1428 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
1429 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
1430 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
1431 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
1432 unbounded queue container.
1433 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
1434 bounded queue container.
1435 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
1436 unbounded priority queue container.
1437 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
1438 bounded priority queue container.
1439
24c34107
AC
14402011-08-31 Pascal Obry <obry@adacore.com>
1441
1442 * a-direct.adb: Do not try to create an UNC path on Windows.
1443 (Create_Path): Skip leading computer name in UNC path if any.
1444
14452011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1446
1447 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
1448 version-dependent generation of the return statement. The Ada 2005 tree
1449 is now the default.
1450
14512011-08-31 Thomas Quinot <quinot@adacore.com>
1452
1453 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
1454 types Stream_Element_Offset and Storage_Offset have a different native
1455 type depending on whether the platform is 32 or 64 bits. When
1456 exchanging them, always convert to 64 bits.
1457
14582011-08-31 Yannick Moy <moy@adacore.com>
1459
1460 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
1461 --force-alfa to gnat2why.
1462
14632011-08-31 Ed Schonberg <schonberg@adacore.com>
1464
1465 * sem_ch12.adb (Save_References): If the node has aspects, save
1466 references within the corresponding expressions in a separate step,
1467 because the aspects are not directly in the tree for the declaration
1468 to which they belong.
1469
14702011-08-31 Arnaud Charlet <charlet@adacore.com>
1471
1472 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
1473 in CodePeer mode, since representation clauses are partially ignored.
1474 * gcc-interface/Make-lang.in: Update dependencies.
1475
702d2020
AC
14762011-08-31 Jose Ruiz <ruiz@adacore.com>
1477
1478 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1479 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
1480 to any dispatching domain.
1481
14822011-08-31 Thomas Quinot <quinot@adacore.com>
1483
1484 * exp_ch4.adb: Minor reformatting.
1485
14862011-08-31 Bob Duff <duff@adacore.com>
1487
1488 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
1489 on nodes for which it is not defined.
1490 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
1491 parent type.
1492
14932011-08-31 Bob Duff <duff@adacore.com>
1494
1495 * sem_ch3.adb (Process_Full_View): Disable legality check if
1496 In_Instance, to avoid spurious errors.
1497 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
1498 if In_Instance, to avoid spurious errors.
1499
15002011-08-31 Pascal Obry <obry@adacore.com>
1501
1502 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
1503 directory speparators.
1504 (Compose): Use Dir_Seps to handle both forms.
1505 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
1506 changes.
1507 (Extension): Use Dir_Seps to handle both forms.
1508
15092011-08-31 Pascal Obry <obry@adacore.com>
1510
1511 * prj-conf.adb: Minor reformatting.
1512
67645bde
AC
15132011-08-31 Jose Ruiz <ruiz@adacore.com>
1514
1515 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
1516 dispatching domain aspect.
1517 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
1518 aspect.
1519 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
1520 Dispatching_Domain aspect in a similar way as we do for the Priority
1521 aspect.
1522 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
1523 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
1524 is present.
1525 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
1526 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
1527 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
1528 Dispatching_Domain and add it to the task definition.
1529 (Sig_Flags): Add Pragma_Dispatching_Domain.
1530 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
1531 support to find the types Dispatching_Domain and
1532 Dispatching_Domain_Access.
1533 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
1534 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
1535 query the availability of a pragma Dispatching_Domain.
1536 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
1537 the expander to pass the Dispatching_Domain when creating a task.
1538 (Name_Dispatching_Domain): Add this new name for a pragma.
1539 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
1540 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
1541 task has been allocated at creation time.
1542 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
1543 Ravenscar is always null.
1544 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
1545 the task has been allocated at creation time.
1546 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
1547 a specific dispatching domain.
1548 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
1549 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
1550 and CPU are specified for the task, and the CPU value is not contained
1551 within the range of processors for the domain.
1552
15532011-08-31 Vincent Celier <celier@adacore.com>
1554
1555 * make.adb (Original_Gcc) : New constant String_Access.
1556 (Gnatmake): For VM targets, do not use VM version of the compiler if
1557 --GCC= has been specified.
1558
15592011-08-31 Thomas Quinot <quinot@adacore.com>
1560
1561 * sem_ch5.adb: Minor reformatting.
1562
15632011-08-31 Ed Schonberg <schonberg@adacore.com>
1564
1565 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
1566 not reanalyze it.
1567
15682011-08-31 Bob Duff <duff@adacore.com>
1569
1570 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
1571 the access type is private; we don't care about privacy in expansion.
1572
15732011-08-31 Ed Schonberg <schonberg@adacore.com>
1574
1575 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
1576 subcomponents tnat may be limited, because they originate in view
1577 conflicts. If the original aggregate is legal and the actuals are
1578 legal, the aggregate itself is legal.
1579
b8789727
AC
15802011-08-31 Matthew Heaney <heaney@adacore.com>
1581
1582 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
1583 status.
1584
15852011-08-31 Ed Schonberg <schonberg@adacore.com>
1586
1587 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
1588 errors in B tests.
1589
15902011-08-31 Jose Ruiz <ruiz@adacore.com>
1591
1592 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
1593 Interrupt_Priority aspects, force the analysis of the aspect expression
1594 (when building the equivalent pragma). Otherwise, its analysis is done
1595 too late, after the task or protected object has been created.
1596 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
1597 Analyze_Single_Task_Declaration): Remove the code to move the aspects
1598 to the object declaration because they are needed in the type
1599 declaration.
1600
e0c32166
AC
16012011-08-31 Robert Dewar <dewar@adacore.com>
1602
1603 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
1604 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
1605 reformatting.
1606
16072011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1608
1609 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
1610 if the corresponding type is malformed due to restriction violations.
1611
16122011-08-31 Robert Dewar <dewar@adacore.com>
1613
1614 * s-ransee.ads, s-ransee.adb: Minor reformatting.
1615
16162011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1617
1618 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
1619 would cause the generation of Set_Finalize_Address if the target is a
1620 VM and the designated type is not derived from [Limited_]Controlled.
1621
16222011-08-31 Arnaud Charlet <charlet@adacore.com>
1623
1624 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
1625 subprogram.
1626 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
1627 case of a compilation error.
1628
16292011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1630
1631 * init.c (__gnat_error_handler): Standardize the stack overflow or
1632 erroneous memory access message.
1633 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
1634 or erroneous memory access message.
1635
11bc76df
AC
16362011-08-31 Robert Dewar <dewar@adacore.com>
1637
1638 * sem_ch4.adb: Minor reformatting.
1639 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
1640
16412011-08-31 Thomas Quinot <quinot@adacore.com>
1642
1643 * scos.ads: Minor documentation clarification.
1644 * put_scos.adb: Do not generate SCO unit header line for a unit that
1645 has no SCO lines.
1646
876d4394
RD
16472011-08-31 Robert Dewar <dewar@adacore.com>
1648
1649 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
1650
36b8f95f
AC
16512011-08-31 Tristan Gingold <gingold@adacore.com>
1652
1653 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
1654 hold variables between these following subprograms.
1655 (Build_Exception_Handler, Build_Object_Declarations,
1656 Build_Raise_Statement): Use the above type as parameter.
1657 Make the above adjustments.
1658 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
1659
16602011-08-31 Pascal Obry <obry@adacore.com>
1661
1662 * projects.texi: Minor reformatting.
1663
16642011-08-31 Tristan Gingold <gingold@adacore.com>
1665
1666 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
1667 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
1668
16692011-08-31 Ed Schonberg <schonberg@adacore.com>
1670
1671 * exp_ch5.adb: Minor code cleanup.
1672 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
1673 prevent cascaded errors.
1674 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
1675 variable of an iterator specification in current scope.
1676 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
1677 postconditions on the stack, as they contain no return statements.
1678
16792011-08-31 Yannick Moy <moy@adacore.com>
1680
1681 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
1682 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
1683 call Qualify_Entity_Names.
1684 (Expand_Alfa): call Qualify_Entity_Names in more cases
1685 * lib-xref-alfa.adb: Take into account system package.
1686 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
1687 CodePeer mode in which we are interested in finding bugs even if
1688 compiler cannot compile source.
1689 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
1690 deferred constant.
1691
16922011-08-31 Gary Dismukes <dismukes@adacore.com>
1693
1694 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
1695 denoted by the subtype mark to ensure getting the concurrent type in
1696 the case where the subtype mark denotes a private subtype of a
1697 concurrent type (needed when using -gnatc).
1698 (Process_Subtype): For the processing specific to type kinds, case on
1699 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
1700 subtype denotes a private subtype whose base type is nonprivate (needed
1701 for subtypes of private fulfilled by task types when compiling with
1702 -gnatc).
1703
17042011-08-31 Gary Dismukes <dismukes@adacore.com>
1705
1706 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
1707 late primitives that override interface operations when the full
1708 expander is not active, to avoid blowups in Register_Primitive when
1709 types don't have associated secondary dispatch tables.
1710
17112011-08-31 Yannick Moy <moy@adacore.com>
1712
1713 * alfa_test.adb: Code clean up.
1714
17152011-08-31 Marc Sango <sango@adacore.com>
1716
1717 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
1718 by Comes_From_Source (Original_Node (N)) in order to treat also the
1719 nodes which have been rewritten.
1720 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
1721 explicit dereference and slice violation in spark mode on the nodes
1722 coming only from the source code.
1723
8cf23b91
AC
17242011-08-31 Robert Dewar <dewar@adacore.com>
1725
1726 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
1727 lib-xref-alfa.adb: Minor reformatting.
1728
17292011-08-31 Matthew Heaney <heaney@adacore.com>
1730
1731 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
1732
17332011-08-31 Javier Miranda <miranda@adacore.com>
1734
1735 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
1736 only for class-wide subprograms conflicting with entities of concurrent
1737 tagged types.
1738
17392011-08-31 Matthew Heaney <heaney@adacore.com>
1740
1741 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
1742 node to null value.
1743
17442011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1745
1746 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
1747 general description of the routine.
1748
17492011-08-31 Ed Schonberg <schonberg@adacore.com>
1750
1751 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
1752 doubly-linked lists.
1753
0bb3bfb8
GD
17542011-08-31 Gary Dismukes <dismukes@adacore.com>
1755
1756 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
1757 check is needed for a left-hand side that is a dereference, and the
1758 base type is private without discriminants (whereas the full type does
1759 have discriminants), an extra retrieval of the underlying type may be
1760 needed in the case where the subtype is a record subtype whose base
1761 type is private. Update comments.
1762
11fa950b
AC
17632011-08-31 Javier Miranda <miranda@adacore.com>
1764
1765 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
1766 found check if there is a class-wide subprogram covering the primitive.
1767
17682011-08-31 Yannick Moy <moy@adacore.com>
1769
1770 * sem_res.adb: Further cases where full expansion test is needed,
1771 rather than expansion test.
1772
17732011-08-31 Pascal Obry <obry@adacore.com>
1774
1775 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
1776
17772011-08-31 Ed Schonberg <schonberg@adacore.com>
1778
1779 * exp_ch5.adb: Handle iterators over derived container types.
1780
17812011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1782
1783 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
1784 (Has_Anonymous_Master): New routine.
1785 (Set_Has_Anonymous_Master): New routine.
1786 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
1787 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
1788 (Current_Anonymous_Master): New routine.
1789 (Current_Unit_First_Declaration): Removed.
1790 (Current_Unit_Scope): Removed.
1791 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
1792 their objects on a per-unit heterogeneous finalization master.
1793
17942011-08-31 Matthew Heaney <heaney@adacore.com>
1795
1796 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
1797 array.
1798
17992011-08-31 Jose Ruiz <ruiz@adacore.com>
1800
1801 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
1802 when not needed.
1803
18042011-08-31 Gary Dismukes <dismukes@adacore.com>
1805
1806 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
1807 where the actual is an unexpanded call to 'Input.
1808
d2b4b3da
AC
18092011-08-31 Yannick Moy <moy@adacore.com>
1810
1811 * sem_ch4.adb: Code clean up.
1812
18132011-08-31 Yannick Moy <moy@adacore.com>
1814
1815 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
1816
18172011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1818
1819 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
1820 and TSS primitive Finalize_Address if finalization is suppressed.
1821 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
1822 primitive Finalize_Address if finalization is suppressed.
1823
18242011-08-31 Jose Ruiz <ruiz@adacore.com>
1825
1826 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
1827 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
1828 sure that the underlying task has already been created before trying
1829 to change its affinity.
1830 (Set_CPU): Use the term processor instead of CPU, as we do in
1831 Assign_Task.
1832
18332011-08-31 Vincent Celier <celier@adacore.com>
1834
1835 * prj-attr.adb: New Compiler attribute Source_File_Switches.
1836 * prj-nmsc.adb (Process_Compiler): Process attribute
1837 Source_File_Switches.
1838 * prj.ads (Language_Config): New name list component
1839 Name_Source_File_Switches.
1840 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
1841
18422011-08-31 Ed Schonberg <schonberg@adacore.com>
1843
1844 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
1845 discriminated component of an actual, expand at once to prevent
1846 ouf-of-order references with generated subtypes.
1847
18482011-08-31 Yannick Moy <moy@adacore.com>
1849
1850 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
1851 reference to operator in Alfa xrefs.
1852
18532011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1854
1855 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
1856 where the parent instance was frozen before the current instance due to
1857 the presence of a source body. Update calls to Insert_After_Last_Decl.
1858 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
1859 Update the comment which illustrates the purpose of the routine.
1860 Package instances are now frozen by source bodies which appear after
1861 the instance. This ensures that entities coming from within the
1862 instance are available for use in the said bodies.
1863 (Install_Body): Add code to handle the case where the parent instance
1864 was frozen before the current instance due to the presence of a source
1865 body. Update calls to Insert_After_Last_Decl.
1866
56812278
AC
18672011-08-31 Jose Ruiz <ruiz@adacore.com>
1868
1869 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
1870 access types.
1871 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
1872
18732011-08-31 Yannick Moy <moy@adacore.com>
1874
1875 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
1876 full-expander test.
16c3301a
AC
1877 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
1878 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
1879 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
1880 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
1881 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
1882 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1883 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
1884 ALFA in Alfa (we dropped acronym).
56812278
AC
1885 * einfo.adb (Primitive_Operations): Correctly return list of primitive
1886 operations in a case where it returned previously No_Elist.
1887
7cda9727
RD
18882011-08-31 Robert Dewar <dewar@adacore.com>
1889
1890 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
1891 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
1892 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1893 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
1894 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
1895 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
1896 reformatting.
1897
0a190dfd
AC
18982011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1899
1900 * sem_ch12 (Check_Private_View): Revert previous change.
1901 * sem_res.adb (Conversion_Check): Do not emit the error message if the
1902 conversion is in a generic instance.
1903
19042011-08-31 Matthew Heaney <heaney@adacore.com>
1905
1906 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
1907 * a-chtgbo.adb (Free): Allow 0 as index value.
1908
19092011-08-31 Matthew Heaney <heaney@adacore.com>
1910
1911 * a-cborma.adb (Insert): Add comment to explain why no element
1912 assignment.
1913
19142011-08-31 Gary Dismukes <dismukes@adacore.com>
1915
1916 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
1917 spec discriminant is already a concurrent type, in which case just use
1918 it, otherwise fetch the Corresponding_Concurrent_Type as before.
1919
7d266442
EB
19202011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1921
1922 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
1923 system-linux-mips.ads, system-linux-mipsel.ads,
1924 system-linux-mips64el.ads, system-linux-ppc64.ads,
1925 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
1926
4f1a975c
EB
19272011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1928
1929 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
1930 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
1931 (build_unary_op): Likewise.
1932
f2991b48
EB
19332011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1934
1935 * raise-gcc.c: Do not include coretypes.h and tm.h.
1936 (setup_to_install): Remove test for compiler macro.
1937 * targext.c: Document use for the library.
1938 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
1939
10a22f43
EB
19402011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1941
1942 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
1943 the expression to the nominal type if the latter is a record type with
1944 a variant part and the type of the former is a record type without one.
1945
bfa2e39d
AC
19462011-08-30 Yannick Moy <moy@adacore.com>
1947
1948 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1949 expansion in Alfa mode.
1950 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
1951 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
1952 Alfa mode.
1953 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
1954 * sem_res.adb: Ditto.
bd34109a 1955 * gcc-interface/Make-lang.in: Update dependencies.
bfa2e39d
AC
1956
19572011-08-30 Thomas Quinot <quinot@adacore.com>
1958
1959 * g-socket.ads: Minor documentation adjustment.
1960
a0347839
AC
19612011-08-30 Robert Dewar <dewar@adacore.com>
1962
1963 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
1964
19652011-08-30 Yannick Moy <moy@adacore.com>
1966
1967 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
1968 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
1969 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
1970 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
1971 Revert change which introduced files for "light"
1972 expansion, to be replaced by a single file for Alfa expansion.
1973
3597c0e9
RD
19742011-08-30 Robert Dewar <dewar@adacore.com>
1975
1976 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
1977 Minor code reorg/reformatting.
1978
da94696d
AC
19792011-08-30 Yannick Moy <moy@adacore.com>
1980
1981 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
1982 common shorthand for (Expander_Active and not ALFA_Mode) that can be
1983 used for testing full expansion, that is active expansion not in the
1984 reduced mode for Alfa
1985 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
1986 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
1987 of the verbose (Expander_Active and not ALFA_Mode)
1988
19892011-08-30 Tristan Gingold <gingold@adacore.com>
1990
1991 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
1992 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5b8ca141
TG
1993 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
1994 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
da94696d 1995
c199ccf7
AC
19962011-08-30 Gary Dismukes <dismukes@adacore.com>
1997
1998 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
1999 access conversions to check that the conversion is a rewritten node,
2000 rather than just having Comes_From_Source set to False, which wasn't
2001 sufficient.
2002
20032011-08-30 Robert Dewar <dewar@adacore.com>
2004
2005 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
2006 g-socket.ads: Minor reformatting.
2007
20082011-08-30 Thomas Quinot <quinot@adacore.com>
2009
2010 * sem_util.adb: Minor reformatting.
2011
20122011-08-30 Tristan Gingold <gingold@adacore.com>
2013
2014 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
2015 to be compliant with the ABI.
2016
dff99e1a
AC
20172011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2018
2019 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
2020 of a designated type when the related access type is an actual in an
2021 instance. This ensures that the full view of designated type is
2022 available when inside the body of the instance.
2023
20242011-08-30 Ed Schonberg <schonberg@adacore.com>
2025
2026 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
2027 in a position to be modified, a slice is treated like an indexed
2028 component.
2029
63be2a5a
AC
20302011-08-30 Thomas Quinot <quinot@adacore.com>
2031
2032 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
2033 field tv_sec in struct timeval.
2034
20352011-08-30 Yannick Moy <moy@adacore.com>
2036
2037 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
2038 blocks of code doing full expansion, previously only guarded by
2039 Expander_Active, by anding the test that ALFA_Mode is not set
2040
20412011-08-30 Ed Schonberg <schonberg@adacore.com>
2042
2043 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
2044 add the function to the list of private dependents, for subsequent
2045 legality check on Taft amendment types.
2046 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
2047 Private_Dependents, as for other incomplete types.
2048 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
2049 Taft-amendment type is used as the return type of a function.
2050
dd54644b
JM
20512011-08-30 Javier Miranda <miranda@adacore.com>
2052
2053 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
2054 which emits an error by a call to a new routine which report the error.
2055 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
2056 entity does not cover an existing interface.
2057 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
2058 code.
2059 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
2060 protected procedures or entries whose mode is not conformant.
2061 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
2062 an error by a call to a new routine which report the error.
2063
d3ba478e
AC
20642011-08-30 Robert Dewar <dewar@adacore.com>
2065
2066 * gnat_rm.texi: Minor change.
2067 * exp_attr_light.adb: Minor reformatting.
2068
20692011-08-30 Ed Schonberg <schonberg@adacore.com>
2070
2071 * sem_ch3.adb: Patch inheritance of aspects in
2072 Complete_Private_Subtype, to avoid infinite loop.
2073
c01817d2
AC
20742011-08-30 Javier Miranda <miranda@adacore.com>
2075
2076 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
2077 been reported and a subprogram covering an interface primitive is not
2078 found then skip generating the internal entity. Done to avoid crashing
2079 the frontend.
2080 (Check_Abstract_Overriding): Change text of error of wrong formal of
2081 protected subprogram or entry. Done for consistency to emit exactly the
2082 same error reported by Check_Synchronized_Overriding. In addition, the
2083 error is restricted to protected types (bug found working on AI05-0090)
2084
20852011-08-30 Yannick Moy <moy@adacore.com>
2086
2087 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2088 expansion in Alfa mode.
2089 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
2090 * exp_light.adb, exp_light.ads: New package defining light expansion.
2091 * expander.adb (Expand): Call light expansion in Alfa mode
2092 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
2093 constructs.
2094 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
2095 constructs.
2096 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
2097 * gnat1drv.adb (Adjust_Global_Switches): Comment
2098
20992011-08-30 Yannick Moy <moy@adacore.com>
2100
2101 * lib-xref-alfa.adb: Minor refactoring.
2102
21032011-08-30 Yannick Moy <moy@adacore.com>
2104
2105 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
2106 mode.
2107 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
2108 expansion in Alfa mode.
2109 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
2110 mode.
2111
21122011-08-30 Robert Dewar <dewar@adacore.com>
2113
2114 * debug_a.adb: Update comment.
2115
996c8821
RD
21162011-08-30 Robert Dewar <dewar@adacore.com>
2117
2118 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
2119 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
2120 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
2121 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
2122
21232011-08-30 Robert Dewar <dewar@adacore.com>
2124
2125 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
2126 volatile.
2127
3647ca26
HK
21282011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2129
2130 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
2131 Build_Finalization_Master by supplying an insertion node and enclosing
2132 scope. In its old version, the call did not generate a finalization
2133 master.
2134 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
2135 recognize anonymous access-to-controlled components. Rewrite the
2136 machinery which creates finalization masters to service anonymous
2137 access-to-controlled components of a record type. In its current state,
2138 only one heterogeneous master is necessary to handle multiple anonymous
2139 components.
2140 (Freeze_Type): Comment reformatting.
2141 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
2142 RE_Unit_Table.
2143 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
2144 associates TSS primitive Finalize_Address with either the master itself
2145 or with the internal hash table depending on the mode of operation of
2146 the master.
2147
6d4e4fbc
JM
21482011-08-30 Javier Miranda <miranda@adacore.com>
2149
2150 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
2151 interface type then do not generate code to compare this component.
2152 Required since they have no components and their equality operator is
2153 abstract.
2154
d15f9422
AC
21552011-08-30 Steve Baird <baird@adacore.com>
2156
2157 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
2158 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
2159 returns the (static) accessibility level of the object. Otherwise, the
2160 same as Type_Access_Level.
2161 (Dynamic_Accessibility_Level): New function; given an expression which
2162 could occur as the rhs of an assignment to a saooaaat (i.e., an
2163 expression of an access-to-object type), return the new value for the
2164 saooaaat's associated Extra_Accessibility object.
2165 (Effective_Extra_Accessibility): New function; same as
2166 Einfo.Extra_Accessibility except that object renames are looked through.
2167 * sem_util.adb
2168 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
2169 (Dynamic_Accessibility_Level): New function; see sem_util.ads
2170 description.
2171 (Effective_Extra_Accessibility): New function; see sem_util.ads
2172 description.
2173 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
2174 (Extra_Accessibility): Update comments.
2175 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
2176 except RM_Size field (which is only for types) is unaffected.
2177 * einfo.adb
2178 (Extra_Accessibility): Expand domain to allow objects, not just formals.
2179 (Set_Extra_Accessibility): Expand domain to allow objects, not just
2180 formals.
2181 (Init_Size): Add assertion that we are not trashing the
2182 Extra_Accessibility attribute of an object.
2183 (Init_Size_Align): Add assertion that we are not trashing the
2184 Extra_Accessibility attribute of an object.
2185 (Init_Object_Size_Align): New procedure; see einfo.ads description.
2186 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
2187 differently for the type of a (non-library-level) saooaaat depending
2188 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
2189 is queried in this set of changes - everything else (in particular,
2190 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
2191 driven off of the setting of the Is_Local_Anonymous_Access attribute.
2192 The special treatment of library-level saooaaats is an optimization,
2193 not required for correctnesss. This is based on the observation that the
2194 Ada2012 rules (static and dynamic) for saooaaats turn out to be
2195 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
2196 * exp_ch3.adb
2197 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
2198 false for the type of a saooaaat, declare and initialize its
2199 accessibility level object and set the Extra_Accessibility attribute
2200 of the saooaaat to refer to this object.
2201 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
2202 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
2203 calls to Effective_Extra_Accessibility in order to support
2204 renames of saooaaats.
2205 (Expand_N_Type_Conversion): Add new local function,
2206 Has_Extra_Accessibility, and call it when determining whether an
2207 accessibility check is needed.
2208 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
2209 evaluate to True (without raising an exception).
2210 * exp_ch5.adb
2211 (Expand_N_Assignment_Statement): When assigning to an Ada2012
2212 saooaaat, update its associated Extra_Accessibility object (if
2213 it has one). This includes an accessibility check.
2214 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
2215 a saooaaat, update its Extra_Accessibility object too (if it
2216 has one).
2217 (Expand_Call): Replace a couple of calls to Type_Access_Level
2218 with calls to Dynamic_Access_Level to handle cases where
2219 passing a literal (any literal) is incorrect.
2220 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
2221 checks associated with "Saooaat := Some_Object'Access;"; this must
2222 be rejected if Some_Object is declared in a more nested scope
2223 than Saooaat.
2224 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
2225 assignment to a saooaaat even if Is_Local_Anonymous_Access
2226 returns False for its type (indicating a 2012-style saooaaat).
2227 * sem_ch8.adb
2228 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
2229 (which is only appropriate for objects, not types) with a call
2230 of Init_Object_Size_Align in order to avoid trashing the
2231 Extra_Accessibility attribute of a rename (the two attributes
2232 share storage).
2233 * sem_res.adb
2234 (Valid_Conversion) Replace six calls to Type_Access_Level with
2235 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
2236 Ada2012 non-library-level saooaaat, the former returns library level
2237 while the latter returns the (static) accessibility level of the
2238 saooaaat. A type conversion to the anonymous type of a saooaaat
2239 can only occur as part of an assignment to the saooaaat, so we
2240 know that such a conversion must be in a lhs context, so Deepest
2241 yields the result that we need. If such a conversion could occur,
2242 say, as the operand of an equality operator, then this might not
2243 be right. Also add a test so that static accessibilty checks are
2244 performed for converting to a saooaaat's type even if
2245 Is_Local_Anonymous_Access yields False for the type.
2246
22472011-08-30 Javier Miranda <miranda@adacore.com>
2248
2249 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
2250 controls generation of a warning associated with late declaration of
2251 dispatching functions. Required to avoid generating spurious
2252 warnings.
2253
6cce2156
GD
22542011-08-30 Gary Dismukes <dismukes@adacore.com>
2255
2256 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
2257 return object has an anonymous access type and the function's type is
2258 a named access type.
2259 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
2260 conversions on implicit conversions, since such conversions can occur
2261 for anonymous access cases due to expansion. Issue error for attempt
2262 to rename an anonymous expression as an object of a named access type.
2263 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
2264 to indicate whether this function should report errors on invalid
2265 conversions.
2266 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
2267 the expression is of an anonymous access type and the expected type is
2268 a named general access type, rewrite the expression as a type
2269 conversion, unless this is an expression of a membership test.
2270 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
2271 calling of Error_Msg_N on new formal Report_Errs.
2272 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
2273 calling of Error_Msg_NE on new formal Report_Errs.
2274 (Valid_Conversion): Move declaration of this function to the package
2275 spec, to allow calls from membership test processing. For Ada 2012,
2276 enforce legality restrictions on implicit conversions of anonymous
2277 access values to general access types, disallowing such conversions in
2278 cases where the expression has a dynamic accessibility level (access
2279 parameters, stand-alone anonymous access objects, or a component of a
2280 dereference of one of the first two cases).
2281 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
2282 in the context of a named general access expected type.
2283 * exp_ch4.adb Add with and use of Exp_Ch2.
2284 (Expand_N_In): Add processing for membership tests applied to
2285 expressions of an anonymous access type. First, Valid_Conversion is
2286 called to check whether the test is statically False, and then the
2287 conversion is expanded to test that the expression's accessibility
2288 level is no deeper than that of the tested type. In the case of
2289 anonymous access-to-tagged types, a tagged membership test is applied
2290 as well.
2291 (Tagged_Membership): Extend to handle access type cases, applying the
2292 test to the designated types.
2293 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
2294 accessibility level, and the actual is a 'Access applied to a current
2295 instance, pass the accessibility level of the type of the current
2296 instance rather than applying Object_Access_Level to the prefix. Add a
2297 ??? comment, since this level isn't quite right either (will eventually
2298 need to pass an implicit level parameter to init procs).
2299
747de90b
AC
23002011-08-30 Bob Duff <duff@adacore.com>
2301
2302 * s-taskin.ads: Minor comment fix.
2303
23042011-08-30 Ed Schonberg <schonberg@adacore.com>
2305
2306 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
2307 component and the selector is a dispatching operation, check if it is
2308 a prefixed call before rewriting as a parameterless function call.
2309
cdc4cc65
JJ
23102011-08-29 Jakub Jelinek <jakub@redhat.com>
2311
2312 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
2313 tsystem.h into $(RTSDIR) instead of rts.
2314
226a7fa4
AC
23152011-08-29 Robert Dewar <dewar@adacore.com>
2316
2317 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
2318 reformatting.
2319 * gcc-interface/Make-lang.in: Update dependencies.
2320
23212011-08-29 Yannick Moy <moy@adacore.com>
2322
2323 * alfa.ads (Name_Of_Heap_Variable): New constant name.
2324 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
2325 table to hold dereferences.
2326 (Add_ALFA_Xrefs): Take into account dereferences as special
2327 reads/writes to the variable "HEAP".
2328 (Enclosing_Subprogram_Or_Package): Move subprogram here.
2329 (Generate_Dereference): New procedure to store a read/write dereferencew
2330 in the table Drefs.
2331 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
2332 the special "HEAP" var.
2333 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
2334 in ALFA mode.
2335 * sem_util.adb (Note_Possible_Modification): Store write dereference
2336 in ALFA mode.
2337
dfbcb149
HK
23382011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2339
2340 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
2341 ensures that the level of the subpool access type is not deeper than
2342 that of the pool object.
2343 * sem_util.adb (Object_Access_Level): Expand to handle defining
2344 identifiers.
2345 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
2346 subpool handle name of a rewritten allocator.
2347
1df4f514
AC
23482011-08-29 Robert Dewar <dewar@adacore.com>
2349
2350 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
2351
23522011-08-29 Thomas Quinot <quinot@adacore.com>
2353
2354 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
2355 values, we generate multiple triples of parameters in the TypeCode.
2356 Bump Choice_Index for each such triple so that a subsequent default
2357 choice is associated with the correct index in the typecode.
2358
23592011-08-29 Ed Schonberg <schonberg@adacore.com>
2360
2361 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
2362 container.
2363 (First, Last): Handle properly an iterator over a null container.
2364
23652011-08-29 Bob Duff <duff@adacore.com>
2366
2367 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
2368 processing if we run across a node with no Scope. This can happen if
2369 we're with-ing an library-level instance, and that instance got errors
2370 that caused "instantiation abandoned".
2371 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
2372 an exception instead of using Assert, so it won't go into an infinite
2373 loop, even when assertions are turned off.
2374
23752011-08-29 Ed Schonberg <schonberg@adacore.com>
2376
2377 * a-coorse.adb: Proper handling of empty ordered sets.
2378
14f0f659
AC
23792011-08-29 Johannes Kanig <kanig@adacore.com>
2380
2381 * debug.adb: Add comments.
2382
8027b455
AC
23832011-08-29 Thomas Quinot <quinot@adacore.com>
2384
2385 * a-except.adb, a-except-2005.adb: Minor comment rewording and
2386 reformatting.
2387
23882011-08-29 Yannick Moy <moy@adacore.com>
2389
2390 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
2391 declaration for Itypes in Alfa mode.
2392
d85fd922
AC
23932011-08-29 Robert Dewar <dewar@adacore.com>
2394
2395 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
2396 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2397 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
2398 reformatting.
2399
24002011-08-29 Tristan Gingold <gingold@adacore.com>
2401
2402 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
2403 package spec.
2404 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
2405 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
2406 while raising PE.
2407
fd3d2680
AC
24082011-08-29 Robert Dewar <dewar@adacore.com>
2409
2410 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
2411
24122011-08-29 Javier Miranda <miranda@adacore.com>
2413
2414 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
2415 renamings of formal subprograms when the actual for a formal type is
2416 class-wide.
2417
dfbf013f
MH
24182011-08-29 Matthew Heaney <heaney@adacore.com>
2419
2420 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
2421 to Target.
2422
24232011-08-29 Matthew Heaney <heaney@adacore.com>
2424
2425 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
2426 components of record type.
2427 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
2428 to Target.
2429
a6dd3a54
ES
24302011-08-29 Ed Schonberg <schonberg@adacore.com>
2431
2432 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
2433 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
2434 container packages.
2435
c54796e0
AC
24362011-08-29 Robert Dewar <dewar@adacore.com>
2437
2438 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
2439 reformatting.
2440
24412011-08-29 Matthew Heaney <heaney@adacore.com>
2442
2443 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
2444 components of record type.
2445
24462011-08-29 Bob Duff <duff@adacore.com>
2447
2448 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
2449 by the termination handler.
2450
9fd9d2be
AC
24512011-08-29 Yannick Moy <moy@adacore.com>
2452
2453 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
2454 created in Alfa mode, instead of inserting artificial declarations of
2455 non-Itypes in the tree.
2456 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
2457 know if an Itype has a corresponding declaration, as defined in
2458 itypes.ads.
2459
24602011-08-29 Yannick Moy <moy@adacore.com>
2461
2462 * gnat1drv.adb: Minor rewrite.
2463
24642011-08-29 Bob Duff <duff@adacore.com>
2465
2466 * s-tasuti.adb (Make_Passive): Work around race condition in
2467 Make_Independent, which can cause Wait_Count to be zero. So instead of
2468 asserting that Wait_Count > 0, and then decrementing it, decrement it
2469 only if Wait_Count > 0.
2470 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
2471 should be nonnegative, so declare them Natural instead of Integer.
2472
833eaa8a
AC
24732011-08-29 Robert Dewar <dewar@adacore.com>
2474
2475 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
2476 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
2477 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
2478 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
2479 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
2480
24812011-08-29 Tristan Gingold <gingold@adacore.com>
2482
2483 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
2484
24852011-08-29 Vadim Godunko <godunko@adacore.com>
2486
2487 * s-parint.ads: Minor comment clarification.
2488
24892011-08-29 Vincent Celier <celier@adacore.com>
2490
2491 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
2492 may be used as identifiers.
2493
24942011-08-29 Ed Schonberg <schonberg@adacore.com>
2495
2496 * a-coinho.ads: Minor reformating.
2497
3a613a36
AC
24982011-08-29 Ed Schonberg <schonberg@adacore.com>
2499
2500 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
2501 container of a derived type.
2502
3a613a36
AC
25032011-08-29 Ed Schonberg <schonberg@adacore.com>
2504
2505 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
2506 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
2507
14848f57
AC
25082011-08-29 Pascal Obry <obry@adacore.com>
2509
2510 * exp_disp.adb: Minor comment fix.
2511 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
2512 to avoid warnings when compiling with -Wall.
2513 (Make_Disp_Conditional_Select_Body): Likewise.
2514 (Make_Disp_Timed_Select_Body): Likewise.
2515
25162011-08-29 Ed Schonberg <schonberg@adacore.com>
2517
2518 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
2519 an entity name, generate reference for it.
2520
25212011-08-29 Ed Schonberg <schonberg@adacore.com>
2522
2523 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
2524 iterator form.
2525 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
2526 the class-wide type.
2527 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
2528
25292011-08-29 Ed Schonberg <schonberg@adacore.com>
2530
2531 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
2532 subtype for an object whose type is an unconstrained union.
2533
25342011-08-29 Ed Schonberg <schonberg@adacore.com>
2535
2536 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
2537 is allowed in a component definition, by AI95-406.
2538
25392011-08-29 Matthew Heaney <heaney@adacore.com>
2540
2541 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
2542
25432011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2544
2545 * a-except-2005.adb: Alphabetize all routines.
2546 (Triggered_By_Abort): New routine.
2547 * a-except-2005.ads (Triggered_By_Abort): New routine.
2548 * a-except.adb Alphabetize all routines.
2549 (Triggered_By_Abort): New routine.
2550 * a-except.ads (Triggered_By_Abort): New routine.
2551 * exp_ch7.adb: Update all comments involving the detection of aborts in
2552 finalization code.
2553 (Build_Object_Declarations): Do not generate code to detect the
2554 presence of an abort at the start of finalization code, use a runtime
2555 routine istead.
2556 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
2557 RE_Unit_Table.
2558 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
2559 allocate a task on a subpool.
2560 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
2561 The flag disables all actions related to the maintenance of
2562 Finalize_Address_Table when subpools are not in use.
2563 (Allocate_Any_Controlled): Signal the machinery that subpools are in
2564 use.
2565 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
2566 performs costly task locking when subpools are not in use.
2567
57a8057a
AC
25682011-08-29 Yannick Moy <moy@adacore.com>
2569
2570 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
2571 types and dispatching calls in Alfa mode.
2572 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
2573 correspondance between body and spec scopes, to reuse utility functions
2574 (Traverse_Declarations_Or_Statements): Protect access to body for stub
2575 by testing the presence of the library unit for the body
2576 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
2577 mode the expansion of accept statements is skipped
2578 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
2579 the unique entity corresponding to the one returned by
2580 Unique_Defining_Entity applied to the enclosing declaration of the
2581 argument.
2582
25832011-08-29 Bob Duff <duff@adacore.com>
2584
2585 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
2586 gdb when x is not a node (it can be a node list, name_id, etc). pp is
2587 an alias for pn. ppp is an alias for pt.
2588
25892011-08-29 Javier Miranda <miranda@adacore.com>
2590
2591 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
2592 aggregate to take a consistent decision on the need to convert into
2593 assignments aggregates that initialize constant objects.
2594
25952011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2596
2597 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
2598 Build_Allocate_Deallocate_Proc in order to handle allocation of
2599 non-controlled objects on subpools.
2600 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
2601 to be end-user visible.
2602 * s-finmas.adb: Add with and use clause for System.HTable.
2603 Add an instantiation of Simple_HTable which provides a mapping between
2604 the address of a controlled object and the corresponding
2605 Finalize_Address used to clean up the object. The table is used when a
2606 master is operating in heterogeneous mode.
2607 (Attach): Explain why the input node is not verified on being already
2608 attached.
2609 (Delete_Finalize_Address): New routine.
2610 (Detach): Add pragma Assert which ensures that a node is already
2611 attached.
2612 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
2613 since nodes are no longer removed on traversal. Explain why node
2614 detachment is undesirable in this case.
2615 (Get_Finalize_Address): New routine.
2616 (Hash): New routine.
2617 (Is_Empty_List): Removed.
2618 (pm): Renamed to Print_Master. Add output for discriminant
2619 Is_Homogeneous.
2620 Comment reformatting.
2621 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
2622 * s-finmas.ads: Various comments additions / improvements.
2623 Type Finalization_Master has a discriminant which determines the mode of
2624 operation.
2625 (Delete_Finalize_Address): New routine.
2626 (Get_Finalize_Address): New routine.
2627 (pm): Renamed to Print_Master.
2628 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
2629 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
2630 use clause for System.IO.
2631 (Allocate_Any_Controlled): Add machinery to set TSS primitive
2632 Finalize_Address depending on the mode of allocation and the mode of
2633 the master.
2634 (Deallocate_Any_Controlled): Remove the relation pair object -
2635 Finalize_Address regardless of the master mode. Add comment explaining
2636 the reason.
2637 (Detach): Ensure that fields Prev and Next are null after detachment.
2638 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
2639 scheme to check whether the list of subpools is empty. There is no
2640 longer need to store the next subpool or advance the current pointer.
2641 (Is_Empty_List): New routine.
2642 (Print_Pool): New routine.
2643 (Print_Subpool): New routine.
2644 * s-stposu.ads: Various comments additions / improvements.
2645 Field Master of type Root_Subpool is now a heterogeneous collection.
2646 (Print_Pool): New routine.
2647 (Print_Subpool): New routine.
2648
26492011-08-29 Ed Schonberg <schonberg@adacore.com>
2650
2651 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
2652 forms, using aspects of container types.
2653 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
2654 Has_Implicit_Dereference flags, that may be set on the partial view.
2655 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
2656 container type with an indexing aspect.
2657 (Analyze_Quantified_Expression): Analyze construct with expansion
2658 disabled, because it will be rewritten as a loop during expansion.
2659 (Try_Container_Indexing): The prefix itself may be a container type
2660 with an indexing aspect, as with a vector of vectors.
2661 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
2662 the original doamin of iteration, for name capture.
2663 (Analyze_Iterator_Specification): If the domain is an expression that
2664 needs finalization, create a separate declaration for it.
2665 For an iterator with "of" retrieve default iterator info from aspect of
2666 container type. For "in" iterator, retrieve type of Iterate function.
2667 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
2668 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
2669 analysis, to prevent spurious errors about late attributes.
2670 * sprint.adb: Handle quantified expression with either loop or iterator
2671 specification.
2672 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
2673 iterator.
2674
ddf67a1d
AC
26752011-08-29 Vincent Celier <celier@adacore.com>
2676
2677 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
2678 Binder or Linker of the main project file.
2679
26802011-08-29 Ed Schonberg <schonberg@adacore.com>
2681
2682 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
2683 unit.
2684
26852011-08-29 Yannick Moy <moy@adacore.com>
2686
2687 * exp_ch9.adb: Partial revert of previous change for Alfa mode
2688
26892011-08-29 Yannick Moy <moy@adacore.com>
2690
2691 * exp_ch11.adb: Minor expansion of comment.
2692
26932011-08-29 Yannick Moy <moy@adacore.com>
2694
2695 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
2696
26972011-08-29 Ed Schonberg <schonberg@adacore.com>
2698
2699 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
2700 interpretation, set the type before resolving the operands, because
2701 legality checks on an exponention operand need to know the type of the
2702 context.
2703
27042011-08-29 Ed Schonberg <schonberg@adacore.com>
2705
2706 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
2707 cleanups on a master if the instance is within a generic unit.
2708 Complement to the corresponding fix to inline.adb for K520-030.
2709
27102011-08-29 Tristan Gingold <gingold@adacore.com>
2711
2712 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
2713 occurrence.
2714 * exp_intr.adb: Minor comment fix.
2715
27162011-08-29 Bob Duff <duff@adacore.com>
2717
2718 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
2719 Delay_Required was used as an uninitialized variable.
2720
690943fc
RD
27212011-08-29 Robert Dewar <dewar@adacore.com>
2722
2723 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
2724 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
2725 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
2726
9f0ee988
TQ
27272011-08-29 Thomas Quinot <quinot@adacore.com>
2728
2729 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
2730 Remove unused variables.
2731
3e24afaa
AC
27322011-08-29 Ed Schonberg <schonberg@adacore.com>
2733
2734 * sem_res.adb: Remove Build_Explicit_Dereference.
2735 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
2736 from sem_res.adb, used in analysis of additional constructs.
2737 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
2738 expansion of iterators.
2739 (Is_Object_Reference): Recognize variables rewritten as explicit
2740 dereferences in Ada2012.
2741 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
2742 Reversible_Iterator names, for expansion of Ada2012 iterators.
2743 * aspects.ads, aspects.adb (Find_Aspect): Utility.
2744 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
2745 linked list container.
2746 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
2747 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
2748
27492011-08-29 Ed Schonberg <schonberg@adacore.com>
2750
2751 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
2752 containers.
2753
27542011-08-29 Vincent Celier <celier@adacore.com>
2755
2756 * make.adb (Gnatmake): Get the maximum number of simultaneous
2757 compilation processes after the Builder switches has been scanned, as
2758 there may include -jnn.
2759
27602011-08-29 Matthew Heaney <heaney@adacore.com>
2761
2762 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
2763
27642011-08-29 Tristan Gingold <gingold@adacore.com>
2765
2766 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
2767 GNAT_DRIVER_COMMAND_LINE to 255.
2768
27692011-08-29 Pascal Obry <obry@adacore.com>
2770
2771 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
2772 reformatting and style fix (class attribute casing).
2773
27742011-08-29 Yannick Moy <moy@adacore.com>
2775
2776 * exp_ch11.adb: Yet another case where expansion should be common
2777 between CodePeer and Alfa.
2778
27792011-08-29 Yannick Moy <moy@adacore.com>
2780
2781 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
2782
27832011-08-29 Ed Schonberg <schonberg@adacore.com>
2784
2785 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
2786 incomplete type and its completion match.
2787
3ddd922e
AC
27882011-08-29 Yannick Moy <moy@adacore.com>
2789
2790 * exp_ch13.adb: Adjust previous change.
2791
27922011-08-29 Robert Dewar <dewar@adacore.com>
2793
2794 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
2795 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
2796 Minor reformatting.
2797
444acbdd
AC
27982011-08-29 Emmanuel Briot <briot@adacore.com>
2799
2800 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
2801 initialize aggregated projects.
2802
28032011-08-29 Ed Schonberg <schonberg@adacore.com>
2804
2805 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
2806 depth of candidates to resolve a potentially spurious ambiguity between
2807 two visible subprograms.
2808
e0296583
AC
28092011-08-29 Yannick Moy <moy@adacore.com>
2810
2811 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
2812 Requires/Ensures.
2813 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
2814 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
2815 Requires/Ensures.
2816
28172011-08-29 Arnaud Charlet <charlet@adacore.com>
2818
2819 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
2820 Add comment.
2821
28222011-08-29 Thomas Quinot <quinot@adacore.com>
2823
2824 * sem_res.adb: Minor reformatting.
2825
69794413
JK
28262011-08-29 Johannes Kanig <kanig@adacore.com>
2827
2828 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
2829 mode.
2830 * gnat1drv.adb (Adjust_Global_Switches): Set
2831 Use_Expressions_With_Actions to False in ALFA mode.
2832 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
2833 ALFA mode.
2834
59e6b23c
AC
28352011-08-29 Yannick Moy <moy@adacore.com>
2836
2837 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
2838 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
2839 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
2840 tagged types and dispatching calls in Alfa mode.
2841
28422011-08-29 Javier Miranda <miranda@adacore.com>
2843
2844 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
2845 we do not report an error on an Empty node.
2846
28472011-08-29 Geert Bosch <bosch@adacore.com>
2848
2849 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
2850 a-nlrear.o and a-nurear.o.
2851
28522011-08-29 Robert Dewar <dewar@adacore.com>
2853
2854 * freeze.adb: Minor code reorganization.
2855 Minor reformatting.
2856 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
2857 sem_ch6.adb: Minor reformatting
2858
28592011-08-29 Tristan Gingold <gingold@adacore.com>
2860
2861 * s-except.ads, s-except.adb: Provide dummy body.
2862
28632011-08-29 Yannick Moy <moy@adacore.com>
2864
2865 * sem_warn.adb (Within_Postcondition): Take into account the case of
2866 an Ensures component in a Test_Case.
2867
4d792549
AC
28682011-08-29 Tristan Gingold <gingold@adacore.com>
2869
2870 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
2871 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
2872 System_Exceptions_Debug
2873 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
2874 * a-except.adb: With and use System.Exceptions_Debug instead of
2875 System.Exceptions.
2876 * a-except-2005.adb: Likewise.
2877 * s-assert.adb: Likewise.
2878 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
2879 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
2880 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
2881 s-excdeb. Update dependencies.
2882 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
2883 as these no longer need external libraries.
2884
28852011-08-29 Ed Schonberg <schonberg@adacore.com>
2886
2887 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
2888 exponentiation operator on universal values in a context that requires
2889 a fixed-point type.
2890
28912011-08-29 Tristan Gingold <gingold@adacore.com>
2892
2893 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
2894 before calling notify_handled_exception.
2895 * a-exextr.adb: Fix comment.
2896
b254da66
AC
28972011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2898
2899 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
2900 Finalize_Address of the access type's finalization master.
2901 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
2902 access type's finalization master. Add a guard to prevent
2903 Associated_Storage_Pool from being set on .NET/JVM.
2904 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
2905 attribute Finalize_Address of the access type's finalization master.
2906 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
2907 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
2908 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
2909 RE_Unit_Table.
2910 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
2911 use clause for System.IO
2912 (Detach): Relax the assertion, to be reinstated later.
2913 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
2914 Relax the assertion on Finalize_Address, to be reinstated later.
2915 (Is_Empty_List): New routine.
2916 (pm): New debug routine.
2917 (Set_Finalize_Address): New routine.
2918 * s-finmas.ads (pm): New debug routine.
2919 (Set_Finalize_Address): New routine.
2920 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2921
29222011-08-29 Tristan Gingold <gingold@adacore.com>
2923
2924 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
2925 Remove convention C.
2926
29272011-08-29 Tristan Gingold <gingold@adacore.com>
2928
2929 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
2930 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
2931 (Finalize_TCB): Remove its finalization.
2932 (Initialize): Remove assignment of GET_Exc_Stack_Addr
2933 * s-soflin.adb (NT_Exc_Stack): Remove
2934 (Get_Exc_Stack_Addr_NT): Likewise.
2935 (Get_Exc_Stack_Addr_Soft): Likewise.
2936 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
2937 (Get_Exc_Stack_Addr): Likewise.
2938 (Get_Exc_Stack_Addr_Soft): Likewise
2939 * s-taspri-vms.ads (Exc_Stack_T): Remove.
2940 (Exc_Stack_Ptr_T): Likewise.
2941 (Private_Data): Remove Exc_Stack_Ptr component.
2942
29432011-08-29 Tristan Gingold <gingold@adacore.com>
2944
2945 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
2946
29472011-08-29 Tristan Gingold <gingold@adacore.com>
2948
2949 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2950
29512011-08-29 Geert Bosch <bosch@adacore.com>
2952
2953 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
2954 L2_Norm, Swap_Column): New generic subprograms
2955 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
2956 L2_Norm, Swap_Column): Implement new subprograms in order to
2957 eliminate dependency on BLAS and LAPACK libraries in
2958 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
2959 version. Forward_Eliminate/Back_Substitute can be used to put a
2960 matrix in row echelon or reduced row echelon form using partial
2961 pivoting.
2962 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
2963 Swap_Column): Instantiate from System.Generic_Array_Operations.
2964 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
2965 (Sqrt): Local function for simple computation of square root without
2966 adding dependencies on Generic_Elementary_Functions.
2967 (Swap): New subprogram to exchange floating point numbers.
2968 (Inverse): Reimplement using Jordan-Gauss elimination.
2969 (Jacobi): New procedure implementing Jacobi's method for computation
2970 of eigensystems, based on Rutishauser's implementation.
2971 (L2_Norm): Implement directly using the inner product.
2972 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
2973 decreasing eigenvalue as required by the Ada RM.
2974 (Swap_Column): New helper procedure for Sort_Eigensystem.
2975 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
2976 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
2977 Sort_Eigensystems.
2978
29792011-08-29 Thomas Quinot <quinot@adacore.com>
2980
2981 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
2982 statements line.
2983
60370fb1
AC
29842011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2985
2986 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
2987 than the current node.
2988 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
2989 Finalization_Master. The list headers have two fields instead of three.
2990 This should fix alignment issue but subpool allocations are now
2991 unusable. Alphabetize subprograms.
2992 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
2993 the size of the header when converting the beginning of the object to
2994 a FM_Node. Set the master's Finalize_Address attribute if not already
2995 set.
2996 (Deallocate_Any_Controlled): Use the offset rather than the size of the
2997 header when converting the beginning of the object to a FM_Node.
2998
29992011-08-29 Gary Dismukes <dismukes@adacore.com>
3000
3001 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
3002 reraise when compiling for CodePeer.
3003
30042011-08-29 Arnaud Charlet <charlet@adacore.com>
3005
3006 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
3007 now needed by a-convec.adb. Fix warning.
3008
30092011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3010
3011 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
3012 processing of TSS routine Finalize_Address when compiling in
3013 CodePeer_Mode.
3014
30152011-08-29 Thomas Quinot <quinot@adacore.com>
3016
3017 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
3018 sem_warn.adb: Minor reformatting.
3019
30202011-08-29 Emmanuel Briot <briot@adacore.com>
3021
3022 * prj-conf.adb (Get_Config_Switches): Also collect the list of
3023 languages from aggregated projects.
3024
30252011-08-29 Yannick Moy <moy@adacore.com>
3026
3027 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
3028 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3029 Traverse_Package_Declaration, Traverse_Subprogram_Body,
3030 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
3031 for stubs are traversed too when parameter is set
3032 (Traverse_All_Compilation_Units): Traverse without going inside stubs
3033 (Traverse_Declarations_Or_Statements): Do the special traversing for
3034 stubs when required.
3035 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
3036 return subprogram or package body from stub.
3037 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
3038 stubs without prior subprogram decl.
3039
30402011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3041
3042 * gnat_ugn.texi: Fix typo.
3043
e9c9d122
HK
30442011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3045
3046 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
3047 which accounts for size vs alignment issues and calculates the size of
3048 the list header.
3049 (Deallocate_Any_Controlled): Ditto.
3050 (Nearest_Multiple_Rounded_Up): New routine.
3051
25ebc085
AC
30522011-08-29 Tristan Gingold <gingold@adacore.com>
3053
3054 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
3055 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
3056 (Set_Exception_Msg): Ditto.
3057 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
3058 Private_Data.
3059 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
3060 Use Save_Occurrence instead of Save_Occurrence_No_Private.
3061 (Raise_With_Msg): Remove Cleanup_Flag.
3062 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
3063 Clean_Flag and Private_Data components.
3064
30652011-08-29 Yannick Moy <moy@adacore.com>
3066
3067 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
3068 in CodePeer mode.
3069 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
3070 of an explicitly declared type, so that the base types of the original
3071 type and this generated type are the same, and a "type" (not a subtype
3072 like previously).
3073 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
3074 small" in Alfa mode, like in CodePeer mode.
3075 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
3076 clauses in Alfa mode.
3077
30782011-08-29 Javier Miranda <miranda@adacore.com>
3079
3080 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
3081 function to the package spec.
3082 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
3083 internally generated bodies of null procedures locate the internally
3084 generated spec enforcing mode conformance.
3085 (Is_Interface_Conformant): Ensure that the controlling formal of the
3086 primitives match.
3087
30882011-08-29 Ed Schonberg <schonberg@adacore.com>
3089
3090 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
3091 reject the pragma if it appears to apply to a formal subprogram.
3092
30932011-08-29 Ed Schonberg <schonberg@adacore.com>
3094
3095 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
3096 inner expression, to prevent double evaluation.
3097
590549fb
AC
30982011-08-29 Tristan Gingold <gingold@adacore.com>
3099
3100 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
3101 they were unused.
3102 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
3103 * a-except-2005.adb (Propagate_Exception): Adjust spec.
3104 (Raise_Current_Excep): Adjust call.
3105 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
3106
31072011-08-29 Thomas Quinot <quinot@adacore.com>
3108
3109 * exp_disp.adb: Minor reformatting.
3110
62380e66
TG
31112011-08-29 Tristan Gingold <gingold@adacore.com>
3112
3113 * a-exexpr.adb (Setup_Exception): Removed.
3114 * a-exexpr-gcc.adb (Setup_Exception): Removed.
3115 * a-except.adb (Exception_Propagation): Removed.
3116 * a-except-2005.adb (Setup_Exception): Removed.
3117 (Reraise): Remove call to Setup_Exception.
3118 (Reraise_Occurrence): Ditto.
3119 (Reraise_Occurrence_Always): Ditto.
3120 (Reraise_Occurrence_No_Defer): Ditto.
3121 (Transfer_Occurrence): Ditto.
3122 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
3123 (Set_Exception_Msg): Ditto.
3124
c95aa61c
AC
31252011-08-29 Robert Dewar <dewar@adacore.com>
3126
3127 * a-convec.adb, exp_disp.adb: Minor reformatting.
3128
31292011-08-29 Tristan Gingold <gingold@adacore.com>
3130
3131 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
3132
624e1688
AC
31332011-08-29 Gary Dismukes <dismukes@adacore.com>
3134
3135 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
3136 Exception_Handlers to No_List instead of Empty_List in the case where
3137 there are no handlers.
3138
31392011-08-29 Tristan Gingold <gingold@adacore.com>
3140
3141 * gcc-interface/gigi.h (enum standard_datatypes): Add
3142 ADT_reraise_zcx_decl
3143 (reraise_zcx_decl): New macro.
3144 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
3145 (gigi): Set reraise_zcx_decl.
3146 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
3147 (gnat_to_gnu): Handle N_Raise_Statement.
3148
7134062a
AC
31492011-08-29 Robert Dewar <dewar@adacore.com>
3150
3151 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
3152 a-undesu.adb: Minor reformatting.
3153
31542011-08-29 Ed Schonberg <schonberg@adacore.com>
3155
3156 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
3157 table, accept an unfrozen untagged component if it is an actual for a
3158 formal incomplete type.
3159 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
3160 provide new iterator forms over vectors.
3161 Introduce type Iterator in package body to implement operations of
3162 Reversible_Iterator interface.
3163 * a-iteint.ads: Make package pure so it is usable with new container
3164 packages, that are categorized Remote_Types.
3165
ca5af305
AC
31662011-08-29 Robert Dewar <dewar@adacore.com>
3167
3168 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
3169
31702011-08-29 Bob Duff <duff@adacore.com>
3171
3172 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
3173 of <>, because this is the routine that checks for dimensionality
3174 errors (for example, for a two-dimensional array, (others => <>) should
3175 be (others => (others => <>)).
3176
31772011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3178
3179 * impunit.adb: Add new run-time units.
3180 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
3181 s-stposu.ads, s-stposu.adb: Code clean up.
3182 Handle protected class-wide or task class-wide types
3183 Handle C/C++/CIL/Java types.
3184 * s-spsufi.adb, s-spsufi.ads: New files.
3185
5accd7b6
AC
31862011-08-29 Yannick Moy <moy@adacore.com>
3187
3188 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
3189 library-level subprogram.
3190 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
3191 placement.
3192 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
3193 component.
3194 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
3195 component.
3196 * gnat_rm.texi: Update doc for Test_Case pragma.
3197
31982011-08-29 Tristan Gingold <gingold@adacore.com>
3199
3200 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
3201 convention C.
3202 (GCC_Exception_Access): New type.
3203 (Unwind_DeleteException): New imported procedure
3204 (Foreign_Exception): Import it.
3205 (GNAT_GCC_Exception): Simply have the occurrence inside.
3206 (To_GCC_Exception): New function.
3207 (To_GNAT_GCC_Exception): New function.
3208 (GNAT_GCC_Exception_Cleanup): New procedure..
3209 (Propagate_GCC_Exception): New procedure.
3210 (Reraise_GCC_Exception): New procedure.
3211 (Setup_Current_Excep): New procedure.
3212 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
3213 (Unwind_RaiseException): Ditto.
3214 (Unwind_ForcedUnwind): Ditto.
3215 (Remove): Removed.
3216 (Begin_Handler): Change type of parameter.
3217 (End_Handler): Ditto. Now delete the exception if still present.
3218 (Setup_Key): Removed.
3219 (Is_Setup_And_Not_Propagated): Removed.
3220 (Set_Setup_And_Not_Propagated): Ditto.
3221 (Clear_Setup_And_Not_Propagated): Ditto.
3222 (Save_Occurrence_And_Private): Ditto.
3223 (EID_For): Add 'not null' constraint on parameter.
3224 (Setup_Exception): Does nothing.
3225 (Propagate_Exception): Simplified.
3226 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
3227 re-raise is not expanded anymore.
3228 * s-except.ads (Foreign_Exception): New exception - placeholder for
3229 non Ada exceptions.
3230 * raise-gcc.c (__gnat_setup_current_excep): Declare
3231 (CXX_EXCEPTION_CLASS): Define (not yet used)
3232 (GNAT_EXCEPTION_CLASS): Define.
3233 (is_handled_by): Handle foreign exceptions.
3234 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
3235
32362011-08-29 Jose Ruiz <ruiz@adacore.com>
3237
3238 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
3239
2ef48385
AC
32402011-08-29 Thomas Quinot <quinot@adacore.com>
3241
3242 * a-synbar-posix.adb: Minor reformatting.
3243
32442011-08-29 Jose Ruiz <ruiz@adacore.com>
3245
3246 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
3247 a-exetim-default.ads (Interrupt_Clocks_Supported,
3248 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3249 definitions to be compliant with AI-0171. The target systems do not
3250 support separate account for the execution time of interrupt handlers.
3251
32522011-08-29 Jose Ruiz <ruiz@adacore.com>
3253
3254 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
3255 in the barrier to put first the easiest to evaluate (and the one which
3256 will be True more often). More efficient.
3257
32582011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3259
3260 * s-atocou-x86.adb: Fix constraint in machine code insertion.
3261
32622011-08-29 Bob Duff <duff@adacore.com>
3263
3264 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
3265 attributes that are now aspects, as specified by AI05-0229-1.
3266 * sem_ch13.adb (Analyze_Aspect_Specifications,
3267 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
3268 pragmas or attribute references, as appropriate.
3269
0db16b1e
AC
32702011-08-29 Robert Dewar <dewar@adacore.com>
3271
3272 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
3273 a-synbar-posix.ads: Minor reformatting.
3274
32752011-08-29 Yannick Moy <moy@adacore.com>
3276
3277 * snames.ads-tmpl: Add name Force.
3278
978ffe02
AC
32792011-08-29 Pascal Obry <obry@adacore.com>
3280
3281 * prj-nmsc.adb: Minor reformatting.
3282
32832011-08-29 Jose Ruiz <ruiz@adacore.com>
3284
3285 * a-exetim.ads (Interrupt_Clocks_Supported,
3286 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3287 definitions to be compliant with AI-0171.
3288
32892011-08-29 Robert Dewar <dewar@adacore.com>
3290
3291 * a-ngelfu.adb: Add comments.
3292
718f39dc
AC
32932011-08-29 Geert Bosch <bosch@adacore.com>
3294
3295 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
3296 the closest machine number to Pi / 2.0.
3297
32982011-08-29 Jose Ruiz <ruiz@adacore.com>
3299
3300 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
3301 package Ada.Synchronous_Barriers.
3302 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
3303 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
3304 default implementation using protected objects and another one
3305 a-synbar-posix using POSIX barriers as the underlying support.
3306 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
3307 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
3308 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
3309 Clean up dependencies.
3310 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
3311
ee2e3f6b
AC
33122011-08-29 Robert Dewar <dewar@adacore.com>
3313
3314 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
3315 exp_dist.adb: Minor code reorganization.
3316 Minor reformatting.
3317
33182011-08-29 Thomas Quinot <quinot@adacore.com>
3319
3320 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
3321 primitive operation must support external streaming if it is not a
3322 controlling access result.
3323
646e2823
AC
33242011-08-29 Thomas Quinot <quinot@adacore.com>
3325
3326 * sinfo.ads, sem_ch7.adb: Minor reformatting.
3327
33282011-08-29 Bob Duff <duff@adacore.com>
3329
3330 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
3331 restriction on allocators, as required by AI05-0013-1.
3332 * restrict.ads: Minor comment fix.
3333
5d59eef2
AC
33342011-08-29 Tristan Gingold <gingold@adacore.com>
3335
3336 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
3337 (To_Jmpbuf_Address): Ditto
3338 (builtin_longjmp): Ditto
3339
33402011-08-29 Thomas Quinot <quinot@adacore.com>
3341
3342 * sem_res.adb: Minor reformatting.
3343
33442011-08-29 Vincent Celier <celier@adacore.com>
3345
3346 * make.adb (Gnatmake): Move special processing for VM targets after the
3347 call to Get_Target_Parameters.
3348
33492011-08-29 Thomas Quinot <quinot@adacore.com>
3350
3351 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
3352
949a18cc
AC
33532011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3354
3355 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
3356 where an anonymous access discriminant of a limited designated type
3357 appears in a non-immutably limited discriminated type and issue an
3358 error message. Add local variable Desig_T and replace all occurrences
3359 of Designated_Type.
3360
33612011-08-29 Jose Ruiz <ruiz@adacore.com>
3362
3363 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
3364 implementation is compliant to RM D.15(15/2) after the modification
3365 imposed by AI05-0094-1 (binding interpretation).
3366
cb25faf8
AC
33672011-08-29 Robert Dewar <dewar@adacore.com>
3368
3369 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
3370 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
3371
33722011-08-29 Thomas Quinot <quinot@adacore.com>
3373
3374 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
3375 the scope name, do not report a missing label as a style violation (it
3376 will be diagnosed as an illegality).
3377 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
3378 variant records: Get_Enum_Lit_From_Pos already returns a usage
3379 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
3380 on Expr in Integer_Literal case so that it can be used by
3381 Build_To_Any_Call.
3382
1d10f669
AC
33832011-08-29 Tristan Gingold <gingold@adacore.com>
3384
3385 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
3386 Adjust comment.
3387 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
3388 (Build_Abort_Block_Handler): New function to build an Abort_Signal
3389 exception handler.
3390 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
3391 Build_Abort_Block_Handler to build the exception handler. Do not
3392 undefer aborts for the Abort_Signal exception handler if back-end
3393 exception mechanism.
3394 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
3395 back_end exceptions for all others and abort_signal.
3396 * s-except.ads (ZCX_By_Default): New constant.
3397 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
3398 (Raise_Exception_Always): Ditto.
3399 (Raise_From_Signal_Handler): Ditto.
3400 (Raise_With_Location_And_Msg): Ditto.
3401 (Raise_With_Msg): Ditto.
3402 (Reraise): Ditto.
3403 (Reraise_Occurence): Ditto.
3404 (Reraise_Occurrence_Always): Ditto.
3405 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
3406 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1d10f669
AC
3407
34082011-08-29 Thomas Quinot <quinot@adacore.com>
3409
3410 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
3411
d986066d
AC
34122011-08-29 Robert Dewar <dewar@adacore.com>
3413
3414 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
3415 Minor code reorganization.
3416
34172011-08-29 Bob Duff <duff@adacore.com>
3418
3419 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
3420 2012, not just Ada 2005.
3421
34222011-08-29 Vincent Celier <celier@adacore.com>
3423
3424 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
3425 with a project file or with gprbuid, if -gnatep= is specified, the
3426 builder may need to be invoked with -x.
3427
34282011-08-29 Tristan Gingold <gingold@adacore.com>
3429
3430 * a-exexpr-gcc.adb: Minor comment fix.
3431
ff4f0ed0
AC
34322011-08-29 Robert Dewar <dewar@adacore.com>
3433
3434 * sem_ch8.adb: Minor reformatting.
3435
34362011-08-29 Bob Duff <duff@adacore.com>
3437
3438 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
3439 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
3440 treating "some" as unreserved in earlier Ada versions. This is now
3441 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
3442 rather than Name_Some, since Tok_Some is now recognized as reserved.
3443 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
3444 reserved word.
3445 * scans.ads: Minor comment fixes.
3446 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
3447 for other language versions.
3448 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
3449 treating "some" as unreserved in earlier Ada versions. This is now
3450 handled in Snames.Is_Keyword_Name.
3451 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
3452 Ada 2012.
3453 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
3454 unreserved in earlier Ada versions. This is now handled in
3455 Snames.Is_Keyword_Name.
3456 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
3457 words as for other language versions.
3458 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
3459 Ada 2012, not just Ada 2005.
3460
d941cee6
AC
34612011-08-29 Ed Schonberg <schonberg@adacore.com>
3462
3463 * sem_ch13.adb: Additional semantic checks for aspects involved in
3464 iterators.
3465
34662011-08-29 Matthew Heaney <heaney@adacore.com>
3467
3468 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
3469 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
3470 Container parameter.
3471 (Ancestor_Find): ditto.
3472
b970af39
TQ
34732011-08-29 Thomas Quinot <quinot@adacore.com>
3474
3475 * par-endh.adb: Minor reformatting.
d941cee6 3476
92db5dee
AC
34772011-08-29 Tristan Gingold <gingold@adacore.com>
3478
3479 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
3480 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
3481 (Adjust_N_CLeanups_For): Remove.
3482 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
3483 stack is reached.
3484 (Propgate_Exception): Adjust.
3485 * raise-gcc.c: Add a few static/const.
3486 (Adjust_N_Cleanups_For): Remove declaration.
3487 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
3488
34892011-08-29 Ed Schonberg <schonberg@adacore.com>
3490
3491 * sem_ch8.adb: Use type of function return when rewriting as object
3492 declaration.
3493
1378bf10
AC
34942011-08-29 Gary Dismukes <dismukes@adacore.com>
3495
3496 * sem_type.adb: Minor reformatting.
3497
34982011-08-29 Robert Dewar <dewar@adacore.com>
3499
3500 * makeutl.adb: Minor reformatting.
3501
35022011-08-29 Ed Schonberg <schonberg@adacore.com>
3503
3504 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
3505 function call of a limited type, the expansion of the renaming is
3506 complicated by the presence of various temporaries and subtypes that
3507 capture constraints of the renamed object.
3508 Rewrite node as an object declaration, whose expansion is simpler.
3509 Given that the object is limited there is no copy involved and no
3510 performance hit.
3511
164e06c6
AC
35122011-08-29 Robert Dewar <dewar@adacore.com>
3513
3514 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
3515 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
3516
35172011-08-29 Tristan Gingold <gingold@adacore.com>
3518
3519 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
3520 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
3521 system-linux-hppa.ads, system-linux-s390.ads,
3522 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
3523 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
3524 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
3525 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
3526 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
3527 system-solaris-sparc.ads, system-lynxos-x86.ads,
3528 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
3529 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
3530 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
3531 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7d266442 3532 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
164e06c6
AC
3533 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
3534 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
3535 * opt.ads: Adjust comment.
3536 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
3537 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
3538 * system.ads: Move GCC_ZCX_Support to obsolete entries.
3539
35402011-08-29 Emmanuel Briot <briot@adacore.com>
3541
3542 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
3543 file name is specified on the gnatmake or gprbuild command line, and
3544 before we search for that file in the project.
3545
35462011-08-29 Ed Schonberg <schonberg@adacore.com>
3547
3548 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
3549 used to determine whether a possible interpretation for an overloadable
3550 entity is declared within the current instantiation and should be
3551 included in the candidate set.
3552
35532011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3554
3555 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
3556
97216ca8
ES
35572011-08-29 Ed Schonberg <schonberg@adacore.com>
3558
3559 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
3560 access subtype is access_to_subprogram, when applying checks for
3561 RM 3.10.2 (27).
3562
d3cb4cc0
AC
35632011-08-29 Matthew Heaney <heaney@adacore.com>
3564
3565 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
3566 for sibling when common parent.
3567
35682011-08-29 Thomas Quinot <quinot@adacore.com>
3569
3570 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
3571 "pragma_".
3572
35732011-08-29 Ed Schonberg <schonberg@adacore.com>
3574
3575 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
3576 for the return type when in ASIS mode.
3577
35782011-08-29 Vincent Celier <celier@adacore.com>
3579
3580 * make.adb (Gnatmake): Get the default search dirs, then the target
3581 parameters after getting the Builder switches, as the Builder switches
3582 may include --RTS= and that could change the default search dirs.
3583
35842011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3585
3586 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
3587 Make_Final_Call. Move the processing for class-wide types before the
3588 processing for derivations from [Limited_]Controlled.
3589 (Make_Final_Call): Move the processing for class-wide types before the
3590 processing for derivations from [Limited_]Controlled.
3591 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
3592 Add code to account for alignments larger than the list header. Add a
3593 comment illustrating the structure of the allocated object + padding +
3594 header.
3595 (Deallocate_Any_Controlled): Add code to account for alignments larger
3596 than the list header.
3597
35982011-08-29 Ed Schonberg <schonberg@adacore.com>
3599
3600 * sinfo.ads, sinfo.adb: New node kind
3601 N_Formal_Incomplete_Type_Definition, related flags.
3602 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
3603 Parse formal incomplete types.
3604 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
3605 sem_ch12.
3606 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
3607 Formal incomplete types do not need completion.
3608 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
3609 Validate_Incomplete_Type_Instance): New procedures to handle formal
3610 incomplete types.
3611 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
3612 that corresponds to a formal incomplete type.
3613 * sprint.adb: Handle formal incomplete type declarations.
3614 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
3615 an insertion point.
3616
d3f70b35
AC
36172011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3618
3619 * a-fihema.ads, a-fihema.adb: Unit removed.
3620 * a-undesu.ads, a-undesu.adb: New unit implementing
3621 Ada.Unchecked_Deallocate_Subpool.
3622 * einfo.adb: Remove Associated_Collection from the node usage.
3623 Add Finalization_Master to the node usage.
3624 (Associated_Collection): Removed.
3625 (Finalization_Master): New routine.
3626 (Set_Associated_Collection): Removed.
3627 (Set_Finalization_Master): New routine.
3628 (Write_Field23_Name): Remove Associated_Collection from the output. Add
3629 Finalization_Master to the output.
3630 * einfo.ads: Remove attribute Associated_Collection and its uses in
3631 entities.
3632 Add new attribute Finalization_Master along with its uses in entitites.
3633 (Associated_Collection): Removed along with its pragma import.
3634 (Finalization_Master): New routine along with a pragma import.
3635 (Set_Associated_Collection): Removed along with its pragma import.
3636 (Set_Finalization_Master): New routine along with a pragma import.
3637 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
3638 Build_Finalization_Collection with Build_Finalization_Master.
3639 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
3640 before the bodies of the predefined routines. Add comment explaining
3641 this. Replace call to Build_Finalization_Collection with
3642 Build_Finalization_Master.
3643 (Freeze_Type): Replace call to Build_Finalization_Collection with
3644 Build_Finalization_Master.
3645 (Make_Finalize_Address_Body): Comment reformatting.
3646 (Make_Predefined_Primitive_Specs): Code reformatting.
3647 (Stream_Operation_OK): Update comment mentioning finalization
3648 collections. Replace RE_Finalization_Collection with
3649 RE_Finalization_Master.
3650 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
3651 Associated_Collection with Finalization_Master. Replace call to
3652 Build_Finalization_Collection with Build_Finalization_Master.
3653 (Expand_Allocator_Expression): Replace call to Associated_Collection
3654 with Finalization_Master. Replace call to Set_Associated_Collection with
3655 Set_Finalization_Master. Remove the generation of
3656 Set_Finalize_Address_Ptr.
3657 (Expand_N_Allocator): Replace call to Associated_Collection with
3658 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
3659 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
3660 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
3661 comment on usage. Replace call to Needs_BIP_Collection with
3662 Needs_BIP_Finalization_Master Remplace BIP_Collection with
3663 BIP_Finalization_Master. Update all comments which mention finalization
3664 collections. Replace Associated_Collection with
3665 Finalization_Master. Replace Build_Finalization_Collection with
3666 Build_Finalization_Master.
3667 (BIP_Formal_Suffix): Update BIP_Collection's case.
3668 (Build_Heap_Allocator): Update the related comment. Rename local
3669 variable Collect to Fin_Mas_Id and update its occurrences. Update
3670 comments which mention finalization collections. Replace
3671 Set_Associated_Collection with Set_Finalization_Master.
3672 (Expand_Call): Update the code which detects a special piece of library
3673 code for .NET/JVM.
3674 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
3675 Add_Collection_Actual_To_Build_In_Place_Call with
3676 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
3677 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
3678 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
3679 Add_Collection_Actual_To_Build_In_Place_Call with
3680 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
3681 (Make_Build_In_Place_Call_In_Assignment): Replace call to
3682 Add_Collection_Actual_To_Build_In_Place_Call with
3683 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
3684 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
3685 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
3686 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
3687 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
3688 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
3689 Replace call to Set_Associated_Collection with Set_Finalization_Master.
3690 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
3691 Replace the call to Associated_Collection with Finalization_Master.
3692 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
3693 Update the way finalization master names are generated. Update the
3694 retrieval of the correct access type which will carry the pool and
3695 master attributes.
3696 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
3697 (Make_Finalize_Address_Body): Abstract types do not need
3698 Finalize_Address. Code reformatting.
3699 (Make_Finalize_Address_Stmts): Update comment on usage.
3700 (Make_Set_Finalize_Address_Ptr_Call): Removed.
3701 (Process_Declarations): Update comments.
3702 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
3703 Build_Finalization_Master. Update associated comment.
3704 (Make_Set_Finalize_Address_Ptr_Call): Removed.
3705 * exp_ch13.adb: Update comments which mention finalization collections.
3706 (Expand_N_Free_Statement): Replace the call to Associated_Collection
3707 with Finalization_Master.
3708 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
3709 create calls to routines Allocate_Any_Controlled and
3710 Deallocate_Any_Controlled.
3711 (Find_Finalize_Address): New routine.
3712 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
3713 comparison.
3714 (Requires_Cleanup_Actions): Update the comment on freeze node
3715 inspection.
3716 * exp_util.ads: Remove comment on generated code for
3717 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
3718 is better to simply look in the body.
3719 * freeze.adb (Freeze_All): Update the comment of finalization
3720 collections. Replace the call to Associated_Collection with
3721 Finalization_Master. Replace the call to Build_Finalization_Collection
3722 with Build_Finalization_Master.
3723 * impunit.adb: Add a-undesu and s-stposu to the list of units.
3724 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
3725 a-fihema.
3726 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
3727 Ada.Finalization. Add processing for children of System.Storage_Pools.
3728 * rtsfind.ads: Remove the naming of second level children of
3729 Ada.Finalization.
3730 Remove Ada_Finalization_Heap_Management from the list of units.
3731 Remove subtype Ada_Finalization_Child.
3732 Remove the following subprogram entities:
3733
3734 RE_Allocate
3735 RE_Deallocate
3736 RE_Finalization_Collection
3737 RE_Finalization_Collection_Ptr
3738 RE_Set_Finalize_Address_Ptr
3739
3740 Add the naming of second level children of System.Storage_Pools.
3741 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
3742 the list of units.
3743 Add subtype System_Storage_Pools_Child.
3744 Add the following subprogram entities to System.Finalization_Masters:
3745
3746 RE_Finalization_Master
3747 RE_Finalization_Master_Ptr
3748
3749 Add the following subprogram entities to System.Storage_Pools.Subpools:
3750
3751 RE_Allocate_Any_Controlled
3752 RE_Deallocate_Any_Controlled
3753 RE_Root_Storage_Pool_With_Subpools
3754 RE_Root_Subpool
3755 RE_Subpool_Handle
3756
3757 Move the following subprogram entities from
3758 Ada.Finalization.Heap_Management to System.Finalization_Masters:
3759
3760 RE_Add_Offset_To_Address
3761 RE_Attach
3762 RE_Base_Pool
3763 RE_Detach
3764
3765 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
3766 Set_Associated_Collection with Set_Finalization_Master.
3767 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
3768 BIP_Finalization_Master is created.
3769 * s-finmas.adb: New unit System.Finalization_Masters.
3770 * s-finmas.ads: New unit System.Finalization_Masters.
3771 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
3772 * s-stposu.ads, s-stposu.adb: New unit implementing
3773 System.Storage_Pools.Subpools.
3774
37752011-08-29 Bob Duff <duff@adacore.com>
3776
3777 * tbuild.adb: Add assertion.
3778
8c889ae4
AC
37792011-08-29 Thomas Quinot <quinot@adacore.com>
3780
3781 * s-pooglo.adb: Minor reformatting.
3782
37832011-08-29 Ed Schonberg <schonberg@adacore.com>
3784
3785 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
3786 an indexed component of a packed array whose element type is a record
3787 with a representation clause different from that of the right-hand
3788 side, generate a temporary to minimuze the number of bit-field
3789 operations generated.
3790
37912011-08-29 Ed Schonberg <schonberg@adacore.com>
3792
3793 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
3794 declarations, and thus are likely insertion points for actions.
3795
37962011-08-29 Bob Duff <duff@adacore.com>
3797
3798 * einfo.ads: Minor comment fix.
3799
1a07a71a
AC
38002011-08-29 Robert Dewar <dewar@adacore.com>
3801
3802 * frontend.adb, gnat1drv.adb: Minor reformatting.
3803
38042011-08-29 Tristan Gingold <gingold@adacore.com>
3805
3806 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
3807 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
3808 space in front of the header.
3809
4bcd6411
JK
38102011-08-29 Johannes Kanig <kanig@adacore.com>
3811
3812 * frontend.adb (Frontend): Exit after creating Standard package when
3813 -gnatd.H is present.
3814 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
3815 present.
3816
f0f88eb6
RD
38172011-08-29 Robert Dewar <dewar@adacore.com>
3818
3819 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
3820 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
3821 snames.ads-tmpl: Minor reformatting.
3822
3e37be71
PG
38232011-08-29 Philippe Gil <gil@adacore.com>
3824
3825 * prj.adb (Reset_Units_In_Table): New procedure.
3826 Reset units to avoid access to freed memory.
3827
94fb7608
AC
38282011-08-29 Thomas Quinot <quinot@adacore.com>
3829
3830 * get_scos.adb: When reading a P statement SCO without a pragma name
3831 (from an older ALI file), ensure that the Pragma_Name component is set
3832 to Unknown_Pragma (not left uninitialized).
3833
38342011-08-29 Vincent Celier <celier@adacore.com>
3835
3836 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
3837 modified to compute correctly the object path of a SAL project that is
3838 extending another library project.
3839 (Write_Path_File): New procedure.
3840 * makeutl.ads (Directories): New table moved from Buildgpr
3841 (Get_Directories): New procedure moved from Buildgpr
3842 (Write_Path_File): New procedure
3843 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
3844 paths before binding SALs, instead of Set_Ada_Paths.
3845 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
3846 Prj.
3847 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
3848 (Current_Source_Path_File_Of): New function
3849 (Set_Current_Object_Path_File_Of): New procedure
3850 (Current_Source_Object_File_Of): New function
3851 (Set_Current_Object_Path_File_Of): New procedure
3852 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
3853 (Current_Source_Path_File_Of): New function
3854 (Set_Current_Object_Path_File_Of): New procedure
3855 (Current_Source_Object_File_Of): New function
3856 (Set_Current_Object_Path_File_Of): New procedure
3857
38582011-08-29 Ed Schonberg <schonberg@adacore.com>
3859
3860 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
3861 packed entity, use a bit-field assignment only if there is no change of
3862 representation.
3863
c5ecd6b7
AC
38642011-08-29 Thomas Quinot <quinot@adacore.com>
3865
3866 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
3867 Is_RTU instead of using Chars comparisons.
3868
38692011-08-29 Thomas Quinot <quinot@adacore.com>
3870
3871 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
3872 temporary object if the actual is constrained, and the discriminants
3873 read from the stream don't match.
3874
38752011-08-29 Tristan Gingold <gingold@adacore.com>
3876
3877 * sem_attr.adb, exp_attr.adb: Add handling of
3878 Attribute_System_Allocator_Alignment
3879 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
3880 Attribute_System_Allocator_Alignment.
3881 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
3882 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
3883 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
3884 get_target_system_allocator_alignment.
3885
38862011-08-29 Arnaud Charlet <charlet@adacore.com>
3887
3888 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3889 dependencies.
3890
8abdac29
AC
38912011-08-29 Arnaud Charlet <charlet@adacore.com>
3892
3893 * exp_ch3.adb (In_Runtime): Fix typo.
3894
df170605
AC
38952011-08-29 Bob Duff <duff@adacore.com>
3896
3897 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
3898
38992011-08-29 Ed Schonberg <schonberg@adacore.com>
3900
3901 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
3902 and a separate tag assignment is generated, ensure that the tag
3903 assignment is analyzed.
3904
864a4236
ES
39052011-08-29 Ed Schonberg <schonberg@adacore.com>
3906
3907 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
3908 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
3909 of statement lists that may contain local declarations.
df170605
AC
3910 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
3911 duplicate the triggering statements needed for the expansion of this
3912 construct, when the trigger is a dispatching call to a synchronized
3913 primitive.
864a4236 3914
7f394c1d
AC
39152011-08-29 Arnaud Charlet <charlet@adacore.com>
3916
3917 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
3918 * bindgen.adb: Add comments.
3919 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
3920 in CodePeer mode.
3921
2c1a2cf3
RD
39222011-08-29 Robert Dewar <dewar@adacore.com>
3923
3924 * exp_attr.adb: Minor reformatting.
3925 Minor code reorganization and commenting.
3926 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
3927 reformatting.
3928
0bfc9a64
AC
39292011-08-29 Thomas Quinot <quinot@adacore.com>
3930
3931 * get_scos.adb: Ignore chaining indicators not currently supported
3932 by Ada.
3933
39342011-08-29 Arnaud Charlet <charlet@adacore.com>
3935
3936 * system.ads: Minor editing.
3937
39382011-08-29 Arnaud Charlet <charlet@adacore.com>
3939
3940 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
3941 CodePeer mode.
3942 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
3943 Attribute_Elab_Subp_Body.
3944 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
3945 * sem_util.adb: Update comments.
3946
828d4cf0
TQ
39472011-08-29 Thomas Quinot <quinot@adacore.com>
3948
3949 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
3950 pragma name for each SCO statement corresponding to a pragma.
3951
5cd7bb15
AC
39522011-08-29 Arnaud Charlet <charlet@adacore.com>
3953
3954 * opt.ads: Minor editing.
3955
39562011-08-29 Yannick Moy <moy@adacore.com>
3957
3958 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
3959 that only made sense for CodePeer mode.
3960
39612011-08-29 Jose Ruiz <ruiz@adacore.com>
3962
3963 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
3964 which is no longer used.
3965 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
3966 handling of the 64-bit division check.
3967 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
3968 division available.
3969 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
3970 longer used.
3971
39722011-08-29 Thomas Quinot <quinot@adacore.com>
3973
3974 * get_scos.adb: Minor reformatting.
3975
25b589cb
AC
39762011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3977
3978 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
3979 statement list is wrapped in a block, the block is explicitly analyzed
3980 in order to properly redecorate the entities and create a servicing
3981 finalizer.
3982
39832011-08-29 Tristan Gingold <gingold@adacore.com>
3984
3985 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
3986 (Set_Zero_Cost_Handling): Remove.
3987
39882011-08-29 Thomas Quinot <quinot@adacore.com>
3989
3990 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
3991
1197ddb1
AC
39922011-08-29 Geert Bosch <bosch@adacore.com>
3993
3994 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
3995 instruction, as the latter may produce -0.0, which is not a valid VAX
3996 F float number.
3997 (Neg_G): Likewise for VAX F float.
3998
39992011-08-29 Robert Dewar <dewar@adacore.com>
4000
4001 * exp_util.adb: Minor reformatting.
4002
40032011-08-29 Yannick Moy <moy@adacore.com>
4004
4005 * sem_ch3.adb: Minor comment update.
4006
40072011-08-29 Thomas Quinot <quinot@adacore.com>
4008
4009 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
4010 the operand type.
4011
40122011-08-29 Thomas Quinot <quinot@adacore.com>
4013
4014 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
4015 current statement sequence on a generic instantiation or a subprogram
4016 declaration.
4017
8f66cda7
AC
40182011-08-29 Robert Dewar <dewar@adacore.com>
4019
4020 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
4021 Minor reformatting.
4022
40232011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4024
4025 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4026 Correct the check which involves the freeze node of a controlled or
4027 access-to-controlled type.
4028
40292011-08-29 Geert Bosch <bosch@adacore.com>
4030
4031 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
4032 statements.
4033 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
4034 Asm statements.
4035
cf161d66
AC
40362011-08-29 Yannick Moy <moy@adacore.com>
4037
4038 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
4039 for every index type and component type that is not a subtype_mark.
4040 (Process_Subtype): Set Etype of subtype.
4041
40422011-08-29 Robert Dewar <dewar@adacore.com>
4043
4044 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
4045 reorganization. Minor reformatting.
4046
7cc83cd8
AC
40472011-08-29 Steve Baird <baird@adacore.com>
4048
4049 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
4050 for CodePeer and ALFA modes.
4051
40522011-08-29 Ed Schonberg <schonberg@adacore.com>
4053
4054 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
4055 that comes from an enclosing scope if it is not the renaming of an
4056 actual, to handle properly a spurious ambiguity in an instance.
4057
76af4137
AC
40582011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4059
4060 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
4061 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
4062 use it instead of the Esize of the first parameter.
4063 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
4064 above change.
4065 <Size>: Likewise. Call it for composite types on the RM size.
4066
40672011-08-29 Yannick Moy <moy@adacore.com>
4068
4069 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
4070 * sem_util.adb (Unique_Name): Correct behaviour for names of
4071 compilation units.
4072
9b20e59b
AC
40732011-08-29 Yannick Moy <moy@adacore.com>
4074
4075 * sem_prag.adb (Check_Precondition_Postcondition): In formal
4076 verification mode, analyze pragma expression for correctness, for
4077 pre/post on library-level subprogram, as it is not expanded later.
4078
40792011-08-29 Yannick Moy <moy@adacore.com>
4080
4081 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
4082 in formal verification.
4083
40842011-08-29 Thomas Quinot <quinot@adacore.com>
4085
4086 * sem_util.adb: Minor reformatting.
4087 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
4088 there's no pragma.
4089 * par_sco.ads, par_sco.adb: Update comments.
4090
40912011-08-29 Yannick Moy <moy@adacore.com>
4092
4093 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
4094 associated getter/setter.
4095 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
4096
40972011-08-29 Vincent Celier <celier@adacore.com>
4098
4099 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
4100 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
4101 with declarations for Language_Kind and Dependency_Kind for Ada.
4102 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
4103 (Process_Compiler): Take into account the new attributes Dependency_Kind
4104 and Language_Kind.
4105 (Check_Configuration): Check if language kind is unit based, not if the
4106 language name is Ada.
4107 (Process_Exceptions_Unit_Based): Ditto
4108 (Add_Language): Remove default additions of language and dependency kind
4109 * prj.ads: Minor comment change
4110 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
4111
41122011-08-29 Johannes Kanig <kanig@adacore.com>
4113
4114 * debug.adb: Update comments.
4115
c5bc3df6
JM
41162011-08-24 Joseph Myers <joseph@codesourcery.com>
4117
4118 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
4119 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
4120 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
4121 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
4122 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
4123
e3aa9eba
RO
41242011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4125
4126 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
4127 (GNATLIBCFLAGS_FOR_C): Replace
4128 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
4129 (gnatlib-shared-default, gnatlib-shared-dual-win32)
4130 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
4131 (gnatlib-sjlj, gnatlib-zcx): Likewise.
4132
f446d60e
EB
41332011-08-07 Eric Botcazou <ebotcazou@adacore.com>
4134
4135 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
4136
588c8f48
EB
4137 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
4138
4139 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
4140
28d711bf
NR
41412011-08-05 Nicolas Roche <roche@adacore.com>
4142
4143 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
4144 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
4145 canadian cross.
4146 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
4147
993f8920
AC
41482011-08-05 Matthew Heaney <heaney@adacore.com>
4149
4150 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
4151 subprogram bodies declared out-of-order.
4152
41532011-08-05 Yannick Moy <moy@adacore.com>
4154
4155 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
4156 entities directly in package Standard, otherwise skip the standard
4157 prefix.
4158
9b3956dd
RD
41592011-08-05 Robert Dewar <dewar@adacore.com>
4160
4161 * a-cbmutr.adb: Minor reformatting
4162 (Allocate_Node): refactor node allocation algorithm
4163
41642011-08-05 Robert Dewar <dewar@adacore.com>
4165
4166 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
4167 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
4168 mode.
4169 (Analyze_Pragma, case Check_Policy): Ditto.
4170 * sem_prag.ads (Check_Disabled): New function
4171 * snames.ads-tmpl: Add Name_Disable.
4172
41732011-08-05 Robert Dewar <dewar@adacore.com>
4174
4175 * gnat_rm.texi: Document implementation-defined policy DISABLE for
4176 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
4177
79e705d6
AC
41782011-08-05 Ed Schonberg <schonberg@adacore.com>
4179
4180 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
4181 that appears in a generic formal part and applies to a formal
4182 subprogram.
4183
41842011-08-05 Robert Dewar <dewar@adacore.com>
4185
4186 * a-cbmutr.ads: Minor reformatting.
4187
23b6deca
AC
41882011-08-05 Matthew Heaney <heaney@adacore.com>
4189
4190 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
4191 to check count, check sign of value instead.
4192 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
4193 (Copy_Subtree): allocate copy of source element
4194 (Equal_Subtree): compare elements, not access objects
4195
41962011-08-05 Vincent Celier <celier@adacore.com>
4197
4198 * gnat_ugn.texi: Fix VMS alternative.
4199
a2773bd3
AC
42002011-08-05 Thomas Quinot <quinot@adacore.com>
4201
4202 * sem_ch11.adb: Add comment.
4203
42042011-08-05 Robert Dewar <dewar@adacore.com>
4205
4206 * exp_util.adb: Minor comment fix.
4207
42082011-08-05 Robert Dewar <dewar@adacore.com>
4209
4210 * scng.adb (Error_Unterminated_String): Improve flag position when
4211 comma present.
4212
42132011-08-05 Matthew Heaney <heaney@adacore.com>
4214
4215 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
4216 tree containers).
4217 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
4218 multiway tree containers.
4219
42202011-08-05 Robert Dewar <dewar@adacore.com>
4221
4222 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
4223 * stylesw.adb: Implement -gnatyC to control comment spacing
4224 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
4225 -gnatyc/C).
4226 * usage.adb: Add line for -gnatyC.
4227
42282011-08-05 Robert Dewar <dewar@adacore.com>
4229
f446d60e 4230 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
4231 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
4232 synonym for COMMENTS2).
4233
dedac3eb
RD
42342011-08-05 Robert Dewar <dewar@adacore.com>
4235
4236 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
4237 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
4238 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
4239 a-comutr.ads, lib-xref.adb: Minor reformatting.
4240
42412011-08-05 Robert Dewar <dewar@adacore.com>
4242
4243 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
4244 warning if there is an exception handler present.
4245
7c62a85a
AC
42462011-08-05 Pascal Obry <obry@adacore.com>
4247
4248 * a-iteint.ads: Fix copyright year.
4249
42502011-08-05 Thomas Quinot <quinot@adacore.com>
4251
4252 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
4253 statement SCO for a USE clause or a representation clause.
4254
42552011-08-05 Yannick Moy <moy@adacore.com>
4256
4257 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
4258 between body and spec for stub.
4259 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
4260 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
4261 pragma precondition or postcondition, for which the enclosing
4262 subprogram or package in the AST is not the desired one, return empty.
4263
e49208a9
AC
42642011-08-05 Thomas Quinot <quinot@adacore.com>
4265
4266 * g-expect.adb: Minor reformatting.
4267
42682011-08-05 Bob Duff <duff@adacore.com>
4269
4270 * a-fihema.adb: Comment out OS_Lib.
4271
42722011-08-05 Matthew Heaney <heaney@adacore.com>
4273
4274 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
4275 (unbounded multiway tree containers) and a-iteint.ads.
4276 * a-comutr.ads, a-comutr.adb:
4277 This is the new Ada 2012 unit for unbounded multiway tree containers
4278 * a-cimutr.ads, a-cimutr.adb
4279 This is the new Ada 2012 unit for indefinite multiway tree containers
4280 * a-iteint.ads: New file.
4281
201cdb74
RO
42822011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4283
f446d60e 4284 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 4285
d50f4827
AC
42862011-08-05 Bob Duff <duff@adacore.com>
4287
4288 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
4289 subpools.
4290 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
4291
42922011-08-05 Ed Schonberg <schonberg@adacore.com>
4293
4294 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
4295 general indexing aspects of Ada2012. Called when analyzing indexed
4296 components when other interpretations fail.
4297 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
4298 in an expression context where overloading is meaningful. This excludes
4299 the occurrence in an aspect specification (efficiency only).
4300 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
4301 related to iterators can be set by an attribute specification, but
4302 cannot be queried.
4303 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
4304 Constant_Indexing and Variable_Indexing.
4305 (Check_Indexing_Functions): New procedure to perform legality checks.
4306 Additional semantic checks at end of declarations.
4307
efe05dfc
AC
43082011-08-05 Sergey Rybin <rybin@adacore.com>
4309
4310 * tree_io.ads: Update ASIS_Version_Number because of the change of the
4311 order of calling Tree_Write/Tree_Read routines made for aspects.
4312
43132011-08-05 Bob Duff <duff@adacore.com>
4314
4315 * a-fihema.adb (Finalize): Fix race condition.
4316
5f9cdefe
AC
43172011-08-05 Yannick Moy <moy@adacore.com>
4318
4319 * sem_ch12.adb (Analyze_Package_Instantiation,
4320 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
4321 mode.
4322
43232011-08-05 Ed Schonberg <schonberg@adacore.com>
4324
4325 * sem_type.adb (Specific_Type): in an instance, the type-specific
4326 operand of an equality check that involves null may have a private
4327 type. Use full view to determine legality of construct.
4328
822868aa
AC
43292011-08-05 Vincent Celier <celier@adacore.com>
4330
4331 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
4332 delete or close the file when the call to gnatmake was successful.
4333
43342011-08-05 Yannick Moy <moy@adacore.com>
4335
4336 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
4337 Global_Discard_Names.
4338
43392011-08-05 Ed Schonberg <schonberg@adacore.com>
4340
4341 * sinfo.ads: comments on use of entity field for aspect specifications.
4342
43432011-08-05 Ed Schonberg <schonberg@adacore.com>
4344
4345 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
4346 node is not itself an entity but a selected component, it is a
4347 rewritten parameterless call to an en enclosing synchronized operation,
4348 and this expansion will be performed again in the instance, so there is
4349 no global information to preserve.
4350
44a10091
AC
43512011-08-05 Javier Miranda <miranda@adacore.com>
4352
4353 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
4354 for renamings of predefined primitives.
4355 (In_Predef_Prims_DT): New subprogram.
4356
43572011-08-05 Ed Schonberg <schonberg@adacore.com>
4358
4359 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
4360 possible interpretation of name is a reference type, add an
4361 interpretation that is the designated type of the reference
4362 discriminant of that type.
4363 * sem_res.adb (resolve): If the interpretation imposed by context is an
4364 implicit dereference, rewrite the node as the deference of the
4365 reference discriminant.
4366 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
4367 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
4368 parent type or base type.
4369 * sem_ch4.adb (Process_Indexed_Component,
4370 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
4371 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
4372 Check for implicit dereference.
4373 (List_Operand_Interps): Indicate when an implicit dereference is
4374 ambiguous.
4375 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
4376
43772011-08-05 Thomas Quinot <quinot@adacore.com>
4378
4379 * scos.ads: Update documentation of SCO table. Pragma statements can now
4380 be marked as disabled (using 'p' instead of 'P' as the statement kind).
4381 * par_sco.ads, par_sco.adb: Implement the above change.
4382 (Process_Decisions_Defer): Generate a P decision for the first parameter
4383 of a dyadic pragma Debug.
4384 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
4385 necessary.
4386 * put_scos.adb: Code simplification based on above change.
4387
bb3c784c
AC
43882011-08-05 Robert Dewar <dewar@adacore.com>
4389
4390 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
4391 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
4392 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
4393 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
4394
43952011-08-05 Bob Duff <duff@adacore.com>
4396
4397 * a-stunau.ads, g-spipat.adb: Update comments.
4398
36f686f9
BD
43992011-08-05 Bob Duff <duff@adacore.com>
4400
4401 * a-fihema.ads: Minor comment fix.
4402 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
4403 correct.
4404 (Attach, Detach): Remove some unnecessary code.
4405 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
4406
7882673f
BD
44072011-08-05 Bob Duff <duff@adacore.com>
4408
4409 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
4410 allocation for Objects component. This simplifies the code somewhat. It
4411 is also a little more efficient in the not-so-unusual case where there
4412 are no controlled objects allocated.
4413 Make Finalization_Started flag atomic.
4414 (Finalize): Avoid unnecessary detachment of items from the list.
4415 (pcol): Minor cleanup.
4416
d34cd274
AC
44172011-08-05 Ed Schonberg <schonberg@adacore.com>
4418
4419 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
4420 package whose name is the same as that of the generic unit, or its
4421 ultimate prefix.
4422
44232011-08-05 Bob Duff <duff@adacore.com>
4424
4425 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
4426 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
4427 Minor comment fixes.
4428
00332244
AC
44292011-08-05 Arnaud Charlet <charlet@adacore.com>
4430
4431 * make.adb (Linking_Phase): No longer need to set source search path
4432 before calling gnatlink in CodePeer mode.
4433 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
4434 gcc in CodePeer mode, since the binder generated file no longer has a
4435 'with Main'.
4436 * switch.ads, switch.adb (Is_Language_Switch): Removed.
4437 * switch-c.adb: Update comment.
4438
44392011-08-05 Thomas Quinot <quinot@adacore.com>
4440
4441 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
4442
44432011-08-05 Nicolas Roche <roche@adacore.com>
4444
4445 * gnat_ugn.texi: Fix minor syntax error issue.
4446
44472011-08-05 Vincent Celier <celier@adacore.com>
4448
4449 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
4450 delete or close the file when the call to gnatmake returns a non
4451 successful return code.
4452
44532011-08-05 Ed Schonberg <schonberg@adacore.com>
4454
4455 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
4456 check, indicate that the copy of the original node does not come from
4457 source, to prevent an infinite recursion of the expansion.
4458
44592011-08-05 Johannes Kanig <kanig@adacore.com>
4460
4461 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
4462 VC generation for subprogram bodies.
4463
44642011-08-05 Yannick Moy <moy@adacore.com>
4465
4466 * einfo.ads: Typo.
4467 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
4468 the base type with the smallest allowed base type.
4469
44702011-08-05 Sergey Rybin <rybin@adacore.com>
4471
4472 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
4473 aspects.
4474
44752011-08-05 Ed Schonberg <schonberg@adacore.com>
4476
4477 * sem_ch12.ads: minor comment updates.
4478
44792011-08-05 Ed Schonberg <schonberg@adacore.com>
4480
4481 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
4482 instantiation and a formal package the compiler generates a package
4483 renaming declaration so that the generic name within the declaration
4484 is interpreted as a renaming of the instance. At the end of a formal
4485 package declaration, this renaming must become invisible.
4486
0da80d7d
AC
44872011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4488
4489 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
4490 comparison and rely on concrete entities instead.
4491
44922011-08-05 Ed Schonberg <schonberg@adacore.com>
4493
4494 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
4495 and discriminants, to indicate that the type has an access discriminant
4496 that supports implicit dereference.
4497 * snames.ads-tmpl: Add names of aspects and attributes related to
4498 Ada2012 iterators: constant_indexing, default_iterator,
4499 iterator_element, implicit_dereference, variable_indexing.
4500 * aspects.ads, aspects.adb: entries for iterator-related aspects.
4501 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
4502 iterator-related aspects.
4503 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
4504
45052011-08-05 Sergey Rybin <rybin@adacore.com>
4506
4507 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
4508 metrics in gnatmetric to cover new kinds of coupling mentrics.
4509
45102011-08-05 Steve Baird <baird@adacore.com>
4511
4512 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 4513 of calling the user-defined main subprogram.
0da80d7d
AC
4514 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
4515 is set) Call_Main_Subprogram ahead of, as opposed to
4516 inside of, Main.
4517 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
4518 generation of a "with" of the user-defined main subprogram.
4519 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
4520 (which is now called from Gen_Main instead).
4521
73242473
AC
45222011-08-05 Emmanuel Briot <briot@adacore.com>
4523
4524 * projects.texi: Added reference to the Makefile package.
4525
45262011-08-05 Thomas Quinot <quinot@adacore.com>
4527
4528 * exp_ch7.adb: Minor comment rewording.
4529
45302011-08-05 Ed Falis <falis@adacore.com>
4531
4532 * env.c: Fix comment.
4533
45342011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4535
4536 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
4537 character comparison and rely on concrete entities instead.
4538
97ed5872
AC
45392011-08-05 Ed Schonberg <schonberg@adacore.com>
4540
4541 * sem_ch3.adb: (Check_Private_Overriding): better error message,
4542 suggested by AI95-0068.
4543
45442011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4545
4546 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
4547 the two potential initialization calls. This accounts for any
4548 access-before-elaboration checks which may precede the initialization
4549 calls.
4550 (Next_Suitable_Statement): New routine. Returns the next real statement
4551 after the input node while skipping generated checks.
4552 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
4553 with comment on usage.
4554 Do not generate Elaborate_All when the trigger is a finalization call
4555 coming from a type init proc.
4556 (Check_Elab_Call): Propagate the initialization procedure context to
4557 subsequent calls to Check_A_Call.
4558 (Check_Internal_Call_Continue): Propagate the initialization procedure
4559 context to subsequent calls to Check_Elab_Call.
4560 (Is_Finalization_Procedure): New routine. Returns True if the input
4561 entity denotes a [Deep_]Finalize routine.
4562 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
4563 along with comment on usage.
4564
45652011-08-05 Vadim Godunko <godunko@adacore.com>
4566
4567 * s-atocou.ads: Add list of supported platforms.
4568
45692011-08-05 Yannick Moy <moy@adacore.com>
4570
4571 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
4572
4573 * opt.ads (Disable_ALI_File): new Boolean flag
4574 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
4575
45762011-08-05 Ed Falis <falis@adacore.com>
4577
4578 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
4579 environ is properly defined.
4580
45812011-08-05 Vincent Celier <celier@adacore.com>
4582
4583 * make.adb (Compilation_Phase): Exit immediately when all objects have
4584 been found up to date, to avoid multiple exit messages.
4585 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
4586 same project for languages with no compiler.
4587 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
4588 -eI.
9aff36e9
RD
45892011-08-05 Robert Dewar <dewar@adacore.com>
4590
4591 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
4592 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
4593 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
4594 s-atocou-builtin.adb: Minor reformatting.
4595
406935b6
AC
45962011-08-05 Yannick Moy <moy@adacore.com>
4597
4598 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
4599 if the node to wrap is a pragma check, this node and enclosed
4600 expression are not expanded, so do not apply any transformations here.
4601 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
4602 introducing transient scopes.
4603
46042011-08-05 Jose Ruiz <ruiz@adacore.com>
4605
4606 * adaint.c (__gnat_set_writable, __gnat_set_readable,
4607 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
4608 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
4609 routine is available, so we use the default implementation of these
4610 functions.
4611 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
4612 support for copying attributes on VxWorks 6.
4613
46142011-08-05 Yannick Moy <moy@adacore.com>
4615
4616 * debug.adb: Remove use of -gnatd.D.
4617 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
4618 * opt.ads: Simplify variables for ALFA mode, to keep one only
4619 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
4620 to ALFA mode.
4621
46222011-08-05 Vincent Celier <celier@adacore.com>
4623
4624 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
4625 Builder'Default_Switches.
4626
46272011-08-05 Vincent Celier <celier@adacore.com>
4628
4629 * makeusg.adb: Add lines for --create-map-file switches.
4630
46312011-08-05 Ed Schonberg <schonberg@adacore.com>
4632
4633 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
4634 profile is incomplete and the full view is available, replace it with
4635 the full view.
4636 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
4637 incomplete, freezing the subprogram is delayed until the full view is
4638 frozen.
4639 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
4640 fixed-point multiplication operator and the predefined operator is
4641 resolved in favor of the user-defined one.
4642
96c891b3
RO
46432011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4644
4645 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
4646 CONST_CAST.
4647
276e7ed0
AC
46482011-08-04 Ed Schonberg <schonberg@adacore.com>
4649
4650 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
4651 whether a type lacks user-defined Read or Write operations, or has a
4652 component that lacks them.
4653 * sem_attr.adb (Check_Stream_Attribute): if restriction
4654 No_Default_Stream_Attributes is active, verify that all subcomponent
4655 types of the target have user-defined stream operations, and report
4656 error otherwise.
4657 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
4658 * exp_strm.adb: Build_Elementary_Input_Call,
4659 Build_Elementary_Write_Call): remove checks for restriction
4660 No_Default_Stream_Attributes, now checked in semantics.
4661
46622011-08-04 Vincent Celier <celier@adacore.com>
4663
4664 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
4665 switches on the command line, look for all valid --RTS switches in the
4666 Builder switches and for each language use the first runtime name found
4667 to invoke gprconfig.
4668 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
4669 command line and there is no auto-configuration.
4670 (Runtime_Name_Set_For): New function.
4671
46722011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4673
4674 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
4675 elaborate initialization expression for variable Abort when processing
4676 a package body or a declaration.
4677 (Create_Finalizer): Propagate the package context when creating the
4678 exception-related variables.
4679 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
4680 For_Package along with usage comment.
4681
19172ae9
AC
46822011-08-04 Arnaud Charlet <charlet@adacore.com>
4683
4684 * gcc-interface/Makefile.in: Clean up targets.
4685 Enable new package for atomic counters and copy-on-write implementation
4686 of unbounded strings on x86 platforms.
4687 * gcc-interface/Make-lang.in: Update dependencies.
4688
0319cacc
AC
46892011-08-04 Robert Dewar <dewar@adacore.com>
4690
4691 * exp_ch7.adb: Minor reformatting.
4692
46932011-08-04 Robert Dewar <dewar@adacore.com>
4694
4695 * exp_strm.adb: Minor reformatting.
4696
46972011-08-04 Vadim Godunko <godunko@adacore.com>
4698
4699 * s-atocou.adb: Replace by dummy version and use on targets where atomic
4700 operations are not supported.
4701 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
4702 * s-atocou-x86.adb: New file.
4703 * Makefile.rtl: Add s-atocou.o file
4704
47052011-08-04 Arnaud Charlet <charlet@adacore.com>
4706
4707 * make.adb (Compile): Move setting of CodePeer_Mode to ...
4708 (Compilation_Phase): ... here.
4709 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
4710
47112011-08-04 Thomas Quinot <quinot@adacore.com>
4712
4713 * Make-generated.in: Fix minor typo in comment.
4714
26e7e1a0
AC
47152011-08-04 Thomas Quinot <quinot@adacore.com>
4716
4717 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
4718 the project path.
4719
47202011-08-04 Robert Dewar <dewar@adacore.com>
4721
4722 * a-coinho.adb: Minor reformatting.
4723
47242011-08-04 Robert Dewar <dewar@adacore.com>
4725
4726 * a-coinho.ads: Minor reformatting.
4727
47282011-08-04 Vadim Godunko <godunko@adacore.com>
4729
4730 * s-atocou.ads, s-atocou.adb: New files.
4731 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
4732 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
4733 direct use of GCC's atomic builtins and replace them by use of new
4734 atomic counter package.
4735
47362011-08-04 Ed Schonberg <schonberg@adacore.com>
4737
4738 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
4739
47402011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4741
4742 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
4743 with a call to Get_External_Tag.
4744 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
4745 subprogram usage. Remove the guard against package declarations and
4746 bodies since Build_Cleanup_Statements is no longer invoked in that
4747 context.
4748 (Build_Components): Initialize Tagged_Type_Stmts when the context
4749 contains at least one library-level tagged type.
4750 (Build_Finalizer): New local variables Has_Tagged_Types and
4751 Tagged_Type_Stmts along with associated comments on usage. Update the
4752 logic to include tagged type processing.
4753 (Create_Finalizer): Insert all library-level tagged type unregistration
4754 code before the jump block circuitry.
4755 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
4756 (Expand_N_Package_Declaration): Remove the call to
4757 Build_Cleanup_Statements.
4758 (Process_Tagged_Type_Declaration): New routine. Generate a call to
4759 unregister the external tag of a tagged type.
4760 (Processing_Actions): Reimplemented to handle tagged types.
4761 (Process_Declarations): Detect the declaration of a library-level
4762 tagged type and carry out the appropriate actions.
4763 (Unregister_Tagged_Types): Removed. The machinery has been directly
4764 merged with Build_Finalizer.
4765
7483c888
AC
47662011-08-04 Robert Dewar <dewar@adacore.com>
4767
4768 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
4769 gnatls.adb, exp_ch3.adb: Minor reformatting.
4770
47712011-08-04 Marc Sango <sango@adacore.com>
4772
4773 * sem_attr.adb (Analyze_Attribute): Replace the message
4774 "invisible attribute of}" of the spark restriction violation in
4775 attribute reference by the simple message "invisible attribute of type".
4776 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
4777 two insertion characters: '&' and '}'.
4778
47792011-08-04 Vadim Godunko <godunko@adacore.com>
4780
4781 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
4782 * a-coinho.ads, a-coinho.adb: New file.
4783 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
4784
5207696c
AC
47852011-08-04 Nicolas Roche <roche@adacore.com>
4786
4787 * alfa_test.adb: Not all ali files are containing alfa information even
4788 if compiled with -gnatd.F. So suppress warning about missing ALFA
4789 information.
4790
47912011-08-04 Yannick Moy <moy@adacore.com>
4792
4793 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
4794 scope.
4795 * put_alfa.adb: Check that scope name is not empty.
4796
47972011-08-04 Ed Schonberg <schonberg@adacore.com>
4798
4799 * exp_ch3.adb (Stream_Operation_Ok): new predicate
4800 Needs_Elementary_Stream_Operation, to determine whether user-defined
4801 Read and Write attributes are available for the elementary components
4802 of the given type. If only the predefined attributes are available,
4803 then when restriction No_Default_Stream_Attributes is active the
4804 predefined stream attributes for the composite type cannot be created.
4805
48062011-08-04 Robert Dewar <dewar@adacore.com>
4807
4808 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
4809 Put routines in alpha order
4810
2bd2d858
JR
48112011-08-04 Jose Ruiz <ruiz@adacore.com>
4812
4813 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
4814 * gcc-interface/Make-lang.in: Update dependencies.
4815
8fae6016
AC
48162011-08-04 Arnaud Charlet <charlet@adacore.com>
4817
4818 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
4819 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
4820 gnat1why).
4821
a54d0eb4
AC
48222011-08-04 Robert Dewar <dewar@adacore.com>
4823
4824 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
4825 lib-xref-alfa.adb: Minor reformatting.
4826
48272011-08-04 Marc Sango <sango@adacore.com>
4828
4829 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
4830 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
4831 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
4832 mode.
4833
48342011-08-04 Tristan Gingold <gingold@adacore.com>
4835
4836 * bindgen.adb (Gen_Adainit_C): Remove.
4837 (Gen_Adafinal_C): Ditto.
4838 (Gen_Elab_Externals_C): Ditto.
4839 (Gen_Elab_Calls_C): Ditto.
4840 (Gen_Elab_Order_C): Ditto.
4841 (Gen_Elab_Defs_C): Ditto.
4842 (Gen_Finalize_Library_C): Ditto.
4843 (Gen_Finalize_Library_Defs_C): Ditto.
4844 (Gen_Main_C): Ditto.
4845 (Gen_Output_File_C): Ditto.
4846 (Gen_Restrictions_C): Ditto.
4847 (Gen_Versions_C): Ditto.
4848 (Write_Info_Ada_C): Ditto.
4849 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
4850 (Gen_Output_File): Do not force Ada_Bind_File anymore.
4851 Always call Gen_Output_File_Ada.
4852 * gnatlink.adb (Begin_Info): Now a constant.
4853 (End_Info): Ditto.
4854 (Ada_Bind_File): Remove
4855 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
4856 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
4857 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
4858 * opt.ads (Ada_Bind_File): Remove.
4859
48602011-08-04 Thomas Quinot <quinot@adacore.com>
4861
4862 * projects.texi: Document target-specific directory in default project
4863 path for gnatmake.
4864
48652011-08-04 Thomas Quinot <quinot@adacore.com>
4866
4867 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
4868 path in all cases .
4869
24558db8
AC
48702011-08-04 Yannick Moy <moy@adacore.com>
4871
4872 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
4873 opt.ads, lib-xref.ads: Code clean up.
4874
48752011-08-04 Yannick Moy <moy@adacore.com>
4876
4877 * gnat_rm.texi: Update description of Test_Case
4878 * gnat_ugn.texi: Typo.
4879
48802011-08-04 Ed Falis <falis@adacore.com>
4881
4882 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
4883
48842011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4885
4886 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
4887 it is of type Root_Controlled. This action eliminates fields Prev and
4888 Next from type equality.
4889
48902011-08-04 Yannick Moy <moy@adacore.com>
4891
4892 * lib-xref-alfa.adb: Correct typo.
4893
48942011-08-04 Matthew Heaney <heaney@adacore.com>
4895
4896 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
4897 component.
4898
1f9939b5
AC
48992011-08-04 Yannick Moy <moy@adacore.com>
4900
4901 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
4902 (Analyze_Pragma): allow static string expression for name of Test_Case,
4903 instead of simply string literals.
4904 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
4905 expressions.
4906
49072011-08-04 Vincent Celier <celier@adacore.com>
4908
4909 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
4910 case suffixes to find truncated main sources.
4911
49122011-08-04 Tristan Gingold <gingold@adacore.com>
4913
4914 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
4915 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
4916 (Compute_Current_Task): Ditto.
4917
49182011-08-04 Tristan Gingold <gingold@adacore.com>
4919
4920 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
4921
49222011-08-04 Yannick Moy <moy@adacore.com>
4923
4924 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
4925 library-level constant.
4926 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
4927 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
4928 used as selector of parameter association, in ALFA mode.
4929
15d8a51d
AC
49302011-08-04 Robert Dewar <dewar@adacore.com>
4931
4932 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
4933 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
4934 reformatting.
4935
49362011-08-04 Arnaud Charlet <charlet@adacore.com>
4937
4938 * make.adb (Linking_Phase): Set source search path before calling
4939 gnatlink in CodePeer mode.
4940
f46faa08
AC
49412011-08-04 Javier Miranda <miranda@adacore.com>
4942
4943 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
4944 Remove code which takes care of building TSDs.
4945 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
4946 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
4947 the accessibility check in VM targets.
4948 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
4949 (Building_Static_DT): Now returns false for VM targets.
4950 (Build_VM_TSDs): Removed.
4951 (Expand_Interface_Conversion): Generate missing runtime check for
4952 conversions to interface types whose target type is unknown at compile
4953 time.
4954 (Make_VM_TSD): Add missing code to disable the generation of calls to
4955 Check_TSD if the tagged type is not defined at library level, or not
4956 has a representation clause specifying its external tag, or -gnatdQ is
4957 active.
4958 * exp_disp.ads (Build_VM_TSDs): Removed.
4959 (Make_VM_TSDs): Spec relocated from exp_disp.adb
4960 * sem_disp.adb (Check_Dispatching_Operation): No code required to
4961 register primitives in the dispatch tables in VM targets.
4962 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
4963 initialization of class-wide interface objects in VM targets.
4964 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
4965 of Make_DT).
4966
49672011-08-04 Jerome Lambourg <lambourg@adacore.com>
4968
4969 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
4970 when dotnet-ld cannot be found.
4971
49722011-08-04 Arnaud Charlet <charlet@adacore.com>
4973
4974 * bindgen.adb: Simplify significantly generation of binder body file in
4975 CodePeer mode.
4976 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
4977 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
4978 not expanded).
4979
2ba7e31e
AC
49802011-08-04 Yannick Moy <moy@adacore.com>
4981
4982 * sem_prag.adb, sem.ads: Code cleanup.
4983
49842011-08-04 Tristan Gingold <gingold@adacore.com>
4985
4986 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
4987 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
4988 results if possible.
4989 * s-stusta.adb (Print): Adjust after changes in s-stausa.
4990 * gnat_ugn.texi: Update dynamic stack usage section.
4991
49922011-08-04 Steve Baird <baird@adacore.com>
4993
4994 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
4995 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
4996 contains only a call to the user-defined main subprogram.
4997 (Gen_Main_Ada) - If CodePeer_Mode is set, then
4998 call the "wrapper" subprogram instead of directly
4999 calling the user-defined main subprogram.
5000
50012011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5002
5003 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
5004 alternatives of a case statement for controlled objects. Rename local
5005 variable A to Dead_Alt.
5006 (Expand_N_If_Statement): Check the then and else statements of an if
5007 statement for controlled objects. Check the then statements of all
5008 elsif parts of an if statement for controlled objects.
5009 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
5010 objects.
5011 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
5012 detects a loop associated with the expansion of an array object.
5013 Augment the processing of the loop statements to account for a possible
5014 wrap done by Process_Statements_For_Controlled_Objects.
5015 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
5016 statements and abortable part of an asynchronous select for controlled
5017 objects.
5018 (Expand_N_Conditional_Entry_Call): Check the else statements of a
5019 conditional entry call for controlled objects.
5020 (Expand_N_Selective_Accept): Check the alternatives of a selective
5021 accept for controlled objects.
5022 (Expand_N_Timed_Entry_Call): Check the entry call and delay
5023 alternatives of a timed entry call for controlled objects.
5024 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
5025 exception handler for controlled objects.
5026 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5027 Add formal parameter Nested_Constructs along with its associated
5028 comment.
5029 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
5030 Requires_Cleanup_Actions.
5031 (Process_Statements_For_Controlled_Objects): New routine.
5032 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
5033 routine. Inspect a node which contains a non-handled sequence of
5034 statements for controlled objects. If such an object is found, the
5035 statements are wrapped in a block.
5036
1bf773bb
AC
50372011-08-04 Bob Duff <duff@adacore.com>
5038
5039 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
5040 need to compare with Class_Wide_Type (T2), in order to get at the
5041 original class-wide type node.
5042 * sem_type.ads (Covers): Improve the comment.
5043 * einfo.ads (Class_Wide_Type): Improve the comment.
5044 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
5045 the type of the Deref.
5046
50472011-08-04 Yannick Moy <moy@adacore.com>
5048
5049 * gnat_rm.texi: Document that Test_Case pragma can only appear on
5050 separate declarations.
5051 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
5052 check identifier of pragma argument.
5053 (Chain_TC): check that no other test case associated to the same entity
5054 share the same name.
5055 (Check_Test_Case): disallow test case inside subprogram body
5056 (Analyze_Pragma): correct call to check identifier and not argument
5057 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
5058 function gets name from test case pragma.
5059
dac3bede
YM
50602011-08-04 Yannick Moy <moy@adacore.com>
5061
5062 * gnat_rm.texi: Document new pragma and aspect.
5063 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
5064 (No_Duplicates_Allowed): new constant array defining whether duplicates
5065 aspects of each kind can appear on the same declaration.
5066 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
5067 field, which points to a node holding the previous Spec_PPC_List.
5068 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
5069 through the indirection with Contract.
5070 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
5071 * par-prag.adb (Prag): do nothing on Test_Case pragma
5072 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
5073 be called directly.
5074 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
5075 component Ensures of Test_Case.
5076 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
5077 (Analyze_Generic_Subprogram_Declaration,
5078 Analyze_Subprogram_Instantiation,
5079 Analyze_Abstract_Subprogram_Declaration,
5080 Analyze_Subprogram_Body_Helper,
5081 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
5082 insert contract in subprogram node at point of definition
5083 * sem_ch13.adb
5084 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
5085 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
5086 corresponding pragma
5087 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
5088 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
5089 similar to the analysis of pre/post
5090 (Derive_Subprogram): insert contract in subprogram node at point of
5091 derivation.
5092 * sem_prag.adb, sem_prag.ads
5093 (Check_Arg_Is_String_Literal, Check_Identifier):
5094 new checking procedures to be called in treatment of pragmas
5095 (Check_Test_Case): new procedure to check that a Test_Case aspect or
5096 pragma is well-formed. This does not check currently that 'Result is
5097 used only in the Ensures component of a Test_Case.
5098 (Analyze_Pragma): add case for Test_Case
5099 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
5100 components of a Test_Case.
5101 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
5102 expressions in the 3rd (and 4th if present) arguments of a Test_Case
5103 pragma, treated as spec expressions.
5104 (Sig_Flags): add value -1 for Test_Case.
5105 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
5106 Get_Requires_From_Test_Case_Pragma): getters for both expression
5107 components of a Test_Case.
5108 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
5109 indirection between an entry or [generic] subprogram entity and its
5110 pre/post + test-cases.
5111 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
5112 get/set for fields of an N_Contract node.
5113 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
5114 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
5115 names and pragma for Test_Case.
5116 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
5117
6a2e5d0f
AC
51182011-08-04 Vincent Celier <celier@adacore.com>
5119
5120 * gnat_ugn.texi: Improve documentation of gnatmake switch
5121 --source-info-file=.
5122
51232011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5124
5125 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
5126 type). Initialize Atyp to the appropriate type which is later checked
5127 for completion. Rewrite the assertion associated with private type
5128 completion.
5129
51302011-08-04 Ed Falis <falis@adacore.com>
5131
5132 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
5133 initialize the number of CPUs.
5134
51352011-08-04 Ed Schonberg <schonberg@adacore.com>
5136
5137 * sem_type.adb (Disambiguate): New subsidiary routine
5138 In_Same_Declaration_List, to implement AI05-0020: a user-defined
5139 equality on an anonymous access type whose designated type is private
5140 does not lead to an ambiguity with the universal access equality
5141 operator in the body or child units of the defining package. The same
5142 is true for a multiplication operator on a private type completed with
5143 a fixed-point-type.
5144
51452011-08-04 Javier Miranda <miranda@adacore.com>
5146
5147 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
5148 (Normalize_Scalars_Config): Removed.
5149 * opt.adb
5150 (Register_Opt_Config_Switches): Remove registering config values of
5151 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
5152 (Restore_Opt_Config_Switches): Remove code which restores the values of
5153 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5154 Init_Or_Norm_Scalars.
5155 (Save_Opt_Config_Switches): Remove code which saves values of
5156 Init_Or_Norm_Scalars and Normalize_Scalars.
5157 (Set_Opt_Config_Switches): Remove code which restores config values of
5158 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5159 Init_Or_Norm_Scalars.
5160
51612011-08-04 Yannick Moy <moy@adacore.com>
5162
5163 * frontend.adb (Frontend): remove previous patch to avoid full
5164 qualification in ALFA mode.
5165 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
5166 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
5167 unique name for an entity, which could be used to identify the entity
5168 across compilation units.
5169
51702011-08-04 Thomas Quinot <quinot@adacore.com>
5171
5172 * prj-env.adb
5173 (Initialize_Default_Project_Path): Add target specific directory
5174 ($prefix/$target/lib/gnat) in front of project path in all cases
5175 (making gnatmake's behaviour consistent with gprbuild).
5176 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
5177 Pass target name from Sdefault to project subsystem.
5178 * gnatls.adb: Show new target specific default project directory.
5179
51802011-08-04 Johannes Kanig <kanig@adacore.com>
5181
5182 * cstand.adb: Add Information to Identifier in Standard
5183 (Identifer_For): Set Entity to the corresponding entity
5184
483361a6
AC
51852011-08-04 Sergey Rybin <rybin@adacore.com>
5186
5187 * gnat_ugn.texi: Update doc on gnatcheck.
5188
51892011-08-04 Yannick Moy <moy@adacore.com>
5190
5191 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
5192 xrefs in a scope.
5193
51942011-08-04 Yannick Moy <moy@adacore.com>
5195
5196 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
5197 performing expansion.
5198 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
5199 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
5200 it is not called in ALFA mode.
5201
ef5569c6
AC
52022011-08-04 Emmanuel Briot <briot@adacore.com>
5203
5204 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
5205 after all, so removed.
5206
52072011-08-04 Sergey Rybin <rybin@adacore.com>
5208
5209 * vms_data.ads: Add missing VMS qualifiers.
5210
1ab4a286
EB
52112011-08-04 Emmanuel Briot <briot@adacore.com>
5212
5213 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
5214 the list of files on the command line after processing it through
5215 Complete_Mains.
5216
7ae0d98c
AC
52172011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5218
5219 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
5220 processing for .NET/JVM. These targets can now benefit from
5221 Raise_From_Controlled_Operation and they share the same processing with
5222 standard targets.
5223 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
5224 These targets need transient scopes in order to properly finalize short
5225 lived controlled objects.
5226 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
5227 NET/JVM. These targets can now benefit from
5228 Raise_From_Controlled_Operation and they share the same processing with
5229 standard targets.
5230
52312011-08-04 Geert Bosch <bosch@adacore.com>
5232
5233 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
5234
52352011-08-04 Ed Schonberg <schonberg@adacore.com>
5236
5237 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
5238 Expand_Record_Aggregate, to determine whether aggregate must be
5239 expanded into assignments. This is the case if the ancestor part is
5240 private, regarless of the setting of the flag Has_Private_Ancestor.
5241
52422011-08-04 Ed Falis <falis@adacore.com>
5243
5244 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
5245
52462011-08-04 Bob Duff <duff@adacore.com>
5247
5248 * sinfo.ads: Fix comment.
5249
52502011-08-04 Steve Baird <baird@adacore.com>
5251
5252 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
5253 choose a package name in much the same way as is
5254 done for JGNAT when VM_Target /= No_VM, except that
5255 a slightly more distinctive prefix string is used.
5256
52572011-08-04 Emmanuel Briot <briot@adacore.com>
5258
5259 * makeutl.adb (Complete_Mains): no longer accept unit names on the
5260 gnatmake command line.
5261 This behavior was never documented (and was supported only because of
5262 an early bug in the code). This case might lead to ambiguous cases
5263 (between unit names and truncated base names without suffixes).
5264
87729e5a
AC
52652011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5266
5267 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
5268 Remove the external tag of a tagged type from the internal hash table.
5269 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
5270 expanded usage of the routine. Strenghten the check for Is_Master. Add
5271 processing for tagged types.
5272 (Build_Finalizer): Create all the necessary lists used in finalizer
5273 creation when the processed context is a package that may contain
5274 tagged types.
5275 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
5276 Requires_Cleanup_Actions.
5277 (Expand_N_Package_Body): Package bodies may need clean up code
5278 depending on whether they contain tagged types.
5279 (Expand_N_Package_Declaration): Package declarations may need clean up
5280 code depending on whether they contain tagged types.
5281 (Unregister_Tagged_Types): New routine. Search through a list of
5282 declarations or statements, looking for non-abstract Ada tagged types.
5283 For each such type, generate code to unregister the external tag.
5284 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
5285 Requires_Cleanup_Actions.
5286 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
5287 through a list of declarations or statements looking for non-abstract
5288 Ada tagged types or controlled objects.
5289 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
5290 Requires_Cleanup_Actions.
5291 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
5292 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
5293 RE_Unit_Table.
5294
52952011-08-04 Vincent Celier <celier@adacore.com>
5296
5297 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
5298 has Ada sources, not project Project, because if the root project
5299 Project has no sources of its own, all projects will be deemed without
5300 sources.
5301
53022011-08-04 Gary Dismukes <dismukes@adacore.com>
5303
5304 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
5305 of the No_Param_Proc acc-to-subp type used for initialization of
5306 __gnat_finalize_library_objects so that it's declared at library level
5307 rather than nested inside of the adainit routine.
5308
53092011-08-04 Javier Miranda <miranda@adacore.com>
5310
5311 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
5312 if the tagged type has a representation clause which specifies its
5313 external tag.
5314
53152011-08-04 Ed Schonberg <schonberg@adacore.com>
5316
5317 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
5318 Remove previous procedure with that name.
5319 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
5320 when appropriate.
5321 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
5322 subtype mark, the ancestor cannot have unknown discriminants.
5323 (Resolve_Record_Aggregate): if the type has invisible components
5324 because of a private ancestor, the aggregate is illegal.
5325
53262011-08-04 Vincent Celier <celier@adacore.com>
5327
5328 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
5329 account switches -gnat2005, -gnat12 and -gnat2012.
5330
53312011-08-04 Bob Duff <duff@adacore.com>
5332
5333 * s-tasdeb.ads: Minor comment fix.
5334
53352011-08-04 Arnaud Charlet <charlet@adacore.com>
5336
5337 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
5338 CodePeer mode.
5339 * switch.ads, switch.adb (Is_Language_Switch): New function.
5340
53412011-08-04 Vincent Celier <celier@adacore.com>
5342
5343 * switch-c.adb: Minor comment addition.
5344
53452011-08-04 Vincent Celier <celier@adacore.com>
5346
5347 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
5348 ending with '=' is followed by a space (missing file name).
5349
53502011-08-04 Pascal Obry <obry@adacore.com>
5351
5352 * g-regist.ads: Fix size of HKEY on x86_64-windows.
5353
53542011-08-04 Ed Schonberg <schonberg@adacore.com>
5355
5356 * sem_ch12.adb (Analyze_Associations): New routine
5357 Check_Overloaded_Formal_Subprogram to reject a formal package when
5358 there is a named association or a box initialisation for an overloaded
5359 formal subprogram of the corresponding generic.
5360
53612011-08-04 Yannick Moy <moy@adacore.com>
5362
5363 * alfa.ads (ALFA_Xref_Record): add component for type of entity
5364 * get_alfa.adb, put_alfa.adb: Read and write new component of
5365 cross-reference.
5366 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
5367
88f47280
AC
53682011-08-04 Pascal Obry <obry@adacore.com>
5369
5370 * urealp.adb: Minor reformatting.
5371
53722011-08-04 Tristan Gingold <gingold@adacore.com>
5373
5374 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
5375 Handle the case when Cleanup_Protected_Object returns Empty.
5376
53772011-08-04 Yannick Moy <moy@adacore.com>
5378
5379 * frontend.adb (Frontend): only qualify names in non-ALFA mode
5380
53812011-08-04 Ed Schonberg <schonberg@adacore.com>
5382
5383 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
5384 call, ignore functions.
5385
05c53a69
GB
53862011-08-04 Geert Bosch <bosch@adacore.com>
5387
5388 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
5389 point.
5390
23cc1ace
EB
53912011-08-04 Emmanuel Briot <briot@adacore.com>
5392
5393 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
5394 as an index for Builder'Switches. This conforms to the documentation.
5395 * make.adb (Insert_Project_Sources): avoid duplicate code
5396
cef14201
AC
53972011-08-04 Emmanuel Briot <briot@adacore.com>
5398
5399 * makeutl.adb (Complete_Mains): if the user has passed a relative file
5400 name on the command line (for instance "../dummy"), never assume it can
5401 be a unit name.
5402
54032011-08-04 Tristan Gingold <gingold@adacore.com>
5404
5405 * bindgen.adb: Remove code the reference or create the
5406 Break_Start/__gnat_break_start procedure.
5407 * s-stalib.adb (Break_Start): Removed.
5408
e2fee30d
EB
54092011-08-04 Emmanuel Briot <briot@adacore.com>
5410
5411 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
5412 shared with gprbuild.
5413
2d395256
AC
54142011-08-04 Yannick Moy <moy@adacore.com>
5415
5416 * par-ch4.adb (P_Primary): preferentially issue an error message about
5417 a missing parenthesis arount a conditional or case expression in Ada
5418 2012 mode, if we detect that the alignment is not correct for a
5419 statement.
5420
54212011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5422
5423 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
5424 tag-to-class-wide conversion as needing finalization actions.
5425 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
5426 a tag-to-class-wide conversion as needing finalization actions.
5427 (Is_Finalizable_Transient): The result of a tag-to-class-wide
5428 conversion does not need finalization actions.
5429 (Is_Tag_To_CW_Conversion): New routine.
5430 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
5431 whether an object is the result of a tag-to-class-wide conversion.
5432
54332011-08-04 Yannick Moy <moy@adacore.com>
5434
5435 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
5436 the left-hand-side and right-hand-side of a conjunct are inserted when
5437 translating a pre- or postcondition
5438 * sem_ch6.adb: Correct typo in comment
5439
54402011-08-04 Ed Schonberg <schonberg@adacore.com>
5441
5442 * gnat_rm.texi: Ravenscar does not prohibit dependence on
5443 Unchecked_Conversion and Unchecked_Deallocation.
5444
54452011-08-04 Thomas Quinot <quinot@adacore.com>
5446
5447 * make.adb: Minor reformatting.
5448
767ab2fd
EB
54492011-08-04 Emmanuel Briot <briot@adacore.com>
5450
5451 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
5452 sources in the project and its imported projects, but not in the whole
5453 tree.
5454
8fb3f5df
AC
54552011-08-04 Emmanuel Briot <briot@adacore.com>
5456
5457 * make.adb: Remove debug trace.
5458
54592011-08-04 Vincent Celier <celier@adacore.com>
5460
5461 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
5462 path in canonical form, to be able to compare path names on platforms
5463 such as Windows or Darwin.
5464
54652011-08-04 Thomas Quinot <quinot@adacore.com>
5466
5467 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
5468 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
5469 * scos.ads: Update documentation accordingly.
5470 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
5471 pragmas.
5472
9515740f
AC
54732011-08-04 Ed Schonberg <schonberg@adacore.com>
5474
5475 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
5476 attribute only if prefix type is scalar.
5477
54782011-08-04 Emmanuel Briot <briot@adacore.com>
5479
5480 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
5481 in gnatmake for specifying mains on the command line that do not belong
5482 to the main project. These mains must currently all belong to the same
5483 project, though.
5484 (Ultimate_Extension_Of): removed, since duplicated
5485 Ultimate_Extending_Project.
5486
92966893
AC
54872011-08-04 Arnaud Charlet <charlet@adacore.com>
5488
5489 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
5490 instead.
5491 (CodePeer_Mode_String): New.
5492 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
5493 CodePeer mode.
5494 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
5495 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
5496 mode, since no useful elaboration subprogram is needed by CodePeer.
5497 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
5498 In this mode, compile binder file with -gnatC and do stop after this
5499 step.
5500
55012011-08-04 Vincent Celier <celier@adacore.com>
5502
5503 * exp_ch7.adb: Minor comment fix.
5504
5969611f
RD
55052011-08-04 Robert Dewar <dewar@adacore.com>
5506
5507 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
5508 exp_ch4.adb, makeutl.adb: Minor reformatting.
5509
6367dd30
AC
55102011-08-04 Emmanuel Briot <briot@adacore.com>
5511
5512 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
5513 Create several new subprograms to move code out of Make. This makes the
5514 code more readable, removes code duplication, and is a preparation work
5515 for adding support for aggregate projects.
5516
55172011-08-04 Tristan Gingold <gingold@adacore.com>
5518
5519 * s-po32gl.ads, s-po32gl.adb: New files.
5520 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
5521 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
5522 (Build_Finalization_Collection): Use it.
5523 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
5524 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
5525 literals.
5526 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
5527 * gcc-interface/Make-lang.in: Update dependencies.
5528
cd8bfe35
EB
55292011-08-04 Emmanuel Briot <briot@adacore.com>
5530
5531 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
5532 the command line.
5533
7db29ea7
EB
55342011-08-04 Emmanuel Briot <briot@adacore.com>
5535
5536 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
5537 command line is not a file name, also check whether it could be a unit
5538 name.
5539
d9b056ea
AC
55402011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5541
5542 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
5543 the header of the finalization routine.
5544 If the unit has no finalizer but is a body whose spec has one, then
5545 generate the decrement of the elaboration entity only.
5546 If the unit has a finalizer and is a spec, then do not generate the
5547 decrement of the elaboration entity.
5548 (Gen_Finalize_Library_C): Likewise.
5549
55502011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5551
5552 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
5553 (Bounds_Size_Expression): Removed.
5554 (Double_Alignment_Of): New subsidiary routine.
5555 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
5556 for a hole in the dope vector of unconstrained arrays due to different
5557 index and element alignments.
5558
55592011-08-04 Ed Schonberg <schonberg@adacore.com>
5560
5561 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
5562 raise program_error because body has not been seen yet.
5563
55642011-08-04 Ed Schonberg <schonberg@adacore.com>
5565
5566 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
5567 an unresolved name.
5568
55692011-08-04 Vincent Celier <celier@adacore.com>
5570
5571 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
5572
55732011-08-04 Yannick Moy <moy@adacore.com>
5574
5575 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
5576 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
5577
55782011-08-04 Thomas Quinot <quinot@adacore.com>
5579
5580 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
5581 instantiation in RCI.
5582
55832011-08-04 Emmanuel Briot <briot@adacore.com>
5584
5585 * make.adb: Share more code with gprbuild
5586
f5fc5b9d
AC
55872011-08-04 Emmanuel Briot <briot@adacore.com>
5588
5589 * projects.texi: Added documentation for the IDE'Gnat project file
5590 attribute.
5591
55922011-08-04 Nicolas Roche <roche@adacore.com>
5593
5594 * gnat_rm.texi: Minor editing.
5595
55962011-08-04 Javier Miranda <miranda@adacore.com>
5597
5598 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
5599 and the library case for VM targets.
5600 (Gen_Adainit_Ada): Likewise.
5601
56022011-08-04 Robert Dewar <dewar@adacore.com>
5603
5604 * g-altive.ads: Minor comment updates.
5605 * prj-nmsc.adb: Minor reformatting.
5606
56072011-08-04 Javier Miranda <miranda@adacore.com>
5608
5609 * opt.ads
5610 (Normalize_Scalars_Config): Value of the configuration switch set by
5611 pragma Normalize_Scalars when it appears in the gnat.adc file.
5612 (Normalize_Scalars): New field for record Config_Switches_Type. Used
5613 to save and restore settings of this pragma.
5614 * opt.adb
5615 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
5616 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
5617
56182011-08-04 Vincent Celier <celier@adacore.com>
5619
5620 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
5621
0c4683cf
AC
56222011-08-04 Arnaud Charlet <charlet@adacore.com>
5623
5624 * makeutl.adb: Minor reformatting.
5625
56262011-08-04 Olivier Hainque <hainque@adacore.com>
5627
5628 * g-altive.ads: Update comments to reflect that only the soft
5629 binding is available today.
5630
2598ee6d
RD
56312011-08-04 Robert Dewar <dewar@adacore.com>
5632
5633 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
5634 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
5635 * gcc-interface/Make-lang.in: Update dependencies.
5636
c2db4b32
AC
56372011-08-04 Arnaud Charlet <charlet@adacore.com>
5638
5639 * prj-env.adb: Remove local debug traces.
5640
56412011-08-04 Yannick Moy <moy@adacore.com>
5642
5643 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
5644 was used instead of Hi_OK, which could cause a read of an uninitialized
5645 value later on. Detected while working on the new warning.
5646 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
5647 to local variable.
5648 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
5649 in more cases, in order to detect more unreferenced values.
5650 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
5651 object for expression, if any.
5652
56532011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5654
5655 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
5656 the operand types instead of the Esize.
5657
56582011-08-04 Steve Baird <baird@adacore.com>
5659
5660 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
5661 enable CodePeer_Mode.
5662 * bindusg.adb (Display): Add help message describing -P binder switch.
5663 * gnat_ugn.texi: Document -P binder switch.
5664 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
5665 user-defined main program directly.
5666 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
5667 user-defined main program in the context clause of the package body.
5668
ad05f2e9
AC
56692011-08-04 Yannick Moy <moy@adacore.com>
5670
5671 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
5672 duplicate of Defining_Entity
5673 (Get_Unique_Entity_For_Decl): rename function into
5674 Unique_Defining_Entity
5675 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
5676 (Formal_Proof_On): remove synthesized flag
5677 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5678 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
5679 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
5680 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
5681 Annotate (Formal_Proof)
5682
56832011-08-04 Emmanuel Briot <briot@adacore.com>
5684
5685 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
5686 source files with non-standard naming schemes, in imported projects
5687
756ef2a0
AC
56882011-08-04 Emmanuel Briot <briot@adacore.com>
5689
5690 * makeutl.adb (Complete_Mains): when a multi-unit source file is
5691 specified on the gprbuild command line, we need to compile all units
5692 within that file, not just the first one we find
5693 Fix error message for mains that are not found.
5694
56952011-08-04 Thomas Quinot <quinot@adacore.com>
5696
5697 * sem_ch6.adb: Update comment.
5698 * sem_ch12.adb: Minor reformatting.
5699
57002011-08-04 Bob Duff <duff@adacore.com>
5701
5702 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
5703 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
5704 race condition whose symptom is to fail to lock Parent. That, in turn,
5705 causes Parent.Awake_Count to be accessed without locking Parent, which
5706 causes another race condition whose symptom is that Parent.Awake_Count
5707 can be off by 1 (either too high or too low). The solution is to lock
5708 Parent unconditionally, and then lock Acceptor, before reading
5709 Acceptor.Terminate_Alternative.
5710
4fdebd93
AC
57112011-08-04 Arnaud Charlet <charlet@adacore.com>
5712
5713 * debug.adb: Update comment.
5714
57152011-08-04 Robert Dewar <dewar@adacore.com>
5716
5717 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
5718 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
5719 exp_ch6.adb: Minor reformatting.
5720
57212011-08-04 Gary Dismukes <dismukes@adacore.com>
5722
5723 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
5724 checks for -gnateE.
5725
57262011-08-04 Ed Schonberg <schonberg@adacore.com>
5727
5728 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
5729
57302011-08-04 Thomas Quinot <quinot@adacore.com>
5731
5732 * sinfo.ads: Minor reformatting.
5733
57342011-08-04 Emmanuel Briot <briot@adacore.com>
5735
5736 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
5737 even if there is no location.
5738
6aaa0587
ES
57392011-08-04 Ed Schonberg <schonberg@adacore.com>
5740
5741 * sem_res.adb, sem_ch4.adb: move check for restriction
5742 No_Task_Hierarchy to resolve_allocator.
5743
35a1c212
AC
57442011-08-04 Thomas Quinot <quinot@adacore.com>
5745
5746 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
5747 This flag of N_Pragma nodes is not used, remove it as well as all of
5748 the associated circuitry.
5749
57502011-08-04 Javier Miranda <miranda@adacore.com>
5751
5752 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
5753 runtime check on duplicated externa tags
5754 * debug.adb Document switch -gnatdQ.
5755
57562011-08-04 Gary Dismukes <dismukes@adacore.com>
5757
5758 * a-fihema.ads: Minor typo fix.
5759
57602011-08-04 Yannick Moy <moy@adacore.com>
5761
5762 * sem_ch10.adb: Minor comment update.
5763
57642011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5765
5766 * einfo.adb: Update the node field usage to reflect the renaming of
5767 Return_Flag to Return_ Flag_Or_Transient_Decl.
5768 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
5769 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
5770 (Write_Field15_Name): Change Return_Flag to
5771 Return_Flag_Or_Transient_Decl.
5772 * einfo.ads: Rename node field Return_Flag to
5773 Return_Flag_Or_Transient_Decl. Update the associated comment and all
5774 occurrences in entities.
5775 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
5776 associated Inline pragma.
5777 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
5778 associated Inline pragma.
5779 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
5780 routine.
5781 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
5782 Return_Flag and Set_Return_Flag.
5783 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
5784 objects generated for controlled transients declared inside an
5785 Exception_With_Actions. Update the calls to Return_Flag.
5786 (Process_Object_Declaration): Add code to add a null guard for hook
5787 objects generated for controlled transients declared inside an
5788 Exception_With_Actions. Update related comment.
5789 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
5790 objects generated for controlled transients declared inside an
5791 Exception_With_Actions. Update the calls to Return_Flag.
5792 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
5793
57942011-08-04 Ed Schonberg <schonberg@adacore.com>
5795
5796 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
5797 positional aggregate.
5798
57992011-08-04 Vincent Celier <celier@adacore.com>
5800
5801 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
5802 SLOC only for pragmas.
5803
58042011-08-04 Emmanuel Briot <briot@adacore.com>
5805
5806 * projects.texi: Minor typo fix.
5807
58082011-08-04 Emmanuel Briot <briot@adacore.com>
5809
5810 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
5811 on case-sensitive file systems.
5812
c2873f74
TQ
58132011-08-04 Thomas Quinot <quinot@adacore.com>
5814
5815 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
5816 nested in a disabled pragma.
5817 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
5818 enclosing pragma, if any, for X decisions.
5819
58202011-08-04 Thomas Quinot <quinot@adacore.com>
5821
5822 * sem_prag.adb: Minor reformatting.
5823
46414266
VC
58242011-08-04 Vincent Celier <celier@adacore.com>
5825
5826 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
5827 allowed in no run time mode.
5828
58292011-08-04 Vincent Celier <celier@adacore.com>
5830
5831 * make.adb (Check): When -gnatc is used, check for the source file
5832 inside the ALI file with a canonical case file name.
5833
afab164f
EB
58342011-08-04 Emmanuel Briot <briot@adacore.com>
5835
5836 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
5837 overriding the separator.
5838
fe0ec02f
AC
58392011-08-04 Robert Dewar <dewar@adacore.com>
5840
5841 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
5842 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
5843
58442011-08-04 Robert Dewar <dewar@adacore.com>
5845
5846 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
5847
58482011-08-04 Yannick Moy <moy@adacore.com>
5849
5850 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
5851 'Result only appears in postcondition of function.
5852
58532011-08-04 Thomas Quinot <quinot@adacore.com>
5854
5855 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
5856 external tag, include the value of the external tag in the exception
5857 message.
5858
0180fd26
AC
58592011-08-04 Yannick Moy <moy@adacore.com>
5860
5861 * sem_attr.adb (Result): modify error message for misplaced 'Result
5862
58632011-08-04 Sergey Rybin <rybin@adacore.com>
5864
5865 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
5866 clear that the second argument must be an identifier.
5867
58682011-08-04 Thomas Quinot <quinot@adacore.com>
5869
5870 * exp_ch9.adb (Build_Barrier_Function): When compiling with
5871 -fpreserve-control-flow, insert an IF statement on the barrier
5872 condition to ensure that a conditional branch instruction is generated.
5873
58742011-08-04 Emmanuel Briot <briot@adacore.com>
5875
5876 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
5877 (Processing_Flags.Ignore_Missing_With): new flag.
5878
58792011-08-04 Emmanuel Briot <briot@adacore.com>
5880
5881 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
5882 Source_List_File on case-insensitive systems where the file is actually
5883 on a case-sensitive file system (NFS,...).
5884
58852011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5886
5887 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
5888 function return contains a controlled [extension] aggregate and the
5889 return statement is not part of a handled sequence of statements, wrap
5890 the return in a block. This ensures that all controlled temporaries
5891 generated during aggregate resolution will be picked up by the
5892 finalization machinery.
5893
58942011-08-04 Ed Schonberg <schonberg@adacore.com>
5895
5896 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
5897 components, freeze type before resolution, to ensure that default
5898 initializations are present for all components.
5899 * sem_res.adb (Resolve_Actuals): the designated object of an
5900 accces-to-constant type is a legal actual in a call to an
5901 initialization procedure.
5902
59032011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5904
5905 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
5906 N_Unchecked_Type_Conversion to the possible containers of a renamed
5907 transient variable.
5908
78efd712
AC
59092011-08-04 Yannick Moy <moy@adacore.com>
5910
5911 * par-ch13.adb (Aspect_Specifications_Present): recognize
5912 "with Identifier'Class =>" as an aspect, so that a meaningful warning
5913 is issued in Strict mode.
5914 * par.adb: Fix typos in comments.
5915
59162011-08-04 Yannick Moy <moy@adacore.com>
5917
5918 * sem_attr.adb (Result): modify error message to take into account Post
5919 aspect when compiling Ada 2012 (or newer) code.
5920
59212011-08-04 Nicolas Roche <roche@adacore.com>
5922
5923 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 5924 remove need for GCC exceptions.
78efd712
AC
5925
59262011-08-04 Vincent Celier <celier@adacore.com>
5927
5928 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
5929 project, not the source file name.
5930 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
5931 excluded, continue looking. This excluded source will only be returned
5932 if there is no other source with the same base name that is not locally
5933 removed.
5934
59352011-08-04 Ed Schonberg <schonberg@adacore.com>
5936
5937 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
5938 private and one of the operands is a real literal, use a qualified
5939 expression rather than a conversion which is not meaningful to the
5940 back-end.
5941
0170a691
AC
59422011-08-04 Yannick Moy <moy@adacore.com>
5943
5944 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
5945 corresponding aspect X'Class are allowed, proceed with analysis of the
5946 aspect instead of skipping it.
5947
59482011-08-04 Tristan Gingold <gingold@adacore.com>
5949
5950 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
5951 This will allow to have an Ada implementation for the subprogram.
5952
deb4f5ba
ES
59532011-08-04 Ed Schonberg <schonberg@adacore.com>
5954
5955 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
5956 completion and aspects are present, apply them to the entity for the
5957 type which is currently the partial view, but which is the one that
5958 will be frozen.
5959 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
5960 applies to a partial view, indicate that the full view has predicates
5961 and delayed aspects.
5962 (Replace_Type_Reference): Handle properly predicates that apply to the
5963 full view of a private completion.
5964
fc893455
AC
59652011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5966
5967 * layout.adb (Layout_Type): For composite types, do not set Esize.
5968 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
5969 set Esize.
5970 (Size_Known): Look at the RM size of components instead of the Esize.
5971 (Freeze_Record_Type): Look at the RM size instead of the Esize to
5972 issue warning and activate Implicit_Packing.
5973 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
5974 if the Esize is not known.
5975 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
5976 for elementary types only.
5977 (Analyze_Record_Representation_Clause): Look at the RM size instead
5978 of the Esize to issue errors.
5979 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
5980 is not known.
5981 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 5982 obsolete block.
fc893455
AC
5983 Look at the RM size instead of the Esize for types if the latter is
5984 not known.
5985 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
5986
59872011-08-04 Ed Schonberg <schonberg@adacore.com>
5988
5989 * sem_type.adb: proper handling of equality not involving anonymous
5990 access types.
5991
b37d5bc6
AC
59922011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5993
5994 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
5995 Vis_Decls. When creating a library-level finalizer for a package spec,
5996 both the declaration and body of the finalizer are inserted either in
5997 the visible or private declarations of the package spec.
5998
59992011-08-04 Javier Miranda <miranda@adacore.com>
6000
6001 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
6002 use of the full-view of a type when invoking Is_Ancestor.
6003 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
6004 the full-view of private parents is requested, then use also the
6005 full-view of the parent of the first derivation.
6006
7ab4d95a
AC
60072011-08-04 Tristan Gingold <gingold@adacore.com>
6008
6009 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
6010 instead of the locally imported procedure.
6011 * s-taprop-mingw.adb (Enter_Task): Ditto.
6012 * s-valrea.adb (Scan_Real): Ditto.
6013 * s-imgrea.adb (Set_Image_Real): Ditto.
6014 * s-flocon.ads: Make the package pure.
6015
60162011-08-04 Thomas Quinot <quinot@adacore.com>
6017
6018 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
6019 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
6020 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
6021 New subprogram, moved here from...
6022 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
6023 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
6024 rewriting of the last argument into a procedure call statement here...
6025 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
6026 instead.
6027
60282011-08-04 Thomas Quinot <quinot@adacore.com>
6029
6030 * par_sco.adb: Minor reformatting.
6031
51c400f5
AC
60322011-08-04 Robert Dewar <dewar@adacore.com>
6033
6034 * erroutc.adb: Minor reformatting.
6035
60362011-08-04 Thomas Quinot <quinot@adacore.com>
6037
6038 * par_sco.adb: Comment update.
6039
60402011-08-04 Tristan Gingold <gingold@adacore.com>
6041
6042 * s-flocon.ads: New file.
6043 * g-flocon.ads: Now a renaming of s-flocon.
6044 * Makefile.rtl: Add s-flocon.o
6045
6a49f110
AC
60462011-08-04 Javier Miranda <miranda@adacore.com>
6047
6048 * exp_strm.adb (Build_Array_Input_Function): if the array type is
6049 constrained, do not attempt to build a subtype of it.
6050
60512011-08-04 Yannick Moy <moy@adacore.com>
6052
6053 * errout.ads Change comments: remove 'R'M as an example where quotes
6054 are needed; add ALFA as another case where quotes are not needed
6055 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
6056 case where quotes are not needed.
6057 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6058 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
6059 Remove all occurrences of 'A'L'F'A
6060
60612011-08-04 Ed Schonberg <schonberg@adacore.com>
6062
6063 * sem_ch13.adb: check legality of invariant pragma.
6064
a4640a39
AC
60652011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6066
6067 * bindgen.adb: Add comments.
6068
60692011-08-04 Yannick Moy <moy@adacore.com>
6070
6071 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
6072 synthesized flag.
6073 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
6074 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
6075
60762011-08-04 Robert Dewar <dewar@adacore.com>
6077
6078 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
6079 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
6080 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
6081
39ade2f9
AC
60822011-08-04 Thomas Quinot <quinot@adacore.com>
6083
6084 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
6085
60862011-08-04 Thomas Quinot <quinot@adacore.com>
6087
6088 PR ada/47880
6089 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
6090 allocated object.
6091
60922011-08-04 Robert Dewar <dewar@adacore.com>
6093
6094 * einfo.ads, exp_ch4.adb: Minor reformatting.
6095
60962011-08-04 Jerome Lambourg <lambourg@adacore.com>
6097
6098 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
6099
7efc3f2d
AC
61002011-08-04 Ed Schonberg <schonberg@adacore.com>
6101
6102 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
6103 type in all cases to compute list of primitive operations, because full
6104 view may be an itype that is not attached to the list of declarations.
6105
61062011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6107
6108 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
6109 library has already been finalized.
6110 (Gen_Adafinal_C): Likewise.
6111 (Gen_Adainit_Ada): Generate an early return if the library has
6112 already been elaborated.
6113 (Gen_Adainit_C): Likewise.
6114 (Gen_Output_File_Ada): Generate an elaboration flag.
6115 (Gen_Output_File_C): Likewise.
6116
f65df609
HK
61172011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6118
6119 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
6120 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
6121 built in the first place.
6122 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
6123 for CodePeer because Finalize_Address was not built to begin with.
6124 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
6125
a0fb8fe8
AC
61262011-08-04 Pascal Obry <obry@adacore.com>
6127
6128 * adaint.c (__gnat_tmp_name): Use current process id to create temp
6129 filenames, this ensures unicity of filenames across processes.
6130
61312011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6132
6133 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
6134 Raise_Controlled to Raise_From_Controlled_Operation. Update the
6135 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
6136 Add False as the actual to From_Abort in the generated call to
6137 Raise_From_Controlled_Operation.
6138
61392011-08-04 Jerome Lambourg <lambourg@adacore.com>
6140
6141 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
6142 so that the ali file name can be retrieved from outside of this package.
6143 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
6144 doing nothing in the general case, but used to update the object file
6145 timestamp if directly generated by the backend.
6146 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
6147 to a later time than the ali file one.
6148
9534ab17
AC
61492011-08-04 Yannick Moy <moy@adacore.com>
6150
6151 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
6152 entities whose body contains an Annotate pragma which forces formal
6153 proof on this body.
6154 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6155 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
6156 Mark_Non_ALFA_Subprogram to pass in a message and node.
6157 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
6158 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
6159 surrounding subprogram.
6160 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
6161 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
6162 as not in ALFA is annotated with Formal_Proof being On, then an error
6163 is issued based on the additional parameters for message and node.
6164 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
6165 * gcc-interface/Make-lang.in: Update dependencies.
6166
61672011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6168
6169 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
6170 Finalize_Address when CodePeer is enabled.
6171
61722011-08-04 Pascal Obry <obry@adacore.com>
6173
6174 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
6175 the latter returns a pointer to a static buffer which is deallocated
6176 at the end of the routine.
6177
5c0e97dd
AC
61782011-08-04 Yannick Moy <moy@adacore.com>
6179
6180 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
6181 after index creation; mark unconstrained base array type generated as
6182 being in/not in ALFA as well
6183 (Make_Index): mark subtype created as in/not in ALFA
6184 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
6185 over a loop as in/not in ALFA, depending on its type and form of loop
6186 iteration.
6187
61882011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6189
6190 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
6191 directly to False on .NET and JVM.
6192
7a93c64b
YM
61932011-08-04 Yannick Moy <moy@adacore.com>
6194
6195 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
6196 constraint that subtype must come from source code to be in ALFA, so
6197 that anonymous subtypes can be in ALFA too.
6198
e9a1ed9b
YM
61992011-08-04 Yannick Moy <moy@adacore.com>
6200
6201 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
6202 reference for ALFA mode.
6203 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
6204 procedure public so as to use it from formal verification back-end.
6205
8e293fbd
AC
62062011-08-04 Jerome Lambourg <lambourg@adacore.com>
6207
6208 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
6209 invalid checks of the Parameter, making Remove_Switch not working
6210 correctly.
6211
62122011-08-04 Arnaud Charlet <charlet@adacore.com>
6213
6214 * targparm.ads: Update header: no run-time exception is needed on this
6215 file.
6216
62172011-08-04 Vincent Celier <celier@adacore.com>
6218
6219 * a-fihema.adb: Use System.IO instead of GNAT.IO
6220
62212011-08-04 Thomas Quinot <quinot@adacore.com>
6222
6223 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
6224 are forbidden in Compiler_Unit mode.
6225
cfae2bed
AC
62262011-08-04 Robert Dewar <dewar@adacore.com>
6227
6228 * sem_util.adb: Minor reformatting.
6229
62302011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6231
6232 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
6233 library-level finalizers.
6234 (Gen_Finalize_Library_C): Update the import string for library-level
6235 finalizers.
6236 (Gen_Finalize_Library_Defs_C): Update the definition name of a
6237 library-level finalizer.
6238 * exp_ch7.adb: Remove with and use clauses for Stringt.
6239 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
6240 Spec_Decl. Add local variable Body_Id. The names of library-level
6241 finalizers are now manually fully qualified and are no longer external.
6242 A single name is now capable of servicing .NET, JVM and non-VM targets.
6243 Pragma Export is no longer required to provide visibility for the name.
6244 (Create_Finalizer_String): Removed.
6245 (New_Finalizer_Name): New routine which mimics New_..._Name.
6246
01f0729a
AC
62472011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6248
6249 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
6250 elaboration counter to Standard_Short_Integer.
6251 * sem_util.adb (Build_Elaboration_Entity): Likewise.
6252 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
6253 (Gen_Elab_Externals_C): Likewise.
6254
62552011-08-04 Ed Falis <falis@adacore.com>
6256
6257 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
6258 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
6259 system-vxworks-mips.ads, system-vxworks-x86.ads
6260 (Always_Compatible_Rep): set to False for all VxWorks targets.
6261
2c1b72d7
AC
62622011-08-04 Robert Dewar <dewar@adacore.com>
6263
6264 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
6265 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
6266 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
6267 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
6268 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
6269 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
6270 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
6271 Minor reformatting and code reorganization.
6272
62732011-08-04 Emmanuel Briot <briot@adacore.com>
6274
6275 * projects.texi: Added doc for aggregate projects.
6276
824e9320
AC
62772011-08-04 Emmanuel Briot <briot@adacore.com>
6278
6279 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
6280 Add support for overriding the Project_Path in aggregate projects.
6281
62822011-08-04 Robert Dewar <dewar@adacore.com>
6283
6284 * a-cofove.ads: Minor reformatting.
6285
62862011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6287
6288 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
6289 on the generated code.
6290 (Build_Finalize_Statements): Update the comment on the generated code.
6291 (Build_Initialize_Statements): Update the comment on the generated code.
6292 (Build_Object_Declarations): Add local variable Result. The object
6293 declarations are now built in sequence.
6294 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
6295 RE_Unit_Table.
6296
62972011-08-04 Robert Dewar <dewar@adacore.com>
6298
6299 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
6300
63012011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6302
6303 * einfo.ads (Elaboration_Entity): Document new definition and use.
6304 (Elaboration_Entity_Required): Adjust to above change.
6305 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
6306 * exp_ch12.adb: And with and use for Snames.
6307 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
6308 * exp_util.adb (Set_Elaboration_Flag): Likewise.
6309 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
6310 <Check_Unit_Name>: Deal with N_Expanded_Name.
6311 <Attribute_Elaborated>: Extend to all unit names.
6312 * sem_elab.adb: And with and use for Uintp.
6313 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
6314 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
6315 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
6316 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
6317 from Gen_Adainit_Ada.
6318 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
6319 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
6320 case, do not call System.Standard_Library.Adafinal; instead call
6321 finalize_library if needed.
6322 (Gen_Adafinal_C): Likewise.
6323 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
6324 non-main program case.
6325 (Gen_Adainit_C): Generate a couple of external declarations here.
6326 In the main program case, set SSL.Finalize_Library_Objects.
6327 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
6328 (Gen_Elab_Calls_C): Likewise.
6329 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
6330 (Gen_Finalize_Library_C): Likewise. Generate a full function.
6331 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
6332 objects here.
6333 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
6334 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
6335 Gen_Adafinal_Ada.
6336 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
6337 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 6338 of external declarations. Call Gen_Finalize_Library_C.
824e9320 6339
316d9d4f
EB
63402011-08-04 Emmanuel Briot <briot@adacore.com>
6341
6342 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
6343 Compute_Compilation_Phases): new subprogram.
6344 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
6345 The number of mains as well as the various compilation phases that
6346 need to be run are now project tree specific, since various
6347 aggregated trees might have different requirements. In particular,
6348 they do not all require bind or link phases.
6349
9434c32e
EB
63502011-08-04 Emmanuel Briot <briot@adacore.com>
6351
6352 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
6353 (Project_Tree_Appdata): New type.
6354 It is now possible to associate application-specific data to a project
6355 tree. In particular, this is used in the gprbuild builder to avoid a
6356 number of global tables and htables, especially now that there can be
6357 several project trees loaded at once because of aggregate projects.
6358 (Debug_Name): new procedure.
6359 * projects.texi: Clarify syntax of "**" for Source_Dirs
6360
41ba34db
EB
63612011-08-03 Emmanuel Briot <briot@adacore.com>
6362
6363 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
6364 the "roots" for a main.
6365 (Fill_From_Project): add support for aggregate projects. Main units
6366 in aggregated projects are now automatically added in the list of
6367 files to build (although this fails later on in gprbuild, because
6368 these files are not using the root proejct tree, so this needs
6369 further cleanup)
6370 * gcc-interface/Make-lang.in: Update dependencies.
6371
fccd42a9
AC
63722011-08-03 Yannick Moy <moy@adacore.com>
6373
6374 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
6375 conditional expression in ALFA.
6376 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
6377 expressions as not in ALFA.
6378
63792011-08-03 Robert Dewar <dewar@adacore.com>
6380
6381 * a-cofove.adb: Minor reformatting.
6382
63832011-08-03 Emmanuel Briot <briot@adacore.com>
6384
6385 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
6386 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
6387 gprbuild sources.
6388 These packages are more logically placed in the Queue package, since
6389 they manipulate the queue. It is also likely that they can be adapted
6390 for gnatmake, thus sharing more code.
6391 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
6392 that we could move the above.
6393
63942011-08-03 Emmanuel Briot <briot@adacore.com>
6395
6396 * errutil.adb (Finalize): clean up the list of error messages on exit.
6397 Calling this subprogram multiple times will no longer show duplicate
6398 error messages on stderr.
6399
64002011-08-03 Emmanuel Briot <briot@adacore.com>
6401
6402 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
6403 Getopt_Switches when we have already define a command line
6404 configuration.
6405
5e8c8e44
YM
64062011-08-03 Yannick Moy <moy@adacore.com>
6407
6408 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
6409 in ALFA. Instead, they are considered as assertions to prove.
6410 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
6411 nodes as not in ALFA. Instead, include conditional expressions in ALFA
6412 if they have no ELSE part, or if they occur in pre- and postconditions,
6413 where the Condition cannot have side-effects in ALFA
6414 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
6415 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
6416 Instead, include type conversion between scalar types in ALFA.
6417 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
6418 if-and-only-if its type is in ALFA.
6419
5ffe0bab
AC
64202011-08-03 Thomas Quinot <quinot@adacore.com>
6421
6422 * scos.adb, get_scos.adb, put_scos.adb
6423 New code letter for decisions: G (entry guard)
6424 * par_sco.adb
6425 (Traverse_Subprogram_Body): Rename to...
6426 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
6427 (Traverse_Protected_Body): New subprogram
6428 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
6429 protected bodies and entry bodies.
6430
64312011-08-03 Yannick Moy <moy@adacore.com>
6432
6433 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
6434 entities with get/set subprograms, which is set on procedure entities
6435 generated by the compiler for a postcondition.
6436 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
6437 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
6438 entity for a declaration
6439 (Get_Unique_Entity_For_Decl): new function returning an entity which
6440 represents a declaration, so that matching spec and body have the same
6441 entity.
6442
64432011-08-03 Robert Dewar <dewar@adacore.com>
6444
6445 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
6446 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
6447
64482011-08-03 Yannick Moy <moy@adacore.com>
6449
6450 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
6451 library-level because retriction No_Implicit_Dynamic_Code in the
6452 front-end prevents its definition as a local subprogram
6453 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
6454 for reuse in other contexts
6455 (Traverse_Declarations_Or_Statements,
6456 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6457 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
6458 procedures take a callback parameter to be called on all declarations
6459 * lib-xref.ads
6460 (Traverse_All_Compilation_Units): new generic function to traverse a
6461 compilation unit and call a callback parameter on all declarations
6462
f9ad6b62
AC
64632011-08-03 Javier Miranda <miranda@adacore.com>
6464
6465 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
6466 in Java since they are always enclosed in a namespace that
6467 differentiates them, and overloaded entities are supported by the VM.
6468
64692011-08-03 Ed Schonberg <schonberg@adacore.com>
6470
6471 * checks.adb (Determine_Range): If a computed bound of an operation is
6472 outside the range of the base type of the expression, and overflow
6473 checks are enabled, the result is unknown and cannot be used for any
6474 subsequent constant folding.
6475 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
6476 unknown, so is the result of the comparison.
6477
64782011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6479
6480 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
6481 From_Abort. When finalization was triggered by an abort, propagate
6482 Standard'Abort_Signal rather than Program_Error.
6483 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
6484 From_Abort.
6485 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
6486 From_Abort. When finalization was triggered by an abort, propagate
6487 Standard'Abort_Signal rather than Program_Error.
6488 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
6489 From_Abort.
6490 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
6491 Abort_Id. Update the calls to Build_Object_Declarations and
6492 Build_Raise_Statement to include Abort_Id.
6493 (Build_Adjust_Statements): New local variable Abort_Id. Update the
6494 calls to Build_Object_Declarations and Build_Raise_Statement to include
6495 Abort_Id.
6496 (Build_Finalize_Statements): New local variable Abort_Id. Update the
6497 calls to Build_Object_Declarations and Build_Raise_Statement to include
6498 Abort_Id.
6499 (Build_Components): Create an entity for Abort_Id when exceptions are
6500 allowed on the target.
6501 (Build_Finalizer): New local variable Abort_Id.
6502 (Build_Initialize_Statements): New local variable Abort_Id. Update the
6503 calls to Build_Object_Declarations and Build_Raise_Statement to include
6504 Abort_Id.
6505 (Build_Object_Declarations): Add new formal Abort_Id. Create the
6506 declaration of flag Abort_Id to preserve the original abort status
6507 before finalization code is executed.
6508 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
6509 runtime routine Raise_From_Controlled_Operation.
6510 (Create_Finalizer): Update the call to Build_Raise_Statement to include
6511 Abort_Id. Update the call to Build_Object_Declarations to include
6512 Abort_Id. Update the layout of the finalizer body.
6513 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
6514 (Process_Transient_Objects): New local variable Abort_Id. Remove the
6515 clunky code to create all flags and objects related to
6516 exception propagation and replace it with a call to
6517 Build_Object_Declarations. Update the call to Build_Raise_Statement to
6518 include Abort_Id.
6519 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
6520 Add new formal Abort_Id and associated comment on its use.
6521 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
6522 on its use.
6523 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
6524 Remove the clunky code to create all flags and objects related to
6525 exception propagation and replace it with a call to
6526 Build_Object_Declarations. Update the call to Build_Raise_Statement.
6527
65282011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6529
6530 * s-tassta.adb: Fix minor typos.
6531
65322011-08-03 Robert Dewar <dewar@adacore.com>
6533
6534 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
6535 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
6536
1cdfa9be
AC
65372011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6538
6539 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
6540 to packages. This ensures that the finalizer body will not end up
6541 inside the freeze node.
6542 (Process_Declarations): Add code to detect whether a freeze node has a
6543 nested finalization collection.
6544
65452011-08-03 Pascal Obry <obry@adacore.com>
6546
6547 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
6548 (Current_Session): Return a not null access to Session_Type.
6549 (Default_Session): Likewise.
6550
243cae0a
AC
65512011-08-03 Robert Dewar <dewar@adacore.com>
6552
6553 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
6554 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
6555
65562011-08-03 Pascal Obry <obry@adacore.com>
6557
6558 * g-awk.ads: Minor comment fix.
6559
65602011-08-03 Sergey Rybin <rybin@adacore.com>
6561
6562 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6563 the tree structure related to discriminant constraints.
6564 Original_Discriminant cannot be used any more for computing the
6565 defining name for the reference to a discriminant.
6566
65672011-08-03 Ed Schonberg <schonberg@adacore.com>
6568
6569 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
6570 function is not visibly tagged, this is not a dispatching call and
6571 therfore is not Tag_Indeterminate, even if the function is marked as
6572 dispatching on result.
6573
f553e7bc
AC
65742011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6575
6576 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
6577 (Expand_N_Free_Statement): Add a guard to protect against run-times
6578 which do not support controlled types.
6579 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
6580 against run-times which do not support controlled types.
6581 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
6582 against run-times which do not support controlled types.
6583 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
6584 against run-times which do not support controlled types.
6585 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
6586 protect against run-times which do not support controlled types.
6587
65882011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6589
6590 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
6591 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
6592
e4982b64
AC
65932011-08-03 Ed Schonberg <schonberg@adacore.com>
6594
6595 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
6596 modified in the source, to prevent spurious warnings when compiling
6597 with -gnatg.
6598
65992011-08-03 Thomas Quinot <quinot@adacore.com>
6600
6601 * a-except-2005.adb: Minor reformatting.
6602
66032011-08-03 Ed Schonberg <schonberg@adacore.com>
6604
6605 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
6606 is a renaming declaration in the private part of a package, do not emit
6607 a warning that the with_clause could be moved because the renaming may
6608 be used in the body or in a child unit.
6609
66102011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6611
6612 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6613 Propagate the Comes_From_Source attribute from the original return
6614 object to the renaming.
6615
66162011-08-03 Jose Ruiz <ruiz@adacore.com>
6617
6618 * exp_ch7.adb (Build_Raise_Statement): Do not call
6619 Raise_From_Controlled_Operation when this routine is not present in
6620 the run-time library.
6621 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
6622 libraries (Ravenscar), tasks are non-terminating, and protected objects
6623 and tasks can only appear at library level, so we do not want
6624 finalization of protected objects nor tasks.
6625 * exp_intr.adb: Minor clarification in comment.
6626 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
6627 Gen_Output_File_C): Remove references to finalization of library-level
6628 objects when using restricted run-time libraries.
6629
66302011-08-03 Ed Schonberg <schonberg@adacore.com>
6631
6632 * sem_ch3.adb (Build_Discriminant_Constraints): Set
6633 Original_Discriminant only if the parent type is a generic formal.
6634
deb8dacc
HK
66352011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6636
6637 * exp_ch13.adb: Add with and use clause for Targparm;
6638 (Expand_N_Free_Statement): Prevent the generation of a custom
6639 Deallocate on .NET/JVM targets since this requires pools and address
6640 arithmetic.
6641 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
6642 .NET/JVM targets, attach the newly allocated object to the access
6643 type's finalization collection. Do not generate a call to
6644 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
6645 exist in the runtime.
6646 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
6647 create a custom Allocate for object that do not require initialization.
6648 Attach a newly allocated object to the access type's finalization
6649 collection on .NET/JVM.
6650 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
6651 assignment of controlled types on .NET/JVM. The two hidden pointers
6652 Prev and Next and stored and later restored after the assignment takes
6653 place.
6654 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
6655 kludge for .NET/JVM to recognize a particular piece of code coming from
6656 Heap_Management and change the call to Finalize into Deep_Finalize.
6657 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
6658 finalization collections on .NET/JVM only for types derived from
6659 Controlled. Separate the association of storage pools with a collection
6660 and only allow it on non-.NET/JVM targets.
6661 (Make_Attach_Call): New routine.
6662 (Make_Detach_Call): New routine.
6663 (Process_Object_Declarations): Suppress the generation of
6664 build-in-place return object clean up code on .NET/JVM since it uses
6665 pools.
6666 * exp_ch7.ads (Make_Attach_Call): New routine.
6667 (Make_Detach_Call): New routine.
6668 * exp_intr.adb Add with and use clause for Targparm.
6669 (Expand_Unc_Deallocation): Detach a controlled object from a collection
6670 on .NET/JVM targets.
6671 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
6672 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
6673 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
6674 names used in finalization.
6675
66762011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6677
6678 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
6679 (Attach, Detach): Lock the current task when chaining an object onto a
6680 collection.
6681
df3e68b1
HK
66822011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6683
6684 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
6685 Rewritten to create the message strings when the exception is not
6686 raised by an abort during finalization.
6687 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
6688 Raise_From_Controlled_Operation and update its associated comment.
6689 * a-fihema.ads, a-fihema.adb: New GNAT unit.
6690 Ada.Finalization.Heap_Management provides key functionality
6691 associated with controlled objects on the heap, their creation,
6692 finalization and reclamation. Type Finalization_Collection is
6693 effectively a wrapper which sits ontop of a storage pool and performs
6694 all necessary bookkeeping for all the objects it contains. Each
6695 access-to-controlled or access-to-class-wide type receives a collection
6696 as part of its expansion. The compiler generates buffer code and
6697 invokes Allocate / Deallocate to create and destroy allocated
6698 controlled objects.
6699 * a-finali.adb ("="): Removed.
6700 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
6701 fields Prev and Next.
6702 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
6703 A library unit with at least one controlled object on the library level
6704 has a special finalizer which is invoked by the binder. To signal this,
6705 ali files carry field PF.
6706 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
6707 associated comment on field usage.
6708 * a-tags.adb (Get_RC_Offset): Removed.
6709 (Needs_Finalization): New routine.
6710 * a-tags.ads: Update the structure of the GNAT dispatch tables.
6711 Dispatch tables now carry field Needs_Finalization which provides
6712 runtime indication whether a type is controlled or has controlled
6713 components or both. Remove field RC_Offset.
6714 (Get_RC_Offset): Removed along with its associated pragma Export.
6715 Since tagged types with controlled components no longer carry hidden
6716 field _controller, the special mechanism to retrieve its location is no
6717 longer needed.
6718 (Needs_Finalization): New routine.
6719 * atree.ads, atree.adb (Elist24): New routine.
6720 (Set_Elist24): New routine.
6721 * atree.h: Add a define clause for Elist24.
6722 * bindgen.adb New library-level variable Lib_Final_Built.
6723 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
6724 presence of a VM target, the routine generates calls to the proper
6725 library finalization routine.
6726 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
6727 targets. Set the correct library finalization routine depending on
6728 whether the library has controlled objects or this is a VM compilation.
6729 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
6730 to library-level finalizers of compiled units in reverse order of
6731 elaboration. It also produces exception management code and reraises a
6732 potential exception after all units have been finalized.
6733 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
6734 library-level finalizers of compiled units in reverse order of
6735 elaboration.
6736 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
6737 definitions of all library-level finalizers available to the compilation
6738 (Gen_Main_Ada): Directly call Adafinal which now contails all target
6739 dependent code.
6740 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
6741 System.Standard_Library.Adafinal directly. If the library needs
6742 finalization actions, create the sequence of finalization calls.
6743 (Gen_Output_File_Ada): Alphabetize local variables and constants.
6744 Generate a with clause for System.Soft_Links when compiling for a VM.
6745 Remove the code which imports System.Standard_Library.Adafinal as
6746 Do_Finalize. Generate the library finalization routine.
6747 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
6748 If the library needs finalization actions, create all the definitions
6749 of library- level finalizers.
6750 (Has_Finalizer): New routine. Determines whether at least one compiled
6751 unit has a library-level finalizer.
6752 Add type Qualification_Mode.
6753 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
6754 * einfo.adb: New usage of field 15 as Return_Flag.
6755 Remove Finalization_Chain_Entity from the usages of field 19.
6756 Remove Associated_Final_Chain from the usages of field 23.
6757 New usage of field 23 as Associated_Collection.
6758 New usage of field 24 as Finalizer.
6759 New usage of flag 252 as Is_Processed_Transient.
6760 (Associated_Final_Chain): Removed.
6761 (Associated_Collection): New routine.
6762 (Finalization_Chain_Entity): Removed.
6763 (Finalizer): New routine.
6764 (Is_Finalizer): New routine.
6765 (Is_Processed_Transient): New routine.
6766 (Return_Flag): New routine.
6767 (Set_Associated_Final_Chain): Removed.
6768 (Set_Associated_Collection): New routine.
6769 (Set_Finalization_Chain_Entity): Removed.
6770 (Set_Finalizer): New routine.
6771 (Set_Is_Processed_Transient): New routine.
6772 (Set_Return_Flag): New routine.
6773 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
6774 displayed flags.
6775 (Write_Field8_Name): Alphabetize the output.
6776 (Write_Field11_Name): Alphabetize the output.
6777 (Write_Field12_Name): Alphabetize the output.
6778 (Write_Field13_Name): Alphabetize the output.
6779 (Write_Field14_Name): Alphabetize the output.
6780 (Write_Field15_Name): Alphabetize the output.
6781 (Write_Field16_Name): Alphabetize the output.
6782 (Write_Field17_Name): Alphabetize the output.
6783 (Write_Field18_Name): Alphabetize the output.
6784 (Write_Field19_Name): Alphabetize the output. Remove the output of
6785 Finalization_Chain_Entity.
6786 (Write_Field20_Name): Alphabetize the output.
6787 (Write_Field21_Name): Alphabetize the output.
6788 (Write_Field22_Name): Alphabetize the output.
6789 (Write_Field23_Name): Alphabetize the output. Remove the output of
6790 Associated_Final_Chain. Add output for Associated_Collection.
6791 (Write_Field24_Name): Alphabetize the output.
6792 (Write_Field25_Name): Add output for Finalizer.
6793 (Write_Field26_Name): Alphabetize the output.
6794 (Write_Field27_Name): Alphabetize the output.
6795 (Write_Field28_Name): Alphabetize the output.
6796 * einfo.ads: Add new field description for Associated_Collection and
6797 its uses in nodes.
6798 Remove Associated_Final_Chain and its uses in nodes.
6799 Remove Finalization_Chain_Entity and its uses in nodes.
6800 Add new field description for Finalizer and its uses in nodes.
6801 Add new synthesized attribute Is_Finalizer.
6802 Add new flag description for Is_Processed_Transient and its uses in
6803 nodes.
6804 Add new field description for Return_Flag and its uses in nodes.
6805 (Associated_Final_Chain): Removed along with its pragma Inline.
6806 (Associated_Collection): New routine and pragma Inline.
6807 (Finalization_Chain_Entity): Removed along with its pragma Inline.
6808 (Finalizer): New routine and pragma Inline.
6809 (Is_Finalizer): New routine and pragma Inline.
6810 (Is_Processed_Transient): New routine and pragma Inline.
6811 (Return_Flag): New routine and pragma Inline.
6812 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
6813 (Set_Associated_Collection): New routine and pragma Inline.
6814 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
6815 (Set_Finalizer): New routine and pragma Inline.
6816 (Set_Is_Processed_Transient): New routine and pragma Inline.
6817 (Set_Return_Flag): New routine and pragma Inline.
6818 * exp_aggr.adb: Alphabetize subprograms.
6819 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
6820 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
6821 associated comments. Remove local variables External_Final_List and
6822 Attach.
6823 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
6824 Ancestor. Remove the retrieval of finalization lists. Update the call to
6825 Make_Adjust_Call.
6826 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
6827 lists. Update the call to Late_Expansion.
6828 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
6829 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
6830 (Gen_Assign): Remove the retrieval of the finalization list used to
6831 build the assignment. Update the calls to Make_Init_Call and
6832 Make_Adjust_Call.
6833 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
6834 Remove the mechanism to determine attachment levels and finalization
6835 list retrieval. Remove the processing for coextensions.
6836 (Init_Controller): Removed. Controllers no longer exist.
6837 (Late_Expansion): Remove formals Flist and Obj along with their
6838 associated comments. Update the calls to Build_Record_Aggr_Code and
6839 Build_Array_Aggr_Code.
6840 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
6841 (Expand_N_Freeze_Entity): Add special processing for finalizers which
6842 appear in entry bodies, protected subprograms and task bodies.
6843 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
6844 * exp_ch3.adb (Add_Final_Chain): Removed.
6845 (Build_Array_Init_Proc): Alphabetize local variables.
6846 (Build_Assignment): Alphabetize local variables. Update the call to
6847 Maked_Adjust_Call.
6848 (Build_Class_Wide_Master): Rename local variables to better reflect
6849 their role.
6850 (Build_Discriminant_Assignments): Code reformatting.
6851 (Build_Init_Call_Thru): Code reformatting.
6852 (Build_Init_Procedure): Code reformatting. Generate a special version
6853 of Deep_Finalize which is capable of finalizing all initialized
6854 components and ignore the rest.
6855 (Build_Init_Statements): Rename local variables to better reflect their
6856 role.
6857 Reimplement the mechanism to include the creation and update of an index
6858 variable called a "counter". It is used as a bookmark for tracing
6859 initialized and non-initialized components.
6860 (Build_Initialization_Call): Remove local variable Controller_Typ.
6861 Alphabetize all local variables. Remove the initialization of the
6862 record controller and update the call to Make_Init_Call.
6863 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
6864 New local variable Counter.
6865 (Constrain_Array): Alphabetize.
6866 (Expand_Freeze_Array_Type): Create a collection instead of a
6867 finalization list.
6868 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
6869 Finalize_Address which is used in conjunction with allocated controlled
6870 objects.
6871 (Expand_N_Object_Declaration): Remove the creation of a finalization
6872 list for anonymous access types. Update the calls to Make_Init_Call and
6873 Make_Adjust_Call.
6874 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
6875 retrieval of finalization lists. Remove the expansion of the record
6876 controller. Create TSS primitive Finalize_Address used in conjunction
6877 with controlled objects on the heap. Create finalization collections
6878 for access-to-controlled record components.
6879 (Expand_Record_Controller): Removed.
6880 (Freeze_Type): Remove the freezing of record controllers. Freezing of
6881 class-wide types now requires additional processing. Create
6882 finalization collections for access-to-controlled types.
6883 (Increment_Counter): New routine.
6884 (Make_Counter): New routine.
6885 (Make_Eq_If): Remove the mention of Name_uController.
6886 (Make_Predefined_Primitive_Specs): There is no longer need to skip
6887 types coming from System.Finalization_Root.
6888 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
6889 (Predefined_Primitive_Bodies): There is no longer need to skip types
6890 coming from System.Finalization_Root.
6891 (Stream_Operation_OK): Do not generate stream routines for
6892 type Ada.Finalization.Heap_Management.Finalization_Collection.
6893 * exp_ch3.ads: Alphabetize subprograms.
6894 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
6895 Add with and use clause for Lib.
6896 (Complete_Coextension_Finalization): Removed.
6897 (Complete_Controlled_Allocation): New routine. Create a finalization
6898 collection for anonymous access-to-controlled types. Create a custom
6899 Allocate which interfaces with the back end and the machinery in
6900 Heap_Management.
6901 (Expand_Allocator_Expression): Add necessary calls to
6902 Complete_Controlled_Allocation. Remove the retrieval of finalization
6903 lists. Update the calls to Make_Adjust_Call. Generate a call to
6904 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6905 the associated collection.
6906 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
6907 Code clean up. Remove the retrieval of finalization lists and
6908 attachment levels.
6909 Update the call to Make_Init_Call. Generate a call to
6910 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6911 the associated collection.
6912 (Get_Allocator_Final_List): Removed. Finalization lists are not
6913 available.
6914 (Suitable_Element): Remove the mention of Name_uController.
6915 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
6916 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
6917 the left hand side, carry out the assignment and adjust the left hand
6918 side.
6919 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
6920 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
6921 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
6922 BIP_Collection and BIPcollection.
6923 (Build_Heap_Allocator): New routine used to allocate the return object
6924 of a build-in-place function onto a collection.
6925 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
6926 (Expand_Call): Do not replace direct calls to Deep routines with their
6927 aliases.
6928 (Expand_N_Extended_Return_Statement): Give all variables shorter names
6929 and update their occurrences. Add a special return flag to monitor the
6930 [ab]normal execution of the function. The flag is set right before the
6931 return statement.
6932 Rewrite the mechanism used to allocate a build-in-place return object
6933 on the heap or on a storage pool.
6934 (Is_Direct_Deep_Call): New routine.
6935 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
6936 build-in-place function call instead of a final list. Build a call to
6937 Set_Finalize_Address_Ptr to decorate the associated collection.
6938 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
6939 order to name the build-in-place function call's result for later
6940 finalization. Add a collection to a build-in-place function call
6941 instead of a final list.
6942 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
6943 build-in-place function call instead of a final list. Remove the code
6944 which moves one final list and transforms it into the actual in a
6945 nested build-in-place call.
6946 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
6947 build-in-place function call instead of a final list.
6948 (Move_Final_List): Removed.
6949 (Needs_BIP_Collection): New routine.
6950 (Needs_BIP_Final_List): Removed.
6951 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
6952 enumeration type BIP_Formal_Kind.
6953 Update the related comment.
6954 (Needs_BIP_Collection): New routine.
6955 (Needs_BIP_Final_List): Removed.
6956 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
6957 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
6958 majority of subprograms in this unit. Add Name_Finalize_Address to
6959 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
6960 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
6961 statements for an array type.
6962 (Build_Adjust_Statements): Create the adjust statements for a record
6963 type.
6964 (Build_Cleanup_Statements): New routine. A procedure which given any
6965 construct containing asynchronous calls, references to _master, or is a
6966 task body, a task allocation or a protected body produces the necessary
6967 runtime calls to clean up these constructs.
6968 (Build_Exception_Handler): New routine.
6969 (Build_Final_List): Removed.
6970 (Build_Finalization_Collection): New routine. A core procedure which
6971 creates a collection to service heap allocated controlled objects
6972 associated with an access-to-controlled type.
6973 (Build_Finalize_Statements): Create the finalization statements for a
6974 record types.
6975 (Build_Finalizer): New routine. A core procedure which given any
6976 construct with declarations and/or statements detects all objects which
6977 need any type of clean up (controlled objects, protected objects) and
6978 generates all necessary code to clean up the said objects in the proper
6979 order.
6980 (Build_Finalizer_Call): New routine.
6981 (Build_Initialize_Statements): Create the initialization statements for
6982 an array type. The generated routine contains code to finalize partially
6983 initialized arrays.
6984 (Build_Object_Declarations): New routine.
6985 (Build_Raise_Statement): New routine.
6986 (Clean_Simple_Protected_Objects): Removed.
6987 (Controller_Component): Removed.
6988 (Enclosing_Function): New routine.
6989 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
6990 either declarations or statements or both.
6991 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
6992 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
6993 package.
6994 (Find_Final_List): Removed.
6995 (Global_Flist_Ref): Removed.
6996 (In_Finalization_Root): Removed.
6997 (Insert_Actions_In_Scope_Around): Determine the range of the transient
6998 scope in terms of tree nodes. Process all transient variables within
6999 that range.
7000 (Make_Adjust_Call): Rewritten. There is no longer an attach call
7001 generated after the adjust.
7002 (Make_Attach_Call): Removed.
7003 (Make_Call): New routine.
7004 (Make_Clean): Removed.
7005 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
7006 build routines.
7007 (Make_Deep_Proc): Rewritten to generate the new profile signature used
7008 in Deep routines.
7009 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
7010 build routines.
7011 (Make_Final_Call): Modified to simply create a call to either
7012 Deep_Finalize or Finalize.
7013 (Make_Finalize_Address_Body): New routine.
7014 (Make_Finalize_Address_Stmts): New routine. A function which produces
7015 TSS primitive Finalize_Address used in conjunction with heap allocated
7016 controlled objects.
7017 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
7018 (Make_Init_Call): Rewritten. There is no longer an attach call
7019 generated after initialization.
7020 (Make_Local_Deep_Finalize): New routine.
7021 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7022 (Make_Transient_Block): Remove the finalization list retrieval and
7023 manipulation.
7024 (Needs_Finalization): Moved to Exp_Util.
7025 (Parent_Field_Type): New routine.
7026 (Preprocess_Components): New routine.
7027 (Process_Transient_Objects): New routine.
7028 (Wrap_HSS_In_Block): New routine.
7029 (Wrap_Transient_Declaration): Remove finalization list management and
7030 controller insertion.
7031 (Wrap_Transient_Expression): Code reformatting.
7032 (Wrap_Transient_Statement): Code reformatting.
7033 * exp_ch7.ads (Build_Final_List): Removed.
7034 (Build_Finalization_Collection): New routine.
7035 (Build_Raise_Statement): New routine.
7036 (Controller_Component): Removed.
7037 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
7038 (Find_Final_List): Removed.
7039 (In_Finalization_Root): Removed.
7040 (Is_Simple_Protected_Type): Update related comment.
7041 (Make_Adjust_Call): New parameter profile and associated comments.
7042 (Make_Attach_Call): Removed.
7043 (Make_Final_Call): New parameter profile and associated comments.
7044 (Make_Finalize_Address_Body): New routine.
7045 (Make_Init_Call): New parameter profile and associated comments.
7046 (Make_Local_Deep_Finalize): New routine.
7047 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7048 (Needs_Finalization): Moved to Exp_Util.
7049 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
7050 (Expand_N_Protected_Body): Remove the handling of finalization lists.
7051 (Find_Protection_Type): Moved to Exp_Util.
7052 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
7053 (Make_DT): Update sequence of dispatch table initialization. Remove the
7054 initialization of field RC_Offset. Add initialization of field Needs_
7055 Finalization.
7056 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
7057 Reimplement how an object is first finalized, then deallocated.
7058 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
7059 Code reformatting.
7060 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
7061 Register TSS_Finalize_Address with type TSS_Names.
7062 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
7063 procedure provides the interface between an allocation / deallocation
7064 and the support machinery in Ada.Finalization.Heap_Management.
7065 (Find_Init_Call): Code reformatting.
7066 (Find_Init_Call_In_List): Code reformatting.
7067 (Find_Protection_Type): Moved from Exp_Ch9.
7068 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
7069 (Has_Controlled_Coextensions): Removed.
7070 (Has_Controlled_Objects): New routine.
7071 (In_Library_Level_Package_Body): New routine.
7072 (Insert_Action_After): New routine.
7073 (Is_Finalizable_Transient): New routine. This predicate determines
7074 whether an object declaration is one of the many variants of controlled
7075 transients.
7076 (Is_Null_Access_BIP_Func_Call): New routine.
7077 (Is_Non_BIP_Func_Call): New routine.
7078 (Is_Related_To_Func_Return): New routine.
7079 (Needs_Finalization): Moved from Exp_Ch7.
7080 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
7081 (Find_Protection_Type): Moved from Exp_Ch9.
7082 (Has_Controlled_Coextensions): Removed.
7083 (Has_Controlled_Objects): New routine.
7084 (In_Library_Level_Package_Body): New routine.
7085 (Insert_Action_After): New routine.
7086 (Is_Finalizable_Transient): New routine.
7087 (Is_Null_Access_BIP_Func_Call): New routine.
7088 (Is_Non_BIP_Func_Call): New routine.
7089 (Is_Related_To_Func_Return): New routine.
7090 (Needs_Finalization): Moved from Exp_ch7.
7091 * expander.adb (Expand): Add a case for N_Free_Statement.
7092 * freeze.adb (Freeze_All): Replace the generation of a finalization
7093 list with a collection for access-to-controlled types.
7094 (Freeze_Entity): Code reformatting.
7095 (Freeze_Record_Type): Remove the freezing of a record controller
7096 component.
7097 (Freeze_Subprogram): Code reformatting.
7098 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
7099 finalization list.
7100 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
7101 has a library-level finalizer.
7102 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
7103 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
7104 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
7105 files. Add a-fihema to the list of object files.
7106 * par-ch4.adb:
7107 Alphabetize the associations in type Is_Parameterless_Attribute.
7108 * rtsfind.ads: Ada.Finalization_List.Controller and
7109 System.Finalization_Implementation are no longer a GNAT unit.
7110 Update the range of type Ada_Finalization_Child. Remove the following
7111 recoverable entities:
2c7f9cc0 7112
df3e68b1
HK
7113 RE_Attach_To_Final_List
7114 RE_Deep_Tag_Attach
7115 RE_Finalize_List
7116 RE_Finalize_One
7117 RE_Finalizable_Ptr_Ptr
7118 RE_Global_Final_List
7119 RE_Limited_Record_Controller
7120 RE_List_Controller
7121 RE_Move_Final_List
7122 RE_Record_Controller
7123 RE_Simple_List_Controller
2c7f9cc0 7124
df3e68b1 7125 Add the following recoverable entities:
2c7f9cc0 7126
df3e68b1
HK
7127 RE_Add_Offset_To_Address
7128 RE_Allocate
7129 RE_Base_Pool
7130 RE_Deallocate
7131 RE_Exception_Identity
7132 RE_Finalization_Collection
7133 RE_Finalization_Collection_Ptr
7134 RE_Needs_Finalization
7135 RE_Save_Library_Occurrence
7136 RE_Set_Finalize_Address_Ptr
7137 RE_Set_Storage_Pool_Ptr
7138 RE_Storage_Count
7139 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
7140 Name_uController.
7141 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
7142 (First_Stored_Discriminant): Remove the mention of Name_uController.
7143 * sem_aux.ads: Comment reformatting.
7144 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
7145 to redecorate an already existing class-wide type.
7146 (Decorate_Tagged_Type): New parameter profile and associated comment.
7147 Create a "shadow class-wide type" for a shadow entity.
7148 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
7149 of the final chain along with the associated comment.
7150 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
7151 Full_Desig and set it to the full view of the designated type.
7152 Initialize the finalization collection to empty.
7153 (Build_Derived_Record_Type): Alphabetize local variables. Code
7154 reformatting.
7155 (Collect_Fixed_Components): Remove the mention of Name_uController.
7156 (Create_Constrained_Components): Remove the mention of Name_uController.
7157 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
7158 class-wide type of a shadow entity.
7159 (Process_Full_View): Update the machinery which marks type
7160 Limited_Controlled's entity as limited.
7161 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
7162 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
7163 list, instead make a collection build-in-place formal.
7164 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
7165 a designated type in order to establish a match between the renaming
7166 and the renamed entity.
7167 (Find_Selected_Component): Add guard to prevent spurious exceptions
7168 from being raised on .NET/JVM.
7169 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
7170 to the list of primitive that need special processing. Update arrays
7171 C_Names and D_Names.
7172 (Replace_Types): Handle class-wide types.
7173 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
7174 different parameter profile, look at the first formal.
7175 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
7176 use clauses for Exp_Util.
7177 * sem_res.adb: Remove with and use clauses for Elists.
7178 (Propagate_Coextensions): Removed.
7179 (Resolve_Allocator): Do not propagate the list of coextensions from one
7180 allocator to another.
7181 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
7182 Deaccessed_T to Desig_Typ.
7183 (Enter_Name): Remove the mention of Name_uController.
7184 (Gather_Components): Remove the mention of Name_uController.
7185 (Incomplete_Or_Private_View): New routine.
7186 (Is_Coextension_Root): Removed.
7187 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
7188 * sem_util.ads (Incomplete_Or_Private_View): New routine.
7189 (Is_Coextension_Root): Removed.
7190 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
7191 Controlled types are now derived from a null tagged record. Remove
7192 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
7193 * sinfo.adb (Coextensions): Removed.
7194 (Set_Coextensions): Removed.
7195 * sinfo.ads: Remove Coextensions from the explanation of node fields
7196 and its uses in nodes.
7197 Update the field usage of N_Allocator.
7198 (Coextensions): Removed along with its pragma Inline.
7199 (Set_Coextensions): Removed along with its pragma Inline.
7200 * snames.ads-tmpl: Remove names
2c7f9cc0 7201
df3e68b1
HK
7202 Name_uClean
7203 Name_uController
7204 Name_uFinal_List
7205 Name_uLocal_Final_List
7206 Name_Finalization_Root
7207 Name_Next
7208 Name_Prev
2c7f9cc0 7209
df3e68b1 7210 Add names
2c7f9cc0 7211
df3e68b1
HK
7212 Name_uFinalizer
7213 Name_Finalize_Address
7214 * s-pooglo.adb (Allocate): Add overriding indicator.
7215 (Deallocate): Add overriding indicator.
7216 (Storage_Size): Add overriding indicator.
7217 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
7218 than Finalize_Global_List.
7219 (Null_Finalize_Global_List): Removed.
7220 (Save_Library_Occurrence): New routine.
7221 * s-soflin.ads: Remove variable Finalize_Global_List along with its
7222 initialization. Add variable Finalize_Library_Objects along with its
7223 pragma Export. Add variables Library_Exception and
7224 Library_Exception_Set along with their pragma Export.
7225 (Null_Finalize_Global_List): Removed.
7226 (Save_Library_Occurrence): New routine.
7227 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
7228 rather than Finalize_Global_List.
7229 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
7230 of the constructed node.
7231
2ee06322
RO
72322011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7233
7234 * link.c: Include "auto-host.h" before system headers.
7235
f77b022b
VC
72362011-08-03 Vincent Celier <celier@adacore.com>
7237
7238 * make.adb (Gnatmake): Add to table Library_Projs only library projects
7239 that are not extended. Do not check if a library project that is
7240 extended should be regenerated. Do not add to table Library_Paths the
7241 libraries that are in extended projects. Link only with libraries that
7242 are in libray projects that are not extended.
7243 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
7244 for a library project that is extended.
7245
0187b60e
AC
72462011-08-03 Gary Dismukes <dismukes@adacore.com>
7247
7248 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
7249 conforming subprogram renamings that appear to be completions if they
7250 are not fully conformant.
7251 Such renamings are homographs but not completions.
7252 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
7253 names in a subprogram renaming that appears in an instance.
7254
72552011-08-03 Ed Schonberg <schonberg@adacore.com>
7256
7257 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
7258 not immutably limited, build actual subtype from expression to provide
7259 proper bounds to caller.
7260
72612011-08-03 Gary Dismukes <dismukes@adacore.com>
7262
7263 * sem_ch8.adb: Minor comment correction.
7264
72652011-08-03 Thomas Quinot <quinot@adacore.com>
7266
7267 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
7268 returning a limited array, use an extended return statement.
7269
72702011-08-03 Vincent Celier <celier@adacore.com>
7271
7272 * make.adb (Initialize): If --subdirs= is used, but no project file is
7273 specified, attempt to create the specify subdir if it does not already
7274 exist and use it as the object directory as if -D had been specified.
7275
72762011-08-03 Arnaud Charlet <charlet@adacore.com>
7277
7278 * s-tpopsp-vms.adb: New file.
7279 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
7280 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
7281
e280f981
AC
72822011-08-03 Emmanuel Briot <briot@adacore.com>
7283
7284 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
7285 package.
7286
72872011-08-03 Yannick Moy <moy@adacore.com>
7288
7289 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
7290 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
7291 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
7292 detect that an array has static bounds.
7293
98c99a5a
AC
72942011-08-03 Thomas Quinot <quinot@adacore.com>
7295
7296 * exp_dist.adb: Minor reformatting.
7297
72982011-08-03 Arnaud Charlet <charlet@adacore.com>
7299
7300 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
7301 (ATCB_Key): Removed, not always used.
7302
73032011-08-03 Emmanuel Briot <briot@adacore.com>
7304
7305 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
7306 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
7307 most remaining global variables.
7308
686d0984
AC
73092011-08-03 Robert Dewar <dewar@adacore.com>
7310
7311 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
7312 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
7313 reformatting.
7314
73152011-08-03 Javier Miranda <miranda@adacore.com>
7316
7317 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
7318 that must be passed by copy in VM targets.
7319
73202011-08-03 Emmanuel Briot <briot@adacore.com>
7321
7322 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
7323 duplicates a similar htable now in the project tree.
7324
73252011-08-03 Claire Dross <dross@adacore.com>
7326
7327 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
7328 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
7329 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
7330 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
7331 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
7332 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
7333 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
7334 update.
7335
73362011-08-03 Arnaud Charlet <charlet@adacore.com>
7337
7338 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
7339 (ATCB_Key): Removed, not always used.
7340 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
7341 s-taprop-posix.adb.
7342 * s-tpopsp-tls.adb: New file.
7343 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
7344 x86/x64/ia64/powerpc/sparc Linux.
7345
73462011-08-03 Arnaud Charlet <charlet@adacore.com>
7347
7348 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
7349 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
7350
73512011-08-03 Thomas Quinot <quinot@adacore.com>
7352
7353 * rtsfind.ads, exp_dist.adb, exp_dist.ads
7354 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
7355 Fix type selection for mapping integer types to PolyORB types.
7356
73572011-08-03 Bob Duff <duff@adacore.com>
7358
7359 * sem_ch7.adb: Minor comment clarification.
7360
73612011-08-03 Bob Duff <duff@adacore.com>
7362
7363 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
7364 an error analyzing a choice, skip further processing. Further
7365 processing could cause a crash or cascade errors.
7366
40ecf2f5
EB
73672011-08-03 Emmanuel Briot <briot@adacore.com>
7368
7369 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
7370 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
7371 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
7372 prj-env.ads (Shared_Project_Tree_Data): new type
7373 An aggregate project and its aggregated trees need to share the common
7374 data structures used for lists of strings, packages,... This makes the
7375 code simpler since otherwise we have to pass the root tree (also used
7376 for the configuration file data) in addition to the current project
7377 tree. This also avoids ambiguities as to which tree should be used.
7378 And finally this saves a bit of memory.
7379 (For_Every_Project_Imported): new parameter Tree.
7380 Since aggregated projects are using a different tree, we need to let
7381 the caller know which tree to use to manipulate the returned project.
7382
9fde638d
RD
73832011-08-03 Robert Dewar <dewar@adacore.com>
7384
7385 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
7386 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
7387 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
7388 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
7389
95eb8b69
AC
73902011-08-03 Javier Miranda <miranda@adacore.com>
7391
7392 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
7393 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
7394
73952011-08-03 Bob Duff <duff@adacore.com>
7396
7397 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
7398 the Base_Type.
7399
74002011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
7401
7402 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
7403 g-sehash.ads: Fix typo. Update header.
7404
74052011-08-03 Thomas Quinot <quinot@adacore.com>
7406
7407 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
7408 expansion.
7409
74102011-08-03 Gary Dismukes <dismukes@adacore.com>
7411
7412 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
7413 prefixes of private types along with records, since the selector may be
7414 a discriminant.
7415 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
7416 private types along with records, since the selector may be a
7417 discriminant.
7418
92e77027
AC
74192011-08-03 Emmanuel Briot <briot@adacore.com>
7420
b2f7ebc1 7421 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
7422
74232011-08-03 Javier Miranda <miranda@adacore.com>
7424
7425 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
7426 Tagged_Type_Expansion.
7427
74282011-08-03 Yannick Moy <moy@adacore.com>
7429
b2f7ebc1
GP
7430 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
7431 violation when the argument of concatenation is the name of a
7432 constant.
92e77027 7433
ab29a348
EB
74342011-08-03 Emmanuel Briot <briot@adacore.com>
7435
7436 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
7437 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
7438 (Process_Declarative_Items): new parameter Child_Env.
7439
9466892f
AC
74402011-08-03 Yannick Moy <moy@adacore.com>
7441
589ef536
GP
7442 * alfa.ads: Update format of ALFA section in ALI file in order to
7443 add a mapping from bodies to specs when both are present.
7444 (ALFA_Scope_Record): Add components for spec file/scope.
7445 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
7446 present.
7447 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
7448 collected, fill in the spec information when relevant.
7449 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
7450 present.
7451
74522011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7453
7454 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
7455 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 7456
9466892f
AC
74572011-08-03 Javier Miranda <miranda@adacore.com>
7458
7459 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
7460 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
7461 be handled by copy in VM targets.
9466892f
AC
7462
74632011-08-03 Emmanuel Briot <briot@adacore.com>
7464
589ef536 7465 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
7466 code with Makeutl.Get_Switches.
7467 * prj-tree.adb: Update comment.
7468
b5ea9143
AC
74692011-08-03 Thomas Quinot <quinot@adacore.com>
7470
7471 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
7472 subprogram with a limited formal that does not support external
7473 streaming.
7474
74752011-08-03 Yannick Moy <moy@adacore.com>
7476
7477 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
7478 continuation line
7479 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
7480 not from current unit in two phases, because it is not possible to
7481 change the table while iterating over its content.
7482 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
7483
74842011-08-03 Sergey Rybin <rybin@adacore.com>
7485
7486 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
7487 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
7488
668a19bc
ES
74892011-08-03 Ed Schonberg <schonberg@adacore.com>
7490
7491 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
7492 and the component type is composite, this is ambiguous for predefined
7493 concatenation, but if the node is not overloaded and the entity is a use
7494 -defined function its profile can be used to resolve that aggregate.
7495
170b2989
AC
74962011-08-03 Robert Dewar <dewar@adacore.com>
7497
7498 * exp_ch4.adb: Minor code cleanup.
7499
75002011-08-03 Thomas Quinot <quinot@adacore.com>
7501
7502 * exp_dist.adb: Do not generate distribution stubs if serious errors
7503 have been diagnosed.
7504
75052011-08-03 Ed Schonberg <schonberg@adacore.com>
7506
7507 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
7508 the first formal of a primitive operation, go to the base type to
7509 handle properly an access to a derived type with constrained
7510 discriminants.
7511 * sem_type.adb (Disambiguate): an immediately visible operator hides a
7512 user-defined function that is only use-visible.
170b2989 7513
e917aec2
RD
75142011-08-03 Robert Dewar <dewar@adacore.com>
7515
7516 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
7517 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
7518 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
7519 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
7520 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
7521 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
7522 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
7523 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
7524
75252011-08-03 Robert Dewar <dewar@adacore.com>
7526
7527 * repinfo.adb (List_Mechanism): Add handling of
7528 Convention_Ada_Pass_By_XXX.
7529 * sem_mech.adb (Set_Mechanism): Ditto.
7530 * sem_prag.adb (Process_Convention): Add entries for
7531 Convention_Ada_Pass_By_XXX.
7532 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
7533
49bfcf43
AC
75342011-08-03 Pascal Obry <obry@adacore.com>
7535
7536 * makeutl.adb: Minor reformatting.
7537
75382011-08-03 Vincent Celier <celier@adacore.com>
7539
7540 * fname-uf.adb
7541 (Get_File_Name) If the file cannot be found when there are no config
7542 pragmas file and May_Fail is True, return No_File instead of the file
7543 name, to be consistent.
7544
75452011-08-03 Pascal Obry <obry@adacore.com>
7546
7547 * adaint.c (__gnat_is_executable_file_attr): Avoid access
7548 to null pointer.
7549
75502011-08-03 Javier Miranda <miranda@adacore.com>
7551
7552 * sem_ch13.adb
7553 (Same_Representation): In VM targets the representation of arrays with
7554 aliased components differs from arrays with non-aliased components.
7555
34798441
EB
75562011-08-03 Emmanuel Briot <briot@adacore.com>
7557
7558 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
7559 not systematically lower case attribute indexes that contain no "."
7560 Fix definition of several Naming attributes, which take
7561 a unit name as index and therefore should be case insensitive.
7562 Minor refactoring (reduce length of variable names).
7563
75642011-08-03 Emmanuel Briot <briot@adacore.com>
7565
7566 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
7567
4437a530
EB
75682011-08-03 Emmanuel Briot <briot@adacore.com>
7569
7570 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
7571 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
7572 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
7573 prj-tree.ads (Prj.Tree.Environment): new type.
7574
804fe3c4
EB
75752011-08-03 Emmanuel Briot <briot@adacore.com>
7576
7577 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
7578 prj-tree.adb, prj-tree.ads (Environment): new type.
7579
c565bc66
AC
75802011-08-03 Emmanuel Briot <briot@adacore.com>
7581
7582 * prj-tree.ads: Remove unused variable.
7583
75842011-08-03 Yannick Moy <moy@adacore.com>
7585
7586 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
7587 issuing messages related to SPARK restriction violation.
7588
4ee646da
AC
75892011-08-03 Ed Schonberg <schonberg@adacore.com>
7590
7591 * sem_ch6.adb: guard against error nodes in return statements.
7592
75932011-08-03 Arnaud Charlet <charlet@adacore.com>
7594
7595 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
7596 a warning can only appear on a configuration file, so emit warning
7597 without further checks.
7598
75992011-08-03 Arnaud Charlet <charlet@adacore.com>
7600
7601 * s-interr.ads: add overriding keyword.
7602
76032011-08-03 Geert Bosch <bosch@adacore.com>
7604
7605 * exp_attr.adb: Fix minor typo.
7606
76072011-08-03 Ed Schonberg <schonberg@adacore.com>
7608
7609 * par-ch4.adb: improve error recovery.
7610
c0e538ad
AC
76112011-08-03 Emmanuel Briot <briot@adacore.com>
7612
7613 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
7614 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
7615 to Errout_Handling.
7616
76172011-08-03 Emmanuel Briot <briot@adacore.com>
7618
7619 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
7620 "external" as an attribute name in aggregate projects.
7621
76222011-08-03 Jose Ruiz <ruiz@adacore.com>
7623
7624 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
7625 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
7626 from 0, so we need to adjust.
7627
76282011-08-03 Emmanuel Briot <briot@adacore.com>
7629
7630 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
7631 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
7632
c4d67e2d
AC
76332011-08-03 Yannick Moy <moy@adacore.com>
7634
7635 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
7636 restriction on overloaded entity if the entity is not an operator.
7637
76382011-08-03 Yannick Moy <moy@adacore.com>
7639
7640 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
7641 restrict.ads: Rename remaining Check_Formal_Restriction* into
7642 Check_SPARK_Restriction*.
7643
76442011-08-03 Emmanuel Briot <briot@adacore.com>
7645
7646 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
7647 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
7648 qualifier.
7649 (Project_Empty): removed
7650 (Empty_Project): new parameter Qualifier
7651 This is used to have fields specific to aggregate projects, cleaner
7652 New field to store the list of aggregated projects.
7653 (Check_Aggregate_Project): removed
7654 (Process_Aggregated_Projects, Free): new subprograms.
7655
3f5a8fee
AC
76562011-08-03 Olivier Hainque <hainque@adacore.com>
7657
7658 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
7659
76602011-08-03 Ed Schonberg <schonberg@adacore.com>
7661
7662 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
7663 explicit dereference of an unconstrained type, create a constrained
7664 subtype for it, as is done for function calls that return an
7665 unconstrained type.
7666
76672011-08-03 Thomas Quinot <quinot@adacore.com>
7668
7669 * g-pehage.adb (Finalize): Avoid possible double-free.
7670
76712011-08-03 Steve Baird <baird@adacore.com>
7672
7673 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
7674 Elab_Spec/Body attrs in CodePeer_Mode.
7675
76762011-08-03 Javier Miranda <miranda@adacore.com>
7677
7678 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
7679 low bound is not known at compile time but they have no others choice.
7680 Done because in this case the bounds can be obtained directly from the
7681 aggregate.
7682
76832011-08-03 Ed Falis <falis@adacore.com>
7684
7685 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
7686 on VxWorks SMP. Remove unusable constant ANY_CPU.
7687
a96ca600
EB
76882011-08-03 Emmanuel Briot <briot@adacore.com>
7689
7690 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
7691 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
7692 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
7693 Prj.Env.Initialize_Empty): new subprograms
7694 (Get_Env, Find_Project): remove parameter Target_Name.
7695
3e582869
AC
76962011-08-03 Gary Dismukes <dismukes@adacore.com>
7697
7698 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
7699 as a condition for the delayed call to Derived_Subprograms done for the
7700 case of the rewriting of a derived type that constrains the
7701 discriminants of its parent type.
7702 Avoids redundant subprogram derivations for private subtype derivations.
7703
77042011-08-03 Javier Miranda <miranda@adacore.com>
7705
7706 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
7707 Build_Record_Aggr_Code.
7708 (Build_Record_Aggr_Code): Add missing support to initialize hidden
7709 discriminants in extension aggregates.
7710
77112011-08-03 Emmanuel Briot <briot@adacore.com>
7712
7713 * prj-pp.adb (Print): also output project qualifiers, since in
7714 particular "aggregate" is mandatory in an aggregate project.
7715
77162011-08-03 Emmanuel Briot <briot@adacore.com>
7717
7718 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
7719 (Debug_Output): new function.
7720
56e94186
AC
77212011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7722
7723 * gnat_ugn.texi: Document -Wstack-usage.
7724 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
7725
77262011-08-03 Thomas Quinot <quinot@adacore.com>
7727
7728 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
7729 have keyword LIMITED.
7730
77312011-08-03 Yannick Moy <moy@adacore.com>
7732
7733 * alfa.adb, alfa.ads, alfa_test.adb: New files.
7734 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
7735 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
7736 section (does not happen in compiler, only if code directly calls
7737 Scan_ALI).
7738 * get_alfa.adb, get_alfa.ads: New files.
7739 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
7740 needed.
7741 * lib-xref-alfa.adb: New file.
7742 * lib-xref.adb, lib-xref.ads
7743 (Xref_Entry): redefine information needed in cross-references for ALFA.
7744 Push ALFA treatments in separated local package.
7745 (Enclosing_Subpragram_Or_Package): treat specially subprogram
7746 identifiers. Return entity of package body instead of spec. Return
7747 Empty for a scope with no location.
7748 (Generate_Reference): adapt to new components for ALFA information.
7749 Remove the need for D references on definitions.
7750 (Is_Local_Reference): moved to ALFA local package
7751 (Output_References): extract subfunction as Extract_Source_Name
7752 (Output_Local_References): remove procedure, replaced by filtering of
7753 cross-references in package ALFA and printing in Put_ALFA.
7754 (Write_Entity_Name): remove procedure
7755 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
7756 print exact name of entity as it appears in source file
7757 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
7758 * put_alfa.adb, put_alfa.ads: New files.
7759 * xref_lib.adb (Search_Xref): protect read of cross-references against
7760 reading other sections of the ALI file, in gnatxref
7761 (Search): protect read of cross-references against reading other
7762 sections of the ALI file, in gnatfind.
7763 * gcc-interface/Make-lang.in: Update dependencies.
7764
77652011-08-03 Thomas Quinot <quinot@adacore.com>
7766
7767 * sem_ch3.adb: Minor reformatting.
7768
77692011-08-03 Jose Ruiz <ruiz@adacore.com>
7770
7771 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
7772 raising an exception.
7773
77742011-08-03 Ed Schonberg <schonberg@adacore.com>
7775
7776 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
7777 type, always use 1 as the lower bound or string, even if lower bound of
7778 context is not static, to handle properly null strings in a non-static
7779 context.
7780
77812011-08-03 Bob Duff <duff@adacore.com>
7782
7783 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
7784 always legal on the right-hand side of an assignment statement; there
7785 is always an applicable index constraint in this case. Therefore, the
7786 check for Pkind = N_Assignment_Statement is now unconditional -- it
7787 doesn't depend on whether Is_Constrained (Typ).
7788
4317e442
AC
77892011-08-03 Robert Dewar <dewar@adacore.com>
7790
7791 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
7792
77932011-08-03 Ed Schonberg <schonberg@adacore.com>
7794
7795 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
7796 for an itype created within a generic unit.
7797
77982011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7799
7800 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
7801 suppresses all inlining.
7802
53f29d4f
AC
78032011-08-03 Robert Dewar <dewar@adacore.com>
7804
7805 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
7806 exp_aggr.adb: Minor reformatting.
7807
78082011-08-03 Thomas Quinot <quinot@adacore.com>
7809
7810 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
7811 tagged assignment when discriminant checks are suppressed. This is
7812 useless and extremely costly in terms of static stack usage.
7813
78142011-08-03 Bob Duff <duff@adacore.com>
7815
7816 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
7817 of generics, because this leads to the wrong entity in the wrong scope,
7818 causing (e.g.) pragma Export_Procedure to get an error if the entity is
7819 an instance.
7820 (Process_Interface_Name): Follow Alias for instances of generics, to
7821 correct for the above change.
7822
78232011-08-03 Ed Schonberg <schonberg@adacore.com>
7824
7825 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
7826 is an integer literal it is always safe to replace the reference. In
7827 addition, if the reference appears in the generated code for an object
7828 declaration it is necessary to copy because otherwise the reference
7829 might be to the uninitilized value of the discriminant of the object
7830 itself.
7831
78322011-08-03 Pascal Obry <obry@adacore.com>
7833
7834 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
7835 ACL used, in this case we want to check for ending .exe, not .exe
7836 anywhere in the path.
7837
78382011-08-03 Sergey Rybin <rybin@adacore.com>
7839
7840 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7841 the tree structure (semantic decoration of references to record
7842 discriminants).
7843
c0b11850
AC
78442011-08-03 Gary Dismukes <dismukes@adacore.com>
7845
7846 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
7847 choices of a named array aggregate, bail out when any choices are
7848 marked as Errors_Posted.
7849
78502011-08-03 Ed Schonberg <schonberg@adacore.com>
7851
7852 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
7853 in which entity is frozen, to handle properly loop variables in
7854 iterators.
7855
78562011-08-03 Ed Schonberg <schonberg@adacore.com>
7857
7858 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
7859 subtype is not static, compute the upper bound using attributes, to
7860 handle properly index types that are not integer types.
7861
78622011-08-03 Bob Duff <duff@adacore.com>
7863
7864 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
7865 Update copyright notice.
7866
78672011-08-03 Ed Schonberg <schonberg@adacore.com>
7868
7869 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
7870 Original_Discriminant if within an instance.
7871 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7872
78732011-08-03 Thomas Quinot <quinot@adacore.com>
7874
7875 * einfo.ads: Minor reformatting.
7876
78772011-08-03 Ed Schonberg <schonberg@adacore.com>
7878
7879 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
7880 composite type with an unfrozen subcomponent, in the profile of a
7881 primitive operation.
7882
5c34e9cd
AC
78832011-08-03 Robert Dewar <dewar@adacore.com>
7884
7885 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
7886
78872011-08-03 Ed Schonberg <schonberg@adacore.com>
7888
7889 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
7890 unconstrained type with discriminants is initialized with an aggregate,
7891 use the constrained subtype of the aggregate as the type of the object,
7892 because it is immutable, and this allows the back-end to generate no
7893 code for the object declaration.
7894
abcd9db2
AC
78952011-08-03 Robert Dewar <dewar@adacore.com>
7896
7897 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
7898 comparison operand is variable, and turns out to be zero or negative.
7899
79002011-08-03 Javier Miranda <miranda@adacore.com>
7901
7902 * exp_intr.adb
7903 (Expand_Dispatching_Constructor_Call): Disable expansion of
7904 code required for native targets. Done to avoid generating
7905 references to unavailable runtime entities in VM targets.
7906 * exp_ch3.adb
7907 (Expand_N_Object_Declaration): Add missing support to handle
7908 the explicit initialization of class-wide interface objects.
7909 Fix documentation.
7910
79112011-08-03 Matthew Heaney <heaney@adacore.com>
7912
7913 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
7914
79152011-08-03 Matthew Heaney <heaney@adacore.com>
7916
7917 * a-cbdlli.adb (Splice): move source items from first to last
7918
79192011-08-03 Yannick Moy <moy@adacore.com>
7920
7921 * sem_util.ads: comment added.
7922
79232011-08-03 Javier Miranda <miranda@adacore.com>
7924
7925 * exp_aggr.adb
7926 (Expand_Record_Aggregate): In VM targets disable the expansion into
7927 assignments of aggregates whose type is not known at compile time.
7928
b474d6c3
ES
79292011-08-03 Ed Schonberg <schonberg@adacore.com>
7930
7931 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
7932 protected entries and task entries, to build the proper renaming
7933 declaration for entry formals, used in debugging.
7934 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
7935 parameters in the same way.
7936
0580d807
AC
79372011-08-02 Robert Dewar <dewar@adacore.com>
7938
7939 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
7940 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
7941 code reorganization.
7942
79432011-08-02 Robert Dewar <dewar@adacore.com>
7944
7945 * debug.adb: Debug flag d.P to suppress length comparison optimization
7946 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
7947 comparison of Length by comparing First/Last instead.
7948
79492011-08-02 Matthew Heaney <heaney@adacore.com>
7950
7951 * a-cobove.ads: Code clean up.
7952
b191a125
AC
79532011-08-02 Vincent Celier <celier@adacore.com>
7954
7955 * adaint.c (file_names_case_sensitive_cache): New static int.
7956 (__gnat_get_file_names_case_sensitive): Cache the return value in
7957 file_names_case_sensitive_cache at the first invocation, to avoid
7958 multiple calls to getenv.
7959
79602011-08-02 Bob Duff <duff@adacore.com>
7961
7962 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
7963
316a0661
AC
79642011-08-02 Yannick Moy <moy@adacore.com>
7965
7966 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
7967 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
7968 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
7969 indicate that we are in a precondition or postcondition. This is used in
7970 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
7971 decide whether to flag the spec or body of the current subprogram as
7972 not in ALFA.
7973
79742011-08-02 Fabien Chouteau <chouteau@adacore.com>
7975
7976 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
7977 list.
7978 * a-extiin.ads: New file.
7979
79802011-08-02 Bob Duff <duff@adacore.com>
7981
7982 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
7983 now raises Name_Error instead of Use_Error in certain cases. The other
7984 parts of this AI were already implemented properly.
7985
f9adb9d4
AC
79862011-08-02 Vincent Celier <celier@adacore.com>
7987
7988 * link.c: Only import "auto-host.h" when building the gnattools.
7989
79902011-08-02 Yannick Moy <moy@adacore.com>
7991
7992 * sem_util.adb: Inter-unit inlining does not work for a subprogram
7993 which calls a local subprogram, so extract subprogram
7994 from Mark_Non_ALFA_Subprogram_Body.
7995
79962011-08-02 Javier Miranda <miranda@adacore.com>
7997
7998 * exp_ch9.adb
7999 (Extract_Dispatching_Call): If the type of the dispatching object is an
8000 access type then return an explicit dereference in the Object out-mode
8001 parameter.
8002
80032011-08-02 Gary Dismukes <dismukes@adacore.com>
8004
8005 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
8006 compatibility checks for all indexes of an array subtype, not just the
8007 first. Reset Has_Dynamic_Range_Check on the subtype before each
8008 potential check to ensure that Insert_Range_Checks will not elide any
8009 of the dynamic checks.
8010
80112011-08-02 Yannick Moy <moy@adacore.com>
8012
8013 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
8014 SPARK restriction at parsing time.
8015 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
8016 directive only if the SPARK restriction is set for this unit.
8017
83f33150
YM
80182011-08-02 Yannick Moy <moy@adacore.com>
8019
8020 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
8021 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
8022 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
8023 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
8024 Mark_Non_ALFA_Subprogram_Body.
8025 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
8026 inlined.
8027
7b98672f
YM
80282011-08-02 Yannick Moy <moy@adacore.com>
8029
8030 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
8031 might be costly.
8032
052e0603
AC
80332011-08-02 Robert Dewar <dewar@adacore.com>
8034
8035 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
8036 exp_ch3.adb: Minor reformatting.
8037
80382011-08-02 Emmanuel Briot <briot@adacore.com>
8039
8040 * adaint.c (__gnat_locate_exec_on_path): only returns executable
8041 files, not any regular file.
8042 (__gnat_locate_file_with_predicate): new subprogram.
8043
80442011-08-02 Yannick Moy <moy@adacore.com>
8045
8046 * sinfo.adb, sinfo.ads: Restrict the use of flags
8047 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
8048 nodes, plus N_Subtype_Declaration for the 2nd one.
8049
4fbad0ba
AC
80502011-08-02 Sergey Rybin <rybin@adacore.com>
8051
8052 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8053 - fix bugs in the description of Source_Trace;
8054 - get rid of UNIT_NAME;
8055
052e0603
AC
80562011-08-02 Javier Miranda <miranda@adacore.com>
8057
8058 * exp_ch9.adb
8059 (Build_Dispatching_Requeue): Adding support for VM targets
8060 since we cannot directly reference the Tag entity.
8061 * exp_sel.adb (Build_K): Adding support for VM targets.
8062 (Build_S_Assignment): Adding support for VM targets.
8063 * exp_disp.adb
8064 (Default_Prim_Op_Position): In VM targets do not restrict availability
8065 of predefined interface primitives to compiling in Ada 2005 mode.
8066 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8067 restricted to compiling in Ada 2005 mode.
8068 (Make_VM_TSD): Generate code that declares and initializes the OSD
8069 record. Needed to support dispatching calls through synchronized
8070 interfaces.
8071 * exp_ch3.adb
8072 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8073 primitives associated with synchronized interfaces.
8074 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8075 primitives associated with synchronized interfaces.
8076
80772011-08-02 Yannick Moy <moy@adacore.com>
8078
8079 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8080 statements hidden in SPARK if preceded by the HIDE directive
8081 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8082 exception handlers as hidden in SPARK if preceded by the HIDE directive
8083 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8084 if starting with the HIDE directive
8085 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8086 starting with the HIDE directive; mark the declarations in a private
8087 part as hidden in SPARK if the private part starts with the HIDE
8088 directive
8089 * restrict.adb, restrict.ads
8090 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8091 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8092 argument node belongs to a part which is hidden in SPARK
8093 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8094 parts in SPARK; protect the possibly costly call to
8095 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8096 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8097 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8098 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8099 Tok_SPARK_Hide.
8100 (Scan): recognize special comment starting with '#' and followed by
8101 SPARK keyword "hide" as a HIDE directive.
8102
81032011-08-02 Yannick Moy <moy@adacore.com>
8104
8105 * types.ads, erroutc.ads: Minor reformatting.
8106
81072011-08-02 Vincent Celier <celier@adacore.com>
8108
8109 * link.c: Add response file support for cross platforms.
8110
81112011-08-02 Ed Schonberg <schonberg@adacore.com>
8112
8113 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8114 in an association, set parent field of copy before partial analysis.
8115 * sem_res.adb (Resolve_Slice): create reference to itype only when
8116 expansion is enabled.
8117
81182011-08-02 Yannick Moy <moy@adacore.com>
8119
8120 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8121 for new flag denoting which subprogram bodies are in ALFA
8122 * restrict.adb, sem_ch7.adb: Update comment
8123 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8124 sem_ch9.adb, sem_res.adb: Add calls to
8125 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8126 * sem_ch6.adb (Analyze_Function_Return): add calls to
8127 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8128 middle of the body, and extended return.
8129 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8130 False when missing return.
8131 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8132 to True for subprograms whose spec is in ALFA. Remove later on the flag
8133 on the entity used for a subprogram body when there exists a separate
8134 declaration.
8135 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8136 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8137 False, otherwise do nothing.
8138
81392011-08-02 Robert Dewar <dewar@adacore.com>
8140
8141 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8142
81432011-08-02 Yannick Moy <moy@adacore.com>
8144
8145 * sem_ch4.ads: minor formatting.
8146
81472011-08-02 Yannick Moy <moy@adacore.com>
8148
8149 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8150 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8151 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8152 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8153 opt.ads: cleanup of SPARK mode
8154
81552011-08-02 Yannick Moy <moy@adacore.com>
8156
8157 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8158 types.
8159 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8160 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8161 * sem_ch3.adb
8162 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8163 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8164 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8165 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8166 types.
8167 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8168 non-static range.
8169 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8170 functions whose return type is not in ALFA.
8171 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8172 specifications.
8173 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8174 parameter's type is not in ALFA.
8175 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8176 types are in ALFA.
8177
81782011-08-02 Ed Schonberg <schonberg@adacore.com>
8179
8180 * sem_ch6 (Analyze_Expression_Function): treat the function as
8181 Inline_Always, and introduce a subprogram declaration for it when it is
8182 not a completion.
8183 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8184 expression functions, so that the back-end can determine whether they
8185 can in fact be inlined.
8186 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8187 a function body comes from an expression function.
8188
81892011-08-02 Gary Dismukes <dismukes@adacore.com>
8190
8191 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8192 null exclusions to test Can_Never_Be_Null on the anonymous access types
8193 of the formals rather than testing the formals themselves. Exclude this
8194 check in cases where the Old_Formal is marked as a controlling formal,
8195 to avoid issuing spurious errors for bodies completing dispatching
8196 operations (due to the flag not getting set on controlling access
8197 formals in body specs).
8198 (Find_Corresponding_Spec): When checking full and subtype conformance of
8199 subprogram bodies in instances, pass Designated and E in that order, for
8200 consistency with the expected order of the formals (New_Id followed by
8201 Old_Id).
8202
82032011-08-02 Robert Dewar <dewar@adacore.com>
8204
8205 * sem_ch8.adb: Minor reformatting.
8206
82072011-08-02 Ed Schonberg <schonberg@adacore.com>
8208
8209 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8210 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8211 primitive operations of class-wide actuals.
8212
82132011-08-02 Javier Miranda <miranda@adacore.com>
8214
8215 * exp_atag.ads, exp_atag.adb
8216 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8217 since its value is implicitly passed in argument Typ.
8218 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8219 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8220 Build_Common_Dispatching_Select_Statements.
8221
82222011-08-02 Robert Dewar <dewar@adacore.com>
8223
8224 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8225 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8226 Minor reformatting.
8227
82282011-08-02 Robert Dewar <dewar@adacore.com>
8229
8230 * sem_res.adb: Minor reformatting.
8231 * sem_prag.adb: Minor reformatting.
8232
82332011-08-02 Javier Miranda <miranda@adacore.com>
8234
8235 * exp_atag.adb, exp_atags.ads
8236 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8237 by the tagged type Entity. Required to use this routine in the VM
8238 targets since we do not have available the Tag entity in the VM
8239 platforms.
8240 * exp_ch6.adb
8241 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8242 Ada.Tags has not been previously loaded.
8243 * exp_ch7.adb
8244 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8245 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8246 * sem_aux.adb
8247 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8248 view of enclosing scopes. Required to handle enclosing scopes that
8249 are synchronized types whose full view is a task type.
8250 * exp_disp.adb
8251 (Build_VM_TSDs): Minor code improvement to avoid generating and
8252 analyzing lists with empty nodes.
8253 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8254 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8255 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8256 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8257 (Make_Select_Specific_Data_Table): Add support for VM targets.
8258 (Make_VM_TSD): Generate code to initialize the SSD structure of
8259 the TSD.
8260
82612011-08-02 Yannick Moy <moy@adacore.com>
8262
8263 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8264 cross-references section in ALI.
8265 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8266 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8267 Sub).
8268 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8269 subprogram or package entity of a node
8270 (Is_Local_Reference_Type): new function returns True for references
8271 selected in local cross-references.
8272 (Lt): function extracted from Lt in Output_References
8273 (Write_Entity_Name): function extracted from Output_References
8274 (Generate_Definition): generate reference with type 'D' for definition
8275 of objects (object declaration and parameter specification), with
8276 appropriate locations and units, for use in local cross-references.
8277 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8278 references of type 'I' for initialization in object definition.
8279 (Output_References): move part of function Lt and procedure
8280 Write_Entity_Name outside of the body. Ignore references of types 'D'
8281 and 'I' introduced for local cross-references.
8282 (Output_Local_References): new procedure to output the local
8283 cross-references sections.
8284 (Lref_Entity_Status): new array defining whether an entity is a local
8285 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8286 with 'I' type when initialization expression is present.
8287 * get_scos.adb, get_scos.ads: Correct comments and typos
8288
82892011-08-02 Javier Miranda <miranda@adacore.com>
8290
8291 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8292 the JVM target.
8293 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8294 the JVM target.
8295 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8296 TSD support.
8297
82982011-08-02 Vincent Celier <celier@adacore.com>
8299
8300 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8301 (No_Space_Img): New function
8302 (Find_Excluded_Sources): When reading from a file, record the file name
8303 and the line number for each excluded source.
8304 (Mark_Excluded_Sources): When reporting an error, if the excluded
8305 sources were read from a file, include file name and line number in
8306 the error message.
8307
83082011-08-02 Ed Schonberg <schonberg@adacore.com>
8309
8310 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8311
83122011-08-02 Robert Dewar <dewar@adacore.com>
8313
8314 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8315
83162011-08-02 Javier Miranda <miranda@adacore.com>
8317
8318 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8319 generation of TSDs to the DOTNET compiler.
8320 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8321 generation of TSDs to the DOTNET compiler.
8322
83232011-08-02 Javier Miranda <miranda@adacore.com>
8324
8325 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8326 record of all the tagged types declared inside library level package
8327 declarations, library level package bodies or library level subprograms.
8328 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8329 associated with a given tagged type.
8330 (Build_VM_TSDs): New subprogram.
8331 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8332 compilation units that are subprograms.
8333 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8334 compilation units that are package bodies.
8335 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8336 units that are a package declaration or a package instantiation.
8337 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8338 reorganization to improve the error generated by the frontend when the
8339 function Ada.Tags.Secondary_Tag is not available.
8340 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8341 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8342
83432011-08-02 Javier Miranda <miranda@adacore.com>
8344
8345 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8346
83472011-08-02 Robert Dewar <dewar@adacore.com>
8348
8349 * s-imenne.ads: Minor reformatting.
8350
83512011-08-02 Robert Dewar <dewar@adacore.com>
8352
8353 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8354 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8355 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8356
83572011-08-02 Robert Dewar <dewar@adacore.com>
8358
8359 * einfo.ads (Materialize_Entity): Document this is only for renamings
8360 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8361 required debug information in the case where we transform the object
8362 declaration into a renaming declaration.
8363 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8364 object
8365 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8366 Materialize_Entity.
8367
83682011-08-02 Robert Dewar <dewar@adacore.com>
8369
8370 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8371 Suppress_Init_Procs.
8372 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8373 Suppress_Initialization/Initialization_Suppressed.
8374 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8375 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8376 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8377 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8378
83792011-08-02 Robert Dewar <dewar@adacore.com>
8380
8381 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8382 Minor reformatting.
8383
83842011-08-02 Ed Schonberg <schonberg@adacore.com>
8385
8386 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8387 only have inheritable classwide pre/postconditions.
8388
83892011-08-02 Javier Miranda <miranda@adacore.com>
8390
8391 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8392 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8393 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8394 checks if the external tag of a type is the same as the external tag
8395 of some other declaration.
8396
83972011-08-02 Thomas Quinot <quinot@adacore.com>
8398
8399 * s-taskin.ads: Minor reformatting.
8400
84012011-08-02 Emmanuel Briot <briot@adacore.com>
8402
8403 * g-comlin.adb (Display_Help): swap the order in which it prints the
8404 short help and the general usage.
8405
84062011-08-02 Ed Schonberg <schonberg@adacore.com>
8407
8408 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8409 the aspect declarations and attach them to the generic copy for
8410 subsequent analysis.
8411 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8412 declarations of the generic tree to the new subprogram declarations.
8413 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8414 conditions that apply to a subprogram instance.
8415
84162011-08-02 Robert Dewar <dewar@adacore.com>
8417
8418 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8419
84202011-08-02 Ed Schonberg <schonberg@adacore.com>
8421
8422 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8423 private type with a tagged full view is not derived in the immediate
8424 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8425
84262011-08-02 Robert Dewar <dewar@adacore.com>
8427
8428 * exp_ch4.adb: Minor reformatting.
8429
84302011-08-02 Ed Schonberg <schonberg@adacore.com>
8431
8432 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8433 Ada2012 iterator, the loop will be rewritten during expansion into a
8434 while loop with a cursor and an element declaration. Do not analyze the
8435 body in this case, because if the container is for indefinite types the
8436 actual subtype of the elements will only be determined when the cursor
8437 declaration is analyzed.
8438
84392011-08-02 Arnaud Charlet <charlet@adacore.com>
8440
8441 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8442 size/alignment related attributes in CodePeer_Mode.
8443
84442011-08-02 Gary Dismukes <dismukes@adacore.com>
8445
8446 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8447 Prepend_Element, since this can result in the operation getting the
8448 wrong slot in the full type's dispatch table if the full type has
8449 inherited operations. The incomplete type's operation will get added
8450 to the proper position in the full type's primitives
8451 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8452 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8453 dispatching operations, since there are cases where nonprimitive
8454 subprograms can get added to the list of incomplete dependents (such
8455 as subprograms in nested packages).
8456 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8457 private part when determining whether to add a primitive with a
8458 parameter of a tagged incomplete type to the Private_Dependents list.
8459 Such primitives can also occur in the visible part, and should not have
8460 been excluded from being private dependents.
8461 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8462 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8463 list of a Taft-amendment incomplete type is a primitive before issuing
8464 an error that the full type must appear in the same unit. There are
8465 cases where nonprimitives can be in the list (such as subprograms in
8466 nested packages).
8467 * sem_disp.adb (Derives_From): Use correct condition for checking that
8468 a formal's type is derived from the type of the corresponding formal in
8469 the parent subprogram (the condition was completely wrong). Add
8470 checking that was missing for controlling result types being derived
8471 from the result type of the parent operation.
8472
84732011-08-02 Yannick Moy <moy@adacore.com>
8474
8475 * errout.adb (First_Node): minor renaming
8476 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8477 first node.
8478
84792011-08-02 Yannick Moy <moy@adacore.com>
8480
8481 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8482 before accessing operands.
8483 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8484 decide whether an initialization expression respects SPARK rules, as
8485 the plain node is the expanded one. This allows for more valid warnings
8486 to be issued.
8487 * gnat_rm.texi: Minor update.
8488
84892011-08-02 Arnaud Charlet <charlet@adacore.com>
8490
8491 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8492 previous change.
8493
84942011-08-02 Robert Dewar <dewar@adacore.com>
8495
8496 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8497
84982011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8499
8500 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8501 loop statements and the element renaming declaration with a block when
8502 the element type is controlled.
8503
85042011-08-02 Yannick Moy <moy@adacore.com>
8505
8506 * sinfo.ads: Minor formatting.
8507
85082011-08-02 Ed Schonberg <schonberg@adacore.com>
8509
8510 * sem_aggr.adb (Add_Association): if the association has a box and no
8511 expression, use the Sloc of the aggregate itself for the new
8512 association.
8513 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8514 the Original_Node.
8515
85162011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8517
8518 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8519 When a container is provided via a function call, generate a renaming
8520 of the function result. This avoids the creation of a transient scope
8521 and the premature finalization of the container.
8522 * exp_ch7.adb (Is_Container_Cursor): Removed.
8523 (Wrap_Transient_Declaration): Remove the supression of the finalization
8524 of the list controller when the declaration denotes a container cursor,
8525 it is not needed.
8526
85272011-08-02 Yannick Moy <moy@adacore.com>
8528
8529 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8530 node is from source, instead of the original node being from source.
8531 * sem_aggr.adb
8532 (Resolve_Array_Aggregate): refine the check for a static expression, to
8533 recognize also static ranges
8534 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8535 Array_Type_Declaration): postpone the test for the type being a subtype
8536 mark after the type has been resolved, so that component-selection and
8537 expanded-name are discriminated.
8538 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8539 to distinguish the case of an iteration scheme, so that an error is
8540 issed on a non-static range in SPARK except in an iteration scheme.
8541 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8542 In_Iter_Schm = True.
8543 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8544 user-defined operators so that they are allowed in renaming
8545 * sem_ch8.adb
8546 (Find_Selected_Component): refine the check for prefixing of operators
8547 so that they are allowed in renaming. Move the checks for restrictions
8548 on selector name after analysis discriminated between
8549 component-selection and expanded-name.
8550 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8551 concatenation argument of string type if it is static.
8552 * sem_util.adb, sem_util.ads
8553 (Check_Later_Vs_Basic_Declarations): add a new function
8554 Is_Later_Declarative_Item to decice which declarations are allowed as
8555 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8556 mode, add that renamings are considered as later items.
8557 (Enclosing_Package): new function to return the enclosing package
8558 (Enter_Name): correct the rule for homonyms in SPARK
8559 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8560 from source (result of expansion) to avoid issuing wrong warnings.
8561
85622011-08-02 Ed Schonberg <schonberg@adacore.com>
8563
8564 * errout.adb: On anything but an expression First_Node returns its
8565 argument.
8566
85672011-08-02 Pascal Obry <obry@adacore.com>
8568
8569 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8570
85712011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8572
8573 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8574 Set the associated loop as the related expression of internally
8575 generated cursors.
8576 * exp_ch7.adb (Is_Container_Cursor): New routine.
8577 (Wrap_Transient_Declaration): Supress the finalization of the list
8578 controller when the declaration denotes a container cursor.
8579
85802011-08-02 Yannick Moy <moy@adacore.com>
8581
8582 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8583 command line now.
8584 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8585 expression is a simple expression. This check cannot be performed in
8586 the semantics, so just drop it.
8587 (P_Index_Or_Discriminant_Constraint): move check that the index or
8588 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8589 semantics. Other cases were previously checked in the semantics.
8590 * par-ch4.adb (P_Name): move checks that a selector name is not
8591 character literal or an operator symbol to Find_Selected_Component in
8592 the semantics
8593 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8594 declarations are not placed after later declarations in a separate
8595 procedure in Sem_Util (possibly not the best choice?), to be used both
8596 during parsing, for Ada 83 mode, and during semantic analysis, for
8597 SPARK mode.
8598 * par-endh.adb (Check_End): move check that end label is not missing
8599 to Process_End_Label in the semantics
8600 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8601 the special case for SPARK restriction
8602 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8603 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8604 parameter Force to issue the error message even on internal node (used
8605 for generated end label). Call Check_Restriction to check when an error
8606 must be issued. In SPARK mode, issue an error message even if the
8607 restriction is not set.
8608 (Check_Restriction): new procedure with an additional out parameter to
8609 inform the caller that a message has been issued
8610 * sem_aggr.adb: Minor modification of message
8611 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8612 instead of issuing an error message directly
8613 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8614 declarations are not placed after later declarations, by calling
8615 Check_Later_Vs_Basic_Declarations
8616 (Analyze_Subtype_Declaration): move here the check that an index or
8617 discriminant constraint must be a subtype mark. Change the check that
8618 a subtype of String must start at one so that it works on subtype marks.
8619 * sem_ch4.adb (Analyze_Call): move here the check that a named
8620 association cannot follow a positional one in a call
8621 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8622 instead of issuing an error message directly
8623 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8624 selector name is not a character literal or an operator symbol. Move
8625 here the check that the prefix of an expanded name cannot be a
8626 subprogram or a loop statement.
8627 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8628 procedure called from parsing and semantics to check that basic
8629 declarations are not placed after later declarations
8630 (Process_End_Label): move here the check that end label is not missing
8631
86322011-08-02 Arnaud Charlet <charlet@adacore.com>
8633
8634 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8635 representation clause in codepeer mode, since it confuses CodePeer and
8636 does not bring useful info.
8637
86382011-08-02 Ed Falis <falis@adacore.com>
8639
8640 * init.c: initialize fp hw on MILS.
8641
86422011-08-02 Ed Schonberg <schonberg@adacore.com>
8643
8644 * errout.adb (First_Node): for bodies, return the node itself (small
8645 optimization). For other nodes, do not check source_unit if the node
8646 comes from Standard.
8647
86482011-08-02 Robert Dewar <dewar@adacore.com>
8649
8650 * exp_ch3.adb: Minor comment additions.
8651 * sem_ch13.adb: Minor reformatting.
8652
86532011-08-02 Pascal Obry <obry@adacore.com>
8654
8655 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8656
86572011-08-02 Robert Dewar <dewar@adacore.com>
8658
8659 * sem_attr.adb: Minor reformatting.
8660
86612011-08-02 Robert Dewar <dewar@adacore.com>
8662
8663 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8664 (Has_Default_Component_Value): Removed
8665 * einfo.ads Comment updates
8666 (Has_Default_Aspect): Replaces Has_Default_Value
8667 (Has_Default_Component_Value): Removed
8668 * exp_ch13.adb
8669 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8670 * exp_ch3.adb
8671 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8672 (Get_Simple_Init_Val): Handle Default_Value aspect
8673 (Needs_Simple_Initialization): Handle Default_Value aspect
8674 * exp_ch3.ads: Needs_Simple_Initialization
8675 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8676 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8677 * sem_ch13.adb
8678 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8679 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8680 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8681
86822011-08-02 Ed Schonberg <schonberg@adacore.com>
8683
8684 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8685 package containing iteration primitives.
8686 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8687
86882011-08-02 Ed Schonberg <schonberg@adacore.com>
8689
8690 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8691 "of", pre-analyze expression in case it is a function call with
8692 finalization actions that must be placed ahead of the loop.
8693 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8694 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8695
86962011-08-02 Geert Bosch <bosch@adacore.com>
8697
8698 * cstand.adb (Create_Float_Types): Only consider C's long double for
8699 Long_Long_Float, in addition to double.
8700
87012011-08-02 Robert Dewar <dewar@adacore.com>
8702
8703 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8704 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8705 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8706 Minor reformatting.
8707
87082011-08-02 Ed Schonberg <schonberg@adacore.com>
8709
8710 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8711 indexed component.
8712
87132011-08-02 Javier Miranda <miranda@adacore.com>
8714
8715 * einfo.ads, einfo.adb
8716 (Original_Access_Type): Move this attribute to Node26 since there was
8717 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8718 which causes conflicts and breaks the generation of the .NET compiler.
8719 (Interface_Name): Add missing documentation on JGNAT only uses of
8720 this attribute.
8721
87222011-08-02 Geert Bosch <bosch@adacore.com>
8723
8724 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8725 (Find_Back_End_Float_Type): Likewise
8726 (Create_Back_End_Float_Types): Likewise
8727 (Create_Float_Types): Likewise
8728 (Register_Float_Type): Likewise
8729 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8730 Nlist and split out type selection in new local Find_Base_Type function.
8731 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8732 Nlist
8733 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8734
87352011-08-02 Robert Dewar <dewar@adacore.com>
8736
8737 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8738 alpha order).
8739 * opt.ads: Minor comment change.
8740 * sem_ch12.adb: Minor code reorganization.
8741
87422011-08-02 Gary Dismukes <dismukes@adacore.com>
8743
8744 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8745 subtype's list of rep items to the list on the full subtype in the case
8746 where the lists are the same.
8747
87482011-08-02 Geert Bosch <bosch@adacore.com>
8749
8750 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8751 using the one from System.Strings, which also deallocates all strings.
8752
87532011-08-02 Geert Bosch <bosch@adacore.com>
8754
8755 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8756 function.
8757 * gcc-interface/Make-lang.in: Update dependencies.
8758
87592011-08-02 Olivier Hainque <hainque@adacore.com>
8760
8761 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8762 end_locus.
8763
87642011-08-02 Javier Miranda <miranda@adacore.com>
8765
8766 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8767 associated with anonymous access to subprograms.
8768
87692011-08-02 Geert Bosch <bosch@adacore.com>
8770
8771 * opt.ads
8772 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8773 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8774 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8775 (Add_Symbol_Definition): Move to switch-c.adb
8776 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8777 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8778 (Add_Symbol_Definition): Move to switch-c.adb.
8779 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8780 * sem_warn.adb
8781 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8782 Move to warnsw.adb.
8783 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8784 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8785 Move to warnsw.adb.
8786 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8787 (Add_Symbol_Definition): Moved from Prepcomp.
8788 * switch-c.ads: Update copyright notice. Use String_List instead of
8789 Argument_List, removing dependency on System.OS_Lib.
8790
87912011-08-02 Yannick Moy <moy@adacore.com>
8792
8793 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8794 mode on initialization expression which does not respect SPARK
8795 restrictions.
8796 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8797 if the tree referenced by its argument represents an initialization
8798 expression in SPARK, suitable for initializing an object in an object
8799 declaration.
8800
88012011-08-02 Javier Miranda <miranda@adacore.com>
8802
8803 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8804 internally generated access to subprogram with its associated protected
8805 subprogram type.
8806 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8807
88082011-08-02 Geert Bosch <bosch@adacore.com>
8809
8810 * cstand.adb (Register_Float_Type): Print information about type to
8811 register, if the Debug_Flag_Dot_B is set.
8812 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8813 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8814 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8815 with a requested precision of more than Max_Digits digits and no more
8816 than Max_Base_Digits digits, if a range specification is present and the
8817 Predefined_Float_Types list has a suitable type to derive from.
8818 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8819 case of type completion with pragma Import
8820 * sem_prag.adb
8821 (Process_Import_Predefined_Type): Processing to complete a type
8822 with pragma Import. Currently supports floating point types only.
8823 (Set_Convention_From_Pragma): Do nothing without underlying type.
8824 (Process_Convention): Guard against absence of underlying type,
8825 which may happen when importing incomplete types.
8826 (Process_Import_Or_Interface): Handle case of importing predefined
8827 types. Tweak error message.
8828
88292011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8830
8831 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8832 functions to previous change. Reorganize code slightly.
8833
88342011-08-02 Geert Bosch <bosch@adacore.com>
8835
8836 * back_end.ads (Register_Type_Proc): New call back procedure type for
8837 allowing the back end to provide information about available types.
8838 (Register_Back_End_Types): New procedure to register back end types.
8839 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8840 available types.
8841 * cstand.adb (Back_End_Float_Types): New list for floating point types
8842 supported by the back end.
8843 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8844 (Copy_Float_Type): New procedure to make new copies of predefined types.
8845 (Register_Float_Type): New call back procedure to populate the BEFT list
8846 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8847 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8848 (Create_Float_Types): New procedure to create entities for floating
8849 point types predefined in Standard, and put these and any remaining
8850 BEFTs on the Predefined_Float_Types list.
8851 * stand.ads (Predefined_Float_Types): New list for predefined floating
8852 point types that do not have declarations in package Standard.
8853
88542011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8855
8856 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8857 entity node for the unit containing the parameter.
8858 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8859 (Add_Inlined_Subprogram): Likewise.
8860 * gcc-interface/Make-lang.in: Update dependencies.
8861
88622011-08-02 Thomas Quinot <quinot@adacore.com>
8863
8864 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8865 suitable value.
8866
88672011-08-02 Geert Bosch <bosch@adacore.com>
8868
8869 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8870
88712011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8872
8873 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8874 computed value of Base_Type.
8875
88762011-08-02 Yannick Moy <moy@adacore.com>
8877
8878 * restrict.adb (Check_Restriction): issue an error for any use of
8879 class-wide, even if the No_Dispatch restriction is not set.
8880 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8881 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8882 when completing a private extension, the type named in the private part
8883 is not the same as that named in the visible part.
8884 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8885 of an inherited primitive operations of a tagged type or type extension
8886 that returns the tagged type.
8887 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8888 function which returns True for an implicit operation inherited by the
8889 derived type declaration for the argument type.
8890 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8891 order.
8892
88932011-08-02 Ed Schonberg <schonberg@adacore.com>
8894
8895 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8896 Process_Bounds, to perform analysis with expansion of a range or an
8897 expression that is the iteration scheme for a loop.
8898 (Analyze_Iterator_Specification): If domain of iteration is given by a
8899 function call with a controlled result, as is the case if call returns
8900 a predefined container, ensure that finalization actions are properly
8901 generated.
8902 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8903
89042011-08-02 Javier Miranda <miranda@adacore.com>
8905
8906 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8907 * gcc-interface/Make-lang.in: Update dependencies.
8908
89092011-08-02 Javier Miranda <miranda@adacore.com>
8910
8911 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8912 determine if the analysis is performed using N or Original_Node (N).
8913 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8914 functionality of routine Is_Variable avoids code duplication.
8915 * checks.adb (Determine_Range): Handle temporaries generated by
8916 Remove_Side_Effects.
8917
89182011-08-02 Javier Miranda <miranda@adacore.com>
8919
8920 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8921 expansion of the condition. Required since the previous analysis was
8922 done with expansion disabled (see Resolve_Quantified_Expression) and
8923 hence checks were not inserted and record comparisons have not been
8924 expanded.
8925
89262011-08-02 Ed Falis <falis@adacore.com>
8927
8928 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8929 Update header.
8930
89312011-08-02 Bob Duff <duff@adacore.com>
8932
8933 * opt.ads: Minor comment fix.
8934
89352011-08-02 Bob Duff <duff@adacore.com>
8936
8937 * sem_ch12.adb (Analyze_Package_Instantiation,
8938 Analyze_Subprogram_Instantiation): Turn off style checking while
8939 analyzing an instance. Whatever style checks that apply to the generic
8940 unit should apply, so it makes no sense to apply them in an instance.
8941 This was causing trouble when compiling an instance of a runtime
8942 unit that violates the -gnatyO switch.
8943 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8944 one of the two case statements, causing spurious errors.
8945
89462011-08-02 Robert Dewar <dewar@adacore.com>
8947
8948 * uname.adb: Minor reformatting.
8949 * gnatcmd.adb: Minor reformatting.
8950 * exp_attr.adb: Minor reformatting.
8951
89522011-08-02 Ed Schonberg <schonberg@adacore.com>
8953
8954 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8955 No_Dispatching_Calls, do not look for the Assign primitive, because
8956 predefined primitives are not created in this case.
8957
89582011-08-02 Bob Duff <duff@adacore.com>
8959
8960 * stylesw.ads: Minor comment fixes.
8961
89622011-08-02 Robert Dewar <dewar@adacore.com>
8963
8964 * freeze.adb (Add_To_Result): New procedure.
8965
89662011-08-02 Jose Ruiz <ruiz@adacore.com>
8967
8968 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8969 time, if the specific run-time routines for handling streams of strings
8970 are not available, use the default mechanism.
8971
89722011-08-02 Arnaud Charlet <charlet@adacore.com>
8973
8974 * s-regpat.ads: Fix typo.
8975
89762011-08-02 Vincent Celier <celier@adacore.com>
8977
8978 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8979 not null, call it to create the in memory config project file without
8980 parsing an existing default config project file.
8981
89822011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8983
8984 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8985
89862011-08-02 Ed Schonberg <schonberg@adacore.com>
8987
8988 * sem_elim.adb: an abstract subprogram does not need an eliminate
8989 pragma for its descendant to be eliminable.
8990
89912011-08-02 Ed Falis <falis@adacore.com>
8992
8993 * init.c: revert to handling before previous checkin for VxWorks
8994 * s-intman-vxworks.adb: delete unnecessary declarations related to
8995 using Ada interrupt facilities for handling signals.
8996 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8997 * s-intman-vxworks.ads: Import __gnat_install_handler as
8998 Initialize_Interrupts.
8999 * s-taprop-vxworks.adb: Delete Signal_Mask.
9000 (Abort_Handler): change construction of mask to unblock exception
9001 signals.
9002
90032011-08-02 Jerome Guitton <guitton@adacore.com>
9004
9005 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9006 Debug_Raise_Exception before propagation starts.
9007
90082011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9009
9010 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9011 to Restriction_Check_Required.
9012 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9013 * sem_res.adb (Resolve_Call): Likewise.
9014 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9015
90162011-08-02 Bob Duff <duff@adacore.com>
9017
9018 * stylesw.ads: Update comment.
9019 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9020 * errout.ads: Remove obsolete comment.
9021
90222011-08-02 Javier Miranda <miranda@adacore.com>
9023
9024 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9025 (Set_Is_Safe_To_Reevaluate): new procedure.
9026 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9027 assignment is allowed on safe-to-reevaluate variables.
9028 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9029 temporary created to remove side effects in expressions that use
9030 the secondary stack as safe-to-reevaluate.
9031 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9032 variables that are not true constants.
9033
90342011-08-02 Robert Dewar <dewar@adacore.com>
9035
9036 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9037 sem_res.adb, sem_ch6.adb: Minor reformatting.
9038
90392011-08-02 Jerome Guitton <guitton@adacore.com>
9040
9041 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9042
90432011-08-02 Ed Schonberg <schonberg@adacore.com>
9044
9045 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9046 not set Overridden_Operation if subprogram is an initialization
9047 procedure.
9048
90492011-08-02 Yannick Moy <moy@adacore.com>
9050
9051 * par-ch6.adb: Correct obsolete name in comments
9052 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9053 which takes two message arguments (existing function takes one), with
9054 second message used for continuation.
9055 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9056 block statements that originate from a source block statement, not
9057 generated block statements
9058 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9059 symmetry with procedure case
9060 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9061 function to issue an error in formal mode if a package specification
9062 contains more than one tagged type or type extension.
9063 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9064 parameters matching formals of tagged types are objects (or ancestor
9065 type conversions of objects), not general expressions. Issue an error
9066 on view conversions that are not involving ancestor conversion of an
9067 extended type.
9068 (Resolve_Type_Conversion): in formal mode, issue an error on the
9069 operand of an ancestor type conversion which is not an object
9070 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9071 procedure so that it works also for actuals of function calls
9072 (Is_Actual_Tagged_Parameter): new function which determines if its
9073 argument is an actual parameter of a formal of tagged type in a
9074 subprogram call
9075 (Is_SPARK_Object_Reference): new function which determines if the tree
9076 referenced by its argument represents an object in SPARK
9077
90782011-08-02 Robert Dewar <dewar@adacore.com>
9079
9080 * sem_ch3.adb: Minor reformatting
9081 Minor comment addition
9082 Minor error msg text change
9083
90842011-08-02 Javier Miranda <miranda@adacore.com>
9085
9086 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9087 function. Used to be more precise when we generate a variable plus one
9088 assignment to remove side effects in the evaluation of the Bound
9089 expressions.
9090 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9091 of the bound expression to force its re-analysis and thus expand the
9092 associated transient scope (if required). Code cleanup replacing the
9093 previous code that declared the constant entity by an invocation to
9094 routine Force_Evaluation which centralizes this work in the frontend.
9095
90962011-08-02 Robert Dewar <dewar@adacore.com>
9097
9098 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9099 (Base_Type): Now uses improved Is_Base_Type function
9100 * einfo.ads (Base_Type): Inline this function
9101
91022011-08-02 Robert Dewar <dewar@adacore.com>
9103
9104 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9105 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9106
91072011-08-02 Arnaud Charlet <charlet@adacore.com>
9108
9109 * gcc-interface/Make-lang.in: Update dependencies.
9110 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9111 targets.
9112
91132011-08-02 Yannick Moy <moy@adacore.com>
9114
9115 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9116 non-simple expression used in delta constraint
9117 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9118 index constraint which is not a subtype mark
9119 * par.adb: With and use Restrict
9120 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9121 mode on component type which is not a subtype mark and default
9122 expression on component
9123 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9124 of string which does not have a lower index bound equal to 1
9125 (Array_Type_Declaration): issue an error in formal mode on index or
9126 component type which is not a subtype mark, and on aliased keyword on
9127 component
9128 (Derived_Type_Declaration): issue an error in formal mode on interface,
9129 limited or abstract type
9130 (Record_Type_Declaration): issue an error in formal mode on interface
9131 (Record_Type_Definition): issue an error in formal mode on tagged types
9132 and type extensions not declared in the specification of a library unit
9133 package; on null non-tagged record; on variant part
9134
91352011-08-02 Vincent Celier <celier@adacore.com>
9136
9137 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9138 not declared for qualified library project when Library_Name is not
9139 declared, but Library_Dir is.
9140
91412011-08-02 Robert Dewar <dewar@adacore.com>
9142
9143 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9144 pragmas (affects aspects [Component_]Default_Value
9145 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9146 component type for the resolution
9147
91482011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9149
9150 * einfo.adb (Base_Type): Tune implementation for speed.
9151
91522011-08-02 Robert Dewar <dewar@adacore.com>
9153
9154 * freeze.adb: Minor reformatting.
9155
91562011-08-02 Thomas Quinot <quinot@adacore.com>
9157
9158 * scos.ads: Update comments.
9159
91602011-08-02 Ed Schonberg <schonberg@adacore.com>
9161
9162 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9163 base type, because the parent may be a subtype of a private type whose
9164 convention is established in a private part.
9165
91662011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9167
9168 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9169 statement in a block when the expansion of the return expression has
9170 created a finalization chain.
9171 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9172 with the parent node.
9173 Add N_Extended_Return_Statement to handle the case where a transient
9174 object declaration appears in the Return_Object_Declarations list of
9175 an extended return statement.
9176
91772011-08-02 Matthew Gingell <gingell@adacore.com>
9178
9179 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9180 unused parameter 'name'.
9181
91822011-08-02 Ed Schonberg <schonberg@adacore.com>
9183
9184 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9185 inherited operation, check whether its alias, which is the source
9186 operastion that it renames, has been marked eliminated.
9187
91882011-08-02 Javier Miranda <miranda@adacore.com>
9189
9190 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9191 in-mode parameter whose type is an access type since it can be used to
9192 modify its designated object. Enforce code that handles as safe an
9193 access type that is not access-to-constant but it is the result of a
9194 previous removal of side-effects.
9195 (Remove_Side_Effects): Minor code reorganization of cases which require
9196 no action. Done to incorporate documentation on new cases uncovered
9197 working in this ticket: no action needed if this routine was invoked
9198 too early and the nodes are not yet decorated.
9199 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9200 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9201 were issued with actuals that are implicitly provided by
9202 Force_Evaluation.
9203
92042011-08-02 Robert Dewar <dewar@adacore.com>
9205
9206 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9207
92082011-08-02 Yannick Moy <moy@adacore.com>
9209
9210 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9211 to issue an error in formal mode on attribute not supported in this mode
9212 (Analyze_Attribute): issue errors on standard attributes not supported
9213 in formal mode.
9214 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9215 comment, and issue error in formal mode on modulus which is not a power
9216 of 2.
9217 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9218 range.
9219 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9220 subtype mark.
9221 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9222 operator on modular type (except 'not').
9223
92242011-08-02 Robert Dewar <dewar@adacore.com>
9225
9226 * gnat_rm.texi: Minor reformatting.
9227
92282011-08-02 Arnaud Charlet <charlet@adacore.com>
9229
9230 * s-osinte-linux.ads: Minor comment update and reformatting.
9231 * i-cexten.ads: Make this unit pure, as for its parent.
9232 Will allow its usage in more contexts if needed.
9233
92342011-08-02 Robert Dewar <dewar@adacore.com>
9235
9236 * s-utf_32.ads: Minor comment fix.
9237
92382011-08-02 Ed Schonberg <schonberg@adacore.com>
9239
9240 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9241 operation of a tagged synchronized type, handle the case where the
9242 controlling argument is overloaded.
9243
92442011-08-02 Yannick Moy <moy@adacore.com>
9245
9246 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9247 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9248 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9249 SPARK mode and formal verification mode on processing SPARK restriction
9250 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9251 requiring consistency checking.
9252
92532011-08-02 Robert Dewar <dewar@adacore.com>
9254
9255 * sem_res.adb: Minor reformatting.
9256
92572011-08-02 Robert Dewar <dewar@adacore.com>
9258
9259 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9260 a-cforse.ads: Remove unneeded with of Ada.Containers
9261 Remove commented out pragma Inline's
9262 Move specifications of new subprograms to the actual specs
9263
92642011-08-02 Yannick Moy <moy@adacore.com>
9265
9266 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9267 a-cforse.ads: Update comments.
9268
92692011-08-02 Ed Schonberg <schonberg@adacore.com>
9270
9271 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9272
92732011-08-02 Robert Dewar <dewar@adacore.com>
9274
9275 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9276 a-cforse.ads, a-cofove.ads: Minor reformatting.
9277
92782011-08-02 Claire Dross <dross@adacore.com>
9279
9280 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9281 a-cofove.ads: Add comments.
9282
92832011-08-02 Yannick Moy <moy@adacore.com>
9284
9285 * gnat_rm.texi: Document formal containers.
9286
92872011-08-02 Emmanuel Briot <briot@adacore.com>
9288
9289 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9290 are empty sections.
9291
92922011-08-02 Robert Dewar <dewar@adacore.com>
9293
9294 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9295 reformatting.
9296
92972011-08-02 Robert Dewar <dewar@adacore.com>
9298
9299 * aspects.adb: New aspects Default_Value and Default_Component_Value
9300 New format of Aspect_Names table checks for omitted entries
9301 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9302 handling of boolean aspects for derived types.
9303 New aspects Default_Value and Default_Component_Value
9304 New format of Aspect_Names table checks for omitted entries
9305 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9306 (Has_Default_Value): New flag
9307 (Has_Default_Component_Value): New flag
9308 (Has_Default_Value): New flag
9309 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9310 table.
9311 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9312 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9313 Default_Value and Default_Component_Value
9314 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9315 New aspects Default_Value and Default_Component_Value
9316 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9317 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9318
93192011-08-02 Vincent Celier <celier@adacore.com>
9320
9321 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9322 inherit library kind.
9323
93242011-08-02 Ed Schonberg <schonberg@adacore.com>
9325
9326 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9327 Minor reformatting.
9328
93292011-08-02 Robert Dewar <dewar@adacore.com>
9330
9331 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9332
93332011-08-02 Yannick Moy <moy@adacore.com>
9334
9335 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9336
93372011-08-02 Robert Dewar <dewar@adacore.com>
9338
9339 * impunit.adb: Add comment.
9340
93412011-08-02 Yannick Moy <moy@adacore.com>
9342
9343 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9344 qualification of aggregates in formal mode
9345 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9346 another aggregate
9347 (Resolve_Aggregate): complete the test that an aggregate is adequately
9348 qualified in formal mode
9349
93502011-08-02 Pascal Obry <obry@adacore.com>
9351
9352 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9353 * mlib-prj.adb: Supress warning when compiling binder generated file.
9354 (Build_Library): Supress all warnings when compiling the binder
9355 generated file.
9356
93572011-08-02 Yannick Moy <moy@adacore.com>
9358
9359 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9360 from here...
9361 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9362 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9363 Add with/use clauses to make Check_Formal_Restriction visible
9364
93652011-08-02 Ed Schonberg <schonberg@adacore.com>
9366
9367 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9368 in-parameters when type of the generic formal is private in the generic
9369 spec and non-private in the body.
9370
93712011-08-02 Claire Dross <dross@adacore.com>
9372
9373 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9374 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9375 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9376 * impunit.adb, Makefile.rtl: Take new files into account.
9377
93782011-08-02 Robert Dewar <dewar@adacore.com>
9379
9380 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9381 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9382
93832011-08-02 Yannick Moy <moy@adacore.com>
9384
9385 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9386 formal mode
9387 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9388 matching static array bounds, taking into account the special case of
9389 string literals
9390 * sem_ch3.adb: Typo in comment.
9391
93922011-08-02 Yannick Moy <moy@adacore.com>
9393
9394 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9395 which issues an error in formal mode if its argument node is originally
9396 from source
9397 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9398 has a discriminant specification so that it does not include the case
9399 of derived types
9400 (Derived_Type_Declaration): move here the test that a derived type has a
9401 discriminant specification
9402 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9403 first element of a component association before accessing its choices
9404 (presence of component association is not enough)
9405 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9406 declaration is a library item before accessing the next element in a
9407 list, as library items are not member of lists
9408 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9409 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9410 Check_Formal_Restriction whenever possible.
9411
94122011-08-02 Ed Schonberg <schonberg@adacore.com>
9413
9414 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9415 reference when needed.
9416
94172011-08-02 Bob Duff <duff@adacore.com>
9418
9419 * gnat_ugn.texi: Fix typo.
9420
94212011-08-02 Vincent Celier <celier@adacore.com>
9422
9423 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9424 archive file name. Do not use the full path name of archives for Open
9425 VMS.
9426
94272011-08-02 Robert Dewar <dewar@adacore.com>
9428
9429 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9430 Analyze_Aspect_Specifications
9431 * sem_ch13.adb
9432 (Analyze_Aspect_Specifications): New handling for boolean aspects
9433 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9434 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9435 sequence for Analyze_Aspect_Specifications
9436 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9437 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9438
94392011-08-02 Robert Dewar <dewar@adacore.com>
9440
9441 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9442 aspects, since these no longer exist.
9443
94442011-08-02 Robert Dewar <dewar@adacore.com>
9445
9446 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9447 semicolon, do not try to see if there are aspects following it.
9448 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9449 aspect spec.
9450
94512011-08-02 Robert Dewar <dewar@adacore.com>
9452
9453 * sem_ch8.adb, aspects.ads: Minor reformatting.
9454
94552011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9456
9457 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9458 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9459 extracted from...
9460 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9461
94622011-08-02 Yannick Moy <moy@adacore.com>
9463
9464 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9465 mode on subprogram declaration outside of package specification, unless
9466 it is followed by a pragma Import
9467 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9468 Access_Type_Declaration): issue error in formal mode on access type
9469 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9470 incomplete type
9471 (Analyze_Object_Declaration): issue error in formal mode on object
9472 declaration which does not respect SPARK restrictions
9473 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9474 declaration which does not respect SPARK restrictions
9475 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9476 error in formal mode on digits or delta constraint
9477 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9478 decimal fixed point type
9479 (Derived_Type_Declaration): issue error in formal mode on derived type
9480 other than type extensions of tagged record types
9481 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9482 with check on access definition
9483 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9484 mode on protected definition.
9485 (Analyze_Task_Definition): issue error in formal mode on task definition
9486
94872011-08-02 Robert Dewar <dewar@adacore.com>
9488
9489 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9490
94912011-08-02 Javier Miranda <miranda@adacore.com>
9492
9493 * sem_ch6.adb (Can_Override_Operator): New function.
9494 (Verify_Overriding_Indicator): Add missing code to check overriding
9495 indicator in operators. Fixes regression.
9496 (Check_Overriding_Indicator): Minor reformating after replacing the
9497 code that evaluates if the subprogram can override an operator by
9498 invocations to the above new function.
9499 * einfo.adb
9500 (Write_Field26_Name): Add missing code to ensure that, following
9501 the documentation in einfo.ads, this field is not shown as attribute
9502 "Static_Initialization" on non-dispatching functions.
9503
95042011-08-02 Jose Ruiz <ruiz@adacore.com>
9505
9506 * sem_res.adb (Resolve_Call): A call to
9507 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9508 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9509 i.e., when the second parameter is of type Time_Span.
9510
95112011-08-02 Vincent Celier <celier@adacore.com>
9512
9513 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9514 with an archive instead of -L<library dir> -l<library name>.
9515
95162011-08-02 Ed Schonberg <schonberg@adacore.com>
9517
9518 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9519 mark the base types In_Use in addition to making the operations
9520 use_visible.
9521
95222011-08-02 Ed Falis <falis@adacore.com>
9523
9524 * init.c: add and setup __gnat_signal_mask for the exception signals
9525 * s-inmaop-vxworks.adb: new file.
9526 * s-intman-vxworks.adb: remove unnecessary initializations and
9527 simplify remaining
9528 * s-intman-vxworks.ads: remove unnecessary variable
9529 * s-taprop-vxworks.adb: simplify signal initialization
9530
95312011-08-02 Robert Dewar <dewar@adacore.com>
9532
9533 * sem_ch8.adb: Minor code reorganization, comment updates.
9534
95352011-08-02 Robert Dewar <dewar@adacore.com>
9536
9537 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9538 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9539 here from Sem_Res.
9540 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9541 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9542
95432011-08-02 Ed Schonberg <schonberg@adacore.com>
9544
9545 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9546 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9547 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9548 use_type_clauses, to handle more efficiently use_type and use_all_type
9549 constructs.
9550 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9551 Ada2012 Use_All_Type clause.
9552 (Use_Class_Wide_Operations): new procedure.
9553
95542011-08-02 Robert Dewar <dewar@adacore.com>
9555
9556 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9557 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9558 expression to expression function.
9559
95602011-08-02 Ed Schonberg <schonberg@adacore.com>
9561
9562 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9563 if types are compatible.
9564
95652011-08-02 Yannick Moy <moy@adacore.com>
9566
9567 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9568 returns True if its argument array types have same dimension and same
9569 static bounds at each index.
9570 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9571 OUT or IN OUT paramaters which are not view conversions in SPARK.
9572 (Resolve_Arithmetic_Op): issue an error in formal mode on
9573 multiplication or division with operands of fixed point types which are
9574 not qualified or explicitly converted.
9575 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9576 Boolean or array type (except String) operands.
9577 (Resolve_Equality_Op): issue an error in formal mode on equality
9578 operators for array types other than String with non-matching static
9579 bounds.
9580 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9581 for array types with non-matching static bounds. Factorize the code in
9582 Matching_Static_Array_Bounds.
9583 (Resolve_Qualified_Expression): issue an error in formal mode on
9584 qualified expressions for array types with non-matching static bounds.
9585 (Resolve_Type_Conversion): issue an error in formal mode on type
9586 conversion for array types with non-matching static bounds
9587
95882011-08-02 Robert Dewar <dewar@adacore.com>
9589
9590 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9591
95922011-08-02 Ed Schonberg <schonberg@adacore.com>
9593
9594 * par-ch9.adb: save location of entry for proper error message.
9595
95962011-08-02 Javier Miranda <miranda@adacore.com>
9597
9598 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9599 (Use_Full_View) which permits this routine to climb through the
9600 ancestors using the full-view of private parents.
9601 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9602 Use_Full_View to true in calls to Is_Ancestor.
9603 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9604 true in call to Is_Ancestor.
9605 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9606 Use_Full_View to true in call to Is_Ancestor.
9607 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9608 call to Is_Ancestor.
9609 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9610 Use_Full_View to true in calls to Is_Ancestor.
9611 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9612 Make_Select_Specific_Data_Table, Register_Primitive,
9613 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9614 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9615 to true in call to Is_Ancestor.
9616 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9617 Use_Full_View to true in calls to Is_Ancestor.
9618 * exp_cg.adb
9619 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9620 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9621
96222011-08-02 Robert Dewar <dewar@adacore.com>
9623
9624 * gnat_rm.texi: Minor reformatting.
9625 * sem_prag.adb: Minor reformatting.
9626
96272011-08-02 Tristan Gingold <gingold@adacore.com>
9628
9629 * vms_data.ads: Add VMS qualifier for -gnateP.
9630
96312011-08-02 Robert Dewar <dewar@adacore.com>
9632
9633 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9634 * par-ch7.adb (P_Package): Proper placement of aspects for package
9635 decl/instantiation.
9636 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9637 (End_Statements): Add Is_Sloc parameterr
9638 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9639 (Check_End): Ad Is_Sloc parameter
9640 (End_Statements): Add Is_Sloc parameterr
9641
96422011-08-02 Vincent Celier <celier@adacore.com>
9643
9644 * ug_words: Add VMS qualifier equivalent to -gnateP:
9645 /SYMBOL_PREPROCESSING.
9646
96472011-08-02 Jose Ruiz <ruiz@adacore.com>
9648
9649 * gnat-style.texi: For hexadecimal numeric literals the typical
9650 grouping of digits is 4 to represent 2 bytes.
9651 A procedure spec which is split into several lines is indented two
9652 characters.
9653
96542011-08-02 Yannick Moy <moy@adacore.com>
9655
9656 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9657 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9658 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9659 properly qualified
9660 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9661 choice in array aggregate
9662 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9663 mark as ancestor
9664 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9665 positional and named aggregate for record, or others in record
9666 aggregate, or multiple choice in record aggregate
9667 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9668 array operands to logical operations AND, OR and XOR do not have the
9669 same static lower and higher bounds
9670 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9671
96722011-08-01 Robert Dewar <dewar@adacore.com>
9673
9674 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9675 Replaces Last_Source_Node_In_Sequence.
9676 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9677 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9678 parens and blank in string (this was inconsistently implemented).
9679 * errout.ads
9680 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9681 blank in string (this was inconsistently implemented).
9682 * gnat1drv.adb
9683 (Set_Global_Switches): Set formal mode switches appropriately
9684 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9685 * par-prag.adb
9686 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9687 call Set_Error_Msg_Lang to set "spark" as language name.
9688 * par.adb: Remove unnecessary call to set formal language for errout
9689 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9690 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9691 name.
9692 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9693 calls to it, moved after resolution so that types are known
9694 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9695 result of concatenation is not of type String
9696 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9697 concatenation is not properly restricted
9698 * gnat_rm.texi: Add doc on pragma Spark_95.
9699 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9700 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9701 * gcc-interface/Make-lang.in: Update dependencies.
9702
97032011-08-01 Javier Miranda <miranda@adacore.com>
9704
9705 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9706 condition that detects if the overridden operation must replace an
9707 existing entity.
9708
97092011-08-01 Javier Miranda <miranda@adacore.com>
9710
9711 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9712 code declarations inserted by Insert_Actions in each alternative of the
9713 N_Case_Expression node.
9714
97152011-08-01 Robert Dewar <dewar@adacore.com>
9716
9717 * sem_ch6.adb: Minor code reorganization.
9718 * sem_util.adb: Minor reformatting.
9719
97202011-08-01 Pascal Obry <obry@adacore.com>
9721
9722 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9723 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9724
97252011-08-01 Yannick Moy <moy@adacore.com>
9726
9727 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9728 literal or operator symbol which is prefixed
9729 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9730 mode on access attributes.
9731 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9732 that concatenation operands are properly restricted in formal mode
9733 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9734 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9735 result of the concatenation has a type different from String.
9736 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9737 Analyze_Quantified_Expression, Analyze_Slice,
9738 Analyze_Null): issue an error in formal mode on unsupported constructs
9739 * sem_ch5.adb
9740 (Analyze_Block_Statement): only issue error on source block statement
9741 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9742 function which returns the last node in a list of nodes for which
9743 Comes_From_Source returns True, if any
9744 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9745 Last_Source_Node_In_Sequence
9746 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9747 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9748 mode on unsupported constructs
9749 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9750 rest of the actions may be needed later on since the error is marked as
9751 not serious.
9752 * sinfo.ads: Typos in comments.
9753
97542011-08-01 Pascal Obry <obry@adacore.com>
9755
9756 * projects.texi: Minor editing.
9757
97582011-08-01 Yannick Moy <moy@adacore.com>
9759
9760 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9761 insertion character ~~
9762 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9763 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9764 with insertion character ~~
9765 (Set_Msg_Text): treat insertion character ~~
9766 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9767 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9768 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9769 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9770 errors related to the formal language restriction not serious
9771 (insertion character |).
9772 * par.adb (Par): set formal language for error messages if needed
9773 * sem_ch6.adb (Check_Missing_Return): take into account possible
9774 generated statements at the end of the function
9775 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9776 enumeration value to define a new pragma SPARK_95
9777 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9778 SPARK_Version): new type and variables to store the SPARK version
9779 (none by default).
9780 (SPARK_Mode): return True when SPARK_Version is set
9781 * par-prag.adb: Correct indentation
9782 (Prag): take Pragma_SPARK_95 into account
9783 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9784 into account.
9785
97862011-08-01 Robert Dewar <dewar@adacore.com>
9787
9788 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9789 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9790 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9791
97922011-08-01 Pascal Obry <obry@adacore.com>
9793
9794 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9795 Target_Name to Get_Path call.
9796 (Parse_Single_Project): Likewise.
9797 (Post_Parse_Context_Clause): Likewise.
9798 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9799 Call Initialise_Project_Path with the proper Target_Name.
9800 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9801 search path.
9802 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9803 with the proper Target_Name.
9804 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9805 Part.Parse routine.
9806 (Parse_Project_And_Apply_Config): Likewise.
9807 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9808 This is fine as this part of the code is supporting only native
9809 compilation.
9810 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9811 is fine as this part of the code is supporting only native compilation.
9812
98132011-08-01 Yannick Moy <moy@adacore.com>
9814
9815 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9816 of homonym, unless the homonym is one of the cases allowed in SPARK
9817 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9818 package declaration occurring after a body.
9819
98202011-08-01 Robert Dewar <dewar@adacore.com>
9821
9822 * checks.adb, exp_ch4.adb: Minor reformatting.
9823
98242011-08-01 Javier Miranda <miranda@adacore.com>
9825
9826 * einfo.ads (Access_Disp_Table): Fix documentation.
9827 (Dispatch_Table_Wrappers): Fix documentation.
9828
98292011-08-01 Pascal Obry <obry@adacore.com>
9830
9831 * prj-env.adb, prj-env.ads: Minor reformatting.
9832
98332011-08-01 Yannick Moy <moy@adacore.com>
9834
9835 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9836 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9837 procedures out of these packages.
2c7f9cc0 9838 * errout.ads, errout.adb
052e0603
AC
9839 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9840 procedures in of this package
9841 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9842 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9843 on misplaced later vs initial declarations, like in Ada 83
9844 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9845 formal mode on attribute of private type whose full type declaration
9846 is not visible
9847 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9848 package declaration inside a package specification
9849 (Analyze_Full_Type_Declaration): issue error in formal mode on
9850 controlled type or discriminant type
9851 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9852 user-defined operator means that it should come from the source
9853 (New_Overloaded_Entity): issue error in formal mode on overloaded
9854 entity.
9855 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9856
98572011-08-01 Thomas Quinot <quinot@adacore.com>
9858
9859 * atree.adb: Minor reformatting.
9860 * checks.adb: Minor reformatting.
9861
98622011-08-01 Vincent Celier <celier@adacore.com>
9863
9864 * s-parame-vms-ia64.ads: Fix typo in comment
9865 Minor reformatting
9866 * s-parame-vms-restrict.ads: Removed, unused.
9867
98682011-08-01 Javier Miranda <miranda@adacore.com>
9869
9870 * exp_ch3.adb
9871 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9872 * sem_ch3.adb
9873 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9874 * sem_ch3.ads, sem_ch3.adb
9875 (Is_Constant_Bound): New extended version of the subprogram that was
9876 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9877 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9878 * sem_aux.ads (Constant_Value): Fix typo in comment.
9879 * checks.adb (Generate_Index_Checks): New implementation which, for
9880 array objects with constant bounds, generates the runtime check
9881 referencing the bounds of the array type. For other cases this routine
9882 provides its previous behavior obtaining such values from the array
9883 object.
9884 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9885 parent type.
9886 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9887 we cannot have semantic interpretations of the new node.
9888
98892011-08-01 Ed Schonberg <schonberg@adacore.com>
9890
9891 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9892 expressions.
9893
98942011-08-01 Arnaud Charlet <charlet@adacore.com>
9895
9896 * sem_ch8.adb: Minor code editing.
9897 * s-vxwext.adb: Remove trailing space.
9898 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9899 consistency with other files.
9900
99012011-08-01 Thomas Quinot <quinot@adacore.com>
9902
9903 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9904
99052011-08-01 Ed Schonberg <schonberg@adacore.com>
9906
9907 * par-ch10.adb: reject parameterized expressions as compilation unit.
9908 * sem_ch4.adb: handle properly conditional expression with overloaded
9909 then_clause and no else_clause.
9910
99112011-08-01 Tristan Gingold <gingold@adacore.com>
9912
9913 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9914 like done by System.Aux_DEC.
9915 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9916
99172011-08-01 Yannick Moy <moy@adacore.com>
9918
9919 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9920 missing label at end of declaration (subprogram or package)
9921 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9922 of positional and named parameter association
9923 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9924 Error_Msg_SP which adds a prefix to the error message giving the name
9925 of the formal language analyzed
9926 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9927 access result type in subprogram, unconstrained array as result type,.
9928 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9929 procedure
9930 * sem_ch8.adb: Code clean up.
9931
99322011-08-01 Javier Miranda <miranda@adacore.com>
9933
9934 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9935 * einfo.ads (Access_Disp_Table): Fix documentation.
9936 (Dispatch_Table_Wrappers): Fix documentation.
9937 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9938 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9939 to enforce the documentation of this attribute.
9940 (Set_Is_Interface): Cleanup the assertion.
9941 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9942 the Underlying_Type entity before reading attribute Access_Disp_Table.
9943 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9944 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9945 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9946 the Underlying_Type entity before reading attribute Access_Disp_Table.
9947 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9948 Locate the Underlying_Type entity before reading attribute
9949 Access_Disp_Table.
9950
99512011-08-01 Ed Schonberg <schonberg@adacore.com>
9952
9953 * s-poosiz.ads: Additional overriding indicators.
9954
99552011-08-01 Yannick Moy <moy@adacore.com>
9956
9957 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9958 formal mode.
9959 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9960 parameter specification does not include a subtype mark.
9961 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9962 formal mode on abstract subprogram.
9963 (Analyze_Subprogram_Specification): issue error in formal mode on
9964 user-defined operator.
9965 (Process_Formals): issue error in formal mode on access parameter and
9966 default expression.
9967 * sem_ch9.adb (Analyze_Abort_Statement,
9968 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9969 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9970 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9971 Analyze_Requeue, Analyze_Selective_Accept,
9972 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9973 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9974 issue error in formal mode on user-defined raise statement.
9975
99762011-08-01 Thomas Quinot <quinot@adacore.com>
9977
9978 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9979 declaration being hidden when overriding an implicit inherited
9980 subprogram.
9981 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9982 (-gnats), do not complain about a source file that contains only a
9983 pragma No_Body.
9984
99852011-08-01 Ed Schonberg <schonberg@adacore.com>
9986
9987 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9988 variable if already set.
9989
99902011-08-01 Arnaud Charlet <charlet@adacore.com>
9991
9992 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9993 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9994 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9995 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9996 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9997 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9998 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9999 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10000 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10001 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10002 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10003 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10004 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10005 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10006 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10007 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10008 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10009 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10010 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10011 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10012 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10013 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10014 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10015 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10016 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10017 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10018 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10019 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10020 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10021 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10022 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10023 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10024 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10025 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10026 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10027 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10028 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10029 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10030 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10031 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10032 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10033 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10034 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10035 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10036 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10037 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10038 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10039 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10040 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10041 Use GNAT instead of GNARL.
10042
100432011-08-01 Bob Duff <duff@adacore.com>
10044
10045 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10046 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10047 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10048 reformatting.
10049
100502011-08-01 Yannick Moy <moy@adacore.com>
10051
10052 * debug.adb (d.D) reverve flag for the SPARK mode
10053 (d.E) reverve flag for SPARK generation mode
10054 (d.F) reverve flag for Why generation mode
2c7f9cc0 10055 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
10056 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10057 functions which return True when the corresponding modes are set
10058 (Formal_Language): return "spark" or "alfa" when in formal verification
10059 mode.
10060 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10061 Error_Msg to prefix the error message with a tag giving the formal
10062 language
10063 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10064 message with a tag giving the formal language
10065 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10066 block statement
10067 (Analyze_Case_Statement): issue error in formal mode on case statement
10068 with a single "others" case alternative
10069 (Analyze_Exit_Statement): issue errors in formal mode on exit
10070 statements which do not respect SPARK restrictions
10071 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10072 (Check_Unreachable_Code): always issue an error (not a warning) in
10073 formal mode on unreachable code (concerns both code after an infinite
10074 loop and after an unconditional jump, both not allowed in SPARK)
10075 * sem_ch6.adb (Analyze_Return_Statement): add call to
10076 Set_Return_Present for a procedure containing a return statement
10077 (already done for functions in Analyze_Function_Return)
10078 (Analyze_Function_Return): issue error in formal mode on extended
10079 return or if return is not last statement in function
10080 (Check_Missing_Return): issue error in formal mode if function does
10081 not end with return or if procedure contains a return
10082 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10083 function to detect if there is an inner scope of its parameter S which
10084 is a loop.
10085
100862011-08-01 Thomas Quinot <quinot@adacore.com>
10087
10088 * sem_ch6.ads: Minor reformatting.
10089
100902011-08-01 Javier Miranda <miranda@adacore.com>
10091
10092 * sem_util.adb (Abstract_Interface_List): Complete condition when
10093 processing private type declarations to avoid reading unavailable
10094 attribute.
10095 (Is_Synchronized_Tagged_Type): Complete condition when processing
10096 private extension declaration nodes to avoid reading unavailable
10097 attribute.
10098
100992011-08-01 Thomas Quinot <quinot@adacore.com>
10100
10101 * sem_ch3.adb: Minor reformatting.
10102
101032011-08-01 Thomas Quinot <quinot@adacore.com>
10104
10105 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10106 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10107 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10108 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10109 for VMS, instead parametrize the common implementation with
10110 System.Parameters declarations.
10111
101122011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10113
10114 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10115
101162011-08-01 Tristan Gingold <gingold@adacore.com>
10117
10118 * seh_init.c: Fix SEH handler installation on win64.
10119
101202011-08-01 Ed Schonberg <schonberg@adacore.com>
10121
10122 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10123 double analysis of an anonymous access to subprogram, because it can
10124 lead to improper sharing of profiles and a back-end crash.
10125
101262011-08-01 Robert Dewar <dewar@adacore.com>
10127
10128 * make.adb, sem_ch4.adb: Minor reformatting.
10129 * gcc-interface/Make-lang.in: Update dependencies.
10130 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10131
101322011-08-01 Arnaud Charlet <charlet@adacore.com>
10133
10134 * gnat_rm.texi: Fix definition of Long_Integer.
10135
101362011-08-01 Ed Schonberg <schonberg@adacore.com>
10137
10138 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10139 to prevent storage exhaustion.
10140 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10141 finalized is a function body, insert the cleanup code before the final
10142 return statement, to prevent spurious warnings.
10143 * s-pooglo.ads: add overriding indicator.
10144
101452011-08-01 Ed Schonberg <schonberg@adacore.com>
10146
10147 * sem_ch4.adb (Operator_Check): improve error message when both a
10148 with_clause and a use_clause are needed to make operator usage legal.
10149 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10150 determine whether a compilation unit is visible within an other,
10151 either through a with_clause in the current unit, or a with_clause in
10152 its library unit or one one of its parents.
10153
101542011-08-01 Ed Schonberg <schonberg@adacore.com>
10155
10156 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10157 over an arbitrary expression of an array or container type.
10158 * lib-xref.adb: clarify comment.
10159
101602011-08-01 Bob Duff <duff@adacore.com>
10161
10162 * einfo.ads: Minor reformatting.
10163 * debug.adb: Minor comment improvement.
10164
101652011-08-01 Javier Miranda <miranda@adacore.com>
10166
10167 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10168 consider hidden subprograms as valid candidates.
10169
101702011-08-01 Arnaud Charlet <charlet@adacore.com>
10171
10172 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10173
101742011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10175
10176 * gnat_ugn.texi: Fix typo.
10177
101782011-08-01 Robert Dewar <dewar@adacore.com>
10179
10180 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10181 lib-xref.adb: Minor reformatting
10182
101832011-08-01 Gary Dismukes <dismukes@adacore.com>
10184
10185 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10186 when to generate a call to Move_Final_List.
10187 (Has_Controlled_Parts): Remove this function.
10188
101892011-08-01 Geert Bosch <bosch@adacore.com>
10190
10191 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10192 "," in choice list.
10193
101942011-08-01 Thomas Quinot <quinot@adacore.com>
10195
10196 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10197 explicit raise of a predefined exception as Comes_From_Source if the
10198 original N_Raise_Statement comes from source.
10199
102002011-08-01 Robert Dewar <dewar@adacore.com>
10201
10202 * sinfo.ads: Add comment.
10203 * sem_ch6.adb: Minor reformatting.
10204
102052011-08-01 Robert Dewar <dewar@adacore.com>
10206
10207 * freeze.adb (Freeze_Entity): Refine check for bad component size
10208 clause to avoid rejecting confirming clause when atomic/aliased present.
10209
102102011-08-01 Ed Schonberg <schonberg@adacore.com>
10211
10212 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10213 better determine whether an entity reference is a write.
10214 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10215 subcomponent.
10216 * lib-xref.adb (Output_References): Do no suppress a read reference at
10217 the same location as an immediately preceeding modify-reference, to
10218 handle properly in-out actuals.
10219
102202011-08-01 Tristan Gingold <gingold@adacore.com>
10221
10222 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10223
102242011-08-01 Quentin Ochem <ochem@adacore.com>
10225
10226 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10227 heap to compute the result.
10228
102292011-08-01 Robert Dewar <dewar@adacore.com>
10230
10231 * atree.ads: Minor reformatting.
10232
102332011-08-01 Emmanuel Briot <briot@adacore.com>
10234
10235 * g-expect.adb (Get_Command_Output): Fix memory leak.
10236
102372011-08-01 Geert Bosch <bosch@adacore.com>
10238
10239 * cstand.adb (P_Float_Type): New procedure to print the definition of
10240 predefined fpt types.
10241 (P_Mixed_Name): New procedure to print a name using mixed case
10242 (Print_Standard): Use P_Float_Type for printing floating point types
10243 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10244 precision IEEE float.
10245
102462011-08-01 Thomas Quinot <quinot@adacore.com>
10247
10248 * sem_ch3.adb: Minor reformatting.
10249
102502011-08-01 Ed Schonberg <schonberg@adacore.com>
10251
10252 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10253 the completion of a generic function, insert the new body rather than
10254 rewriting the original.
10255
102562011-08-01 Yannick Moy <moy@adacore.com>
10257
10258 * sinfo.ads, errout.ads: Typos in comments.
10259
102602011-08-01 Robert Dewar <dewar@adacore.com>
10261
10262 * par-endh.adb: Minor reformatting.
10263
102642011-08-01 Robert Dewar <dewar@adacore.com>
10265
10266 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10267 (Pre_Post_Aspects): New subtype.
10268 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10269 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10270 * par-ch7.adb (P_Package): Remove Decl parameter
10271 (P_Package): Handle new syntax for aspects (before IS)
10272 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10273 new aspect syntax
10274 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10275 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10276 (P_Package): Remove Decl parameter
10277 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10278 aspects
10279 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10280 specs
10281 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10282 * sinfo.ads: Document new syntax for aspects in packages etc.
10283 * sprint.adb: Handle new syntax of aspects before IS in package
10284
102852011-08-01 Thomas Quinot <quinot@adacore.com>
10286
10287 * atree.ads: Minor reformatting.
10288 * sem_prag.adb: Minor reformatting.
10289
102902011-08-01 Robert Dewar <dewar@adacore.com>
10291
10292 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10293 case expr alternative.
10294
102952011-08-01 Ed Schonberg <schonberg@adacore.com>
10296
10297 * sem_ch12.adb: Fix typo.
10298
102992011-08-01 Geert Bosch <bosch@adacore.com>
10300
10301 * sem_prag.adb (Check_No_Link_Name): New procedure.
10302 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10303 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10304 instead of Standard_Long_Long_Float_Size global. Preparation for
10305 eventual removal of per type constants.
10306 * exp_util.ads (Get_Stream_Size): New function returning the stream
10307 size value of subtype E.
10308 * exp_util.adb (Get_Stream_Size): Implement new function.
10309 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10310 function.
10311 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10312 * einfo.adb:
10313 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10314
103152011-08-01 Geert Bosch <bosch@adacore.com>
10316
10317 * cstand.adb: Fix comments.
10318 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10319 count of arguments.
10320
103212011-08-01 Robert Dewar <dewar@adacore.com>
10322
10323 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10324
103252011-08-01 Geert Bosch <bosch@adacore.com>
10326
10327 * atree.ads: Fix comment.
10328
103292011-08-01 Robert Dewar <dewar@adacore.com>
10330
10331 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10332 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10333 * par.adb: Add with for Namet.Sp.
10334 * par-tchk.adb: Minor reformatting.
10335
103362011-08-01 Vincent Celier <celier@adacore.com>
10337
10338 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10339 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10340 of the init procedure of a SAL.
10341 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10342 New procedure.
10343
103442011-08-01 Thomas Quinot <quinot@adacore.com>
10345
10346 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10347 reformatting.
10348
103492011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10350
10351 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10352
103532011-08-01 Thomas Quinot <quinot@adacore.com>
10354
10355 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10356 conformant with its spec (return True only for types that have
10357 an overriding Initialize primitive operation that prevents them from
10358 having preelaborable initialization).
10359 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10360 initialization for controlled types in Ada 2005 or later mode.
10361
103622011-08-01 Robert Dewar <dewar@adacore.com>
10363
10364 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10365 Postcondition.
10366 (Same_Aspect): New function.
10367 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10368 Type_Invariant, Precondition, Postcondition.
10369 * snames.ads-tmpl: Add Name_Type_Invariant.
10370
103712011-08-01 Robert Dewar <dewar@adacore.com>
10372
10373 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10374 here.
10375 (Freeze_All_Ent): Fix error in handling inherited aspects.
10376 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10377 already analyzed, but don't skip entire processing of a declaration,
10378 that's wrong in some cases of declarations being rewritten.
10379 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10380 Don't delay for integer, string literals
10381 Treat predicates in usual manner for delay, remove special case code,
10382 not needed.
10383 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10384 (Build_Predicate_Function): Update saved expression in aspect
10385 (Build_Invariant_Procedure): Update saved expression in aspect
10386 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10387 of replacement of discriminant references if the reference is simple.
10388
103892011-08-01 Robert Dewar <dewar@adacore.com>
10390
10391 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10392 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10393 Static_Predicate and Dynamic_Predicate.
10394 (Build_Predicate_Function): Add processing for Static_Predicate
10395 and Dynamic_Predicate.
10396 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10397 (From_Static_Predicate): New flag
10398 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10399
104002011-08-01 Robert Dewar <dewar@adacore.com>
10401
10402 * usage.adb: Documentation cleanup for Ada version modes in usage.
10403 * expander.adb: Minor reformatting.
10404
104052011-08-01 Robert Dewar <dewar@adacore.com>
10406
10407 * atree.ads: Minor comment fix.
10408 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10409 a-witeio.ads, sem_prag.adb: Minor reformatting.
10410
104112011-08-01 Doug Rupp <rupp@adacore.com>
10412
10413 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10414 pointers. Use descrip.h header file for convenience. Add some
10415 comments.
10416
104172011-08-01 Robert Dewar <dewar@adacore.com>
10418
10419 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10420 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10421 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10422 New procedure.
10423 (Check_Aspect_At_End_Of_Declarations): New procedure
10424 (Analye_Aspect_Specification): Minor changes for above procedures
10425 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10426 specification node as well.
10427
104282011-08-01 Pascal Obry <obry@adacore.com>
10429
10430 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10431 Windows files. Use GetFilesAttributes() in this case to check for file
10432 existence instead of returning with an error code.
10433
104342011-08-01 Vincent Celier <celier@adacore.com>
10435
10436 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10437 High is above Source length.
10438
104392011-08-01 Robert Dewar <dewar@adacore.com>
10440
10441 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10442
104432011-08-01 Robert Dewar <dewar@adacore.com>
10444
10445 * aspects.ads (Boolean_Aspects): New subtype.
10446 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10447 for derived types in cases where the parent type and derived type have
10448 aspects.
10449 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10450 with aspects when parent type also has aspects.
10451 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10452 boolean expression at this point).
10453 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10454 accordance with final decision on the Ada 2012 feature.
10455 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10456
104572011-08-01 Matthew Heaney <heaney@adacore.com>
10458
10459 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10460
104612011-08-01 Pascal Obry <obry@adacore.com>
10462
10463 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10464 Fix Replace_Slice when High is above current string size.
10465 (Replace_Slice): Fix DL computation when High is above current
10466 string length.
10467
104682011-08-01 Gary Dismukes <dismukes@adacore.com>
10469
10470 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10471
104722011-08-01 Matthew Heaney <heaney@adacore.com>
10473
10474 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10475 of node.
10476
104772011-08-01 Pascal Obry <obry@adacore.com>
10478
10479 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10480 reformatting.
10481
104822011-08-01 Ed Schonberg <schonberg@adacore.com>
10483
10484 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10485 access to protected subprograms in generic bodies.
10486 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10487 protected type, indicate that the convention of the subprogram is
10488 Convention_Protected, because it may be used in subsequent declarations
10489 within the protected declaration.
10490
104912011-08-01 Vincent Celier <celier@adacore.com>
10492
10493 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10494 and "final" procedures when the name of the library is "ada", to avoid
10495 duplicate symbols "adainit" and "adafinal" in executables.
10496
104972011-08-01 Ed Schonberg <schonberg@adacore.com>
10498
10499 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10500 quantified expression that appears within a postcondition and uses the
10501 Ada2012 'Result attribute.
10502
105032011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10504
10505 * init.c (__gnat_error_handler): Cast reason to int.
10506 (__gnat_install_handler): Explain sa_sigaction use.
10507
105082011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10509
10510 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10511 subprogram has copy-in copy-out parameters, try to promote the mode of
10512 the return type if it is passed in registers.
10513
105142011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10515
10516 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10517 left operand as addressable.
10518
105192011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10520
10521 * gcc-interface/gigi.h (build_function_stub): Remove.
10522 (build_return_expr): Likewise.
10523 (convert_vms_descriptor): Declare.
10524 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10525 (build_function_stub): Move to...
10526 * gcc-interface/utils2.c (build_return_expr): Move to...
10527 * gcc-interface/trans.c (build_function_stub): ...here.
10528 (build_return_expr): ...here.
10529 (Subprogram_Body_to_gnu): Add local variable for language_function.
10530 Disconnect the parameter attributes cache, if any, once done with it.
10531 Call end_subprog_body only after setting the end_locus.
10532 Build the stub associated with the function, if any, at the very end.
10533 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10534 variables and streamline control flow.
10535
105362011-07-23 Arnaud Charlet <charlet@adacore.com>
10537
10538 PR ada/49819
10539 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10540 g-trasym-dwarf.adb.
10541
105422011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10543
10544 PR bootstrap/49794
10545 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10546 Assign to act.sa_sigaction.
10547 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10548 current->return_address to char * before arithmetic.
10549
105502011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10551
10552 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10553 Correct argument types.
10554 Extract code from reason.
10555 (__gnat_install_handler): Assign to act.sa_sigaction.
10556
105572011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10558
10559 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10560 (GNAT1_OBJS): ...here.
10561
105622011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10563
10564 PR ada/48711
10565 * g-socthi-mingw.adb (Fill): Fix formatting.
10566
10567 * gcc-interface/gigi.h: Move around comment.
10568
105692011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10570
10571 PR ada/46350
10572 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10573
105742011-07-14 Florian Weimer <fw@deneb.enyo.de>
10575
10576 PR ada/48711
10577 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10578
105792011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10580
10581 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10582 range comparison if Pmode is SImode.
10583
105842011-07-12 Laurent GUERBY <laurent@guerby.net>
10585 Eric Botcazou <ebotcazou@adacore.com>
10586
10587 * adadecode.c: Wrap up in extern "C" block.
10588 * adadecode.h: Likewise.
10589 * adaint.c: Likewise. Remove 'const' keyword.
10590 * adaint.h: Likewise.
10591 * argv.c: Likewise.
10592 * atree.h: Likewise.
10593 * cio.c: Likewise.
10594 * cstreams.c: Likewise.
10595 * env.c: Likewise.
10596 * exit.c: Likewise.
10597 * fe.h: Likewise.
10598 * final.c: Likewise.
10599 * init.c: Likewise.
10600 * initialize.c: Likewise.
10601 * link.c: Likewise.
10602 * namet.h: Likewise.
10603 * nlists.h: Likewise.
10604 * raise.c: Likewise.
10605 * raise.h: Likewise.
10606 * repinfo.h: Likewise.
10607 * seh_init.c: Likewise.
10608 * targext.c: Likewise.
10609 * tracebak.c: Likewise.
10610 * uintp.h: Likewise.
10611 * urealp.h: Likewise.
10612 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10613 * xsinfo.adb: Likewise.
10614 * xsnamest.adb: Likewise.
10615 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10616 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10617 * gcc-interface/misc.c: Likewise.
10618 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10619 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10620 ada/targext.o here...
10621 (GNAT_ADA_OBJS): ...and not here.
10622 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10623 (GNATBIND_OBJS): Reorder.
10624
106252011-07-07 Richard Henderson <rth@redhat.com>
10626
10627 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10628 dwarf2out_frame_init.
10629
106302011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10631
10632 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10633
106342011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10635
10636 PR target/39150
10637 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10638
106392011-07-06 Richard Guenther <rguenther@suse.de>
10640
10641 * gcc-interface/misc.c (gnat_init): Merge calls to
10642 build_common_tree_nodes and build_common_tree_nodes_2.
10643 Re-initialize boolean_false_node.
10644
106452011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10646 Olivier Hainque <hainque@adacore.com>
10647 Nicolas Setton <setton@adacore.com>
10648
10649 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10650 the type according to the ARTIFICIAL_P parameter.
10651 (create_type_decl): Likewise.
10652 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10653
106542011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10655
10656 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10657 (gnatbind): Likewise.
10658
106592011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10660
10661 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10662
106632011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10664
10665 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10666 local variable throughout. Remove useless call to Base_Type.
10667 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10668 Take it also into account for the volatileness of the field. Set the
10669 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10670
106712011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10672
10673 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10674 on a dereference built for a by-ref object if it has an address clause.
10675
106762011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10677
10678 * einfo.ads (Address_Taken): Document use for the second argument of
10679 Asm_Input and Asm_Output attributes.
10680 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10681 argument is an entity name, then set Address_Taken on it.
10682 <Attribute_Asm_Output>: Likewise.
10683 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10684 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10685 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10686 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10687
106882011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10689
10690 PR middle-end/46500
10691 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10692
106932011-06-14 Joseph Myers <joseph@codesourcery.com>
10694
10695 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10696 (ada/utils.o): Update dependencies.
10697 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10698 ../../../libcpp/libcpp.a.
10699 * gcc-interface/utils.c: Include common/common-target.h.
10700 (process_attributes): Use targetm_common.have_named_sections.
10701
107022011-06-07 Richard Guenther <rguenther@suse.de>
10703
10704 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10705 set_sizetype.
10706
107072011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10708
10709 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10710 TREE_THIS_NOTRAP flag.
10711
107122011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10713
10714 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10715 Fix thinko.
10716
107172011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10718
10719 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10720 constants whose full view has discriminants specially.
10721
107222011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10723
10724 * gcc-interface/utils.c: Include diagnostic.h.
10725 (gnat_write_global_declarations): Output debug information for all
10726 global type declarations before finalizing the compilation unit.
10727 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10728
107292011-05-25 Jakub Jelinek <jakub@redhat.com>
10730
10731 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10732
107332011-05-25 Kai Tietz <ktietz@redhat.com>
10734
10735 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10736 initialization instead of const/none-const pointer assignment.
10737
107382011-05-24 Joseph Myers <joseph@codesourcery.com>
10739
10740 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10741 $(EXTRA_GNAT1_OBJS).
10742 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10743 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10744 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10745 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10746 libcommon-target.a instead of prefix.o.
10747
107482011-05-21 Joseph Myers <joseph@codesourcery.com>
10749
10750 PR ada/49097
10751 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10752
107532011-05-20 Joseph Myers <joseph@codesourcery.com>
10754
10755 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10756 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10757 instead of version.o.
10758
107592011-05-18 Kai Tietz <ktietz@redhat.com>
10760
10761 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10762 boolean_false_node instead of integer_zero_node.
10763 (convert_with_check): Likewise.
10764 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10765
107662011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10767
10768 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10769 type of the parameter is an unconstrained array, convert the actual to
10770 the type of the formal in the In Out and Out cases as well.
10771
107722011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10773
10774 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10775 call build_function_type_array or build_varargs_function_type_array
10776 instead.
10777 (create_subprog_type): Don't call build_function_type; call
10778 build_function_type_vec instead.
10779
107802011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10781
10782 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10783 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10784 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10785
107862011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10787
10788 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10789
10790 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10791 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10792
107932011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10794
10795 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10796
107972011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10798
10799 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10800 instead of accessing TYPE_ARG_TYPES directly.
10801 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10802
108032011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10804
10805 PR ada/48844
10806 * gcc-interface/gigi.h (get_variant_part): Declare.
10807 * gcc-interface/decl.c (get_variant_part): Make global.
10808 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10809 types have the same constant size, are record types and T1 has a
10810 variant part while T2 doesn't.
10811
108122011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10813
10814 * gcc-interface/utils.c (begin_subprog_body): Do not call
10815 get_pending_sizes.
10816 (end_subprog_body): Likewise.
10817
108182011-05-04 Richard Guenther <rguenther@suse.de>
10819
10820 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10821 int_const_binop.
10822 (pos_to_constructor): Likewise.
10823
108242011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 10825 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
10826
10827 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10828 of build_function_type. Adjust calls to...
10829 (build_raise_check): ...this. Do not take a void_tree parameter.
10830 Call build_function_type_list instead of build_function_type.
10831 Fix head comment and swap couple of conditional blocks.
10832
108332011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10834
10835 * gnatvsn.ads (Library_Version): Bump to 4.7.
10836 (Current_Year): Bump to 2011.
10837
108382011-04-29 Michael Matz <matz@suse.de>
10839
10840 * gcc-interface/misc.c (gnat_handle_option): Set
10841 warn_maybe_uninitialized.
10842
108432011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10844
10845 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10846 the Watson/McCabe paper.
10847
108482011-04-23 Jim Meyering <meyering@redhat.com>
10849
10850 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10851
108522011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10853
10854 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10855 onto the new type.
10856
108572011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10858
10859 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10860 parameter.
10861 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10862 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10863 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10864 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10865 <all>: Do not set flags on the reused DECL node coming from an alias.
10866 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10867 don't need debug info here...
10868 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10869 (gigi): Adjust calls to create_subprog_decl.
10870 (build_raise_check): Likewise.
10871 (establish_gnat_vms_condition_handler): Likewise.
10872 (Compilation_Unit_to_gnu): Likewise.
10873 (gnat_to_gnu): Likewise.
10874
108752011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10876
10877 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10878 (NO_REORDER_ADAFLAGS): New variable.
10879 (EXTRA_GNATTOOLS): Always define.
10880 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10881 Clean up and adjust list of files compiled with special options.
10882 * gcc-interface/Make-lang.in: Likewise.
10883 (ada/decl.o): Cosmetical change.
10884 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10885
108862011-04-20 Jim Meyering <meyering@redhat.com>
10887
10888 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10889
108902011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10891
10892 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10893 $(CFLAGS) on the link line.
10894
108952011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10896
10897 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10898 padded type built for the return type if it is unconstrained.
10899
109002011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10901
10902 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10903
109042011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10905
10906 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10907 before calling TREE_CHAIN.
10908 * gcc-interface/misc.c (gnat_init_ts): New function.
10909 (LANG_HOOKS_INIT_TS): Define.
10910
109112011-04-12 Martin Jambor <mjambor@suse.cz>
10912
10913 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10914 instead of cgraph_node.
10915
109162011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10917
10918 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10919 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10920 mechanism.
10921
109222011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10923
10924 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10925 of aggregate types that contain a placeholder.
10926
109272011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10928
10929 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10930 TYPE_ARG_TYPES.
10931 (handle_type_generic_attribute): Likewise.
10932
109332011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10934
10935 PR ada/47163
10936 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10937
109382011-04-04 Kai Tietz <ktietz@redhat.com>
10939
10940 PR ada/47163
10941 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10942 to flag value.
10943
109442011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10945
10946 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10947 type case, do not strip a padding type around the array type.
10948
109492011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10950
10951 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10952 types.
10953
109542011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10955
10956 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10957 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10958 code for -feliminate-unused-debug-types.
10959 (gnat_post_options): Likewise.
10960
109612011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10962
10963 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10964 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10965 distinct copy.
10966
109672011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10968
10969 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10970 DECL_ARTIFICIAL flag on enumeration types.
10971
109722011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10973
10974 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10975 fat pointer types artificial unconditionally.
10976 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10977 isn't artificial.
10978
109792011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10980
10981 * gcc-interface/gigi.h (get_dummy_type): Declare.
10982 (build_dummy_unc_pointer_types): Likewise.
10983 (finish_fat_pointer_type): Likewise.
10984 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10985 fat pointer type has been built, complete it in place.
10986 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10987 and thin pointers. Remove useless variable.
10988 (finish_fat_pointer_type): Make global and move to...
10989 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10990 (get_dummy_type): New function.
10991 (build_dummy_unc_pointer_types): Likewise.
10992 (gnat_pushdecl): Propage the name to the anonymous variants only.
10993 (update_pointer_to): Only adjust the pointer types in the unconstrained
10994 array case.
10995
109962011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10997
10998 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10999 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11000 if this is a Taft amendment type and the full declaration is available.
11001 * gcc-interface/trans.c (process_type): Likewise.
11002 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11003 (process_freeze_entity): Likewise.
11004 * gcc-interface/utils.c (dummy_global): New static variable.
11005 (gnat_write_global_declarations): If there are types declared as used
11006 at the global level, insert them in the global hash table.
11007
110082011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11009
11010 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11011 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11012 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11013 copy.
11014 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11015 flag of the type accordingly.
11016 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11017
110182011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11019
11020 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11021 finalizing types when updating the pointers to the designated type.
11022 <all>: Finalize the deferred types even if we didn't defer processing
11023 of incomplete types in this invocation.
11024
110252011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
11026 Nicolas Setton <setton@adacore.com>
11027 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
11028
11029 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11030 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11031
110322011-03-28 Kai Tietz <ktietz@redhat.com>
11033
11034 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11035 Windows targets.
11036 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11037 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11038
11039 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11040
110412011-03-28 Tristan Gingold <gingold@adacore.com>
11042
11043 PR ada/44431
11044 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11045 Use ada output of gnatbind.
11046 (ada/b_gnatb.adb): Ditto.
11047 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11048 (ada.mostlyclean, ada.stage1)
11049 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11050 (ada.stagefeedback): Adjust.
11051 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11052 Use ada output of gnatbind.
11053 (b_gnatm.adb): Ditto.
11054 (b_gnatl.o, b_gnatm.o): New rules.
11055
110562011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11057
11058 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11059 for the padded type built to support a specified size or alignment.
11060
110612011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11062
11063 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11064 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11065 unconditionally to the end of the unit when the designated type is
11066 limited_with'ed.
11067 <all>: Rename local variable. Attempt to un-defer types only and do it
11068 for limited_with'ed types as well.
11069 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11070 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11071 consistently and remove redundant call to finalize_from_with_types.
11072
110732011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11074
11075 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11076 subprograms without a previous spec declared in the same unit.
11077 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11078 subprograms at the end of the unit instead of at the beginning.
11079 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11080 isn't public for the special handling of non-inline functions nested
11081 inside inline external functions.
11082
110832011-03-25 Jeff Law <law@redhat.com>
11084
11085 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11086
110872011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11088
11089 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11090 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11091 to compute Set_Size_Depends_On_Discriminant.
11092 (Layout_Type): Call it on array types in back-end layout mode.
11093 * sem_util.adb (Requires_Transient_Scope): Return true for array
11094 types only if the size depends on the value of discriminants.
11095 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11096 type if the RHS is a call to a function that returns an unconstrained
11097 type with default discriminant.
11098
110992011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11100
11101 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11102 non-conversion to the nominal result type at the end.
11103
111042011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11105
11106 * gcc-interface/trans.c (create_temporary): New function taken from...
11107 (create_init_temporary): ...here. Call it.
11108 (call_to_gnu): Create the temporary for the return value early, if any.
11109 Create it for a function with copy-in/copy-out parameters if there is
11110 no target; in other cases of copy-in/copy-out, use another temporary.
11111 Push the new binding level lazily. Add and rename local variables.
11112
111132011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11114
11115 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11116 error message.
11117 (set_rm_size): Likewise.
11118
111192011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11120
11121 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11122 for the padded type built in order to support a specified alignment.
11123 Fix incorrect formatting.
11124
111252011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11126
11127 PR bootstrap/48216
11128 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11129
111302011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11131
11132 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11133 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11134 to the end of the list. Adjust recursive call. Rename local variable.
11135 If REORDER is true, reorder components of the record type.
11136 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11137 components_to_record and adjust the parameter list.
11138
111392011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11140
11141 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11142 disabled, use the variable for bounds of loop iteration scheme.
11143
111442011-03-21 Kai Tietz <ktietz@redhat.com>
11145
11146 PR target/12171
11147 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11148
111492011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11150
11151 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11152 out whether the expression is read-only. Short-circuit placeholder
11153 case and rename a couple of local variables.
11154
111552011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11156
11157 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11158 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11159 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11160 (convert): Deal with conversions from a smaller form type specially.
11161
111622011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11163
11164 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11165 its argument, except for the special -I- switch.
11166
111672011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11168
11169 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11170 "Ada Issues".
11171
111722011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11173
11174 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11175
111762011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11177
11178 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11179 GNAT_FORMAL.
11180 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11181 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11182 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11183 Do not generate the check directly, instead instantiate the template
11184 check present in the descriptor.
11185 (make_descriptor_field): Move around.
11186 (build_vms_descriptor32): Build a template check in the POINTER field.
11187 (build_vms_descriptor): Remove useless suffixes.
11188 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11189
111902011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11191
11192 PR bootstrap/47467
11193 * targext.c: Include target files if IN_RTS is defined.
11194
111952011-01-26 Richard Guenther <rguenther@suse.de>
11196
11197 PR bootstrap/47467
11198 * targext.c: Include config.h.
11199 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11200 dependency.
11201
112022011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 11203 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
11204
11205 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11206
112072011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11208
11209 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11210 end-of-case on the end label and its associated gotos, if any.
11211
112122011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11213
11214 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11215 expressions of the parameter cache within the statement group of
11216 the CICO mechanism.
11217
112182011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 11219 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
11220
11221 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11222 (set_end_locus_from_node): New function.
11223 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11224 make and the function end_locus.
11225 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11226 for the elaboration subprogram.
11227 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11228 set the end_locus of the expression as well.
11229
112302011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11231
11232 PR ada/47131
11233 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11234 variables that are referenced in exception handlers volatile.
11235
11236
11237\f
11238Copyright (C) 2011 Free Software Foundation, Inc.
11239
11240Copying and distribution of this file, with or without modification,
11241are permitted in any medium without royalty provided the copyright
11242notice and this notice are preserved.
11243
11244 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11245 - fix bugs in the description of Source_Trace;
11246 - get rid of UNIT_NAME;
11247
4fbad0ba
AC
112482011-08-02 Javier Miranda <miranda@adacore.com>
11249
11250 * exp_ch9.adb
11251 (Build_Dispatching_Requeue): Adding support for VM targets
11252 since we cannot directly reference the Tag entity.
11253 * exp_sel.adb (Build_K): Adding support for VM targets.
11254 (Build_S_Assignment): Adding support for VM targets.
11255 * exp_disp.adb
11256 (Default_Prim_Op_Position): In VM targets do not restrict availability
11257 of predefined interface primitives to compiling in Ada 2005 mode.
11258 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11259 restricted to compiling in Ada 2005 mode.
11260 (Make_VM_TSD): Generate code that declares and initializes the OSD
11261 record. Needed to support dispatching calls through synchronized
11262 interfaces.
11263 * exp_ch3.adb
11264 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11265 primitives associated with synchronized interfaces.
11266 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11267 primitives associated with synchronized interfaces.
11268
112692011-08-02 Yannick Moy <moy@adacore.com>
11270
11271 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11272 statements hidden in SPARK if preceded by the HIDE directive
11273 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11274 exception handlers as hidden in SPARK if preceded by the HIDE directive
11275 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11276 if starting with the HIDE directive
11277 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11278 starting with the HIDE directive; mark the declarations in a private
11279 part as hidden in SPARK if the private part starts with the HIDE
11280 directive
11281 * restrict.adb, restrict.ads
11282 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11283 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11284 argument node belongs to a part which is hidden in SPARK
11285 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11286 parts in SPARK; protect the possibly costly call to
11287 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11288 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11289 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11290 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11291 Tok_SPARK_Hide.
11292 (Scan): recognize special comment starting with '#' and followed by
11293 SPARK keyword "hide" as a HIDE directive.
11294
112952011-08-02 Yannick Moy <moy@adacore.com>
11296
11297 * types.ads, erroutc.ads: Minor reformatting.
11298
112992011-08-02 Vincent Celier <celier@adacore.com>
11300
11301 * link.c: Add response file support for cross platforms.
11302
6ff6152d
ES
113032011-08-02 Ed Schonberg <schonberg@adacore.com>
11304
11305 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11306 in an association, set parent field of copy before partial analysis.
11307 * sem_res.adb (Resolve_Slice): create reference to itype only when
11308 expansion is enabled.
11309
975c6896
YM
113102011-08-02 Yannick Moy <moy@adacore.com>
11311
11312 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11313 for new flag denoting which subprogram bodies are in ALFA
11314 * restrict.adb, sem_ch7.adb: Update comment
11315 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11316 sem_ch9.adb, sem_res.adb: Add calls to
11317 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11318 * sem_ch6.adb (Analyze_Function_Return): add calls to
11319 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11320 middle of the body, and extended return.
11321 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11322 False when missing return.
11323 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11324 to True for subprograms whose spec is in ALFA. Remove later on the flag
11325 on the entity used for a subprogram body when there exists a separate
11326 declaration.
11327 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11328 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11329 False, otherwise do nothing.
11330
afc8324d
AC
113312011-08-02 Robert Dewar <dewar@adacore.com>
11332
11333 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11334
113352011-08-02 Yannick Moy <moy@adacore.com>
11336
11337 * sem_ch4.ads: minor formatting.
11338
2ba431e5
YM
113392011-08-02 Yannick Moy <moy@adacore.com>
11340
11341 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11342 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11343 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11344 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11345 opt.ads: cleanup of SPARK mode
11346
0f853035
YM
113472011-08-02 Yannick Moy <moy@adacore.com>
11348
11349 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11350 types.
11351 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11352 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11353 * sem_ch3.adb
11354 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11355 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11356 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11357 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11358 types.
11359 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11360 non-static range.
11361 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11362 functions whose return type is not in ALFA.
11363 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11364 specifications.
11365 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11366 parameter's type is not in ALFA.
11367 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11368 types are in ALFA.
11369
d2b10647
ES
113702011-08-02 Ed Schonberg <schonberg@adacore.com>
11371
11372 * sem_ch6 (Analyze_Expression_Function): treat the function as
11373 Inline_Always, and introduce a subprogram declaration for it when it is
11374 not a completion.
11375 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11376 expression functions, so that the back-end can determine whether they
11377 can in fact be inlined.
11378 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11379 a function body comes from an expression function.
11380
c7b9d548
AC
113812011-08-02 Gary Dismukes <dismukes@adacore.com>
11382
11383 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11384 null exclusions to test Can_Never_Be_Null on the anonymous access types
11385 of the formals rather than testing the formals themselves. Exclude this
11386 check in cases where the Old_Formal is marked as a controlling formal,
11387 to avoid issuing spurious errors for bodies completing dispatching
11388 operations (due to the flag not getting set on controlling access
11389 formals in body specs).
11390 (Find_Corresponding_Spec): When checking full and subtype conformance of
11391 subprogram bodies in instances, pass Designated and E in that order, for
11392 consistency with the expected order of the formals (New_Id followed by
11393 Old_Id).
11394
113952011-08-02 Robert Dewar <dewar@adacore.com>
11396
11397 * sem_ch8.adb: Minor reformatting.
11398
1138cf59
AC
113992011-08-02 Ed Schonberg <schonberg@adacore.com>
11400
11401 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11402 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11403 primitive operations of class-wide actuals.
11404
114052011-08-02 Javier Miranda <miranda@adacore.com>
11406
11407 * exp_atag.ads, exp_atag.adb
11408 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11409 since its value is implicitly passed in argument Typ.
11410 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11411 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11412 Build_Common_Dispatching_Select_Statements.
11413
7b9db926
RD
114142011-08-02 Robert Dewar <dewar@adacore.com>
11415
11416 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11417 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11418 Minor reformatting.
11419
e8374e7a
AC
114202011-08-02 Robert Dewar <dewar@adacore.com>
11421
11422 * sem_res.adb: Minor reformatting.
11423 * sem_prag.adb: Minor reformatting.
11424
114252011-08-02 Javier Miranda <miranda@adacore.com>
11426
11427 * exp_atag.adb, exp_atags.ads
11428 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11429 by the tagged type Entity. Required to use this routine in the VM
11430 targets since we do not have available the Tag entity in the VM
11431 platforms.
11432 * exp_ch6.adb
11433 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11434 Ada.Tags has not been previously loaded.
11435 * exp_ch7.adb
11436 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11437 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11438 * sem_aux.adb
11439 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11440 view of enclosing scopes. Required to handle enclosing scopes that
11441 are synchronized types whose full view is a task type.
11442 * exp_disp.adb
11443 (Build_VM_TSDs): Minor code improvement to avoid generating and
11444 analyzing lists with empty nodes.
11445 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11446 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11447 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11448 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11449 (Make_Select_Specific_Data_Table): Add support for VM targets.
11450 (Make_VM_TSD): Generate code to initialize the SSD structure of
11451 the TSD.
11452
114532011-08-02 Yannick Moy <moy@adacore.com>
11454
11455 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11456 cross-references section in ALI.
11457 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11458 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11459 Sub).
11460 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11461 subprogram or package entity of a node
11462 (Is_Local_Reference_Type): new function returns True for references
11463 selected in local cross-references.
11464 (Lt): function extracted from Lt in Output_References
11465 (Write_Entity_Name): function extracted from Output_References
11466 (Generate_Definition): generate reference with type 'D' for definition
11467 of objects (object declaration and parameter specification), with
11468 appropriate locations and units, for use in local cross-references.
11469 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11470 references of type 'I' for initialization in object definition.
11471 (Output_References): move part of function Lt and procedure
11472 Write_Entity_Name outside of the body. Ignore references of types 'D'
11473 and 'I' introduced for local cross-references.
11474 (Output_Local_References): new procedure to output the local
11475 cross-references sections.
11476 (Lref_Entity_Status): new array defining whether an entity is a local
11477 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11478 with 'I' type when initialization expression is present.
11479 * get_scos.adb, get_scos.ads: Correct comments and typos
11480
1f6439e3
AC
114812011-08-02 Javier Miranda <miranda@adacore.com>
11482
11483 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11484 the JVM target.
11485 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11486 the JVM target.
11487 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11488 TSD support.
11489
114902011-08-02 Vincent Celier <celier@adacore.com>
11491
11492 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11493 (No_Space_Img): New function
11494 (Find_Excluded_Sources): When reading from a file, record the file name
11495 and the line number for each excluded source.
11496 (Mark_Excluded_Sources): When reporting an error, if the excluded
11497 sources were read from a file, include file name and line number in
11498 the error message.
11499
115002011-08-02 Ed Schonberg <schonberg@adacore.com>
11501
11502 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11503
ab027d28
RD
115042011-08-02 Robert Dewar <dewar@adacore.com>
11505
11506 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11507
b3b28b0c
JM
115082011-08-02 Javier Miranda <miranda@adacore.com>
11509
11510 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11511 generation of TSDs to the DOTNET compiler.
11512 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11513 generation of TSDs to the DOTNET compiler.
11514
9732e886
JM
115152011-08-02 Javier Miranda <miranda@adacore.com>
11516
11517 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11518 record of all the tagged types declared inside library level package
11519 declarations, library level package bodies or library level subprograms.
11520 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11521 associated with a given tagged type.
11522 (Build_VM_TSDs): New subprogram.
11523 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11524 compilation units that are subprograms.
11525 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11526 compilation units that are package bodies.
11527 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11528 units that are a package declaration or a package instantiation.
11529 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11530 reorganization to improve the error generated by the frontend when the
11531 function Ada.Tags.Secondary_Tag is not available.
11532 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11533 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11534
e526d0c7
AC
115352011-08-02 Javier Miranda <miranda@adacore.com>
11536
11537 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11538
115392011-08-02 Robert Dewar <dewar@adacore.com>
11540
11541 * s-imenne.ads: Minor reformatting.
11542
115432011-08-02 Robert Dewar <dewar@adacore.com>
11544
11545 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11546 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11547 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11548
115492011-08-02 Robert Dewar <dewar@adacore.com>
11550
11551 * einfo.ads (Materialize_Entity): Document this is only for renamings
11552 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11553 required debug information in the case where we transform the object
11554 declaration into a renaming declaration.
11555 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11556 object
11557 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11558 Materialize_Entity.
11559
5b1e6aca
RD
115602011-08-02 Robert Dewar <dewar@adacore.com>
11561
11562 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11563 Suppress_Init_Procs.
11564 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11565 Suppress_Initialization/Initialization_Suppressed.
11566 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11567 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11568 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11569 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11570
5ad4969d
RD
115712011-08-02 Robert Dewar <dewar@adacore.com>
11572
11573 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11574 Minor reformatting.
11575
8c4ee6f5
AC
115762011-08-02 Ed Schonberg <schonberg@adacore.com>
11577
11578 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11579 only have inheritable classwide pre/postconditions.
11580
115812011-08-02 Javier Miranda <miranda@adacore.com>
11582
11583 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11584 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11585 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11586 checks if the external tag of a type is the same as the external tag
11587 of some other declaration.
11588
0b3d16c0
AC
115892011-08-02 Thomas Quinot <quinot@adacore.com>
11590
11591 * s-taskin.ads: Minor reformatting.
11592
115932011-08-02 Emmanuel Briot <briot@adacore.com>
11594
11595 * g-comlin.adb (Display_Help): swap the order in which it prints the
11596 short help and the general usage.
11597
115982011-08-02 Ed Schonberg <schonberg@adacore.com>
11599
11600 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11601 the aspect declarations and attach them to the generic copy for
11602 subsequent analysis.
11603 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11604 declarations of the generic tree to the new subprogram declarations.
11605 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11606 conditions that apply to a subprogram instance.
11607
116082011-08-02 Robert Dewar <dewar@adacore.com>
11609
11610 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11611
116122011-08-02 Ed Schonberg <schonberg@adacore.com>
11613
11614 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11615 private type with a tagged full view is not derived in the immediate
11616 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11617
4637729f
AC
116182011-08-02 Robert Dewar <dewar@adacore.com>
11619
11620 * exp_ch4.adb: Minor reformatting.
11621
116222011-08-02 Ed Schonberg <schonberg@adacore.com>
11623
11624 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11625 Ada2012 iterator, the loop will be rewritten during expansion into a
11626 while loop with a cursor and an element declaration. Do not analyze the
11627 body in this case, because if the container is for indefinite types the
11628 actual subtype of the elements will only be determined when the cursor
11629 declaration is analyzed.
11630
116312011-08-02 Arnaud Charlet <charlet@adacore.com>
11632
11633 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11634 size/alignment related attributes in CodePeer_Mode.
11635
116362011-08-02 Gary Dismukes <dismukes@adacore.com>
11637
11638 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11639 Prepend_Element, since this can result in the operation getting the
11640 wrong slot in the full type's dispatch table if the full type has
11641 inherited operations. The incomplete type's operation will get added
11642 to the proper position in the full type's primitives
11643 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11644 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11645 dispatching operations, since there are cases where nonprimitive
11646 subprograms can get added to the list of incomplete dependents (such
11647 as subprograms in nested packages).
11648 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11649 private part when determining whether to add a primitive with a
11650 parameter of a tagged incomplete type to the Private_Dependents list.
11651 Such primitives can also occur in the visible part, and should not have
11652 been excluded from being private dependents.
11653 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11654 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11655 list of a Taft-amendment incomplete type is a primitive before issuing
11656 an error that the full type must appear in the same unit. There are
11657 cases where nonprimitives can be in the list (such as subprograms in
11658 nested packages).
11659 * sem_disp.adb (Derives_From): Use correct condition for checking that
11660 a formal's type is derived from the type of the corresponding formal in
11661 the parent subprogram (the condition was completely wrong). Add
11662 checking that was missing for controlling result types being derived
11663 from the result type of the parent operation.
11664
4c60de0c
YM
116652011-08-02 Yannick Moy <moy@adacore.com>
11666
11667 * errout.adb (First_Node): minor renaming
11668 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11669 first node.
11670
f5afb270
AC
116712011-08-02 Yannick Moy <moy@adacore.com>
11672
11673 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11674 before accessing operands.
11675 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11676 decide whether an initialization expression respects SPARK rules, as
11677 the plain node is the expanded one. This allows for more valid warnings
11678 to be issued.
11679 * gnat_rm.texi: Minor update.
11680
116812011-08-02 Arnaud Charlet <charlet@adacore.com>
11682
11683 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11684 previous change.
11685
116862011-08-02 Robert Dewar <dewar@adacore.com>
11687
11688 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11689
116902011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11691
11692 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11693 loop statements and the element renaming declaration with a block when
11694 the element type is controlled.
11695
116962011-08-02 Yannick Moy <moy@adacore.com>
11697
11698 * sinfo.ads: Minor formatting.
11699
117002011-08-02 Ed Schonberg <schonberg@adacore.com>
11701
11702 * sem_aggr.adb (Add_Association): if the association has a box and no
11703 expression, use the Sloc of the aggregate itself for the new
11704 association.
11705 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11706 the Original_Node.
11707
db72f10a
AC
117082011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11709
11710 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11711 When a container is provided via a function call, generate a renaming
11712 of the function result. This avoids the creation of a transient scope
11713 and the premature finalization of the container.
11714 * exp_ch7.adb (Is_Container_Cursor): Removed.
11715 (Wrap_Transient_Declaration): Remove the supression of the finalization
11716 of the list controller when the declaration denotes a container cursor,
11717 it is not needed.
11718
117192011-08-02 Yannick Moy <moy@adacore.com>
11720
11721 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11722 node is from source, instead of the original node being from source.
11723 * sem_aggr.adb
11724 (Resolve_Array_Aggregate): refine the check for a static expression, to
11725 recognize also static ranges
11726 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11727 Array_Type_Declaration): postpone the test for the type being a subtype
11728 mark after the type has been resolved, so that component-selection and
11729 expanded-name are discriminated.
11730 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11731 to distinguish the case of an iteration scheme, so that an error is
11732 issed on a non-static range in SPARK except in an iteration scheme.
11733 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11734 In_Iter_Schm = True.
11735 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11736 user-defined operators so that they are allowed in renaming
11737 * sem_ch8.adb
11738 (Find_Selected_Component): refine the check for prefixing of operators
11739 so that they are allowed in renaming. Move the checks for restrictions
11740 on selector name after analysis discriminated between
11741 component-selection and expanded-name.
11742 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11743 concatenation argument of string type if it is static.
11744 * sem_util.adb, sem_util.ads
11745 (Check_Later_Vs_Basic_Declarations): add a new function
11746 Is_Later_Declarative_Item to decice which declarations are allowed as
11747 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11748 mode, add that renamings are considered as later items.
11749 (Enclosing_Package): new function to return the enclosing package
11750 (Enter_Name): correct the rule for homonyms in SPARK
11751 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11752 from source (result of expansion) to avoid issuing wrong warnings.
11753
117542011-08-02 Ed Schonberg <schonberg@adacore.com>
11755
11756 * errout.adb: On anything but an expression First_Node returns its
11757 argument.
11758
23685ae6
AC
117592011-08-02 Pascal Obry <obry@adacore.com>
11760
11761 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11762
117632011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11764
11765 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11766 Set the associated loop as the related expression of internally
11767 generated cursors.
11768 * exp_ch7.adb (Is_Container_Cursor): New routine.
11769 (Wrap_Transient_Declaration): Supress the finalization of the list
11770 controller when the declaration denotes a container cursor.
11771
117722011-08-02 Yannick Moy <moy@adacore.com>
11773
11774 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11775 command line now.
11776 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11777 expression is a simple expression. This check cannot be performed in
11778 the semantics, so just drop it.
11779 (P_Index_Or_Discriminant_Constraint): move check that the index or
11780 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11781 semantics. Other cases were previously checked in the semantics.
11782 * par-ch4.adb (P_Name): move checks that a selector name is not
11783 character literal or an operator symbol to Find_Selected_Component in
11784 the semantics
11785 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11786 declarations are not placed after later declarations in a separate
11787 procedure in Sem_Util (possibly not the best choice?), to be used both
11788 during parsing, for Ada 83 mode, and during semantic analysis, for
11789 SPARK mode.
11790 * par-endh.adb (Check_End): move check that end label is not missing
11791 to Process_End_Label in the semantics
11792 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11793 the special case for SPARK restriction
11794 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11795 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11796 parameter Force to issue the error message even on internal node (used
11797 for generated end label). Call Check_Restriction to check when an error
11798 must be issued. In SPARK mode, issue an error message even if the
11799 restriction is not set.
11800 (Check_Restriction): new procedure with an additional out parameter to
11801 inform the caller that a message has been issued
11802 * sem_aggr.adb: Minor modification of message
11803 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11804 instead of issuing an error message directly
11805 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11806 declarations are not placed after later declarations, by calling
11807 Check_Later_Vs_Basic_Declarations
11808 (Analyze_Subtype_Declaration): move here the check that an index or
11809 discriminant constraint must be a subtype mark. Change the check that
11810 a subtype of String must start at one so that it works on subtype marks.
11811 * sem_ch4.adb (Analyze_Call): move here the check that a named
11812 association cannot follow a positional one in a call
11813 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11814 instead of issuing an error message directly
11815 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11816 selector name is not a character literal or an operator symbol. Move
11817 here the check that the prefix of an expanded name cannot be a
11818 subprogram or a loop statement.
11819 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11820 procedure called from parsing and semantics to check that basic
11821 declarations are not placed after later declarations
11822 (Process_End_Label): move here the check that end label is not missing
11823
118242011-08-02 Arnaud Charlet <charlet@adacore.com>
11825
11826 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11827 representation clause in codepeer mode, since it confuses CodePeer and
11828 does not bring useful info.
11829
118302011-08-02 Ed Falis <falis@adacore.com>
11831
11832 * init.c: initialize fp hw on MILS.
11833
118342011-08-02 Ed Schonberg <schonberg@adacore.com>
11835
11836 * errout.adb (First_Node): for bodies, return the node itself (small
11837 optimization). For other nodes, do not check source_unit if the node
11838 comes from Standard.
11839
d2d9cc22
AC
118402011-08-02 Robert Dewar <dewar@adacore.com>
11841
11842 * exp_ch3.adb: Minor comment additions.
11843 * sem_ch13.adb: Minor reformatting.
11844
118452011-08-02 Pascal Obry <obry@adacore.com>
11846
11847 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11848
a01b9df6
AC
118492011-08-02 Robert Dewar <dewar@adacore.com>
11850
11851 * sem_attr.adb: Minor reformatting.
11852
118532011-08-02 Robert Dewar <dewar@adacore.com>
11854
11855 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11856 (Has_Default_Component_Value): Removed
11857 * einfo.ads Comment updates
11858 (Has_Default_Aspect): Replaces Has_Default_Value
11859 (Has_Default_Component_Value): Removed
11860 * exp_ch13.adb
11861 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11862 * exp_ch3.adb
11863 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11864 (Get_Simple_Init_Val): Handle Default_Value aspect
11865 (Needs_Simple_Initialization): Handle Default_Value aspect
11866 * exp_ch3.ads: Needs_Simple_Initialization
11867 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11868 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11869 * sem_ch13.adb
11870 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11871 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11872 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11873
118742011-08-02 Ed Schonberg <schonberg@adacore.com>
11875
11876 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11877 package containing iteration primitives.
11878 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11879
75c90775
AC
118802011-08-02 Ed Schonberg <schonberg@adacore.com>
11881
11882 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11883 "of", pre-analyze expression in case it is a function call with
11884 finalization actions that must be placed ahead of the loop.
11885 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11886 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11887
118882011-08-02 Geert Bosch <bosch@adacore.com>
11889
11890 * cstand.adb (Create_Float_Types): Only consider C's long double for
11891 Long_Long_Float, in addition to double.
11892
ded8909b
AC
118932011-08-02 Robert Dewar <dewar@adacore.com>
11894
11895 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11896 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11897 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11898 Minor reformatting.
11899
119002011-08-02 Ed Schonberg <schonberg@adacore.com>
11901
11902 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11903 indexed component.
11904
119052011-08-02 Javier Miranda <miranda@adacore.com>
11906
11907 * einfo.ads, einfo.adb
11908 (Original_Access_Type): Move this attribute to Node26 since there was
11909 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11910 which causes conflicts and breaks the generation of the .NET compiler.
11911 (Interface_Name): Add missing documentation on JGNAT only uses of
11912 this attribute.
11913
70c34e1c
AC
119142011-08-02 Geert Bosch <bosch@adacore.com>
11915
11916 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11917 (Find_Back_End_Float_Type): Likewise
11918 (Create_Back_End_Float_Types): Likewise
11919 (Create_Float_Types): Likewise
11920 (Register_Float_Type): Likewise
11921 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11922 Nlist and split out type selection in new local Find_Base_Type function.
11923 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11924 Nlist
11925 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11926
119272011-08-02 Robert Dewar <dewar@adacore.com>
11928
11929 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11930 alpha order).
11931 * opt.ads: Minor comment change.
11932 * sem_ch12.adb: Minor code reorganization.
11933
b715bc59
AC
119342011-08-02 Gary Dismukes <dismukes@adacore.com>
11935
11936 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11937 subtype's list of rep items to the list on the full subtype in the case
11938 where the lists are the same.
11939
119402011-08-02 Geert Bosch <bosch@adacore.com>
11941
11942 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11943 using the one from System.Strings, which also deallocates all strings.
11944
002bdd68
AC
119452011-08-02 Geert Bosch <bosch@adacore.com>
11946
11947 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11948 function.
11949 * gcc-interface/Make-lang.in: Update dependencies.
11950
119512011-08-02 Olivier Hainque <hainque@adacore.com>
11952
11953 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11954 end_locus.
11955
499769ec
AC
119562011-08-02 Javier Miranda <miranda@adacore.com>
11957
11958 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11959 associated with anonymous access to subprograms.
11960
119612011-08-02 Geert Bosch <bosch@adacore.com>
11962
11963 * opt.ads
11964 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11965 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11966 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11967 (Add_Symbol_Definition): Move to switch-c.adb
11968 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11969 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11970 (Add_Symbol_Definition): Move to switch-c.adb.
11971 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11972 * sem_warn.adb
11973 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11974 Move to warnsw.adb.
11975 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11976 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11977 Move to warnsw.adb.
11978 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11979 (Add_Symbol_Definition): Moved from Prepcomp.
11980 * switch-c.ads: Update copyright notice. Use String_List instead of
11981 Argument_List, removing dependency on System.OS_Lib.
11982
aa1e353a
AC
119832011-08-02 Yannick Moy <moy@adacore.com>
11984
11985 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11986 mode on initialization expression which does not respect SPARK
11987 restrictions.
11988 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11989 if the tree referenced by its argument represents an initialization
11990 expression in SPARK, suitable for initializing an object in an object
11991 declaration.
11992
119932011-08-02 Javier Miranda <miranda@adacore.com>
11994
11995 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11996 internally generated access to subprogram with its associated protected
11997 subprogram type.
11998 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11999
15b682ca
GB
120002011-08-02 Geert Bosch <bosch@adacore.com>
12001
12002 * cstand.adb (Register_Float_Type): Print information about type to
12003 register, if the Debug_Flag_Dot_B is set.
12004 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12005 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12006 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12007 with a requested precision of more than Max_Digits digits and no more
12008 than Max_Base_Digits digits, if a range specification is present and the
12009 Predefined_Float_Types list has a suitable type to derive from.
12010 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12011 case of type completion with pragma Import
12012 * sem_prag.adb
12013 (Process_Import_Predefined_Type): Processing to complete a type
12014 with pragma Import. Currently supports floating point types only.
12015 (Set_Convention_From_Pragma): Do nothing without underlying type.
12016 (Process_Convention): Guard against absence of underlying type,
12017 which may happen when importing incomplete types.
12018 (Process_Import_Or_Interface): Handle case of importing predefined
12019 types. Tweak error message.
12020
f8726f2b
AC
120212011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12022
12023 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12024 functions to previous change. Reorganize code slightly.
12025
120262011-08-02 Geert Bosch <bosch@adacore.com>
12027
12028 * back_end.ads (Register_Type_Proc): New call back procedure type for
12029 allowing the back end to provide information about available types.
12030 (Register_Back_End_Types): New procedure to register back end types.
12031 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12032 available types.
12033 * cstand.adb (Back_End_Float_Types): New list for floating point types
12034 supported by the back end.
12035 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12036 (Copy_Float_Type): New procedure to make new copies of predefined types.
12037 (Register_Float_Type): New call back procedure to populate the BEFT list
12038 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12039 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12040 (Create_Float_Types): New procedure to create entities for floating
12041 point types predefined in Standard, and put these and any remaining
12042 BEFTs on the Predefined_Float_Types list.
12043 * stand.ads (Predefined_Float_Types): New list for predefined floating
12044 point types that do not have declarations in package Standard.
12045
feecad68
AC
120462011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12047
12048 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12049 entity node for the unit containing the parameter.
12050 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12051 (Add_Inlined_Subprogram): Likewise.
12052 * gcc-interface/Make-lang.in: Update dependencies.
12053
120542011-08-02 Thomas Quinot <quinot@adacore.com>
12055
12056 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12057 suitable value.
12058
12f0c50c
AC
120592011-08-02 Geert Bosch <bosch@adacore.com>
12060
12061 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12062
120632011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12064
12065 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12066 computed value of Base_Type.
12067
120682011-08-02 Yannick Moy <moy@adacore.com>
12069
12070 * restrict.adb (Check_Restriction): issue an error for any use of
12071 class-wide, even if the No_Dispatch restriction is not set.
12072 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12073 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12074 when completing a private extension, the type named in the private part
12075 is not the same as that named in the visible part.
12076 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12077 of an inherited primitive operations of a tagged type or type extension
12078 that returns the tagged type.
12079 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12080 function which returns True for an implicit operation inherited by the
12081 derived type declaration for the argument type.
12082 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12083 order.
12084
fb86fe11
ES
120852011-08-02 Ed Schonberg <schonberg@adacore.com>
12086
12087 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12088 Process_Bounds, to perform analysis with expansion of a range or an
12089 expression that is the iteration scheme for a loop.
12090 (Analyze_Iterator_Specification): If domain of iteration is given by a
12091 function call with a controlled result, as is the case if call returns
12092 a predefined container, ensure that finalization actions are properly
12093 generated.
12094 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12095
62be5d0a
JM
120962011-08-02 Javier Miranda <miranda@adacore.com>
12097
12098 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12099 * gcc-interface/Make-lang.in: Update dependencies.
12100
121012011-08-02 Javier Miranda <miranda@adacore.com>
12102
12103 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12104 determine if the analysis is performed using N or Original_Node (N).
12105 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12106 functionality of routine Is_Variable avoids code duplication.
12107 * checks.adb (Determine_Range): Handle temporaries generated by
12108 Remove_Side_Effects.
12109
121102011-08-02 Javier Miranda <miranda@adacore.com>
12111
12112 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12113 expansion of the condition. Required since the previous analysis was
12114 done with expansion disabled (see Resolve_Quantified_Expression) and
12115 hence checks were not inserted and record comparisons have not been
12116 expanded.
12117
a20f4389
AC
121182011-08-02 Ed Falis <falis@adacore.com>
12119
12120 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12121 Update header.
12122
121232011-08-02 Bob Duff <duff@adacore.com>
12124
12125 * opt.ads: Minor comment fix.
12126
121272011-08-02 Bob Duff <duff@adacore.com>
12128
12129 * sem_ch12.adb (Analyze_Package_Instantiation,
12130 Analyze_Subprogram_Instantiation): Turn off style checking while
12131 analyzing an instance. Whatever style checks that apply to the generic
12132 unit should apply, so it makes no sense to apply them in an instance.
12133 This was causing trouble when compiling an instance of a runtime
12134 unit that violates the -gnatyO switch.
12135 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12136 one of the two case statements, causing spurious errors.
12137
121382011-08-02 Robert Dewar <dewar@adacore.com>
12139
12140 * uname.adb: Minor reformatting.
12141 * gnatcmd.adb: Minor reformatting.
12142 * exp_attr.adb: Minor reformatting.
12143
90878b12
AC
121442011-08-02 Ed Schonberg <schonberg@adacore.com>
12145
12146 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12147 No_Dispatching_Calls, do not look for the Assign primitive, because
12148 predefined primitives are not created in this case.
12149
121502011-08-02 Bob Duff <duff@adacore.com>
12151
12152 * stylesw.ads: Minor comment fixes.
12153
121542011-08-02 Robert Dewar <dewar@adacore.com>
12155
12156 * freeze.adb (Add_To_Result): New procedure.
12157
121582011-08-02 Jose Ruiz <ruiz@adacore.com>
12159
12160 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12161 time, if the specific run-time routines for handling streams of strings
12162 are not available, use the default mechanism.
12163
121642011-08-02 Arnaud Charlet <charlet@adacore.com>
12165
12166 * s-regpat.ads: Fix typo.
12167
121682011-08-02 Vincent Celier <celier@adacore.com>
12169
12170 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12171 not null, call it to create the in memory config project file without
12172 parsing an existing default config project file.
12173
121742011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12175
12176 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12177
121782011-08-02 Ed Schonberg <schonberg@adacore.com>
12179
12180 * sem_elim.adb: an abstract subprogram does not need an eliminate
12181 pragma for its descendant to be eliminable.
12182
121832011-08-02 Ed Falis <falis@adacore.com>
12184
12185 * init.c: revert to handling before previous checkin for VxWorks
12186 * s-intman-vxworks.adb: delete unnecessary declarations related to
12187 using Ada interrupt facilities for handling signals.
12188 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12189 * s-intman-vxworks.ads: Import __gnat_install_handler as
12190 Initialize_Interrupts.
12191 * s-taprop-vxworks.adb: Delete Signal_Mask.
12192 (Abort_Handler): change construction of mask to unblock exception
12193 signals.
12194
273adcdf
AC
121952011-08-02 Jerome Guitton <guitton@adacore.com>
12196
12197 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12198 Debug_Raise_Exception before propagation starts.
12199
122002011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12201
12202 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12203 to Restriction_Check_Required.
12204 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12205 * sem_res.adb (Resolve_Call): Likewise.
12206 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12207
122082011-08-02 Bob Duff <duff@adacore.com>
12209
12210 * stylesw.ads: Update comment.
12211 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12212 * errout.ads: Remove obsolete comment.
12213
122142011-08-02 Javier Miranda <miranda@adacore.com>
12215
12216 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12217 (Set_Is_Safe_To_Reevaluate): new procedure.
12218 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12219 assignment is allowed on safe-to-reevaluate variables.
12220 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12221 temporary created to remove side effects in expressions that use
12222 the secondary stack as safe-to-reevaluate.
12223 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12224 variables that are not true constants.
12225
6320f5e1
AC
122262011-08-02 Robert Dewar <dewar@adacore.com>
12227
12228 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12229 sem_res.adb, sem_ch6.adb: Minor reformatting.
12230
122312011-08-02 Jerome Guitton <guitton@adacore.com>
12232
12233 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12234
2fe829ae
ES
122352011-08-02 Ed Schonberg <schonberg@adacore.com>
12236
12237 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12238 not set Overridden_Operation if subprogram is an initialization
12239 procedure.
12240
e24329cd
YM
122412011-08-02 Yannick Moy <moy@adacore.com>
12242
12243 * par-ch6.adb: Correct obsolete name in comments
12244 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12245 which takes two message arguments (existing function takes one), with
12246 second message used for continuation.
12247 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12248 block statements that originate from a source block statement, not
12249 generated block statements
12250 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12251 symmetry with procedure case
12252 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12253 function to issue an error in formal mode if a package specification
12254 contains more than one tagged type or type extension.
12255 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12256 parameters matching formals of tagged types are objects (or ancestor
12257 type conversions of objects), not general expressions. Issue an error
12258 on view conversions that are not involving ancestor conversion of an
12259 extended type.
12260 (Resolve_Type_Conversion): in formal mode, issue an error on the
12261 operand of an ancestor type conversion which is not an object
12262 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12263 procedure so that it works also for actuals of function calls
12264 (Is_Actual_Tagged_Parameter): new function which determines if its
12265 argument is an actual parameter of a formal of tagged type in a
12266 subprogram call
12267 (Is_SPARK_Object_Reference): new function which determines if the tree
12268 referenced by its argument represents an object in SPARK
12269
176dadf6
AC
122702011-08-02 Robert Dewar <dewar@adacore.com>
12271
12272 * sem_ch3.adb: Minor reformatting
12273 Minor comment addition
12274 Minor error msg text change
12275
122762011-08-02 Javier Miranda <miranda@adacore.com>
12277
12278 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12279 function. Used to be more precise when we generate a variable plus one
12280 assignment to remove side effects in the evaluation of the Bound
12281 expressions.
12282 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12283 of the bound expression to force its re-analysis and thus expand the
12284 associated transient scope (if required). Code cleanup replacing the
12285 previous code that declared the constant entity by an invocation to
12286 routine Force_Evaluation which centralizes this work in the frontend.
12287
d8b962d8
AC
122882011-08-02 Robert Dewar <dewar@adacore.com>
12289
12290 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12291 (Base_Type): Now uses improved Is_Base_Type function
12292 * einfo.ads (Base_Type): Inline this function
12293
122942011-08-02 Robert Dewar <dewar@adacore.com>
12295
12296 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12297 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12298
122992011-08-02 Arnaud Charlet <charlet@adacore.com>
12300
12301 * gcc-interface/Make-lang.in: Update dependencies.
12302 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12303 targets.
12304
123052011-08-02 Yannick Moy <moy@adacore.com>
12306
12307 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12308 non-simple expression used in delta constraint
12309 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12310 index constraint which is not a subtype mark
12311 * par.adb: With and use Restrict
12312 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12313 mode on component type which is not a subtype mark and default
12314 expression on component
12315 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12316 of string which does not have a lower index bound equal to 1
12317 (Array_Type_Declaration): issue an error in formal mode on index or
12318 component type which is not a subtype mark, and on aliased keyword on
12319 component
12320 (Derived_Type_Declaration): issue an error in formal mode on interface,
12321 limited or abstract type
12322 (Record_Type_Declaration): issue an error in formal mode on interface
12323 (Record_Type_Definition): issue an error in formal mode on tagged types
12324 and type extensions not declared in the specification of a library unit
12325 package; on null non-tagged record; on variant part
12326
123272011-08-02 Vincent Celier <celier@adacore.com>
12328
12329 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12330 not declared for qualified library project when Library_Name is not
12331 declared, but Library_Dir is.
12332
123332011-08-02 Robert Dewar <dewar@adacore.com>
12334
12335 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12336 pragmas (affects aspects [Component_]Default_Value
12337 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12338 component type for the resolution
12339
f96b2d85
AC
123402011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12341
12342 * einfo.adb (Base_Type): Tune implementation for speed.
12343
123442011-08-02 Robert Dewar <dewar@adacore.com>
12345
12346 * freeze.adb: Minor reformatting.
12347
8b3c6430
AC
123482011-08-02 Thomas Quinot <quinot@adacore.com>
12349
12350 * scos.ads: Update comments.
12351
123522011-08-02 Ed Schonberg <schonberg@adacore.com>
12353
12354 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12355 base type, because the parent may be a subtype of a private type whose
12356 convention is established in a private part.
12357
123582011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12359
12360 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12361 statement in a block when the expansion of the return expression has
12362 created a finalization chain.
12363 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12364 with the parent node.
12365 Add N_Extended_Return_Statement to handle the case where a transient
12366 object declaration appears in the Return_Object_Declarations list of
12367 an extended return statement.
12368
123692011-08-02 Matthew Gingell <gingell@adacore.com>
12370
12371 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12372 unused parameter 'name'.
12373
123742011-08-02 Ed Schonberg <schonberg@adacore.com>
12375
12376 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12377 inherited operation, check whether its alias, which is the source
12378 operastion that it renames, has been marked eliminated.
12379
cae81f17
JM
123802011-08-02 Javier Miranda <miranda@adacore.com>
12381
12382 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12383 in-mode parameter whose type is an access type since it can be used to
12384 modify its designated object. Enforce code that handles as safe an
12385 access type that is not access-to-constant but it is the result of a
12386 previous removal of side-effects.
12387 (Remove_Side_Effects): Minor code reorganization of cases which require
12388 no action. Done to incorporate documentation on new cases uncovered
12389 working in this ticket: no action needed if this routine was invoked
12390 too early and the nodes are not yet decorated.
12391 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12392 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12393 were issued with actuals that are implicitly provided by
12394 Force_Evaluation.
12395
218e6dee
RD
123962011-08-02 Robert Dewar <dewar@adacore.com>
12397
12398 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12399
7a489a2b
AC
124002011-08-02 Yannick Moy <moy@adacore.com>
12401
12402 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12403 to issue an error in formal mode on attribute not supported in this mode
12404 (Analyze_Attribute): issue errors on standard attributes not supported
12405 in formal mode.
12406 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12407 comment, and issue error in formal mode on modulus which is not a power
12408 of 2.
12409 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12410 range.
12411 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12412 subtype mark.
12413 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12414 operator on modular type (except 'not').
12415
124162011-08-02 Robert Dewar <dewar@adacore.com>
12417
12418 * gnat_rm.texi: Minor reformatting.
12419
cb7fa356
AC
124202011-08-02 Arnaud Charlet <charlet@adacore.com>
12421
12422 * s-osinte-linux.ads: Minor comment update and reformatting.
12423 * i-cexten.ads: Make this unit pure, as for its parent.
12424 Will allow its usage in more contexts if needed.
12425
124262011-08-02 Robert Dewar <dewar@adacore.com>
12427
12428 * s-utf_32.ads: Minor comment fix.
12429
124302011-08-02 Ed Schonberg <schonberg@adacore.com>
12431
12432 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12433 operation of a tagged synchronized type, handle the case where the
12434 controlling argument is overloaded.
12435
124362011-08-02 Yannick Moy <moy@adacore.com>
12437
12438 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12439 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12440 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12441 SPARK mode and formal verification mode on processing SPARK restriction
12442 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12443 requiring consistency checking.
12444
5cc9353d
RD
124452011-08-02 Robert Dewar <dewar@adacore.com>
12446
12447 * sem_res.adb: Minor reformatting.
12448
e51537ff
RD
124492011-08-02 Robert Dewar <dewar@adacore.com>
12450
12451 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12452 a-cforse.ads: Remove unneeded with of Ada.Containers
12453 Remove commented out pragma Inline's
12454 Move specifications of new subprograms to the actual specs
12455
83fa09c5
AC
124562011-08-02 Yannick Moy <moy@adacore.com>
12457
12458 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12459 a-cforse.ads: Update comments.
12460
124612011-08-02 Ed Schonberg <schonberg@adacore.com>
12462
12463 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12464
d11cfaf8
RD
124652011-08-02 Robert Dewar <dewar@adacore.com>
12466
12467 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12468 a-cforse.ads, a-cofove.ads: Minor reformatting.
12469
300b98bb
AC
124702011-08-02 Claire Dross <dross@adacore.com>
12471
12472 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12473 a-cofove.ads: Add comments.
12474
124752011-08-02 Yannick Moy <moy@adacore.com>
12476
12477 * gnat_rm.texi: Document formal containers.
12478
124792011-08-02 Emmanuel Briot <briot@adacore.com>
12480
12481 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12482 are empty sections.
12483
19fb051c
AC
124842011-08-02 Robert Dewar <dewar@adacore.com>
12485
12486 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12487 reformatting.
12488
124892011-08-02 Robert Dewar <dewar@adacore.com>
12490
12491 * aspects.adb: New aspects Default_Value and Default_Component_Value
12492 New format of Aspect_Names table checks for omitted entries
12493 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12494 handling of boolean aspects for derived types.
12495 New aspects Default_Value and Default_Component_Value
12496 New format of Aspect_Names table checks for omitted entries
12497 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12498 (Has_Default_Value): New flag
12499 (Has_Default_Component_Value): New flag
12500 (Has_Default_Value): New flag
12501 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12502 table.
12503 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12504 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12505 Default_Value and Default_Component_Value
12506 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12507 New aspects Default_Value and Default_Component_Value
12508 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12509 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12510
125112011-08-02 Vincent Celier <celier@adacore.com>
12512
12513 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12514 inherit library kind.
12515
125162011-08-02 Ed Schonberg <schonberg@adacore.com>
12517
12518 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12519 Minor reformatting.
12520
125212011-08-02 Robert Dewar <dewar@adacore.com>
12522
12523 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12524
5f7747af
AC
125252011-08-02 Yannick Moy <moy@adacore.com>
12526
12527 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12528
125292011-08-02 Robert Dewar <dewar@adacore.com>
12530
12531 * impunit.adb: Add comment.
12532
a5fe697b
AC
125332011-08-02 Yannick Moy <moy@adacore.com>
12534
12535 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12536 qualification of aggregates in formal mode
12537 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12538 another aggregate
12539 (Resolve_Aggregate): complete the test that an aggregate is adequately
12540 qualified in formal mode
12541
125422011-08-02 Pascal Obry <obry@adacore.com>
12543
12544 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12545 * mlib-prj.adb: Supress warning when compiling binder generated file.
12546 (Build_Library): Supress all warnings when compiling the binder
12547 generated file.
12548
bd65a2d7 125492011-08-02 Yannick Moy <moy@adacore.com>
d4487611 12550
bd65a2d7
AC
12551 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12552 from here...
12553 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12554 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12555 Add with/use clauses to make Check_Formal_Restriction visible
12556
125572011-08-02 Ed Schonberg <schonberg@adacore.com>
12558
12559 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12560 in-parameters when type of the generic formal is private in the generic
12561 spec and non-private in the body.
12562
125632011-08-02 Claire Dross <dross@adacore.com>
12564
12565 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12566 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12567 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12568 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
12569
125702011-08-02 Robert Dewar <dewar@adacore.com>
12571
12572 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12573 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12574
bd434b3f
YM
125752011-08-02 Yannick Moy <moy@adacore.com>
12576
12577 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12578 formal mode
12579 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12580 matching static array bounds, taking into account the special case of
12581 string literals
12582 * sem_ch3.adb: Typo in comment.
12583
fe5d3068
YM
125842011-08-02 Yannick Moy <moy@adacore.com>
12585
12586 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12587 which issues an error in formal mode if its argument node is originally
12588 from source
12589 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12590 has a discriminant specification so that it does not include the case
12591 of derived types
12592 (Derived_Type_Declaration): move here the test that a derived type has a
12593 discriminant specification
12594 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12595 first element of a component association before accessing its choices
12596 (presence of component association is not enough)
12597 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12598 declaration is a library item before accessing the next element in a
12599 list, as library items are not member of lists
12600 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12601 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12602 Check_Formal_Restriction whenever possible.
12603
b60a3f26
AC
126042011-08-02 Ed Schonberg <schonberg@adacore.com>
12605
12606 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12607 reference when needed.
12608
126092011-08-02 Bob Duff <duff@adacore.com>
12610
12611 * gnat_ugn.texi: Fix typo.
12612
126132011-08-02 Vincent Celier <celier@adacore.com>
12614
12615 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12616 archive file name. Do not use the full path name of archives for Open
12617 VMS.
12618
eaba57fb
RD
126192011-08-02 Robert Dewar <dewar@adacore.com>
12620
12621 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12622 Analyze_Aspect_Specifications
12623 * sem_ch13.adb
12624 (Analyze_Aspect_Specifications): New handling for boolean aspects
12625 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12626 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12627 sequence for Analyze_Aspect_Specifications
12628 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12629 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12630
126312011-08-02 Robert Dewar <dewar@adacore.com>
12632
12633 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12634 aspects, since these no longer exist.
12635
126362011-08-02 Robert Dewar <dewar@adacore.com>
12637
12638 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12639 semicolon, do not try to see if there are aspects following it.
12640 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12641 aspect spec.
12642
8830d1d2
AC
126432011-08-02 Robert Dewar <dewar@adacore.com>
12644
12645 * sem_ch8.adb, aspects.ads: Minor reformatting.
12646
126472011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12648
12649 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12650 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12651 extracted from...
12652 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12653
7ff2d234
AC
126542011-08-02 Yannick Moy <moy@adacore.com>
12655
12656 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12657 mode on subprogram declaration outside of package specification, unless
12658 it is followed by a pragma Import
12659 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12660 Access_Type_Declaration): issue error in formal mode on access type
12661 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12662 incomplete type
12663 (Analyze_Object_Declaration): issue error in formal mode on object
12664 declaration which does not respect SPARK restrictions
12665 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12666 declaration which does not respect SPARK restrictions
12667 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12668 error in formal mode on digits or delta constraint
12669 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12670 decimal fixed point type
12671 (Derived_Type_Declaration): issue error in formal mode on derived type
12672 other than type extensions of tagged record types
12673 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12674 with check on access definition
12675 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12676 mode on protected definition.
12677 (Analyze_Task_Definition): issue error in formal mode on task definition
12678
126792011-08-02 Robert Dewar <dewar@adacore.com>
12680
12681 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12682
806f6d37
AC
126832011-08-02 Javier Miranda <miranda@adacore.com>
12684
12685 * sem_ch6.adb (Can_Override_Operator): New function.
12686 (Verify_Overriding_Indicator): Add missing code to check overriding
12687 indicator in operators. Fixes regression.
12688 (Check_Overriding_Indicator): Minor reformating after replacing the
12689 code that evaluates if the subprogram can override an operator by
12690 invocations to the above new function.
12691 * einfo.adb
12692 (Write_Field26_Name): Add missing code to ensure that, following
12693 the documentation in einfo.ads, this field is not shown as attribute
12694 "Static_Initialization" on non-dispatching functions.
12695
126962011-08-02 Jose Ruiz <ruiz@adacore.com>
12697
12698 * sem_res.adb (Resolve_Call): A call to
12699 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12700 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12701 i.e., when the second parameter is of type Time_Span.
12702
127032011-08-02 Vincent Celier <celier@adacore.com>
12704
12705 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12706 with an archive instead of -L<library dir> -l<library name>.
12707
127082011-08-02 Ed Schonberg <schonberg@adacore.com>
12709
12710 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12711 mark the base types In_Use in addition to making the operations
12712 use_visible.
12713
127142011-08-02 Ed Falis <falis@adacore.com>
12715
12716 * init.c: add and setup __gnat_signal_mask for the exception signals
12717 * s-inmaop-vxworks.adb: new file.
12718 * s-intman-vxworks.adb: remove unnecessary initializations and
12719 simplify remaining
12720 * s-intman-vxworks.ads: remove unnecessary variable
12721 * s-taprop-vxworks.adb: simplify signal initialization
12722
780d052e
RD
127232011-08-02 Robert Dewar <dewar@adacore.com>
12724
12725 * sem_ch8.adb: Minor code reorganization, comment updates.
12726
127272011-08-02 Robert Dewar <dewar@adacore.com>
12728
12729 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12730 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12731 here from Sem_Res.
12732 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12733 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12734
29efbb8c
ES
127352011-08-02 Ed Schonberg <schonberg@adacore.com>
12736
12737 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12738 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12739 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12740 use_type_clauses, to handle more efficiently use_type and use_all_type
12741 constructs.
12742 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12743 Ada2012 Use_All_Type clause.
12744 (Use_Class_Wide_Operations): new procedure.
12745
b0186f71
AC
127462011-08-02 Robert Dewar <dewar@adacore.com>
12747
12748 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12749 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12750 expression to expression function.
12751
127522011-08-02 Ed Schonberg <schonberg@adacore.com>
12753
12754 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12755 if types are compatible.
12756
127572011-08-02 Yannick Moy <moy@adacore.com>
12758
12759 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12760 returns True if its argument array types have same dimension and same
12761 static bounds at each index.
12762 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12763 OUT or IN OUT paramaters which are not view conversions in SPARK.
12764 (Resolve_Arithmetic_Op): issue an error in formal mode on
12765 multiplication or division with operands of fixed point types which are
12766 not qualified or explicitly converted.
12767 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12768 Boolean or array type (except String) operands.
12769 (Resolve_Equality_Op): issue an error in formal mode on equality
12770 operators for array types other than String with non-matching static
12771 bounds.
12772 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12773 for array types with non-matching static bounds. Factorize the code in
12774 Matching_Static_Array_Bounds.
12775 (Resolve_Qualified_Expression): issue an error in formal mode on
12776 qualified expressions for array types with non-matching static bounds.
12777 (Resolve_Type_Conversion): issue an error in formal mode on type
12778 conversion for array types with non-matching static bounds
12779
767bb4e8
AC
127802011-08-02 Robert Dewar <dewar@adacore.com>
12781
12782 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12783
127842011-08-02 Ed Schonberg <schonberg@adacore.com>
12785
12786 * par-ch9.adb: save location of entry for proper error message.
12787
4ac2477e
JM
127882011-08-02 Javier Miranda <miranda@adacore.com>
12789
12790 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12791 (Use_Full_View) which permits this routine to climb through the
12792 ancestors using the full-view of private parents.
12793 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12794 Use_Full_View to true in calls to Is_Ancestor.
12795 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12796 true in call to Is_Ancestor.
12797 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12798 Use_Full_View to true in call to Is_Ancestor.
12799 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12800 call to Is_Ancestor.
12801 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12802 Use_Full_View to true in calls to Is_Ancestor.
12803 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12804 Make_Select_Specific_Data_Table, Register_Primitive,
12805 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12806 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12807 to true in call to Is_Ancestor.
12808 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12809 Use_Full_View to true in calls to Is_Ancestor.
12810 * exp_cg.adb
12811 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12812 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12813
9f90d123
AC
128142011-08-02 Robert Dewar <dewar@adacore.com>
12815
12816 * gnat_rm.texi: Minor reformatting.
12817 * sem_prag.adb: Minor reformatting.
12818
128192011-08-02 Tristan Gingold <gingold@adacore.com>
12820
12821 * vms_data.ads: Add VMS qualifier for -gnateP.
12822
128232011-08-02 Robert Dewar <dewar@adacore.com>
12824
12825 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12826 * par-ch7.adb (P_Package): Proper placement of aspects for package
12827 decl/instantiation.
12828 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12829 (End_Statements): Add Is_Sloc parameterr
12830 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12831 (Check_End): Ad Is_Sloc parameter
12832 (End_Statements): Add Is_Sloc parameterr
12833
128342011-08-02 Vincent Celier <celier@adacore.com>
12835
12836 * ug_words: Add VMS qualifier equivalent to -gnateP:
12837 /SYMBOL_PREPROCESSING.
12838
128392011-08-02 Jose Ruiz <ruiz@adacore.com>
12840
12841 * gnat-style.texi: For hexadecimal numeric literals the typical
12842 grouping of digits is 4 to represent 2 bytes.
12843 A procedure spec which is split into several lines is indented two
12844 characters.
12845
128462011-08-02 Yannick Moy <moy@adacore.com>
12847
12848 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12849 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12850 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12851 properly qualified
12852 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12853 choice in array aggregate
12854 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12855 mark as ancestor
12856 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12857 positional and named aggregate for record, or others in record
12858 aggregate, or multiple choice in record aggregate
12859 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12860 array operands to logical operations AND, OR and XOR do not have the
12861 same static lower and higher bounds
12862 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12863
2933b16c
RD
128642011-08-01 Robert Dewar <dewar@adacore.com>
12865
12866 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12867 Replaces Last_Source_Node_In_Sequence.
12868 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12869 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12870 parens and blank in string (this was inconsistently implemented).
12871 * errout.ads
12872 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12873 blank in string (this was inconsistently implemented).
12874 * gnat1drv.adb
12875 (Set_Global_Switches): Set formal mode switches appropriately
12876 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12877 * par-prag.adb
12878 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12879 call Set_Error_Msg_Lang to set "spark" as language name.
12880 * par.adb: Remove unnecessary call to set formal language for errout
12881 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12882 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12883 name.
12884 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12885 calls to it, moved after resolution so that types are known
12886 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12887 result of concatenation is not of type String
12888 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12889 concatenation is not properly restricted
12890 * gnat_rm.texi: Add doc on pragma Spark_95.
12891 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12892 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12893 * gcc-interface/Make-lang.in: Update dependencies.
12894
05dbd302
AC
128952011-08-01 Javier Miranda <miranda@adacore.com>
12896
12897 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12898 condition that detects if the overridden operation must replace an
12899 existing entity.
12900
129012011-08-01 Javier Miranda <miranda@adacore.com>
12902
12903 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12904 code declarations inserted by Insert_Actions in each alternative of the
12905 N_Case_Expression node.
12906
129072011-08-01 Robert Dewar <dewar@adacore.com>
12908
12909 * sem_ch6.adb: Minor code reorganization.
12910 * sem_util.adb: Minor reformatting.
12911
af9e051f
PO
129122011-08-01 Pascal Obry <obry@adacore.com>
12913
12914 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12915 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12916
1d801f21
AC
129172011-08-01 Yannick Moy <moy@adacore.com>
12918
12919 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12920 literal or operator symbol which is prefixed
12921 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12922 mode on access attributes.
12923 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12924 that concatenation operands are properly restricted in formal mode
12925 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12926 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12927 result of the concatenation has a type different from String.
12928 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12929 Analyze_Quantified_Expression, Analyze_Slice,
12930 Analyze_Null): issue an error in formal mode on unsupported constructs
12931 * sem_ch5.adb
12932 (Analyze_Block_Statement): only issue error on source block statement
12933 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12934 function which returns the last node in a list of nodes for which
12935 Comes_From_Source returns True, if any
12936 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12937 Last_Source_Node_In_Sequence
12938 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12939 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12940 mode on unsupported constructs
12941 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12942 rest of the actions may be needed later on since the error is marked as
12943 not serious.
12944 * sinfo.ads: Typos in comments.
12945
129462011-08-01 Pascal Obry <obry@adacore.com>
12947
12948 * projects.texi: Minor editing.
12949
53beff22
YM
129502011-08-01 Yannick Moy <moy@adacore.com>
12951
12952 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12953 insertion character ~~
12954 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12955 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12956 with insertion character ~~
12957 (Set_Msg_Text): treat insertion character ~~
12958 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12959 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12960 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12961 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12962 errors related to the formal language restriction not serious
12963 (insertion character |).
12964 * par.adb (Par): set formal language for error messages if needed
12965 * sem_ch6.adb (Check_Missing_Return): take into account possible
12966 generated statements at the end of the function
12967 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12968 enumeration value to define a new pragma SPARK_95
12969 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12970 SPARK_Version): new type and variables to store the SPARK version
12971 (none by default).
12972 (SPARK_Mode): return True when SPARK_Version is set
12973 * par-prag.adb: Correct indentation
12974 (Prag): take Pragma_SPARK_95 into account
12975 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12976 into account.
12977
8d606a78
RD
129782011-08-01 Robert Dewar <dewar@adacore.com>
12979
12980 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12981 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12982 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12983
1982d5a8
PO
129842011-08-01 Pascal Obry <obry@adacore.com>
12985
12986 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12987 Target_Name to Get_Path call.
12988 (Parse_Single_Project): Likewise.
12989 (Post_Parse_Context_Clause): Likewise.
12990 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12991 Call Initialise_Project_Path with the proper Target_Name.
12992 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12993 search path.
12994 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12995 with the proper Target_Name.
12996 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12997 Part.Parse routine.
12998 (Parse_Project_And_Apply_Config): Likewise.
12999 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13000 This is fine as this part of the code is supporting only native
13001 compilation.
13002 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13003 is fine as this part of the code is supporting only native compilation.
13004
0d53d36b
AC
130052011-08-01 Yannick Moy <moy@adacore.com>
13006
13007 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13008 of homonym, unless the homonym is one of the cases allowed in SPARK
13009 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13010 package declaration occurring after a body.
13011
130122011-08-01 Robert Dewar <dewar@adacore.com>
13013
13014 * checks.adb, exp_ch4.adb: Minor reformatting.
13015
130162011-08-01 Javier Miranda <miranda@adacore.com>
13017
13018 * einfo.ads (Access_Disp_Table): Fix documentation.
13019 (Dispatch_Table_Wrappers): Fix documentation.
13020
130212011-08-01 Pascal Obry <obry@adacore.com>
13022
13023 * prj-env.adb, prj-env.ads: Minor reformatting.
13024
8ed68165
AC
130252011-08-01 Yannick Moy <moy@adacore.com>
13026
13027 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13028 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13029 procedures out of these packages.
2c7f9cc0 13030 * errout.ads, errout.adb
8ed68165
AC
13031 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13032 procedures in of this package
13033 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13034 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13035 on misplaced later vs initial declarations, like in Ada 83
13036 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13037 formal mode on attribute of private type whose full type declaration
13038 is not visible
13039 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13040 package declaration inside a package specification
13041 (Analyze_Full_Type_Declaration): issue error in formal mode on
13042 controlled type or discriminant type
13043 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13044 user-defined operator means that it should come from the source
13045 (New_Overloaded_Entity): issue error in formal mode on overloaded
13046 entity.
13047 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13048
130492011-08-01 Thomas Quinot <quinot@adacore.com>
13050
13051 * atree.adb: Minor reformatting.
13052 * checks.adb: Minor reformatting.
13053
4230bdb7
AC
130542011-08-01 Vincent Celier <celier@adacore.com>
13055
13056 * s-parame-vms-ia64.ads: Fix typo in comment
13057 Minor reformatting
13058 * s-parame-vms-restrict.ads: Removed, unused.
13059
130602011-08-01 Javier Miranda <miranda@adacore.com>
13061
13062 * exp_ch3.adb
13063 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13064 * sem_ch3.adb
13065 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13066 * sem_ch3.ads, sem_ch3.adb
13067 (Is_Constant_Bound): New extended version of the subprogram that was
13068 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13069 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13070 * sem_aux.ads (Constant_Value): Fix typo in comment.
13071 * checks.adb (Generate_Index_Checks): New implementation which, for
13072 array objects with constant bounds, generates the runtime check
13073 referencing the bounds of the array type. For other cases this routine
13074 provides its previous behavior obtaining such values from the array
13075 object.
13076 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13077 parent type.
13078 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13079 we cannot have semantic interpretations of the new node.
13080
2010d078
AC
130812011-08-01 Ed Schonberg <schonberg@adacore.com>
13082
13083 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13084 expressions.
13085
130862011-08-01 Arnaud Charlet <charlet@adacore.com>
13087
13088 * sem_ch8.adb: Minor code editing.
13089 * s-vxwext.adb: Remove trailing space.
13090 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13091 consistency with other files.
13092
130932011-08-01 Thomas Quinot <quinot@adacore.com>
13094
13095 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13096
130972011-08-01 Ed Schonberg <schonberg@adacore.com>
13098
13099 * par-ch10.adb: reject parameterized expressions as compilation unit.
13100 * sem_ch4.adb: handle properly conditional expression with overloaded
13101 then_clause and no else_clause.
13102
131032011-08-01 Tristan Gingold <gingold@adacore.com>
13104
13105 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13106 like done by System.Aux_DEC.
13107 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13108
daec8eeb
YM
131092011-08-01 Yannick Moy <moy@adacore.com>
13110
13111 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13112 missing label at end of declaration (subprogram or package)
13113 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13114 of positional and named parameter association
13115 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13116 Error_Msg_SP which adds a prefix to the error message giving the name
13117 of the formal language analyzed
13118 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13119 access result type in subprogram, unconstrained array as result type,.
13120 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13121 procedure
13122 * sem_ch8.adb: Code clean up.
13123
38171f43
AC
131242011-08-01 Javier Miranda <miranda@adacore.com>
13125
13126 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13127 * einfo.ads (Access_Disp_Table): Fix documentation.
13128 (Dispatch_Table_Wrappers): Fix documentation.
13129 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13130 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13131 to enforce the documentation of this attribute.
13132 (Set_Is_Interface): Cleanup the assertion.
13133 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13134 the Underlying_Type entity before reading attribute Access_Disp_Table.
13135 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13136 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13137 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13138 the Underlying_Type entity before reading attribute Access_Disp_Table.
13139 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13140 Locate the Underlying_Type entity before reading attribute
13141 Access_Disp_Table.
13142
131432011-08-01 Ed Schonberg <schonberg@adacore.com>
13144
13145 * s-poosiz.ads: Additional overriding indicators.
13146
131472011-08-01 Yannick Moy <moy@adacore.com>
13148
13149 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13150 formal mode.
13151 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13152 parameter specification does not include a subtype mark.
13153 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13154 formal mode on abstract subprogram.
13155 (Analyze_Subprogram_Specification): issue error in formal mode on
13156 user-defined operator.
13157 (Process_Formals): issue error in formal mode on access parameter and
13158 default expression.
13159 * sem_ch9.adb (Analyze_Abort_Statement,
13160 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13161 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13162 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13163 Analyze_Requeue, Analyze_Selective_Accept,
13164 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13165 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13166 issue error in formal mode on user-defined raise statement.
13167
1f250383
AC
131682011-08-01 Thomas Quinot <quinot@adacore.com>
13169
13170 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13171 declaration being hidden when overriding an implicit inherited
13172 subprogram.
13173 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13174 (-gnats), do not complain about a source file that contains only a
13175 pragma No_Body.
13176
131772011-08-01 Ed Schonberg <schonberg@adacore.com>
13178
13179 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13180 variable if already set.
13181
607d0635
AC
131822011-08-01 Arnaud Charlet <charlet@adacore.com>
13183
13184 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13185 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13186 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13187 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13188 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13189 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13190 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13191 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13192 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13193 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13194 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13195 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13196 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13197 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13198 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13199 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13200 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13201 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13202 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13203 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13204 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13205 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13206 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13207 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13208 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13209 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13210 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13211 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13212 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13213 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13214 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13215 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13216 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13217 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13218 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13219 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13220 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13221 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13222 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13223 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13224 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13225 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13226 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13227 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13228 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13229 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13230 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13231 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13232 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13233 Use GNAT instead of GNARL.
13234
132352011-08-01 Bob Duff <duff@adacore.com>
13236
13237 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13238 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13239 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13240 reformatting.
13241
132422011-08-01 Yannick Moy <moy@adacore.com>
13243
13244 * debug.adb (d.D) reverve flag for the SPARK mode
13245 (d.E) reverve flag for SPARK generation mode
13246 (d.F) reverve flag for Why generation mode
2c7f9cc0 13247 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
13248 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13249 functions which return True when the corresponding modes are set
13250 (Formal_Language): return "spark" or "alfa" when in formal verification
13251 mode.
13252 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13253 Error_Msg to prefix the error message with a tag giving the formal
13254 language
13255 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13256 message with a tag giving the formal language
13257 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13258 block statement
13259 (Analyze_Case_Statement): issue error in formal mode on case statement
13260 with a single "others" case alternative
13261 (Analyze_Exit_Statement): issue errors in formal mode on exit
13262 statements which do not respect SPARK restrictions
13263 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13264 (Check_Unreachable_Code): always issue an error (not a warning) in
13265 formal mode on unreachable code (concerns both code after an infinite
13266 loop and after an unconditional jump, both not allowed in SPARK)
13267 * sem_ch6.adb (Analyze_Return_Statement): add call to
13268 Set_Return_Present for a procedure containing a return statement
13269 (already done for functions in Analyze_Function_Return)
13270 (Analyze_Function_Return): issue error in formal mode on extended
13271 return or if return is not last statement in function
13272 (Check_Missing_Return): issue error in formal mode if function does
13273 not end with return or if procedure contains a return
13274 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13275 function to detect if there is an inner scope of its parameter S which
13276 is a loop.
13277
132782011-08-01 Thomas Quinot <quinot@adacore.com>
13279
13280 * sem_ch6.ads: Minor reformatting.
13281
d8b3ccb9
AC
132822011-08-01 Javier Miranda <miranda@adacore.com>
13283
13284 * sem_util.adb (Abstract_Interface_List): Complete condition when
13285 processing private type declarations to avoid reading unavailable
13286 attribute.
13287 (Is_Synchronized_Tagged_Type): Complete condition when processing
13288 private extension declaration nodes to avoid reading unavailable
13289 attribute.
13290
132912011-08-01 Thomas Quinot <quinot@adacore.com>
13292
13293 * sem_ch3.adb: Minor reformatting.
13294
132952011-08-01 Thomas Quinot <quinot@adacore.com>
13296
13297 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13298 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13299 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13300 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13301 for VMS, instead parametrize the common implementation with
13302 System.Parameters declarations.
13303
0bb9276c
AC
133042011-08-01 Eric Botcazou <ebotcazou@adacore.com>
13305
13306 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13307
133082011-08-01 Tristan Gingold <gingold@adacore.com>
13309
13310 * seh_init.c: Fix SEH handler installation on win64.
13311
133122011-08-01 Ed Schonberg <schonberg@adacore.com>
13313
13314 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13315 double analysis of an anonymous access to subprogram, because it can
13316 lead to improper sharing of profiles and a back-end crash.
13317
6a2e4f0b
AC
133182011-08-01 Robert Dewar <dewar@adacore.com>
13319
13320 * make.adb, sem_ch4.adb: Minor reformatting.
13321 * gcc-interface/Make-lang.in: Update dependencies.
13322 * sem_util.adb, exp_ch5.adb: Minor reformatting.
13323
133242011-08-01 Arnaud Charlet <charlet@adacore.com>
13325
13326 * gnat_rm.texi: Fix definition of Long_Integer.
13327
133282011-08-01 Ed Schonberg <schonberg@adacore.com>
13329
13330 * exp_aggr.adb: check limit size of static aggregate unconditionally,
13331 to prevent storage exhaustion.
13332 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13333 finalized is a function body, insert the cleanup code before the final
13334 return statement, to prevent spurious warnings.
13335 * s-pooglo.ads: add overriding indicator.
13336
4561baf7
ES
133372011-08-01 Ed Schonberg <schonberg@adacore.com>
13338
13339 * sem_ch4.adb (Operator_Check): improve error message when both a
13340 with_clause and a use_clause are needed to make operator usage legal.
13341 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13342 determine whether a compilation unit is visible within an other,
13343 either through a with_clause in the current unit, or a with_clause in
13344 its library unit or one one of its parents.
13345
383e179e
AC
133462011-08-01 Ed Schonberg <schonberg@adacore.com>
13347
13348 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13349 over an arbitrary expression of an array or container type.
13350 * lib-xref.adb: clarify comment.
13351
133522011-08-01 Bob Duff <duff@adacore.com>
13353
13354 * einfo.ads: Minor reformatting.
13355 * debug.adb: Minor comment improvement.
13356
133572011-08-01 Javier Miranda <miranda@adacore.com>
13358
13359 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13360 consider hidden subprograms as valid candidates.
13361
133622011-08-01 Arnaud Charlet <charlet@adacore.com>
13363
13364 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13365
133662011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13367
13368 * gnat_ugn.texi: Fix typo.
13369
61c161b2
AC
133702011-08-01 Robert Dewar <dewar@adacore.com>
13371
13372 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13373 lib-xref.adb: Minor reformatting
13374
133752011-08-01 Gary Dismukes <dismukes@adacore.com>
13376
13377 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13378 when to generate a call to Move_Final_List.
13379 (Has_Controlled_Parts): Remove this function.
13380
84df40f7
AC
133812011-08-01 Geert Bosch <bosch@adacore.com>
13382
13383 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13384 "," in choice list.
13385
133862011-08-01 Thomas Quinot <quinot@adacore.com>
13387
13388 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13389 explicit raise of a predefined exception as Comes_From_Source if the
13390 original N_Raise_Statement comes from source.
13391
133922011-08-01 Robert Dewar <dewar@adacore.com>
13393
13394 * sinfo.ads: Add comment.
13395 * sem_ch6.adb: Minor reformatting.
13396
133972011-08-01 Robert Dewar <dewar@adacore.com>
13398
13399 * freeze.adb (Freeze_Entity): Refine check for bad component size
13400 clause to avoid rejecting confirming clause when atomic/aliased present.
13401
134022011-08-01 Ed Schonberg <schonberg@adacore.com>
13403
13404 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13405 better determine whether an entity reference is a write.
13406 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13407 subcomponent.
13408 * lib-xref.adb (Output_References): Do no suppress a read reference at
13409 the same location as an immediately preceeding modify-reference, to
13410 handle properly in-out actuals.
13411
134122011-08-01 Tristan Gingold <gingold@adacore.com>
13413
13414 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13415
134162011-08-01 Quentin Ochem <ochem@adacore.com>
13417
13418 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13419 heap to compute the result.
13420
c7f0d2c0
AC
134212011-08-01 Robert Dewar <dewar@adacore.com>
13422
13423 * atree.ads: Minor reformatting.
13424
134252011-08-01 Emmanuel Briot <briot@adacore.com>
13426
13427 * g-expect.adb (Get_Command_Output): Fix memory leak.
13428
134292011-08-01 Geert Bosch <bosch@adacore.com>
13430
13431 * cstand.adb (P_Float_Type): New procedure to print the definition of
13432 predefined fpt types.
13433 (P_Mixed_Name): New procedure to print a name using mixed case
13434 (Print_Standard): Use P_Float_Type for printing floating point types
13435 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13436 precision IEEE float.
13437
134382011-08-01 Thomas Quinot <quinot@adacore.com>
13439
13440 * sem_ch3.adb: Minor reformatting.
13441
134422011-08-01 Ed Schonberg <schonberg@adacore.com>
13443
13444 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13445 the completion of a generic function, insert the new body rather than
13446 rewriting the original.
13447
134482011-08-01 Yannick Moy <moy@adacore.com>
13449
13450 * sinfo.ads, errout.ads: Typos in comments.
13451
1c54829e
AC
134522011-08-01 Robert Dewar <dewar@adacore.com>
13453
13454 * par-endh.adb: Minor reformatting.
13455
134562011-08-01 Robert Dewar <dewar@adacore.com>
13457
13458 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13459 (Pre_Post_Aspects): New subtype.
13460 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13461 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13462 * par-ch7.adb (P_Package): Remove Decl parameter
13463 (P_Package): Handle new syntax for aspects (before IS)
13464 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13465 new aspect syntax
13466 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13467 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13468 (P_Package): Remove Decl parameter
13469 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13470 aspects
13471 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13472 specs
13473 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13474 * sinfo.ads: Document new syntax for aspects in packages etc.
13475 * sprint.adb: Handle new syntax of aspects before IS in package
13476
134772011-08-01 Thomas Quinot <quinot@adacore.com>
13478
13479 * atree.ads: Minor reformatting.
13480 * sem_prag.adb: Minor reformatting.
13481
134822011-08-01 Robert Dewar <dewar@adacore.com>
13483
13484 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13485 case expr alternative.
13486
134872011-08-01 Ed Schonberg <schonberg@adacore.com>
13488
13489 * sem_ch12.adb: Fix typo.
13490
9eea4346
GB
134912011-08-01 Geert Bosch <bosch@adacore.com>
13492
13493 * sem_prag.adb (Check_No_Link_Name): New procedure.
13494 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13495 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13496 instead of Standard_Long_Long_Float_Size global. Preparation for
13497 eventual removal of per type constants.
13498 * exp_util.ads (Get_Stream_Size): New function returning the stream
13499 size value of subtype E.
13500 * exp_util.adb (Get_Stream_Size): Implement new function.
13501 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13502 function.
13503 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13504 * einfo.adb:
13505 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13506
3d6c3bd7
GB
135072011-08-01 Geert Bosch <bosch@adacore.com>
13508
13509 * cstand.adb: Fix comments.
13510 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13511 count of arguments.
13512
e7d897b8
AC
135132011-08-01 Robert Dewar <dewar@adacore.com>
13514
13515 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13516
135172011-08-01 Geert Bosch <bosch@adacore.com>
13518
13519 * atree.ads: Fix comment.
13520
c228a069
AC
135212011-08-01 Robert Dewar <dewar@adacore.com>
13522
13523 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13524 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13525 * par.adb: Add with for Namet.Sp.
13526 * par-tchk.adb: Minor reformatting.
13527
135282011-08-01 Vincent Celier <celier@adacore.com>
13529
13530 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13531 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13532 of the init procedure of a SAL.
13533 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13534 New procedure.
13535
135362011-08-01 Thomas Quinot <quinot@adacore.com>
13537
13538 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13539 reformatting.
13540
135412011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13542
13543 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13544
135452011-08-01 Thomas Quinot <quinot@adacore.com>
13546
13547 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13548 conformant with its spec (return True only for types that have
13549 an overriding Initialize primitive operation that prevents them from
13550 having preelaborable initialization).
13551 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13552 initialization for controlled types in Ada 2005 or later mode.
13553
857ade1b
RD
135542011-08-01 Robert Dewar <dewar@adacore.com>
13555
13556 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13557 Postcondition.
13558 (Same_Aspect): New function.
13559 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13560 Type_Invariant, Precondition, Postcondition.
13561 * snames.ads-tmpl: Add Name_Type_Invariant.
13562
bd949ee2
RD
135632011-08-01 Robert Dewar <dewar@adacore.com>
13564
13565 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13566 here.
13567 (Freeze_All_Ent): Fix error in handling inherited aspects.
13568 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13569 already analyzed, but don't skip entire processing of a declaration,
13570 that's wrong in some cases of declarations being rewritten.
13571 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13572 Don't delay for integer, string literals
13573 Treat predicates in usual manner for delay, remove special case code,
13574 not needed.
13575 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13576 (Build_Predicate_Function): Update saved expression in aspect
13577 (Build_Invariant_Procedure): Update saved expression in aspect
13578 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13579 of replacement of discriminant references if the reference is simple.
13580
f1c952af
RD
135812011-08-01 Robert Dewar <dewar@adacore.com>
13582
13583 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13584 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13585 Static_Predicate and Dynamic_Predicate.
13586 (Build_Predicate_Function): Add processing for Static_Predicate
13587 and Dynamic_Predicate.
13588 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13589 (From_Static_Predicate): New flag
13590 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13591
135922011-08-01 Robert Dewar <dewar@adacore.com>
13593
13594 * usage.adb: Documentation cleanup for Ada version modes in usage.
13595 * expander.adb: Minor reformatting.
13596
47e11d08
AC
135972011-08-01 Robert Dewar <dewar@adacore.com>
13598
13599 * atree.ads: Minor comment fix.
13600 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13601 a-witeio.ads, sem_prag.adb: Minor reformatting.
13602
136032011-08-01 Doug Rupp <rupp@adacore.com>
13604
13605 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13606 pointers. Use descrip.h header file for convenience. Add some
13607 comments.
13608
136092011-08-01 Robert Dewar <dewar@adacore.com>
13610
13611 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13612 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13613 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13614 New procedure.
13615 (Check_Aspect_At_End_Of_Declarations): New procedure
13616 (Analye_Aspect_Specification): Minor changes for above procedures
13617 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13618 specification node as well.
13619
136202011-08-01 Pascal Obry <obry@adacore.com>
13621
13622 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13623 Windows files. Use GetFilesAttributes() in this case to check for file
13624 existence instead of returning with an error code.
13625
a3a16b21
VC
136262011-08-01 Vincent Celier <celier@adacore.com>
13627
13628 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13629 High is above Source length.
13630
ff58cc69
RD
136312011-08-01 Robert Dewar <dewar@adacore.com>
13632
13633 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13634
6bb88533
AC
136352011-08-01 Robert Dewar <dewar@adacore.com>
13636
13637 * aspects.ads (Boolean_Aspects): New subtype.
13638 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13639 for derived types in cases where the parent type and derived type have
13640 aspects.
13641 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13642 with aspects when parent type also has aspects.
13643 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13644 boolean expression at this point).
13645 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13646 accordance with final decision on the Ada 2012 feature.
13647 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13648
136492011-08-01 Matthew Heaney <heaney@adacore.com>
13650
13651 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13652
060a3f28
AC
136532011-08-01 Pascal Obry <obry@adacore.com>
13654
13655 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13656 Fix Replace_Slice when High is above current string size.
13657 (Replace_Slice): Fix DL computation when High is above current
13658 string length.
13659
136602011-08-01 Gary Dismukes <dismukes@adacore.com>
13661
13662 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13663
e7f567a3
AC
136642011-08-01 Matthew Heaney <heaney@adacore.com>
13665
13666 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13667 of node.
13668
136692011-08-01 Pascal Obry <obry@adacore.com>
13670
13671 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13672 reformatting.
13673
1a265e78
AC
136742011-08-01 Ed Schonberg <schonberg@adacore.com>
13675
13676 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13677 access to protected subprograms in generic bodies.
13678 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13679 protected type, indicate that the convention of the subprogram is
13680 Convention_Protected, because it may be used in subsequent declarations
13681 within the protected declaration.
13682
136832011-08-01 Vincent Celier <celier@adacore.com>
13684
13685 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13686 and "final" procedures when the name of the library is "ada", to avoid
13687 duplicate symbols "adainit" and "adafinal" in executables.
13688
67e28ef8
ES
136892011-08-01 Ed Schonberg <schonberg@adacore.com>
13690
13691 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13692 quantified expression that appears within a postcondition and uses the
13693 Ada2012 'Result attribute.
13694
6da2ca7d
RO
136952011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13696
13697 * init.c (__gnat_error_handler): Cast reason to int.
13698 (__gnat_install_handler): Explain sa_sigaction use.
13699
7d5997c6
EB
137002011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13701
13702 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13703 subprogram has copy-in copy-out parameters, try to promote the mode of
13704 the return type if it is passed in registers.
13705
4b4cfdd5
EB
137062011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13707
13708 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13709 left operand as addressable.
13710
f3d34576
EB
137112011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13712
13713 * gcc-interface/gigi.h (build_function_stub): Remove.
13714 (build_return_expr): Likewise.
13715 (convert_vms_descriptor): Declare.
13716 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13717 (build_function_stub): Move to...
13718 * gcc-interface/utils2.c (build_return_expr): Move to...
13719 * gcc-interface/trans.c (build_function_stub): ...here.
13720 (build_return_expr): ...here.
13721 (Subprogram_Body_to_gnu): Add local variable for language_function.
13722 Disconnect the parameter attributes cache, if any, once done with it.
13723 Call end_subprog_body only after setting the end_locus.
13724 Build the stub associated with the function, if any, at the very end.
13725 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13726 variables and streamline control flow.
13727
0a6ecc08
AC
137282011-07-23 Arnaud Charlet <charlet@adacore.com>
13729
13730 PR ada/49819
13731 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13732 g-trasym-dwarf.adb.
13733
5b6d595b
RO
137342011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13735
13736 PR bootstrap/49794
13737 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13738 Assign to act.sa_sigaction.
13739 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13740 current->return_address to char * before arithmetic.
13741
94017021
RO
137422011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13743
13744 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13745 Correct argument types.
13746 Extract code from reason.
13747 (__gnat_install_handler): Assign to act.sa_sigaction.
13748
52fd02bb
EB
137492011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13750
13751 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13752 (GNAT1_OBJS): ...here.
13753
f39a9ca2
EB
137542011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13755
13756 PR ada/48711
13757 * g-socthi-mingw.adb (Fill): Fix formatting.
13758
9e36aa23
EB
13759 * gcc-interface/gigi.h: Move around comment.
13760
e3aca522
JDA
137612011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13762
13763 PR ada/46350
13764 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13765
696b1960
FW
137662011-07-14 Florian Weimer <fw@deneb.enyo.de>
13767
13768 PR ada/48711
13769 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13770
f542c405
EB
137712011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13772
13773 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13774 range comparison if Pmode is SImode.
13775
9e9bd455
LG
137762011-07-12 Laurent GUERBY <laurent@guerby.net>
13777 Eric Botcazou <ebotcazou@adacore.com>
13778
13779 * adadecode.c: Wrap up in extern "C" block.
13780 * adadecode.h: Likewise.
13781 * adaint.c: Likewise. Remove 'const' keyword.
13782 * adaint.h: Likewise.
13783 * argv.c: Likewise.
13784 * atree.h: Likewise.
13785 * cio.c: Likewise.
13786 * cstreams.c: Likewise.
13787 * env.c: Likewise.
13788 * exit.c: Likewise.
13789 * fe.h: Likewise.
13790 * final.c: Likewise.
13791 * init.c: Likewise.
13792 * initialize.c: Likewise.
13793 * link.c: Likewise.
13794 * namet.h: Likewise.
13795 * nlists.h: Likewise.
13796 * raise.c: Likewise.
13797 * raise.h: Likewise.
13798 * repinfo.h: Likewise.
13799 * seh_init.c: Likewise.
13800 * targext.c: Likewise.
13801 * tracebak.c: Likewise.
13802 * uintp.h: Likewise.
13803 * urealp.h: Likewise.
13804 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13805 * xsinfo.adb: Likewise.
13806 * xsnamest.adb: Likewise.
13807 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13808 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13809 * gcc-interface/misc.c: Likewise.
13810 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13811 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13812 ada/targext.o here...
13813 (GNAT_ADA_OBJS): ...and not here.
13814 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13815 (GNATBIND_OBJS): Reorder.
13816
7644b3c7
RH
138172011-07-07 Richard Henderson <rth@redhat.com>
13818
13819 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13820 dwarf2out_frame_init.
13821
8384ac41
EB
138222011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13823
13824 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13825
fbdd5d87
RO
138262011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13827
13828 PR target/39150
13829 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13830
1a072294
RG
138312011-07-06 Richard Guenther <rguenther@suse.de>
13832
8384ac41
EB
13833 * gcc-interface/misc.c (gnat_init): Merge calls to
13834 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
13835 Re-initialize boolean_false_node.
13836
bc712852
EB
138372011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13838 Olivier Hainque <hainque@adacore.com>
13839 Nicolas Setton <setton@adacore.com>
13840
13841 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13842 the type according to the ARTIFICIAL_P parameter.
13843 (create_type_decl): Likewise.
13844 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13845
2eb22389
EB
138462011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13847
13848 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13849 (gnatbind): Likewise.
13850
4bdaaf2f
RO
138512011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13852
13853 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13854
c020c92b
EB
138552011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13856
13857 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13858 local variable throughout. Remove useless call to Base_Type.
13859 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13860 Take it also into account for the volatileness of the field. Set the
13861 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13862
96769d32
EB
138632011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13864
13865 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13866 on a dereference built for a by-ref object if it has an address clause.
13867
7e4680c1
EB
138682011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13869
13870 * einfo.ads (Address_Taken): Document use for the second argument of
13871 Asm_Input and Asm_Output attributes.
13872 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13873 argument is an entity name, then set Address_Taken on it.
13874 <Attribute_Asm_Output>: Likewise.
13875 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13876 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13877 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13878 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13879
138802011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
13881
13882 PR middle-end/46500
13883 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13884
677f3fa8
JM
138852011-06-14 Joseph Myers <joseph@codesourcery.com>
13886
13887 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13888 (ada/utils.o): Update dependencies.
13889 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13890 ../../../libcpp/libcpp.a.
13891 * gcc-interface/utils.c: Include common/common-target.h.
13892 (process_attributes): Use targetm_common.have_named_sections.
13893
009db074
RG
138942011-06-07 Richard Guenther <rguenther@suse.de>
13895
0bad0e23
EB
13896 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13897 set_sizetype.
009db074 13898
3bfc61cf
EB
138992011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13900
0bad0e23 13901 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
13902 TREE_THIS_NOTRAP flag.
13903
5c4a1c7b
EB
139042011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13905
13906 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13907 Fix thinko.
13908
e9f57686
EB
139092011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13910
13911 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13912 constants whose full view has discriminants specially.
13913
10e4d056
EB
139142011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13915
13916 * gcc-interface/utils.c: Include diagnostic.h.
13917 (gnat_write_global_declarations): Output debug information for all
13918 global type declarations before finalizing the compilation unit.
13919 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13920
0957c029
JJ
139212011-05-25 Jakub Jelinek <jakub@redhat.com>
13922
13923 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13924
52d0a7ac
KT
139252011-05-25 Kai Tietz <ktietz@redhat.com>
13926
13927 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13928 initialization instead of const/none-const pointer assignment.
13929
1ed1641d
JM
139302011-05-24 Joseph Myers <joseph@codesourcery.com>
13931
13932 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13933 $(EXTRA_GNAT1_OBJS).
13934 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13935 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13936 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13937 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13938 libcommon-target.a instead of prefix.o.
13939
9fe72ebd
JM
139402011-05-21 Joseph Myers <joseph@codesourcery.com>
13941
13942 PR ada/49097
0bad0e23 13943 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 13944
2691e6d7
JM
139452011-05-20 Joseph Myers <joseph@codesourcery.com>
13946
0bad0e23
EB
13947 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13948 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13949 instead of version.o.
2691e6d7 13950
bf6490b5
KT
139512011-05-18 Kai Tietz <ktietz@redhat.com>
13952
13953 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13954 boolean_false_node instead of integer_zero_node.
13955 (convert_with_check): Likewise.
13956 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13957
7bf9a5ac
EB
139582011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13959
13960 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13961 type of the parameter is an unconstrained array, convert the actual to
13962 the type of the formal in the In Out and Out cases as well.
13963
e5b00edf
NF
139642011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13965
13966 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13967 call build_function_type_array or build_varargs_function_type_array
13968 instead.
13969 (create_subprog_type): Don't call build_function_type; call
13970 build_function_type_vec instead.
13971
51545682
NF
139722011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13973
13974 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13975 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13976 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13977
c99c0026
EB
139782011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13979
f620bd21
EB
13980 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13981
c99c0026
EB
13982 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13983 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13984
3d528853
NF
139852011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13986
c99c0026 13987 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 13988
d7d058c5
NF
139892011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13990
13991 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13992 instead of accessing TYPE_ARG_TYPES directly.
13993 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13994
805e60a0
EB
139952011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13996
13997 PR ada/48844
13998 * gcc-interface/gigi.h (get_variant_part): Declare.
13999 * gcc-interface/decl.c (get_variant_part): Make global.
14000 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14001 types have the same constant size, are record types and T1 has a
14002 variant part while T2 doesn't.
14003
907a08d9
EB
140042011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14005
14006 * gcc-interface/utils.c (begin_subprog_body): Do not call
14007 get_pending_sizes.
14008 (end_subprog_body): Likewise.
14009
d35936ab
RG
140102011-05-04 Richard Guenther <rguenther@suse.de>
14011
14012 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14013 int_const_binop.
14014 (pos_to_constructor): Likewise.
14015
c1fd8753 140162011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 14017 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
14018
14019 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14020 of build_function_type. Adjust calls to...
14021 (build_raise_check): ...this. Do not take a void_tree parameter.
14022 Call build_function_type_list instead of build_function_type.
14023 Fix head comment and swap couple of conditional blocks.
14024
4fb87d2b
EB
140252011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14026
14027 * gnatvsn.ads (Library_Version): Bump to 4.7.
14028 (Current_Year): Bump to 2011.
14029
fa5e5a76
MM
140302011-04-29 Michael Matz <matz@suse.de>
14031
14032 * gcc-interface/misc.c (gnat_handle_option): Set
14033 warn_maybe_uninitialized.
14034
8d6a2f69
GP
140352011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14036
14037 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14038 the Watson/McCabe paper.
14039
770937fd
JM
140402011-04-23 Jim Meyering <meyering@redhat.com>
14041
14042 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14043
eb601ae1
EB
140442011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14045
14046 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14047 onto the new type.
14048
7d7fcb08
EB
140492011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14050
14051 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14052 parameter.
14053 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14054 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14055 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14056 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14057 <all>: Do not set flags on the reused DECL node coming from an alias.
14058 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14059 don't need debug info here...
14060 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14061 (gigi): Adjust calls to create_subprog_decl.
14062 (build_raise_check): Likewise.
14063 (establish_gnat_vms_condition_handler): Likewise.
14064 (Compilation_Unit_to_gnu): Likewise.
14065 (gnat_to_gnu): Likewise.
14066
e1876cac
EB
140672011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14068
14069 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14070 (NO_REORDER_ADAFLAGS): New variable.
14071 (EXTRA_GNATTOOLS): Always define.
14072 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14073 Clean up and adjust list of files compiled with special options.
14074 * gcc-interface/Make-lang.in: Likewise.
14075 (ada/decl.o): Cosmetical change.
14076 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14077
04695783
JM
140782011-04-20 Jim Meyering <meyering@redhat.com>
14079
14080 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14081
23399579
EB
140822011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14083
14084 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14085 $(CFLAGS) on the link line.
14086
51c5169c
EB
140872011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14088
14089 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14090 padded type built for the return type if it is unconstrained.
14091
61e46a7d
NF
140922011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14093
14094 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14095
81f653d6
NF
140962011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14097
b4867846
EB
14098 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14099 before calling TREE_CHAIN.
81f653d6
NF
14100 * gcc-interface/misc.c (gnat_init_ts): New function.
14101 (LANG_HOOKS_INIT_TS): Define.
14102
a358e188
MJ
141032011-04-12 Martin Jambor <mjambor@suse.cz>
14104
b4867846
EB
14105 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14106 instead of cgraph_node.
a358e188 14107
29b1c5a4
EB
141082011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14109
14110 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14111 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14112 mechanism.
14113
88872b00
EB
141142011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14115
14116 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14117 of aggregate types that contain a placeholder.
14118
dcf0c47e
NF
141192011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14120
14121 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 14122 TYPE_ARG_TYPES.
dcf0c47e
NF
14123 (handle_type_generic_attribute): Likewise.
14124
53e3000c
EB
141252011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14126
14127 PR ada/47163
14128 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14129
ab380bb4
KT
141302011-04-04 Kai Tietz <ktietz@redhat.com>
14131
14132 PR ada/47163
0bad0e23
EB
14133 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14134 to flag value.
ab380bb4 14135
8ffac116
EB
141362011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14137
14138 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14139 type case, do not strip a padding type around the array type.
14140
de9528f0
EB
141412011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14142
14143 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14144 types.
14145
d9d7a26c
EB
141462011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14147
14148 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14149 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 14150 code for -feliminate-unused-debug-types.
d9d7a26c
EB
14151 (gnat_post_options): Likewise.
14152
4cb12a90
EB
141532011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14154
14155 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14156 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14157 distinct copy.
14158
acccc61c
EB
141592011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14160
14161 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14162 DECL_ARTIFICIAL flag on enumeration types.
14163
583eb0c9
EB
141642011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14165
14166 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14167 fat pointer types artificial unconditionally.
14168 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14169 isn't artificial.
14170
e3edbd56
EB
141712011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14172
14173 * gcc-interface/gigi.h (get_dummy_type): Declare.
14174 (build_dummy_unc_pointer_types): Likewise.
14175 (finish_fat_pointer_type): Likewise.
14176 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14177 fat pointer type has been built, complete it in place.
14178 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14179 and thin pointers. Remove useless variable.
14180 (finish_fat_pointer_type): Make global and move to...
14181 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14182 (get_dummy_type): New function.
14183 (build_dummy_unc_pointer_types): Likewise.
14184 (gnat_pushdecl): Propage the name to the anonymous variants only.
14185 (update_pointer_to): Only adjust the pointer types in the unconstrained
14186 array case.
14187
65444786
EB
141882011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14189
14190 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14191 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14192 if this is a Taft amendment type and the full declaration is available.
14193 * gcc-interface/trans.c (process_type): Likewise.
14194 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14195 (process_freeze_entity): Likewise.
14196 * gcc-interface/utils.c (dummy_global): New static variable.
14197 (gnat_write_global_declarations): If there are types declared as used
14198 at the global level, insert them in the global hash table.
14199
1aeb40dd
EB
142002011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14201
14202 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14203 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14204 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14205 copy.
14206 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14207 flag of the type accordingly.
14208 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14209
80ec8b4c
EB
142102011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14211
14212 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14213 finalizing types when updating the pointers to the designated type.
14214 <all>: Finalize the deferred types even if we didn't defer processing
14215 of incomplete types in this invocation.
14216
2a9d769a 142172011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
14218 Nicolas Setton <setton@adacore.com>
14219 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
14220
14221 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14222 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14223
2438d7a6
KT
142242011-03-28 Kai Tietz <ktietz@redhat.com>
14225
333d8aff 14226 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
14227 Windows targets.
14228 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14229 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 14230
80ec8b4c 14231 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 14232
8ad150f6
TG
142332011-03-28 Tristan Gingold <gingold@adacore.com>
14234
14235 PR ada/44431
80ec8b4c
EB
14236 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14237 Use ada output of gnatbind.
8ad150f6
TG
14238 (ada/b_gnatb.adb): Ditto.
14239 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14240 (ada.mostlyclean, ada.stage1)
14241 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14242 (ada.stagefeedback): Adjust.
80ec8b4c 14243 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
14244 Use ada output of gnatbind.
14245 (b_gnatm.adb): Ditto.
14246 (b_gnatl.o, b_gnatm.o): New rules.
14247
51c7954d
EB
142482011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14249
14250 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14251 for the padded type built to support a specified size or alignment.
14252
6ddf9843
EB
142532011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14254
14255 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14256 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14257 unconditionally to the end of the unit when the designated type is
14258 limited_with'ed.
14259 <all>: Rename local variable. Attempt to un-defer types only and do it
14260 for limited_with'ed types as well.
14261 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14262 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14263 consistently and remove redundant call to finalize_from_with_types.
14264
5daed84a
EB
142652011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14266
14267 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14268 subprograms without a previous spec declared in the same unit.
14269 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14270 subprograms at the end of the unit instead of at the beginning.
14271 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14272 isn't public for the special handling of non-inline functions nested
14273 inside inline external functions.
14274
0edf1bb2
JL
142752011-03-25 Jeff Law <law@redhat.com>
14276
5daed84a 14277 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 14278
e3c4580e
EB
142792011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14280
14281 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14282 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14283 to compute Set_Size_Depends_On_Discriminant.
14284 (Layout_Type): Call it on array types in back-end layout mode.
14285 * sem_util.adb (Requires_Transient_Scope): Return true for array
14286 types only if the size depends on the value of discriminants.
14287 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14288 type if the RHS is a call to a function that returns an unconstrained
14289 type with default discriminant.
14290
abbc8c7b
EB
142912011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14292
14293 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14294 non-conversion to the nominal result type at the end.
14295
ddb5a105
EB
142962011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14297
14298 * gcc-interface/trans.c (create_temporary): New function taken from...
14299 (create_init_temporary): ...here. Call it.
14300 (call_to_gnu): Create the temporary for the return value early, if any.
14301 Create it for a function with copy-in/copy-out parameters if there is
14302 no target; in other cases of copy-in/copy-out, use another temporary.
14303 Push the new binding level lazily. Add and rename local variables.
14304
0d853156
EB
143052011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14306
14307 * gcc-interface/decl.c (validate_size): Improve comments and tweak
14308 error message.
14309 (set_rm_size): Likewise.
14310
4184ef1b
EB
143112011-03-23 Eric Botcazou <ebotcazou@adacore.com>
14312
14313 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14314 for the padded type built in order to support a specified alignment.
14315 Fix incorrect formatting.
14316
bf7eefab
EB
143172011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14318
14319 PR bootstrap/48216
14320 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14321
ef0feeb2
EB
143222011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14323
14324 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14325 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14326 to the end of the list. Adjust recursive call. Rename local variable.
14327 If REORDER is true, reorder components of the record type.
14328 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14329 components_to_record and adjust the parameter list.
14330
646f9414
EB
143312011-03-21 Eric Botcazou <ebotcazou@adacore.com>
14332
14333 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14334 disabled, use the variable for bounds of loop iteration scheme.
14335
62d784f7
KT
143362011-03-21 Kai Tietz <ktietz@redhat.com>
14337
14338 PR target/12171
0bad0e23 14339 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 14340
f230d759
EB
143412011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14342
14343 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14344 out whether the expression is read-only. Short-circuit placeholder
14345 case and rename a couple of local variables.
14346
bb1f7929
EB
143472011-03-17 Eric Botcazou <ebotcazou@adacore.com>
14348
14349 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14350 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14351 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14352 (convert): Deal with conversions from a smaller form type specially.
14353
400a2d24
EB
143542011-02-14 Eric Botcazou <ebotcazou@adacore.com>
14355
14356 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14357 its argument, except for the special -I- switch.
14358
c26bc3ad
GP
143592011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
14360
0bad0e23
EB
14361 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14362 "Ada Issues".
c26bc3ad 14363
07b8e910
EB
143642011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14365
14366 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14367
31a5a547
EB
143682011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14369
14370 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14371 GNAT_FORMAL.
14372 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14373 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14374 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14375 Do not generate the check directly, instead instantiate the template
14376 check present in the descriptor.
14377 (make_descriptor_field): Move around.
14378 (build_vms_descriptor32): Build a template check in the POINTER field.
14379 (build_vms_descriptor): Remove useless suffixes.
14380 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14381
dcf25f59
EB
143822011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14383
14384 PR bootstrap/47467
14385 * targext.c: Include target files if IN_RTS is defined.
14386
0418e131
RG
143872011-01-26 Richard Guenther <rguenther@suse.de>
14388
14389 PR bootstrap/47467
14390 * targext.c: Include config.h.
14391 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14392 dependency.
14393
c6eecbd8 143942011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 14395 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
14396
14397 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14398
2d3c7e4f
EB
143992011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14400
14401 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14402 end-of-case on the end label and its associated gotos, if any.
14403
0394741f
EB
144042011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14405
14406 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14407 expressions of the parameter cache within the statement group of
14408 the CICO mechanism.
14409
2a02d090 144102011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 14411 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
14412
14413 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14414 (set_end_locus_from_node): New function.
14415 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14416 make and the function end_locus.
14417 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14418 for the elaboration subprogram.
14419 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14420 set the end_locus of the expression as well.
14421
89f5e978
EB
144222011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14423
14424 PR ada/47131
14425 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14426 variables that are referenced in exception handlers volatile.
14427
14428
ad41bd84 14429\f
797103eb 14430Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
14431
14432Copying and distribution of this file, with or without modification,
14433are permitted in any medium without royalty provided the copyright
14434notice and this notice are preserved.