]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
579fda56
AC
12011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * exp_strm.adb: Remove with and use clause for Opt.
4 (Build_Array_Input_Function): Remove the version-dependent generation
5 of the return statement. The Ada 2005 tree is now the default.
6
72011-09-01 Yannick Moy <moy@adacore.com>
8
9 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
10 it is never empty when compiling in Alfa mode.
11
122011-09-01 Robert Dewar <dewar@adacore.com>
13
14 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
15 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
16 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
17 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
18
192011-09-01 Matthew Heaney <heaney@adacore.com>
20
21 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
22 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
23 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
24 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
25 unbounded queue container.
26 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
27 bounded queue container.
28 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
29 unbounded priority queue container.
30 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
31 bounded priority queue container.
32
24c34107
AC
332011-08-31 Pascal Obry <obry@adacore.com>
34
35 * a-direct.adb: Do not try to create an UNC path on Windows.
36 (Create_Path): Skip leading computer name in UNC path if any.
37
382011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
39
40 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
41 version-dependent generation of the return statement. The Ada 2005 tree
42 is now the default.
43
442011-08-31 Thomas Quinot <quinot@adacore.com>
45
46 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
47 types Stream_Element_Offset and Storage_Offset have a different native
48 type depending on whether the platform is 32 or 64 bits. When
49 exchanging them, always convert to 64 bits.
50
512011-08-31 Yannick Moy <moy@adacore.com>
52
53 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
54 --force-alfa to gnat2why.
55
562011-08-31 Ed Schonberg <schonberg@adacore.com>
57
58 * sem_ch12.adb (Save_References): If the node has aspects, save
59 references within the corresponding expressions in a separate step,
60 because the aspects are not directly in the tree for the declaration
61 to which they belong.
62
632011-08-31 Arnaud Charlet <charlet@adacore.com>
64
65 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
66 in CodePeer mode, since representation clauses are partially ignored.
67 * gcc-interface/Make-lang.in: Update dependencies.
68
702d2020
AC
692011-08-31 Jose Ruiz <ruiz@adacore.com>
70
71 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
72 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
73 to any dispatching domain.
74
752011-08-31 Thomas Quinot <quinot@adacore.com>
76
77 * exp_ch4.adb: Minor reformatting.
78
792011-08-31 Bob Duff <duff@adacore.com>
80
81 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
82 on nodes for which it is not defined.
83 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
84 parent type.
85
862011-08-31 Bob Duff <duff@adacore.com>
87
88 * sem_ch3.adb (Process_Full_View): Disable legality check if
89 In_Instance, to avoid spurious errors.
90 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
91 if In_Instance, to avoid spurious errors.
92
932011-08-31 Pascal Obry <obry@adacore.com>
94
95 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
96 directory speparators.
97 (Compose): Use Dir_Seps to handle both forms.
98 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
99 changes.
100 (Extension): Use Dir_Seps to handle both forms.
101
1022011-08-31 Pascal Obry <obry@adacore.com>
103
104 * prj-conf.adb: Minor reformatting.
105
67645bde
AC
1062011-08-31 Jose Ruiz <ruiz@adacore.com>
107
108 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
109 dispatching domain aspect.
110 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
111 aspect.
112 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
113 Dispatching_Domain aspect in a similar way as we do for the Priority
114 aspect.
115 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
116 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
117 is present.
118 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
119 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
120 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
121 Dispatching_Domain and add it to the task definition.
122 (Sig_Flags): Add Pragma_Dispatching_Domain.
123 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
124 support to find the types Dispatching_Domain and
125 Dispatching_Domain_Access.
126 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
127 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
128 query the availability of a pragma Dispatching_Domain.
129 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
130 the expander to pass the Dispatching_Domain when creating a task.
131 (Name_Dispatching_Domain): Add this new name for a pragma.
132 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
133 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
134 task has been allocated at creation time.
135 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
136 Ravenscar is always null.
137 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
138 the task has been allocated at creation time.
139 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
140 a specific dispatching domain.
141 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
142 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
143 and CPU are specified for the task, and the CPU value is not contained
144 within the range of processors for the domain.
145
1462011-08-31 Vincent Celier <celier@adacore.com>
147
148 * make.adb (Original_Gcc) : New constant String_Access.
149 (Gnatmake): For VM targets, do not use VM version of the compiler if
150 --GCC= has been specified.
151
1522011-08-31 Thomas Quinot <quinot@adacore.com>
153
154 * sem_ch5.adb: Minor reformatting.
155
1562011-08-31 Ed Schonberg <schonberg@adacore.com>
157
158 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
159 not reanalyze it.
160
1612011-08-31 Bob Duff <duff@adacore.com>
162
163 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
164 the access type is private; we don't care about privacy in expansion.
165
1662011-08-31 Ed Schonberg <schonberg@adacore.com>
167
168 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
169 subcomponents tnat may be limited, because they originate in view
170 conflicts. If the original aggregate is legal and the actuals are
171 legal, the aggregate itself is legal.
172
b8789727
AC
1732011-08-31 Matthew Heaney <heaney@adacore.com>
174
175 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
176 status.
177
1782011-08-31 Ed Schonberg <schonberg@adacore.com>
179
180 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
181 errors in B tests.
182
1832011-08-31 Jose Ruiz <ruiz@adacore.com>
184
185 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
186 Interrupt_Priority aspects, force the analysis of the aspect expression
187 (when building the equivalent pragma). Otherwise, its analysis is done
188 too late, after the task or protected object has been created.
189 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
190 Analyze_Single_Task_Declaration): Remove the code to move the aspects
191 to the object declaration because they are needed in the type
192 declaration.
193
e0c32166
AC
1942011-08-31 Robert Dewar <dewar@adacore.com>
195
196 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
197 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
198 reformatting.
199
2002011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
201
202 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
203 if the corresponding type is malformed due to restriction violations.
204
2052011-08-31 Robert Dewar <dewar@adacore.com>
206
207 * s-ransee.ads, s-ransee.adb: Minor reformatting.
208
2092011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
210
211 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
212 would cause the generation of Set_Finalize_Address if the target is a
213 VM and the designated type is not derived from [Limited_]Controlled.
214
2152011-08-31 Arnaud Charlet <charlet@adacore.com>
216
217 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
218 subprogram.
219 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
220 case of a compilation error.
221
2222011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
223
224 * init.c (__gnat_error_handler): Standardize the stack overflow or
225 erroneous memory access message.
226 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
227 or erroneous memory access message.
228
11bc76df
AC
2292011-08-31 Robert Dewar <dewar@adacore.com>
230
231 * sem_ch4.adb: Minor reformatting.
232 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
233
2342011-08-31 Thomas Quinot <quinot@adacore.com>
235
236 * scos.ads: Minor documentation clarification.
237 * put_scos.adb: Do not generate SCO unit header line for a unit that
238 has no SCO lines.
239
876d4394
RD
2402011-08-31 Robert Dewar <dewar@adacore.com>
241
242 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
243
36b8f95f
AC
2442011-08-31 Tristan Gingold <gingold@adacore.com>
245
246 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
247 hold variables between these following subprograms.
248 (Build_Exception_Handler, Build_Object_Declarations,
249 Build_Raise_Statement): Use the above type as parameter.
250 Make the above adjustments.
251 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
252
2532011-08-31 Pascal Obry <obry@adacore.com>
254
255 * projects.texi: Minor reformatting.
256
2572011-08-31 Tristan Gingold <gingold@adacore.com>
258
259 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
260 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
261
2622011-08-31 Ed Schonberg <schonberg@adacore.com>
263
264 * exp_ch5.adb: Minor code cleanup.
265 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
266 prevent cascaded errors.
267 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
268 variable of an iterator specification in current scope.
269 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
270 postconditions on the stack, as they contain no return statements.
271
2722011-08-31 Yannick Moy <moy@adacore.com>
273
274 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
275 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
276 call Qualify_Entity_Names.
277 (Expand_Alfa): call Qualify_Entity_Names in more cases
278 * lib-xref-alfa.adb: Take into account system package.
279 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
280 CodePeer mode in which we are interested in finding bugs even if
281 compiler cannot compile source.
282 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
283 deferred constant.
284
2852011-08-31 Gary Dismukes <dismukes@adacore.com>
286
287 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
288 denoted by the subtype mark to ensure getting the concurrent type in
289 the case where the subtype mark denotes a private subtype of a
290 concurrent type (needed when using -gnatc).
291 (Process_Subtype): For the processing specific to type kinds, case on
292 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
293 subtype denotes a private subtype whose base type is nonprivate (needed
294 for subtypes of private fulfilled by task types when compiling with
295 -gnatc).
296
2972011-08-31 Gary Dismukes <dismukes@adacore.com>
298
299 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
300 late primitives that override interface operations when the full
301 expander is not active, to avoid blowups in Register_Primitive when
302 types don't have associated secondary dispatch tables.
303
3042011-08-31 Yannick Moy <moy@adacore.com>
305
306 * alfa_test.adb: Code clean up.
307
3082011-08-31 Marc Sango <sango@adacore.com>
309
310 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
311 by Comes_From_Source (Original_Node (N)) in order to treat also the
312 nodes which have been rewritten.
313 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
314 explicit dereference and slice violation in spark mode on the nodes
315 coming only from the source code.
316
8cf23b91
AC
3172011-08-31 Robert Dewar <dewar@adacore.com>
318
319 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
320 lib-xref-alfa.adb: Minor reformatting.
321
3222011-08-31 Matthew Heaney <heaney@adacore.com>
323
324 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
325
3262011-08-31 Javier Miranda <miranda@adacore.com>
327
328 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
329 only for class-wide subprograms conflicting with entities of concurrent
330 tagged types.
331
3322011-08-31 Matthew Heaney <heaney@adacore.com>
333
334 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
335 node to null value.
336
3372011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
338
339 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
340 general description of the routine.
341
3422011-08-31 Ed Schonberg <schonberg@adacore.com>
343
344 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
345 doubly-linked lists.
346
0bb3bfb8
GD
3472011-08-31 Gary Dismukes <dismukes@adacore.com>
348
349 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
350 check is needed for a left-hand side that is a dereference, and the
351 base type is private without discriminants (whereas the full type does
352 have discriminants), an extra retrieval of the underlying type may be
353 needed in the case where the subtype is a record subtype whose base
354 type is private. Update comments.
355
11fa950b
AC
3562011-08-31 Javier Miranda <miranda@adacore.com>
357
358 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
359 found check if there is a class-wide subprogram covering the primitive.
360
3612011-08-31 Yannick Moy <moy@adacore.com>
362
363 * sem_res.adb: Further cases where full expansion test is needed,
364 rather than expansion test.
365
3662011-08-31 Pascal Obry <obry@adacore.com>
367
368 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
369
3702011-08-31 Ed Schonberg <schonberg@adacore.com>
371
372 * exp_ch5.adb: Handle iterators over derived container types.
373
3742011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
375
376 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
377 (Has_Anonymous_Master): New routine.
378 (Set_Has_Anonymous_Master): New routine.
379 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
380 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
381 (Current_Anonymous_Master): New routine.
382 (Current_Unit_First_Declaration): Removed.
383 (Current_Unit_Scope): Removed.
384 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
385 their objects on a per-unit heterogeneous finalization master.
386
3872011-08-31 Matthew Heaney <heaney@adacore.com>
388
389 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
390 array.
391
3922011-08-31 Jose Ruiz <ruiz@adacore.com>
393
394 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
395 when not needed.
396
3972011-08-31 Gary Dismukes <dismukes@adacore.com>
398
399 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
400 where the actual is an unexpanded call to 'Input.
401
d2b4b3da
AC
4022011-08-31 Yannick Moy <moy@adacore.com>
403
404 * sem_ch4.adb: Code clean up.
405
4062011-08-31 Yannick Moy <moy@adacore.com>
407
408 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
409
4102011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
411
412 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
413 and TSS primitive Finalize_Address if finalization is suppressed.
414 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
415 primitive Finalize_Address if finalization is suppressed.
416
4172011-08-31 Jose Ruiz <ruiz@adacore.com>
418
419 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
420 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
421 sure that the underlying task has already been created before trying
422 to change its affinity.
423 (Set_CPU): Use the term processor instead of CPU, as we do in
424 Assign_Task.
425
4262011-08-31 Vincent Celier <celier@adacore.com>
427
428 * prj-attr.adb: New Compiler attribute Source_File_Switches.
429 * prj-nmsc.adb (Process_Compiler): Process attribute
430 Source_File_Switches.
431 * prj.ads (Language_Config): New name list component
432 Name_Source_File_Switches.
433 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
434
4352011-08-31 Ed Schonberg <schonberg@adacore.com>
436
437 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
438 discriminated component of an actual, expand at once to prevent
439 ouf-of-order references with generated subtypes.
440
4412011-08-31 Yannick Moy <moy@adacore.com>
442
443 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
444 reference to operator in Alfa xrefs.
445
4462011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
447
448 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
449 where the parent instance was frozen before the current instance due to
450 the presence of a source body. Update calls to Insert_After_Last_Decl.
451 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
452 Update the comment which illustrates the purpose of the routine.
453 Package instances are now frozen by source bodies which appear after
454 the instance. This ensures that entities coming from within the
455 instance are available for use in the said bodies.
456 (Install_Body): Add code to handle the case where the parent instance
457 was frozen before the current instance due to the presence of a source
458 body. Update calls to Insert_After_Last_Decl.
459
56812278
AC
4602011-08-31 Jose Ruiz <ruiz@adacore.com>
461
462 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
463 access types.
464 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
465
4662011-08-31 Yannick Moy <moy@adacore.com>
467
468 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
469 full-expander test.
16c3301a
AC
470 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
471 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
472 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
473 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
474 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
475 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
476 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
477 ALFA in Alfa (we dropped acronym).
56812278
AC
478 * einfo.adb (Primitive_Operations): Correctly return list of primitive
479 operations in a case where it returned previously No_Elist.
480
7cda9727
RD
4812011-08-31 Robert Dewar <dewar@adacore.com>
482
483 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
484 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
485 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
486 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
487 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
488 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
489 reformatting.
490
0a190dfd
AC
4912011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
492
493 * sem_ch12 (Check_Private_View): Revert previous change.
494 * sem_res.adb (Conversion_Check): Do not emit the error message if the
495 conversion is in a generic instance.
496
4972011-08-31 Matthew Heaney <heaney@adacore.com>
498
499 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
500 * a-chtgbo.adb (Free): Allow 0 as index value.
501
5022011-08-31 Matthew Heaney <heaney@adacore.com>
503
504 * a-cborma.adb (Insert): Add comment to explain why no element
505 assignment.
506
5072011-08-31 Gary Dismukes <dismukes@adacore.com>
508
509 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
510 spec discriminant is already a concurrent type, in which case just use
511 it, otherwise fetch the Corresponding_Concurrent_Type as before.
512
7d266442
EB
5132011-08-30 Eric Botcazou <ebotcazou@adacore.com>
514
515 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
516 system-linux-mips.ads, system-linux-mipsel.ads,
517 system-linux-mips64el.ads, system-linux-ppc64.ads,
518 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
519
4f1a975c
EB
5202011-08-30 Eric Botcazou <ebotcazou@adacore.com>
521
522 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
523 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
524 (build_unary_op): Likewise.
525
f2991b48
EB
5262011-08-30 Eric Botcazou <ebotcazou@adacore.com>
527
528 * raise-gcc.c: Do not include coretypes.h and tm.h.
529 (setup_to_install): Remove test for compiler macro.
530 * targext.c: Document use for the library.
531 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
532
10a22f43
EB
5332011-08-30 Eric Botcazou <ebotcazou@adacore.com>
534
535 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
536 the expression to the nominal type if the latter is a record type with
537 a variant part and the type of the former is a record type without one.
538
bfa2e39d
AC
5392011-08-30 Yannick Moy <moy@adacore.com>
540
541 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
542 expansion in Alfa mode.
543 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
544 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
545 Alfa mode.
546 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
547 * sem_res.adb: Ditto.
bd34109a 548 * gcc-interface/Make-lang.in: Update dependencies.
bfa2e39d
AC
549
5502011-08-30 Thomas Quinot <quinot@adacore.com>
551
552 * g-socket.ads: Minor documentation adjustment.
553
a0347839
AC
5542011-08-30 Robert Dewar <dewar@adacore.com>
555
556 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
557
5582011-08-30 Yannick Moy <moy@adacore.com>
559
560 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
561 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
562 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
563 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
564 Revert change which introduced files for "light"
565 expansion, to be replaced by a single file for Alfa expansion.
566
3597c0e9
RD
5672011-08-30 Robert Dewar <dewar@adacore.com>
568
569 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
570 Minor code reorg/reformatting.
571
da94696d
AC
5722011-08-30 Yannick Moy <moy@adacore.com>
573
574 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
575 common shorthand for (Expander_Active and not ALFA_Mode) that can be
576 used for testing full expansion, that is active expansion not in the
577 reduced mode for Alfa
578 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
579 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
580 of the verbose (Expander_Active and not ALFA_Mode)
581
5822011-08-30 Tristan Gingold <gingold@adacore.com>
583
584 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
585 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5b8ca141
TG
586 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
587 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
da94696d 588
c199ccf7
AC
5892011-08-30 Gary Dismukes <dismukes@adacore.com>
590
591 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
592 access conversions to check that the conversion is a rewritten node,
593 rather than just having Comes_From_Source set to False, which wasn't
594 sufficient.
595
5962011-08-30 Robert Dewar <dewar@adacore.com>
597
598 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
599 g-socket.ads: Minor reformatting.
600
6012011-08-30 Thomas Quinot <quinot@adacore.com>
602
603 * sem_util.adb: Minor reformatting.
604
6052011-08-30 Tristan Gingold <gingold@adacore.com>
606
607 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
608 to be compliant with the ABI.
609
dff99e1a
AC
6102011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
611
612 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
613 of a designated type when the related access type is an actual in an
614 instance. This ensures that the full view of designated type is
615 available when inside the body of the instance.
616
6172011-08-30 Ed Schonberg <schonberg@adacore.com>
618
619 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
620 in a position to be modified, a slice is treated like an indexed
621 component.
622
63be2a5a
AC
6232011-08-30 Thomas Quinot <quinot@adacore.com>
624
625 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
626 field tv_sec in struct timeval.
627
6282011-08-30 Yannick Moy <moy@adacore.com>
629
630 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
631 blocks of code doing full expansion, previously only guarded by
632 Expander_Active, by anding the test that ALFA_Mode is not set
633
6342011-08-30 Ed Schonberg <schonberg@adacore.com>
635
636 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
637 add the function to the list of private dependents, for subsequent
638 legality check on Taft amendment types.
639 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
640 Private_Dependents, as for other incomplete types.
641 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
642 Taft-amendment type is used as the return type of a function.
643
dd54644b
JM
6442011-08-30 Javier Miranda <miranda@adacore.com>
645
646 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
647 which emits an error by a call to a new routine which report the error.
648 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
649 entity does not cover an existing interface.
650 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
651 code.
652 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
653 protected procedures or entries whose mode is not conformant.
654 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
655 an error by a call to a new routine which report the error.
656
d3ba478e
AC
6572011-08-30 Robert Dewar <dewar@adacore.com>
658
659 * gnat_rm.texi: Minor change.
660 * exp_attr_light.adb: Minor reformatting.
661
6622011-08-30 Ed Schonberg <schonberg@adacore.com>
663
664 * sem_ch3.adb: Patch inheritance of aspects in
665 Complete_Private_Subtype, to avoid infinite loop.
666
c01817d2
AC
6672011-08-30 Javier Miranda <miranda@adacore.com>
668
669 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
670 been reported and a subprogram covering an interface primitive is not
671 found then skip generating the internal entity. Done to avoid crashing
672 the frontend.
673 (Check_Abstract_Overriding): Change text of error of wrong formal of
674 protected subprogram or entry. Done for consistency to emit exactly the
675 same error reported by Check_Synchronized_Overriding. In addition, the
676 error is restricted to protected types (bug found working on AI05-0090)
677
6782011-08-30 Yannick Moy <moy@adacore.com>
679
680 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
681 expansion in Alfa mode.
682 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
683 * exp_light.adb, exp_light.ads: New package defining light expansion.
684 * expander.adb (Expand): Call light expansion in Alfa mode
685 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
686 constructs.
687 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
688 constructs.
689 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
690 * gnat1drv.adb (Adjust_Global_Switches): Comment
691
6922011-08-30 Yannick Moy <moy@adacore.com>
693
694 * lib-xref-alfa.adb: Minor refactoring.
695
6962011-08-30 Yannick Moy <moy@adacore.com>
697
698 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
699 mode.
700 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
701 expansion in Alfa mode.
702 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
703 mode.
704
7052011-08-30 Robert Dewar <dewar@adacore.com>
706
707 * debug_a.adb: Update comment.
708
996c8821
RD
7092011-08-30 Robert Dewar <dewar@adacore.com>
710
711 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
712 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
713 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
714 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
715
7162011-08-30 Robert Dewar <dewar@adacore.com>
717
718 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
719 volatile.
720
3647ca26
HK
7212011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
722
723 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
724 Build_Finalization_Master by supplying an insertion node and enclosing
725 scope. In its old version, the call did not generate a finalization
726 master.
727 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
728 recognize anonymous access-to-controlled components. Rewrite the
729 machinery which creates finalization masters to service anonymous
730 access-to-controlled components of a record type. In its current state,
731 only one heterogeneous master is necessary to handle multiple anonymous
732 components.
733 (Freeze_Type): Comment reformatting.
734 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
735 RE_Unit_Table.
736 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
737 associates TSS primitive Finalize_Address with either the master itself
738 or with the internal hash table depending on the mode of operation of
739 the master.
740
6d4e4fbc
JM
7412011-08-30 Javier Miranda <miranda@adacore.com>
742
743 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
744 interface type then do not generate code to compare this component.
745 Required since they have no components and their equality operator is
746 abstract.
747
d15f9422
AC
7482011-08-30 Steve Baird <baird@adacore.com>
749
750 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
751 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
752 returns the (static) accessibility level of the object. Otherwise, the
753 same as Type_Access_Level.
754 (Dynamic_Accessibility_Level): New function; given an expression which
755 could occur as the rhs of an assignment to a saooaaat (i.e., an
756 expression of an access-to-object type), return the new value for the
757 saooaaat's associated Extra_Accessibility object.
758 (Effective_Extra_Accessibility): New function; same as
759 Einfo.Extra_Accessibility except that object renames are looked through.
760 * sem_util.adb
761 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
762 (Dynamic_Accessibility_Level): New function; see sem_util.ads
763 description.
764 (Effective_Extra_Accessibility): New function; see sem_util.ads
765 description.
766 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
767 (Extra_Accessibility): Update comments.
768 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
769 except RM_Size field (which is only for types) is unaffected.
770 * einfo.adb
771 (Extra_Accessibility): Expand domain to allow objects, not just formals.
772 (Set_Extra_Accessibility): Expand domain to allow objects, not just
773 formals.
774 (Init_Size): Add assertion that we are not trashing the
775 Extra_Accessibility attribute of an object.
776 (Init_Size_Align): Add assertion that we are not trashing the
777 Extra_Accessibility attribute of an object.
778 (Init_Object_Size_Align): New procedure; see einfo.ads description.
779 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
780 differently for the type of a (non-library-level) saooaaat depending
781 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
782 is queried in this set of changes - everything else (in particular,
783 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
784 driven off of the setting of the Is_Local_Anonymous_Access attribute.
785 The special treatment of library-level saooaaats is an optimization,
786 not required for correctnesss. This is based on the observation that the
787 Ada2012 rules (static and dynamic) for saooaaats turn out to be
788 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
789 * exp_ch3.adb
790 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
791 false for the type of a saooaaat, declare and initialize its
792 accessibility level object and set the Extra_Accessibility attribute
793 of the saooaaat to refer to this object.
794 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
795 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
796 calls to Effective_Extra_Accessibility in order to support
797 renames of saooaaats.
798 (Expand_N_Type_Conversion): Add new local function,
799 Has_Extra_Accessibility, and call it when determining whether an
800 accessibility check is needed.
801 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
802 evaluate to True (without raising an exception).
803 * exp_ch5.adb
804 (Expand_N_Assignment_Statement): When assigning to an Ada2012
805 saooaaat, update its associated Extra_Accessibility object (if
806 it has one). This includes an accessibility check.
807 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
808 a saooaaat, update its Extra_Accessibility object too (if it
809 has one).
810 (Expand_Call): Replace a couple of calls to Type_Access_Level
811 with calls to Dynamic_Access_Level to handle cases where
812 passing a literal (any literal) is incorrect.
813 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
814 checks associated with "Saooaat := Some_Object'Access;"; this must
815 be rejected if Some_Object is declared in a more nested scope
816 than Saooaat.
817 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
818 assignment to a saooaaat even if Is_Local_Anonymous_Access
819 returns False for its type (indicating a 2012-style saooaaat).
820 * sem_ch8.adb
821 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
822 (which is only appropriate for objects, not types) with a call
823 of Init_Object_Size_Align in order to avoid trashing the
824 Extra_Accessibility attribute of a rename (the two attributes
825 share storage).
826 * sem_res.adb
827 (Valid_Conversion) Replace six calls to Type_Access_Level with
828 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
829 Ada2012 non-library-level saooaaat, the former returns library level
830 while the latter returns the (static) accessibility level of the
831 saooaaat. A type conversion to the anonymous type of a saooaaat
832 can only occur as part of an assignment to the saooaaat, so we
833 know that such a conversion must be in a lhs context, so Deepest
834 yields the result that we need. If such a conversion could occur,
835 say, as the operand of an equality operator, then this might not
836 be right. Also add a test so that static accessibilty checks are
837 performed for converting to a saooaaat's type even if
838 Is_Local_Anonymous_Access yields False for the type.
839
8402011-08-30 Javier Miranda <miranda@adacore.com>
841
842 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
843 controls generation of a warning associated with late declaration of
844 dispatching functions. Required to avoid generating spurious
845 warnings.
846
6cce2156
GD
8472011-08-30 Gary Dismukes <dismukes@adacore.com>
848
849 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
850 return object has an anonymous access type and the function's type is
851 a named access type.
852 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
853 conversions on implicit conversions, since such conversions can occur
854 for anonymous access cases due to expansion. Issue error for attempt
855 to rename an anonymous expression as an object of a named access type.
856 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
857 to indicate whether this function should report errors on invalid
858 conversions.
859 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
860 the expression is of an anonymous access type and the expected type is
861 a named general access type, rewrite the expression as a type
862 conversion, unless this is an expression of a membership test.
863 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
864 calling of Error_Msg_N on new formal Report_Errs.
865 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
866 calling of Error_Msg_NE on new formal Report_Errs.
867 (Valid_Conversion): Move declaration of this function to the package
868 spec, to allow calls from membership test processing. For Ada 2012,
869 enforce legality restrictions on implicit conversions of anonymous
870 access values to general access types, disallowing such conversions in
871 cases where the expression has a dynamic accessibility level (access
872 parameters, stand-alone anonymous access objects, or a component of a
873 dereference of one of the first two cases).
874 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
875 in the context of a named general access expected type.
876 * exp_ch4.adb Add with and use of Exp_Ch2.
877 (Expand_N_In): Add processing for membership tests applied to
878 expressions of an anonymous access type. First, Valid_Conversion is
879 called to check whether the test is statically False, and then the
880 conversion is expanded to test that the expression's accessibility
881 level is no deeper than that of the tested type. In the case of
882 anonymous access-to-tagged types, a tagged membership test is applied
883 as well.
884 (Tagged_Membership): Extend to handle access type cases, applying the
885 test to the designated types.
886 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
887 accessibility level, and the actual is a 'Access applied to a current
888 instance, pass the accessibility level of the type of the current
889 instance rather than applying Object_Access_Level to the prefix. Add a
890 ??? comment, since this level isn't quite right either (will eventually
891 need to pass an implicit level parameter to init procs).
892
747de90b
AC
8932011-08-30 Bob Duff <duff@adacore.com>
894
895 * s-taskin.ads: Minor comment fix.
896
8972011-08-30 Ed Schonberg <schonberg@adacore.com>
898
899 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
900 component and the selector is a dispatching operation, check if it is
901 a prefixed call before rewriting as a parameterless function call.
902
cdc4cc65
JJ
9032011-08-29 Jakub Jelinek <jakub@redhat.com>
904
905 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
906 tsystem.h into $(RTSDIR) instead of rts.
907
226a7fa4
AC
9082011-08-29 Robert Dewar <dewar@adacore.com>
909
910 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
911 reformatting.
912 * gcc-interface/Make-lang.in: Update dependencies.
913
9142011-08-29 Yannick Moy <moy@adacore.com>
915
916 * alfa.ads (Name_Of_Heap_Variable): New constant name.
917 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
918 table to hold dereferences.
919 (Add_ALFA_Xrefs): Take into account dereferences as special
920 reads/writes to the variable "HEAP".
921 (Enclosing_Subprogram_Or_Package): Move subprogram here.
922 (Generate_Dereference): New procedure to store a read/write dereferencew
923 in the table Drefs.
924 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
925 the special "HEAP" var.
926 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
927 in ALFA mode.
928 * sem_util.adb (Note_Possible_Modification): Store write dereference
929 in ALFA mode.
930
dfbcb149
HK
9312011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
932
933 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
934 ensures that the level of the subpool access type is not deeper than
935 that of the pool object.
936 * sem_util.adb (Object_Access_Level): Expand to handle defining
937 identifiers.
938 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
939 subpool handle name of a rewritten allocator.
940
1df4f514
AC
9412011-08-29 Robert Dewar <dewar@adacore.com>
942
943 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
944
9452011-08-29 Thomas Quinot <quinot@adacore.com>
946
947 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
948 values, we generate multiple triples of parameters in the TypeCode.
949 Bump Choice_Index for each such triple so that a subsequent default
950 choice is associated with the correct index in the typecode.
951
9522011-08-29 Ed Schonberg <schonberg@adacore.com>
953
954 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
955 container.
956 (First, Last): Handle properly an iterator over a null container.
957
9582011-08-29 Bob Duff <duff@adacore.com>
959
960 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
961 processing if we run across a node with no Scope. This can happen if
962 we're with-ing an library-level instance, and that instance got errors
963 that caused "instantiation abandoned".
964 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
965 an exception instead of using Assert, so it won't go into an infinite
966 loop, even when assertions are turned off.
967
9682011-08-29 Ed Schonberg <schonberg@adacore.com>
969
970 * a-coorse.adb: Proper handling of empty ordered sets.
971
14f0f659
AC
9722011-08-29 Johannes Kanig <kanig@adacore.com>
973
974 * debug.adb: Add comments.
975
8027b455
AC
9762011-08-29 Thomas Quinot <quinot@adacore.com>
977
978 * a-except.adb, a-except-2005.adb: Minor comment rewording and
979 reformatting.
980
9812011-08-29 Yannick Moy <moy@adacore.com>
982
983 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
984 declaration for Itypes in Alfa mode.
985
d85fd922
AC
9862011-08-29 Robert Dewar <dewar@adacore.com>
987
988 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
989 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
990 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
991 reformatting.
992
9932011-08-29 Tristan Gingold <gingold@adacore.com>
994
995 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
996 package spec.
997 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
998 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
999 while raising PE.
1000
fd3d2680
AC
10012011-08-29 Robert Dewar <dewar@adacore.com>
1002
1003 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1004
10052011-08-29 Javier Miranda <miranda@adacore.com>
1006
1007 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1008 renamings of formal subprograms when the actual for a formal type is
1009 class-wide.
1010
dfbf013f
MH
10112011-08-29 Matthew Heaney <heaney@adacore.com>
1012
1013 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1014 to Target.
1015
10162011-08-29 Matthew Heaney <heaney@adacore.com>
1017
1018 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1019 components of record type.
1020 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1021 to Target.
1022
a6dd3a54
ES
10232011-08-29 Ed Schonberg <schonberg@adacore.com>
1024
1025 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1026 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1027 container packages.
1028
c54796e0
AC
10292011-08-29 Robert Dewar <dewar@adacore.com>
1030
1031 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1032 reformatting.
1033
10342011-08-29 Matthew Heaney <heaney@adacore.com>
1035
1036 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1037 components of record type.
1038
10392011-08-29 Bob Duff <duff@adacore.com>
1040
1041 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1042 by the termination handler.
1043
9fd9d2be
AC
10442011-08-29 Yannick Moy <moy@adacore.com>
1045
1046 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1047 created in Alfa mode, instead of inserting artificial declarations of
1048 non-Itypes in the tree.
1049 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1050 know if an Itype has a corresponding declaration, as defined in
1051 itypes.ads.
1052
10532011-08-29 Yannick Moy <moy@adacore.com>
1054
1055 * gnat1drv.adb: Minor rewrite.
1056
10572011-08-29 Bob Duff <duff@adacore.com>
1058
1059 * s-tasuti.adb (Make_Passive): Work around race condition in
1060 Make_Independent, which can cause Wait_Count to be zero. So instead of
1061 asserting that Wait_Count > 0, and then decrementing it, decrement it
1062 only if Wait_Count > 0.
1063 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1064 should be nonnegative, so declare them Natural instead of Integer.
1065
833eaa8a
AC
10662011-08-29 Robert Dewar <dewar@adacore.com>
1067
1068 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1069 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1070 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1071 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1072 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1073
10742011-08-29 Tristan Gingold <gingold@adacore.com>
1075
1076 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1077
10782011-08-29 Vadim Godunko <godunko@adacore.com>
1079
1080 * s-parint.ads: Minor comment clarification.
1081
10822011-08-29 Vincent Celier <celier@adacore.com>
1083
1084 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1085 may be used as identifiers.
1086
10872011-08-29 Ed Schonberg <schonberg@adacore.com>
1088
1089 * a-coinho.ads: Minor reformating.
1090
3a613a36
AC
10912011-08-29 Ed Schonberg <schonberg@adacore.com>
1092
1093 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1094 container of a derived type.
1095
3a613a36
AC
10962011-08-29 Ed Schonberg <schonberg@adacore.com>
1097
1098 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1099 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1100
14848f57
AC
11012011-08-29 Pascal Obry <obry@adacore.com>
1102
1103 * exp_disp.adb: Minor comment fix.
1104 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1105 to avoid warnings when compiling with -Wall.
1106 (Make_Disp_Conditional_Select_Body): Likewise.
1107 (Make_Disp_Timed_Select_Body): Likewise.
1108
11092011-08-29 Ed Schonberg <schonberg@adacore.com>
1110
1111 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1112 an entity name, generate reference for it.
1113
11142011-08-29 Ed Schonberg <schonberg@adacore.com>
1115
1116 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1117 iterator form.
1118 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1119 the class-wide type.
1120 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1121
11222011-08-29 Ed Schonberg <schonberg@adacore.com>
1123
1124 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1125 subtype for an object whose type is an unconstrained union.
1126
11272011-08-29 Ed Schonberg <schonberg@adacore.com>
1128
1129 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1130 is allowed in a component definition, by AI95-406.
1131
11322011-08-29 Matthew Heaney <heaney@adacore.com>
1133
1134 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1135
11362011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1137
1138 * a-except-2005.adb: Alphabetize all routines.
1139 (Triggered_By_Abort): New routine.
1140 * a-except-2005.ads (Triggered_By_Abort): New routine.
1141 * a-except.adb Alphabetize all routines.
1142 (Triggered_By_Abort): New routine.
1143 * a-except.ads (Triggered_By_Abort): New routine.
1144 * exp_ch7.adb: Update all comments involving the detection of aborts in
1145 finalization code.
1146 (Build_Object_Declarations): Do not generate code to detect the
1147 presence of an abort at the start of finalization code, use a runtime
1148 routine istead.
1149 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1150 RE_Unit_Table.
1151 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1152 allocate a task on a subpool.
1153 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1154 The flag disables all actions related to the maintenance of
1155 Finalize_Address_Table when subpools are not in use.
1156 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1157 use.
1158 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1159 performs costly task locking when subpools are not in use.
1160
57a8057a
AC
11612011-08-29 Yannick Moy <moy@adacore.com>
1162
1163 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1164 types and dispatching calls in Alfa mode.
1165 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1166 correspondance between body and spec scopes, to reuse utility functions
1167 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1168 by testing the presence of the library unit for the body
1169 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1170 mode the expansion of accept statements is skipped
1171 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1172 the unique entity corresponding to the one returned by
1173 Unique_Defining_Entity applied to the enclosing declaration of the
1174 argument.
1175
11762011-08-29 Bob Duff <duff@adacore.com>
1177
1178 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1179 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1180 an alias for pn. ppp is an alias for pt.
1181
11822011-08-29 Javier Miranda <miranda@adacore.com>
1183
1184 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1185 aggregate to take a consistent decision on the need to convert into
1186 assignments aggregates that initialize constant objects.
1187
11882011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1189
1190 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1191 Build_Allocate_Deallocate_Proc in order to handle allocation of
1192 non-controlled objects on subpools.
1193 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1194 to be end-user visible.
1195 * s-finmas.adb: Add with and use clause for System.HTable.
1196 Add an instantiation of Simple_HTable which provides a mapping between
1197 the address of a controlled object and the corresponding
1198 Finalize_Address used to clean up the object. The table is used when a
1199 master is operating in heterogeneous mode.
1200 (Attach): Explain why the input node is not verified on being already
1201 attached.
1202 (Delete_Finalize_Address): New routine.
1203 (Detach): Add pragma Assert which ensures that a node is already
1204 attached.
1205 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1206 since nodes are no longer removed on traversal. Explain why node
1207 detachment is undesirable in this case.
1208 (Get_Finalize_Address): New routine.
1209 (Hash): New routine.
1210 (Is_Empty_List): Removed.
1211 (pm): Renamed to Print_Master. Add output for discriminant
1212 Is_Homogeneous.
1213 Comment reformatting.
1214 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1215 * s-finmas.ads: Various comments additions / improvements.
1216 Type Finalization_Master has a discriminant which determines the mode of
1217 operation.
1218 (Delete_Finalize_Address): New routine.
1219 (Get_Finalize_Address): New routine.
1220 (pm): Renamed to Print_Master.
1221 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1222 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1223 use clause for System.IO.
1224 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1225 Finalize_Address depending on the mode of allocation and the mode of
1226 the master.
1227 (Deallocate_Any_Controlled): Remove the relation pair object -
1228 Finalize_Address regardless of the master mode. Add comment explaining
1229 the reason.
1230 (Detach): Ensure that fields Prev and Next are null after detachment.
1231 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1232 scheme to check whether the list of subpools is empty. There is no
1233 longer need to store the next subpool or advance the current pointer.
1234 (Is_Empty_List): New routine.
1235 (Print_Pool): New routine.
1236 (Print_Subpool): New routine.
1237 * s-stposu.ads: Various comments additions / improvements.
1238 Field Master of type Root_Subpool is now a heterogeneous collection.
1239 (Print_Pool): New routine.
1240 (Print_Subpool): New routine.
1241
12422011-08-29 Ed Schonberg <schonberg@adacore.com>
1243
1244 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1245 forms, using aspects of container types.
1246 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1247 Has_Implicit_Dereference flags, that may be set on the partial view.
1248 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1249 container type with an indexing aspect.
1250 (Analyze_Quantified_Expression): Analyze construct with expansion
1251 disabled, because it will be rewritten as a loop during expansion.
1252 (Try_Container_Indexing): The prefix itself may be a container type
1253 with an indexing aspect, as with a vector of vectors.
1254 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1255 the original doamin of iteration, for name capture.
1256 (Analyze_Iterator_Specification): If the domain is an expression that
1257 needs finalization, create a separate declaration for it.
1258 For an iterator with "of" retrieve default iterator info from aspect of
1259 container type. For "in" iterator, retrieve type of Iterate function.
1260 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1261 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1262 analysis, to prevent spurious errors about late attributes.
1263 * sprint.adb: Handle quantified expression with either loop or iterator
1264 specification.
1265 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1266 iterator.
1267
ddf67a1d
AC
12682011-08-29 Vincent Celier <celier@adacore.com>
1269
1270 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1271 Binder or Linker of the main project file.
1272
12732011-08-29 Ed Schonberg <schonberg@adacore.com>
1274
1275 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1276 unit.
1277
12782011-08-29 Yannick Moy <moy@adacore.com>
1279
1280 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1281
12822011-08-29 Yannick Moy <moy@adacore.com>
1283
1284 * exp_ch11.adb: Minor expansion of comment.
1285
12862011-08-29 Yannick Moy <moy@adacore.com>
1287
1288 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1289
12902011-08-29 Ed Schonberg <schonberg@adacore.com>
1291
1292 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1293 interpretation, set the type before resolving the operands, because
1294 legality checks on an exponention operand need to know the type of the
1295 context.
1296
12972011-08-29 Ed Schonberg <schonberg@adacore.com>
1298
1299 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1300 cleanups on a master if the instance is within a generic unit.
1301 Complement to the corresponding fix to inline.adb for K520-030.
1302
13032011-08-29 Tristan Gingold <gingold@adacore.com>
1304
1305 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1306 occurrence.
1307 * exp_intr.adb: Minor comment fix.
1308
13092011-08-29 Bob Duff <duff@adacore.com>
1310
1311 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1312 Delay_Required was used as an uninitialized variable.
1313
690943fc
RD
13142011-08-29 Robert Dewar <dewar@adacore.com>
1315
1316 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1317 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1318 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1319
9f0ee988
TQ
13202011-08-29 Thomas Quinot <quinot@adacore.com>
1321
1322 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1323 Remove unused variables.
1324
3e24afaa
AC
13252011-08-29 Ed Schonberg <schonberg@adacore.com>
1326
1327 * sem_res.adb: Remove Build_Explicit_Dereference.
1328 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1329 from sem_res.adb, used in analysis of additional constructs.
1330 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1331 expansion of iterators.
1332 (Is_Object_Reference): Recognize variables rewritten as explicit
1333 dereferences in Ada2012.
1334 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1335 Reversible_Iterator names, for expansion of Ada2012 iterators.
1336 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1337 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1338 linked list container.
1339 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1340 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1341
13422011-08-29 Ed Schonberg <schonberg@adacore.com>
1343
1344 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1345 containers.
1346
13472011-08-29 Vincent Celier <celier@adacore.com>
1348
1349 * make.adb (Gnatmake): Get the maximum number of simultaneous
1350 compilation processes after the Builder switches has been scanned, as
1351 there may include -jnn.
1352
13532011-08-29 Matthew Heaney <heaney@adacore.com>
1354
1355 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1356
13572011-08-29 Tristan Gingold <gingold@adacore.com>
1358
1359 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1360 GNAT_DRIVER_COMMAND_LINE to 255.
1361
13622011-08-29 Pascal Obry <obry@adacore.com>
1363
1364 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1365 reformatting and style fix (class attribute casing).
1366
13672011-08-29 Yannick Moy <moy@adacore.com>
1368
1369 * exp_ch11.adb: Yet another case where expansion should be common
1370 between CodePeer and Alfa.
1371
13722011-08-29 Yannick Moy <moy@adacore.com>
1373
1374 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1375
13762011-08-29 Ed Schonberg <schonberg@adacore.com>
1377
1378 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1379 incomplete type and its completion match.
1380
3ddd922e
AC
13812011-08-29 Yannick Moy <moy@adacore.com>
1382
1383 * exp_ch13.adb: Adjust previous change.
1384
13852011-08-29 Robert Dewar <dewar@adacore.com>
1386
1387 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1388 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1389 Minor reformatting.
1390
444acbdd
AC
13912011-08-29 Emmanuel Briot <briot@adacore.com>
1392
1393 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1394 initialize aggregated projects.
1395
13962011-08-29 Ed Schonberg <schonberg@adacore.com>
1397
1398 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1399 depth of candidates to resolve a potentially spurious ambiguity between
1400 two visible subprograms.
1401
e0296583
AC
14022011-08-29 Yannick Moy <moy@adacore.com>
1403
1404 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1405 Requires/Ensures.
1406 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1407 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1408 Requires/Ensures.
1409
14102011-08-29 Arnaud Charlet <charlet@adacore.com>
1411
1412 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1413 Add comment.
1414
14152011-08-29 Thomas Quinot <quinot@adacore.com>
1416
1417 * sem_res.adb: Minor reformatting.
1418
69794413
JK
14192011-08-29 Johannes Kanig <kanig@adacore.com>
1420
1421 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1422 mode.
1423 * gnat1drv.adb (Adjust_Global_Switches): Set
1424 Use_Expressions_With_Actions to False in ALFA mode.
1425 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1426 ALFA mode.
1427
59e6b23c
AC
14282011-08-29 Yannick Moy <moy@adacore.com>
1429
1430 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1431 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1432 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1433 tagged types and dispatching calls in Alfa mode.
1434
14352011-08-29 Javier Miranda <miranda@adacore.com>
1436
1437 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1438 we do not report an error on an Empty node.
1439
14402011-08-29 Geert Bosch <bosch@adacore.com>
1441
1442 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1443 a-nlrear.o and a-nurear.o.
1444
14452011-08-29 Robert Dewar <dewar@adacore.com>
1446
1447 * freeze.adb: Minor code reorganization.
1448 Minor reformatting.
1449 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1450 sem_ch6.adb: Minor reformatting
1451
14522011-08-29 Tristan Gingold <gingold@adacore.com>
1453
1454 * s-except.ads, s-except.adb: Provide dummy body.
1455
14562011-08-29 Yannick Moy <moy@adacore.com>
1457
1458 * sem_warn.adb (Within_Postcondition): Take into account the case of
1459 an Ensures component in a Test_Case.
1460
4d792549
AC
14612011-08-29 Tristan Gingold <gingold@adacore.com>
1462
1463 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1464 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1465 System_Exceptions_Debug
1466 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1467 * a-except.adb: With and use System.Exceptions_Debug instead of
1468 System.Exceptions.
1469 * a-except-2005.adb: Likewise.
1470 * s-assert.adb: Likewise.
1471 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1472 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1473 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1474 s-excdeb. Update dependencies.
1475 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1476 as these no longer need external libraries.
1477
14782011-08-29 Ed Schonberg <schonberg@adacore.com>
1479
1480 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1481 exponentiation operator on universal values in a context that requires
1482 a fixed-point type.
1483
14842011-08-29 Tristan Gingold <gingold@adacore.com>
1485
1486 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1487 before calling notify_handled_exception.
1488 * a-exextr.adb: Fix comment.
1489
b254da66
AC
14902011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1491
1492 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1493 Finalize_Address of the access type's finalization master.
1494 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1495 access type's finalization master. Add a guard to prevent
1496 Associated_Storage_Pool from being set on .NET/JVM.
1497 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1498 attribute Finalize_Address of the access type's finalization master.
1499 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1500 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1501 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1502 RE_Unit_Table.
1503 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1504 use clause for System.IO
1505 (Detach): Relax the assertion, to be reinstated later.
1506 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1507 Relax the assertion on Finalize_Address, to be reinstated later.
1508 (Is_Empty_List): New routine.
1509 (pm): New debug routine.
1510 (Set_Finalize_Address): New routine.
1511 * s-finmas.ads (pm): New debug routine.
1512 (Set_Finalize_Address): New routine.
1513 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1514
15152011-08-29 Tristan Gingold <gingold@adacore.com>
1516
1517 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1518 Remove convention C.
1519
15202011-08-29 Tristan Gingold <gingold@adacore.com>
1521
1522 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1523 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1524 (Finalize_TCB): Remove its finalization.
1525 (Initialize): Remove assignment of GET_Exc_Stack_Addr
1526 * s-soflin.adb (NT_Exc_Stack): Remove
1527 (Get_Exc_Stack_Addr_NT): Likewise.
1528 (Get_Exc_Stack_Addr_Soft): Likewise.
1529 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1530 (Get_Exc_Stack_Addr): Likewise.
1531 (Get_Exc_Stack_Addr_Soft): Likewise
1532 * s-taspri-vms.ads (Exc_Stack_T): Remove.
1533 (Exc_Stack_Ptr_T): Likewise.
1534 (Private_Data): Remove Exc_Stack_Ptr component.
1535
15362011-08-29 Tristan Gingold <gingold@adacore.com>
1537
1538 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1539
15402011-08-29 Tristan Gingold <gingold@adacore.com>
1541
1542 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1543
15442011-08-29 Geert Bosch <bosch@adacore.com>
1545
1546 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1547 L2_Norm, Swap_Column): New generic subprograms
1548 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1549 L2_Norm, Swap_Column): Implement new subprograms in order to
1550 eliminate dependency on BLAS and LAPACK libraries in
1551 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1552 version. Forward_Eliminate/Back_Substitute can be used to put a
1553 matrix in row echelon or reduced row echelon form using partial
1554 pivoting.
1555 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1556 Swap_Column): Instantiate from System.Generic_Array_Operations.
1557 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1558 (Sqrt): Local function for simple computation of square root without
1559 adding dependencies on Generic_Elementary_Functions.
1560 (Swap): New subprogram to exchange floating point numbers.
1561 (Inverse): Reimplement using Jordan-Gauss elimination.
1562 (Jacobi): New procedure implementing Jacobi's method for computation
1563 of eigensystems, based on Rutishauser's implementation.
1564 (L2_Norm): Implement directly using the inner product.
1565 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1566 decreasing eigenvalue as required by the Ada RM.
1567 (Swap_Column): New helper procedure for Sort_Eigensystem.
1568 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1569 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1570 Sort_Eigensystems.
1571
15722011-08-29 Thomas Quinot <quinot@adacore.com>
1573
1574 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1575 statements line.
1576
60370fb1
AC
15772011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1578
1579 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1580 than the current node.
1581 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1582 Finalization_Master. The list headers have two fields instead of three.
1583 This should fix alignment issue but subpool allocations are now
1584 unusable. Alphabetize subprograms.
1585 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1586 the size of the header when converting the beginning of the object to
1587 a FM_Node. Set the master's Finalize_Address attribute if not already
1588 set.
1589 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1590 header when converting the beginning of the object to a FM_Node.
1591
15922011-08-29 Gary Dismukes <dismukes@adacore.com>
1593
1594 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1595 reraise when compiling for CodePeer.
1596
15972011-08-29 Arnaud Charlet <charlet@adacore.com>
1598
1599 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1600 now needed by a-convec.adb. Fix warning.
1601
16022011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1603
1604 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1605 processing of TSS routine Finalize_Address when compiling in
1606 CodePeer_Mode.
1607
16082011-08-29 Thomas Quinot <quinot@adacore.com>
1609
1610 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1611 sem_warn.adb: Minor reformatting.
1612
16132011-08-29 Emmanuel Briot <briot@adacore.com>
1614
1615 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1616 languages from aggregated projects.
1617
16182011-08-29 Yannick Moy <moy@adacore.com>
1619
1620 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1621 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1622 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1623 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1624 for stubs are traversed too when parameter is set
1625 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1626 (Traverse_Declarations_Or_Statements): Do the special traversing for
1627 stubs when required.
1628 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1629 return subprogram or package body from stub.
1630 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1631 stubs without prior subprogram decl.
1632
16332011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1634
1635 * gnat_ugn.texi: Fix typo.
1636
e9c9d122
HK
16372011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1638
1639 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1640 which accounts for size vs alignment issues and calculates the size of
1641 the list header.
1642 (Deallocate_Any_Controlled): Ditto.
1643 (Nearest_Multiple_Rounded_Up): New routine.
1644
25ebc085
AC
16452011-08-29 Tristan Gingold <gingold@adacore.com>
1646
1647 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1648 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1649 (Set_Exception_Msg): Ditto.
1650 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1651 Private_Data.
1652 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1653 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1654 (Raise_With_Msg): Remove Cleanup_Flag.
1655 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1656 Clean_Flag and Private_Data components.
1657
16582011-08-29 Yannick Moy <moy@adacore.com>
1659
1660 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1661 in CodePeer mode.
1662 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1663 of an explicitly declared type, so that the base types of the original
1664 type and this generated type are the same, and a "type" (not a subtype
1665 like previously).
1666 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1667 small" in Alfa mode, like in CodePeer mode.
1668 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1669 clauses in Alfa mode.
1670
16712011-08-29 Javier Miranda <miranda@adacore.com>
1672
1673 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1674 function to the package spec.
1675 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1676 internally generated bodies of null procedures locate the internally
1677 generated spec enforcing mode conformance.
1678 (Is_Interface_Conformant): Ensure that the controlling formal of the
1679 primitives match.
1680
16812011-08-29 Ed Schonberg <schonberg@adacore.com>
1682
1683 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1684 reject the pragma if it appears to apply to a formal subprogram.
1685
16862011-08-29 Ed Schonberg <schonberg@adacore.com>
1687
1688 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1689 inner expression, to prevent double evaluation.
1690
590549fb
AC
16912011-08-29 Tristan Gingold <gingold@adacore.com>
1692
1693 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1694 they were unused.
1695 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1696 * a-except-2005.adb (Propagate_Exception): Adjust spec.
1697 (Raise_Current_Excep): Adjust call.
1698 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1699
17002011-08-29 Thomas Quinot <quinot@adacore.com>
1701
1702 * exp_disp.adb: Minor reformatting.
1703
62380e66
TG
17042011-08-29 Tristan Gingold <gingold@adacore.com>
1705
1706 * a-exexpr.adb (Setup_Exception): Removed.
1707 * a-exexpr-gcc.adb (Setup_Exception): Removed.
1708 * a-except.adb (Exception_Propagation): Removed.
1709 * a-except-2005.adb (Setup_Exception): Removed.
1710 (Reraise): Remove call to Setup_Exception.
1711 (Reraise_Occurrence): Ditto.
1712 (Reraise_Occurrence_Always): Ditto.
1713 (Reraise_Occurrence_No_Defer): Ditto.
1714 (Transfer_Occurrence): Ditto.
1715 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1716 (Set_Exception_Msg): Ditto.
1717
c95aa61c
AC
17182011-08-29 Robert Dewar <dewar@adacore.com>
1719
1720 * a-convec.adb, exp_disp.adb: Minor reformatting.
1721
17222011-08-29 Tristan Gingold <gingold@adacore.com>
1723
1724 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1725
624e1688
AC
17262011-08-29 Gary Dismukes <dismukes@adacore.com>
1727
1728 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1729 Exception_Handlers to No_List instead of Empty_List in the case where
1730 there are no handlers.
1731
17322011-08-29 Tristan Gingold <gingold@adacore.com>
1733
1734 * gcc-interface/gigi.h (enum standard_datatypes): Add
1735 ADT_reraise_zcx_decl
1736 (reraise_zcx_decl): New macro.
1737 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1738 (gigi): Set reraise_zcx_decl.
1739 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1740 (gnat_to_gnu): Handle N_Raise_Statement.
1741
7134062a
AC
17422011-08-29 Robert Dewar <dewar@adacore.com>
1743
1744 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1745 a-undesu.adb: Minor reformatting.
1746
17472011-08-29 Ed Schonberg <schonberg@adacore.com>
1748
1749 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1750 table, accept an unfrozen untagged component if it is an actual for a
1751 formal incomplete type.
1752 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1753 provide new iterator forms over vectors.
1754 Introduce type Iterator in package body to implement operations of
1755 Reversible_Iterator interface.
1756 * a-iteint.ads: Make package pure so it is usable with new container
1757 packages, that are categorized Remote_Types.
1758
ca5af305
AC
17592011-08-29 Robert Dewar <dewar@adacore.com>
1760
1761 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1762
17632011-08-29 Bob Duff <duff@adacore.com>
1764
1765 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1766 of <>, because this is the routine that checks for dimensionality
1767 errors (for example, for a two-dimensional array, (others => <>) should
1768 be (others => (others => <>)).
1769
17702011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1771
1772 * impunit.adb: Add new run-time units.
1773 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1774 s-stposu.ads, s-stposu.adb: Code clean up.
1775 Handle protected class-wide or task class-wide types
1776 Handle C/C++/CIL/Java types.
1777 * s-spsufi.adb, s-spsufi.ads: New files.
1778
5accd7b6
AC
17792011-08-29 Yannick Moy <moy@adacore.com>
1780
1781 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1782 library-level subprogram.
1783 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1784 placement.
1785 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1786 component.
1787 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1788 component.
1789 * gnat_rm.texi: Update doc for Test_Case pragma.
1790
17912011-08-29 Tristan Gingold <gingold@adacore.com>
1792
1793 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
1794 convention C.
1795 (GCC_Exception_Access): New type.
1796 (Unwind_DeleteException): New imported procedure
1797 (Foreign_Exception): Import it.
1798 (GNAT_GCC_Exception): Simply have the occurrence inside.
1799 (To_GCC_Exception): New function.
1800 (To_GNAT_GCC_Exception): New function.
1801 (GNAT_GCC_Exception_Cleanup): New procedure..
1802 (Propagate_GCC_Exception): New procedure.
1803 (Reraise_GCC_Exception): New procedure.
1804 (Setup_Current_Excep): New procedure.
1805 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
1806 (Unwind_RaiseException): Ditto.
1807 (Unwind_ForcedUnwind): Ditto.
1808 (Remove): Removed.
1809 (Begin_Handler): Change type of parameter.
1810 (End_Handler): Ditto. Now delete the exception if still present.
1811 (Setup_Key): Removed.
1812 (Is_Setup_And_Not_Propagated): Removed.
1813 (Set_Setup_And_Not_Propagated): Ditto.
1814 (Clear_Setup_And_Not_Propagated): Ditto.
1815 (Save_Occurrence_And_Private): Ditto.
1816 (EID_For): Add 'not null' constraint on parameter.
1817 (Setup_Exception): Does nothing.
1818 (Propagate_Exception): Simplified.
1819 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
1820 re-raise is not expanded anymore.
1821 * s-except.ads (Foreign_Exception): New exception - placeholder for
1822 non Ada exceptions.
1823 * raise-gcc.c (__gnat_setup_current_excep): Declare
1824 (CXX_EXCEPTION_CLASS): Define (not yet used)
1825 (GNAT_EXCEPTION_CLASS): Define.
1826 (is_handled_by): Handle foreign exceptions.
1827 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
1828
18292011-08-29 Jose Ruiz <ruiz@adacore.com>
1830
1831 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
1832
2ef48385
AC
18332011-08-29 Thomas Quinot <quinot@adacore.com>
1834
1835 * a-synbar-posix.adb: Minor reformatting.
1836
18372011-08-29 Jose Ruiz <ruiz@adacore.com>
1838
1839 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
1840 a-exetim-default.ads (Interrupt_Clocks_Supported,
1841 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1842 definitions to be compliant with AI-0171. The target systems do not
1843 support separate account for the execution time of interrupt handlers.
1844
18452011-08-29 Jose Ruiz <ruiz@adacore.com>
1846
1847 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
1848 in the barrier to put first the easiest to evaluate (and the one which
1849 will be True more often). More efficient.
1850
18512011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1852
1853 * s-atocou-x86.adb: Fix constraint in machine code insertion.
1854
18552011-08-29 Bob Duff <duff@adacore.com>
1856
1857 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
1858 attributes that are now aspects, as specified by AI05-0229-1.
1859 * sem_ch13.adb (Analyze_Aspect_Specifications,
1860 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
1861 pragmas or attribute references, as appropriate.
1862
0db16b1e
AC
18632011-08-29 Robert Dewar <dewar@adacore.com>
1864
1865 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
1866 a-synbar-posix.ads: Minor reformatting.
1867
18682011-08-29 Yannick Moy <moy@adacore.com>
1869
1870 * snames.ads-tmpl: Add name Force.
1871
978ffe02
AC
18722011-08-29 Pascal Obry <obry@adacore.com>
1873
1874 * prj-nmsc.adb: Minor reformatting.
1875
18762011-08-29 Jose Ruiz <ruiz@adacore.com>
1877
1878 * a-exetim.ads (Interrupt_Clocks_Supported,
1879 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1880 definitions to be compliant with AI-0171.
1881
18822011-08-29 Robert Dewar <dewar@adacore.com>
1883
1884 * a-ngelfu.adb: Add comments.
1885
718f39dc
AC
18862011-08-29 Geert Bosch <bosch@adacore.com>
1887
1888 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
1889 the closest machine number to Pi / 2.0.
1890
18912011-08-29 Jose Ruiz <ruiz@adacore.com>
1892
1893 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
1894 package Ada.Synchronous_Barriers.
1895 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
1896 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
1897 default implementation using protected objects and another one
1898 a-synbar-posix using POSIX barriers as the underlying support.
1899 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
1900 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
1901 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
1902 Clean up dependencies.
1903 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
1904
ee2e3f6b
AC
19052011-08-29 Robert Dewar <dewar@adacore.com>
1906
1907 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1908 exp_dist.adb: Minor code reorganization.
1909 Minor reformatting.
1910
19112011-08-29 Thomas Quinot <quinot@adacore.com>
1912
1913 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1914 primitive operation must support external streaming if it is not a
1915 controlling access result.
1916
646e2823
AC
19172011-08-29 Thomas Quinot <quinot@adacore.com>
1918
1919 * sinfo.ads, sem_ch7.adb: Minor reformatting.
1920
19212011-08-29 Bob Duff <duff@adacore.com>
1922
1923 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1924 restriction on allocators, as required by AI05-0013-1.
1925 * restrict.ads: Minor comment fix.
1926
5d59eef2
AC
19272011-08-29 Tristan Gingold <gingold@adacore.com>
1928
1929 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1930 (To_Jmpbuf_Address): Ditto
1931 (builtin_longjmp): Ditto
1932
19332011-08-29 Thomas Quinot <quinot@adacore.com>
1934
1935 * sem_res.adb: Minor reformatting.
1936
19372011-08-29 Vincent Celier <celier@adacore.com>
1938
1939 * make.adb (Gnatmake): Move special processing for VM targets after the
1940 call to Get_Target_Parameters.
1941
19422011-08-29 Thomas Quinot <quinot@adacore.com>
1943
1944 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1945
949a18cc
AC
19462011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1947
1948 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1949 where an anonymous access discriminant of a limited designated type
1950 appears in a non-immutably limited discriminated type and issue an
1951 error message. Add local variable Desig_T and replace all occurrences
1952 of Designated_Type.
1953
19542011-08-29 Jose Ruiz <ruiz@adacore.com>
1955
1956 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1957 implementation is compliant to RM D.15(15/2) after the modification
1958 imposed by AI05-0094-1 (binding interpretation).
1959
cb25faf8
AC
19602011-08-29 Robert Dewar <dewar@adacore.com>
1961
1962 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1963 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1964
19652011-08-29 Thomas Quinot <quinot@adacore.com>
1966
1967 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1968 the scope name, do not report a missing label as a style violation (it
1969 will be diagnosed as an illegality).
1970 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1971 variant records: Get_Enum_Lit_From_Pos already returns a usage
1972 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1973 on Expr in Integer_Literal case so that it can be used by
1974 Build_To_Any_Call.
1975
1d10f669
AC
19762011-08-29 Tristan Gingold <gingold@adacore.com>
1977
1978 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1979 Adjust comment.
1980 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1981 (Build_Abort_Block_Handler): New function to build an Abort_Signal
1982 exception handler.
1983 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1984 Build_Abort_Block_Handler to build the exception handler. Do not
1985 undefer aborts for the Abort_Signal exception handler if back-end
1986 exception mechanism.
1987 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1988 back_end exceptions for all others and abort_signal.
1989 * s-except.ads (ZCX_By_Default): New constant.
1990 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1991 (Raise_Exception_Always): Ditto.
1992 (Raise_From_Signal_Handler): Ditto.
1993 (Raise_With_Location_And_Msg): Ditto.
1994 (Raise_With_Msg): Ditto.
1995 (Reraise): Ditto.
1996 (Reraise_Occurence): Ditto.
1997 (Reraise_Occurrence_Always): Ditto.
1998 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1999 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1d10f669
AC
2000
20012011-08-29 Thomas Quinot <quinot@adacore.com>
2002
2003 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2004
d986066d
AC
20052011-08-29 Robert Dewar <dewar@adacore.com>
2006
2007 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2008 Minor code reorganization.
2009
20102011-08-29 Bob Duff <duff@adacore.com>
2011
2012 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2013 2012, not just Ada 2005.
2014
20152011-08-29 Vincent Celier <celier@adacore.com>
2016
2017 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2018 with a project file or with gprbuid, if -gnatep= is specified, the
2019 builder may need to be invoked with -x.
2020
20212011-08-29 Tristan Gingold <gingold@adacore.com>
2022
2023 * a-exexpr-gcc.adb: Minor comment fix.
2024
ff4f0ed0
AC
20252011-08-29 Robert Dewar <dewar@adacore.com>
2026
2027 * sem_ch8.adb: Minor reformatting.
2028
20292011-08-29 Bob Duff <duff@adacore.com>
2030
2031 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2032 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2033 treating "some" as unreserved in earlier Ada versions. This is now
2034 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2035 rather than Name_Some, since Tok_Some is now recognized as reserved.
2036 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2037 reserved word.
2038 * scans.ads: Minor comment fixes.
2039 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2040 for other language versions.
2041 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2042 treating "some" as unreserved in earlier Ada versions. This is now
2043 handled in Snames.Is_Keyword_Name.
2044 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2045 Ada 2012.
2046 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2047 unreserved in earlier Ada versions. This is now handled in
2048 Snames.Is_Keyword_Name.
2049 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2050 words as for other language versions.
2051 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2052 Ada 2012, not just Ada 2005.
2053
d941cee6
AC
20542011-08-29 Ed Schonberg <schonberg@adacore.com>
2055
2056 * sem_ch13.adb: Additional semantic checks for aspects involved in
2057 iterators.
2058
20592011-08-29 Matthew Heaney <heaney@adacore.com>
2060
2061 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2062 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2063 Container parameter.
2064 (Ancestor_Find): ditto.
2065
b970af39
TQ
20662011-08-29 Thomas Quinot <quinot@adacore.com>
2067
2068 * par-endh.adb: Minor reformatting.
d941cee6 2069
92db5dee
AC
20702011-08-29 Tristan Gingold <gingold@adacore.com>
2071
2072 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2073 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2074 (Adjust_N_CLeanups_For): Remove.
2075 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2076 stack is reached.
2077 (Propgate_Exception): Adjust.
2078 * raise-gcc.c: Add a few static/const.
2079 (Adjust_N_Cleanups_For): Remove declaration.
2080 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2081
20822011-08-29 Ed Schonberg <schonberg@adacore.com>
2083
2084 * sem_ch8.adb: Use type of function return when rewriting as object
2085 declaration.
2086
1378bf10
AC
20872011-08-29 Gary Dismukes <dismukes@adacore.com>
2088
2089 * sem_type.adb: Minor reformatting.
2090
20912011-08-29 Robert Dewar <dewar@adacore.com>
2092
2093 * makeutl.adb: Minor reformatting.
2094
20952011-08-29 Ed Schonberg <schonberg@adacore.com>
2096
2097 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2098 function call of a limited type, the expansion of the renaming is
2099 complicated by the presence of various temporaries and subtypes that
2100 capture constraints of the renamed object.
2101 Rewrite node as an object declaration, whose expansion is simpler.
2102 Given that the object is limited there is no copy involved and no
2103 performance hit.
2104
164e06c6
AC
21052011-08-29 Robert Dewar <dewar@adacore.com>
2106
2107 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2108 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2109
21102011-08-29 Tristan Gingold <gingold@adacore.com>
2111
2112 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2113 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2114 system-linux-hppa.ads, system-linux-s390.ads,
2115 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2116 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2117 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2118 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2119 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2120 system-solaris-sparc.ads, system-lynxos-x86.ads,
2121 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2122 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2123 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2124 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7d266442 2125 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
164e06c6
AC
2126 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2127 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2128 * opt.ads: Adjust comment.
2129 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2130 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2131 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2132
21332011-08-29 Emmanuel Briot <briot@adacore.com>
2134
2135 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2136 file name is specified on the gnatmake or gprbuild command line, and
2137 before we search for that file in the project.
2138
21392011-08-29 Ed Schonberg <schonberg@adacore.com>
2140
2141 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2142 used to determine whether a possible interpretation for an overloadable
2143 entity is declared within the current instantiation and should be
2144 included in the candidate set.
2145
21462011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2147
2148 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2149
97216ca8
ES
21502011-08-29 Ed Schonberg <schonberg@adacore.com>
2151
2152 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2153 access subtype is access_to_subprogram, when applying checks for
2154 RM 3.10.2 (27).
2155
d3cb4cc0
AC
21562011-08-29 Matthew Heaney <heaney@adacore.com>
2157
2158 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2159 for sibling when common parent.
2160
21612011-08-29 Thomas Quinot <quinot@adacore.com>
2162
2163 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2164 "pragma_".
2165
21662011-08-29 Ed Schonberg <schonberg@adacore.com>
2167
2168 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2169 for the return type when in ASIS mode.
2170
21712011-08-29 Vincent Celier <celier@adacore.com>
2172
2173 * make.adb (Gnatmake): Get the default search dirs, then the target
2174 parameters after getting the Builder switches, as the Builder switches
2175 may include --RTS= and that could change the default search dirs.
2176
21772011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2178
2179 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2180 Make_Final_Call. Move the processing for class-wide types before the
2181 processing for derivations from [Limited_]Controlled.
2182 (Make_Final_Call): Move the processing for class-wide types before the
2183 processing for derivations from [Limited_]Controlled.
2184 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2185 Add code to account for alignments larger than the list header. Add a
2186 comment illustrating the structure of the allocated object + padding +
2187 header.
2188 (Deallocate_Any_Controlled): Add code to account for alignments larger
2189 than the list header.
2190
21912011-08-29 Ed Schonberg <schonberg@adacore.com>
2192
2193 * sinfo.ads, sinfo.adb: New node kind
2194 N_Formal_Incomplete_Type_Definition, related flags.
2195 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2196 Parse formal incomplete types.
2197 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2198 sem_ch12.
2199 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2200 Formal incomplete types do not need completion.
2201 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2202 Validate_Incomplete_Type_Instance): New procedures to handle formal
2203 incomplete types.
2204 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2205 that corresponds to a formal incomplete type.
2206 * sprint.adb: Handle formal incomplete type declarations.
2207 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2208 an insertion point.
2209
d3f70b35
AC
22102011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2211
2212 * a-fihema.ads, a-fihema.adb: Unit removed.
2213 * a-undesu.ads, a-undesu.adb: New unit implementing
2214 Ada.Unchecked_Deallocate_Subpool.
2215 * einfo.adb: Remove Associated_Collection from the node usage.
2216 Add Finalization_Master to the node usage.
2217 (Associated_Collection): Removed.
2218 (Finalization_Master): New routine.
2219 (Set_Associated_Collection): Removed.
2220 (Set_Finalization_Master): New routine.
2221 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2222 Finalization_Master to the output.
2223 * einfo.ads: Remove attribute Associated_Collection and its uses in
2224 entities.
2225 Add new attribute Finalization_Master along with its uses in entitites.
2226 (Associated_Collection): Removed along with its pragma import.
2227 (Finalization_Master): New routine along with a pragma import.
2228 (Set_Associated_Collection): Removed along with its pragma import.
2229 (Set_Finalization_Master): New routine along with a pragma import.
2230 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2231 Build_Finalization_Collection with Build_Finalization_Master.
2232 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2233 before the bodies of the predefined routines. Add comment explaining
2234 this. Replace call to Build_Finalization_Collection with
2235 Build_Finalization_Master.
2236 (Freeze_Type): Replace call to Build_Finalization_Collection with
2237 Build_Finalization_Master.
2238 (Make_Finalize_Address_Body): Comment reformatting.
2239 (Make_Predefined_Primitive_Specs): Code reformatting.
2240 (Stream_Operation_OK): Update comment mentioning finalization
2241 collections. Replace RE_Finalization_Collection with
2242 RE_Finalization_Master.
2243 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2244 Associated_Collection with Finalization_Master. Replace call to
2245 Build_Finalization_Collection with Build_Finalization_Master.
2246 (Expand_Allocator_Expression): Replace call to Associated_Collection
2247 with Finalization_Master. Replace call to Set_Associated_Collection with
2248 Set_Finalization_Master. Remove the generation of
2249 Set_Finalize_Address_Ptr.
2250 (Expand_N_Allocator): Replace call to Associated_Collection with
2251 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2252 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2253 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2254 comment on usage. Replace call to Needs_BIP_Collection with
2255 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2256 BIP_Finalization_Master. Update all comments which mention finalization
2257 collections. Replace Associated_Collection with
2258 Finalization_Master. Replace Build_Finalization_Collection with
2259 Build_Finalization_Master.
2260 (BIP_Formal_Suffix): Update BIP_Collection's case.
2261 (Build_Heap_Allocator): Update the related comment. Rename local
2262 variable Collect to Fin_Mas_Id and update its occurrences. Update
2263 comments which mention finalization collections. Replace
2264 Set_Associated_Collection with Set_Finalization_Master.
2265 (Expand_Call): Update the code which detects a special piece of library
2266 code for .NET/JVM.
2267 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2268 Add_Collection_Actual_To_Build_In_Place_Call with
2269 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2270 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2271 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2272 Add_Collection_Actual_To_Build_In_Place_Call with
2273 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2274 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2275 Add_Collection_Actual_To_Build_In_Place_Call with
2276 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2277 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2278 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2279 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2280 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2281 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2282 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2283 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2284 Replace the call to Associated_Collection with Finalization_Master.
2285 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2286 Update the way finalization master names are generated. Update the
2287 retrieval of the correct access type which will carry the pool and
2288 master attributes.
2289 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2290 (Make_Finalize_Address_Body): Abstract types do not need
2291 Finalize_Address. Code reformatting.
2292 (Make_Finalize_Address_Stmts): Update comment on usage.
2293 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2294 (Process_Declarations): Update comments.
2295 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2296 Build_Finalization_Master. Update associated comment.
2297 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2298 * exp_ch13.adb: Update comments which mention finalization collections.
2299 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2300 with Finalization_Master.
2301 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2302 create calls to routines Allocate_Any_Controlled and
2303 Deallocate_Any_Controlled.
2304 (Find_Finalize_Address): New routine.
2305 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2306 comparison.
2307 (Requires_Cleanup_Actions): Update the comment on freeze node
2308 inspection.
2309 * exp_util.ads: Remove comment on generated code for
2310 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2311 is better to simply look in the body.
2312 * freeze.adb (Freeze_All): Update the comment of finalization
2313 collections. Replace the call to Associated_Collection with
2314 Finalization_Master. Replace the call to Build_Finalization_Collection
2315 with Build_Finalization_Master.
2316 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2317 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2318 a-fihema.
2319 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2320 Ada.Finalization. Add processing for children of System.Storage_Pools.
2321 * rtsfind.ads: Remove the naming of second level children of
2322 Ada.Finalization.
2323 Remove Ada_Finalization_Heap_Management from the list of units.
2324 Remove subtype Ada_Finalization_Child.
2325 Remove the following subprogram entities:
2326
2327 RE_Allocate
2328 RE_Deallocate
2329 RE_Finalization_Collection
2330 RE_Finalization_Collection_Ptr
2331 RE_Set_Finalize_Address_Ptr
2332
2333 Add the naming of second level children of System.Storage_Pools.
2334 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2335 the list of units.
2336 Add subtype System_Storage_Pools_Child.
2337 Add the following subprogram entities to System.Finalization_Masters:
2338
2339 RE_Finalization_Master
2340 RE_Finalization_Master_Ptr
2341
2342 Add the following subprogram entities to System.Storage_Pools.Subpools:
2343
2344 RE_Allocate_Any_Controlled
2345 RE_Deallocate_Any_Controlled
2346 RE_Root_Storage_Pool_With_Subpools
2347 RE_Root_Subpool
2348 RE_Subpool_Handle
2349
2350 Move the following subprogram entities from
2351 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2352
2353 RE_Add_Offset_To_Address
2354 RE_Attach
2355 RE_Base_Pool
2356 RE_Detach
2357
2358 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2359 Set_Associated_Collection with Set_Finalization_Master.
2360 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2361 BIP_Finalization_Master is created.
2362 * s-finmas.adb: New unit System.Finalization_Masters.
2363 * s-finmas.ads: New unit System.Finalization_Masters.
2364 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2365 * s-stposu.ads, s-stposu.adb: New unit implementing
2366 System.Storage_Pools.Subpools.
2367
23682011-08-29 Bob Duff <duff@adacore.com>
2369
2370 * tbuild.adb: Add assertion.
2371
8c889ae4
AC
23722011-08-29 Thomas Quinot <quinot@adacore.com>
2373
2374 * s-pooglo.adb: Minor reformatting.
2375
23762011-08-29 Ed Schonberg <schonberg@adacore.com>
2377
2378 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2379 an indexed component of a packed array whose element type is a record
2380 with a representation clause different from that of the right-hand
2381 side, generate a temporary to minimuze the number of bit-field
2382 operations generated.
2383
23842011-08-29 Ed Schonberg <schonberg@adacore.com>
2385
2386 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2387 declarations, and thus are likely insertion points for actions.
2388
23892011-08-29 Bob Duff <duff@adacore.com>
2390
2391 * einfo.ads: Minor comment fix.
2392
1a07a71a
AC
23932011-08-29 Robert Dewar <dewar@adacore.com>
2394
2395 * frontend.adb, gnat1drv.adb: Minor reformatting.
2396
23972011-08-29 Tristan Gingold <gingold@adacore.com>
2398
2399 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2400 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2401 space in front of the header.
2402
4bcd6411
JK
24032011-08-29 Johannes Kanig <kanig@adacore.com>
2404
2405 * frontend.adb (Frontend): Exit after creating Standard package when
2406 -gnatd.H is present.
2407 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2408 present.
2409
f0f88eb6
RD
24102011-08-29 Robert Dewar <dewar@adacore.com>
2411
2412 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2413 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2414 snames.ads-tmpl: Minor reformatting.
2415
3e37be71
PG
24162011-08-29 Philippe Gil <gil@adacore.com>
2417
2418 * prj.adb (Reset_Units_In_Table): New procedure.
2419 Reset units to avoid access to freed memory.
2420
94fb7608
AC
24212011-08-29 Thomas Quinot <quinot@adacore.com>
2422
2423 * get_scos.adb: When reading a P statement SCO without a pragma name
2424 (from an older ALI file), ensure that the Pragma_Name component is set
2425 to Unknown_Pragma (not left uninitialized).
2426
24272011-08-29 Vincent Celier <celier@adacore.com>
2428
2429 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2430 modified to compute correctly the object path of a SAL project that is
2431 extending another library project.
2432 (Write_Path_File): New procedure.
2433 * makeutl.ads (Directories): New table moved from Buildgpr
2434 (Get_Directories): New procedure moved from Buildgpr
2435 (Write_Path_File): New procedure
2436 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2437 paths before binding SALs, instead of Set_Ada_Paths.
2438 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2439 Prj.
2440 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2441 (Current_Source_Path_File_Of): New function
2442 (Set_Current_Object_Path_File_Of): New procedure
2443 (Current_Source_Object_File_Of): New function
2444 (Set_Current_Object_Path_File_Of): New procedure
2445 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2446 (Current_Source_Path_File_Of): New function
2447 (Set_Current_Object_Path_File_Of): New procedure
2448 (Current_Source_Object_File_Of): New function
2449 (Set_Current_Object_Path_File_Of): New procedure
2450
24512011-08-29 Ed Schonberg <schonberg@adacore.com>
2452
2453 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2454 packed entity, use a bit-field assignment only if there is no change of
2455 representation.
2456
c5ecd6b7
AC
24572011-08-29 Thomas Quinot <quinot@adacore.com>
2458
2459 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2460 Is_RTU instead of using Chars comparisons.
2461
24622011-08-29 Thomas Quinot <quinot@adacore.com>
2463
2464 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2465 temporary object if the actual is constrained, and the discriminants
2466 read from the stream don't match.
2467
24682011-08-29 Tristan Gingold <gingold@adacore.com>
2469
2470 * sem_attr.adb, exp_attr.adb: Add handling of
2471 Attribute_System_Allocator_Alignment
2472 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2473 Attribute_System_Allocator_Alignment.
2474 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2475 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2476 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2477 get_target_system_allocator_alignment.
2478
24792011-08-29 Arnaud Charlet <charlet@adacore.com>
2480
2481 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2482 dependencies.
2483
8abdac29
AC
24842011-08-29 Arnaud Charlet <charlet@adacore.com>
2485
2486 * exp_ch3.adb (In_Runtime): Fix typo.
2487
df170605
AC
24882011-08-29 Bob Duff <duff@adacore.com>
2489
2490 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2491
24922011-08-29 Ed Schonberg <schonberg@adacore.com>
2493
2494 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2495 and a separate tag assignment is generated, ensure that the tag
2496 assignment is analyzed.
2497
864a4236
ES
24982011-08-29 Ed Schonberg <schonberg@adacore.com>
2499
2500 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2501 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2502 of statement lists that may contain local declarations.
df170605
AC
2503 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2504 duplicate the triggering statements needed for the expansion of this
2505 construct, when the trigger is a dispatching call to a synchronized
2506 primitive.
864a4236 2507
7f394c1d
AC
25082011-08-29 Arnaud Charlet <charlet@adacore.com>
2509
2510 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2511 * bindgen.adb: Add comments.
2512 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2513 in CodePeer mode.
2514
2c1a2cf3
RD
25152011-08-29 Robert Dewar <dewar@adacore.com>
2516
2517 * exp_attr.adb: Minor reformatting.
2518 Minor code reorganization and commenting.
2519 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2520 reformatting.
2521
0bfc9a64
AC
25222011-08-29 Thomas Quinot <quinot@adacore.com>
2523
2524 * get_scos.adb: Ignore chaining indicators not currently supported
2525 by Ada.
2526
25272011-08-29 Arnaud Charlet <charlet@adacore.com>
2528
2529 * system.ads: Minor editing.
2530
25312011-08-29 Arnaud Charlet <charlet@adacore.com>
2532
2533 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2534 CodePeer mode.
2535 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2536 Attribute_Elab_Subp_Body.
2537 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2538 * sem_util.adb: Update comments.
2539
828d4cf0
TQ
25402011-08-29 Thomas Quinot <quinot@adacore.com>
2541
2542 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2543 pragma name for each SCO statement corresponding to a pragma.
2544
5cd7bb15
AC
25452011-08-29 Arnaud Charlet <charlet@adacore.com>
2546
2547 * opt.ads: Minor editing.
2548
25492011-08-29 Yannick Moy <moy@adacore.com>
2550
2551 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2552 that only made sense for CodePeer mode.
2553
25542011-08-29 Jose Ruiz <ruiz@adacore.com>
2555
2556 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2557 which is no longer used.
2558 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2559 handling of the 64-bit division check.
2560 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2561 division available.
2562 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2563 longer used.
2564
25652011-08-29 Thomas Quinot <quinot@adacore.com>
2566
2567 * get_scos.adb: Minor reformatting.
2568
25b589cb
AC
25692011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2570
2571 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2572 statement list is wrapped in a block, the block is explicitly analyzed
2573 in order to properly redecorate the entities and create a servicing
2574 finalizer.
2575
25762011-08-29 Tristan Gingold <gingold@adacore.com>
2577
2578 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2579 (Set_Zero_Cost_Handling): Remove.
2580
25812011-08-29 Thomas Quinot <quinot@adacore.com>
2582
2583 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2584
1197ddb1
AC
25852011-08-29 Geert Bosch <bosch@adacore.com>
2586
2587 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2588 instruction, as the latter may produce -0.0, which is not a valid VAX
2589 F float number.
2590 (Neg_G): Likewise for VAX F float.
2591
25922011-08-29 Robert Dewar <dewar@adacore.com>
2593
2594 * exp_util.adb: Minor reformatting.
2595
25962011-08-29 Yannick Moy <moy@adacore.com>
2597
2598 * sem_ch3.adb: Minor comment update.
2599
26002011-08-29 Thomas Quinot <quinot@adacore.com>
2601
2602 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2603 the operand type.
2604
26052011-08-29 Thomas Quinot <quinot@adacore.com>
2606
2607 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2608 current statement sequence on a generic instantiation or a subprogram
2609 declaration.
2610
8f66cda7
AC
26112011-08-29 Robert Dewar <dewar@adacore.com>
2612
2613 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2614 Minor reformatting.
2615
26162011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2617
2618 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2619 Correct the check which involves the freeze node of a controlled or
2620 access-to-controlled type.
2621
26222011-08-29 Geert Bosch <bosch@adacore.com>
2623
2624 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2625 statements.
2626 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2627 Asm statements.
2628
cf161d66
AC
26292011-08-29 Yannick Moy <moy@adacore.com>
2630
2631 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2632 for every index type and component type that is not a subtype_mark.
2633 (Process_Subtype): Set Etype of subtype.
2634
26352011-08-29 Robert Dewar <dewar@adacore.com>
2636
2637 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2638 reorganization. Minor reformatting.
2639
7cc83cd8
AC
26402011-08-29 Steve Baird <baird@adacore.com>
2641
2642 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2643 for CodePeer and ALFA modes.
2644
26452011-08-29 Ed Schonberg <schonberg@adacore.com>
2646
2647 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2648 that comes from an enclosing scope if it is not the renaming of an
2649 actual, to handle properly a spurious ambiguity in an instance.
2650
76af4137
AC
26512011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2652
2653 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2654 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2655 use it instead of the Esize of the first parameter.
2656 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2657 above change.
2658 <Size>: Likewise. Call it for composite types on the RM size.
2659
26602011-08-29 Yannick Moy <moy@adacore.com>
2661
2662 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2663 * sem_util.adb (Unique_Name): Correct behaviour for names of
2664 compilation units.
2665
9b20e59b
AC
26662011-08-29 Yannick Moy <moy@adacore.com>
2667
2668 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2669 verification mode, analyze pragma expression for correctness, for
2670 pre/post on library-level subprogram, as it is not expanded later.
2671
26722011-08-29 Yannick Moy <moy@adacore.com>
2673
2674 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2675 in formal verification.
2676
26772011-08-29 Thomas Quinot <quinot@adacore.com>
2678
2679 * sem_util.adb: Minor reformatting.
2680 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2681 there's no pragma.
2682 * par_sco.ads, par_sco.adb: Update comments.
2683
26842011-08-29 Yannick Moy <moy@adacore.com>
2685
2686 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2687 associated getter/setter.
2688 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2689
26902011-08-29 Vincent Celier <celier@adacore.com>
2691
2692 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2693 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2694 with declarations for Language_Kind and Dependency_Kind for Ada.
2695 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2696 (Process_Compiler): Take into account the new attributes Dependency_Kind
2697 and Language_Kind.
2698 (Check_Configuration): Check if language kind is unit based, not if the
2699 language name is Ada.
2700 (Process_Exceptions_Unit_Based): Ditto
2701 (Add_Language): Remove default additions of language and dependency kind
2702 * prj.ads: Minor comment change
2703 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2704
27052011-08-29 Johannes Kanig <kanig@adacore.com>
2706
2707 * debug.adb: Update comments.
2708
c5bc3df6
JM
27092011-08-24 Joseph Myers <joseph@codesourcery.com>
2710
2711 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2712 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2713 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2714 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2715 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2716
e3aa9eba
RO
27172011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2718
2719 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2720 (GNATLIBCFLAGS_FOR_C): Replace
2721 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2722 (gnatlib-shared-default, gnatlib-shared-dual-win32)
2723 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2724 (gnatlib-sjlj, gnatlib-zcx): Likewise.
2725
f446d60e
EB
27262011-08-07 Eric Botcazou <ebotcazou@adacore.com>
2727
2728 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2729
588c8f48
EB
2730 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2731
2732 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2733
28d711bf
NR
27342011-08-05 Nicolas Roche <roche@adacore.com>
2735
2736 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2737 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2738 canadian cross.
2739 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2740
993f8920
AC
27412011-08-05 Matthew Heaney <heaney@adacore.com>
2742
2743 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2744 subprogram bodies declared out-of-order.
2745
27462011-08-05 Yannick Moy <moy@adacore.com>
2747
2748 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2749 entities directly in package Standard, otherwise skip the standard
2750 prefix.
2751
9b3956dd
RD
27522011-08-05 Robert Dewar <dewar@adacore.com>
2753
2754 * a-cbmutr.adb: Minor reformatting
2755 (Allocate_Node): refactor node allocation algorithm
2756
27572011-08-05 Robert Dewar <dewar@adacore.com>
2758
2759 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2760 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2761 mode.
2762 (Analyze_Pragma, case Check_Policy): Ditto.
2763 * sem_prag.ads (Check_Disabled): New function
2764 * snames.ads-tmpl: Add Name_Disable.
2765
27662011-08-05 Robert Dewar <dewar@adacore.com>
2767
2768 * gnat_rm.texi: Document implementation-defined policy DISABLE for
2769 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2770
79e705d6
AC
27712011-08-05 Ed Schonberg <schonberg@adacore.com>
2772
2773 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2774 that appears in a generic formal part and applies to a formal
2775 subprogram.
2776
27772011-08-05 Robert Dewar <dewar@adacore.com>
2778
2779 * a-cbmutr.ads: Minor reformatting.
2780
23b6deca
AC
27812011-08-05 Matthew Heaney <heaney@adacore.com>
2782
2783 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2784 to check count, check sign of value instead.
2785 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2786 (Copy_Subtree): allocate copy of source element
2787 (Equal_Subtree): compare elements, not access objects
2788
27892011-08-05 Vincent Celier <celier@adacore.com>
2790
2791 * gnat_ugn.texi: Fix VMS alternative.
2792
a2773bd3
AC
27932011-08-05 Thomas Quinot <quinot@adacore.com>
2794
2795 * sem_ch11.adb: Add comment.
2796
27972011-08-05 Robert Dewar <dewar@adacore.com>
2798
2799 * exp_util.adb: Minor comment fix.
2800
28012011-08-05 Robert Dewar <dewar@adacore.com>
2802
2803 * scng.adb (Error_Unterminated_String): Improve flag position when
2804 comma present.
2805
28062011-08-05 Matthew Heaney <heaney@adacore.com>
2807
2808 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
2809 tree containers).
2810 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
2811 multiway tree containers.
2812
28132011-08-05 Robert Dewar <dewar@adacore.com>
2814
2815 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
2816 * stylesw.adb: Implement -gnatyC to control comment spacing
2817 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
2818 -gnatyc/C).
2819 * usage.adb: Add line for -gnatyC.
2820
28212011-08-05 Robert Dewar <dewar@adacore.com>
2822
f446d60e 2823 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
2824 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
2825 synonym for COMMENTS2).
2826
dedac3eb
RD
28272011-08-05 Robert Dewar <dewar@adacore.com>
2828
2829 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
2830 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
2831 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
2832 a-comutr.ads, lib-xref.adb: Minor reformatting.
2833
28342011-08-05 Robert Dewar <dewar@adacore.com>
2835
2836 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
2837 warning if there is an exception handler present.
2838
7c62a85a
AC
28392011-08-05 Pascal Obry <obry@adacore.com>
2840
2841 * a-iteint.ads: Fix copyright year.
2842
28432011-08-05 Thomas Quinot <quinot@adacore.com>
2844
2845 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
2846 statement SCO for a USE clause or a representation clause.
2847
28482011-08-05 Yannick Moy <moy@adacore.com>
2849
2850 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
2851 between body and spec for stub.
2852 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
2853 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
2854 pragma precondition or postcondition, for which the enclosing
2855 subprogram or package in the AST is not the desired one, return empty.
2856
e49208a9
AC
28572011-08-05 Thomas Quinot <quinot@adacore.com>
2858
2859 * g-expect.adb: Minor reformatting.
2860
28612011-08-05 Bob Duff <duff@adacore.com>
2862
2863 * a-fihema.adb: Comment out OS_Lib.
2864
28652011-08-05 Matthew Heaney <heaney@adacore.com>
2866
2867 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
2868 (unbounded multiway tree containers) and a-iteint.ads.
2869 * a-comutr.ads, a-comutr.adb:
2870 This is the new Ada 2012 unit for unbounded multiway tree containers
2871 * a-cimutr.ads, a-cimutr.adb
2872 This is the new Ada 2012 unit for indefinite multiway tree containers
2873 * a-iteint.ads: New file.
2874
201cdb74
RO
28752011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2876
f446d60e 2877 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 2878
d50f4827
AC
28792011-08-05 Bob Duff <duff@adacore.com>
2880
2881 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
2882 subpools.
2883 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
2884
28852011-08-05 Ed Schonberg <schonberg@adacore.com>
2886
2887 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
2888 general indexing aspects of Ada2012. Called when analyzing indexed
2889 components when other interpretations fail.
2890 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
2891 in an expression context where overloading is meaningful. This excludes
2892 the occurrence in an aspect specification (efficiency only).
2893 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
2894 related to iterators can be set by an attribute specification, but
2895 cannot be queried.
2896 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
2897 Constant_Indexing and Variable_Indexing.
2898 (Check_Indexing_Functions): New procedure to perform legality checks.
2899 Additional semantic checks at end of declarations.
2900
efe05dfc
AC
29012011-08-05 Sergey Rybin <rybin@adacore.com>
2902
2903 * tree_io.ads: Update ASIS_Version_Number because of the change of the
2904 order of calling Tree_Write/Tree_Read routines made for aspects.
2905
29062011-08-05 Bob Duff <duff@adacore.com>
2907
2908 * a-fihema.adb (Finalize): Fix race condition.
2909
5f9cdefe
AC
29102011-08-05 Yannick Moy <moy@adacore.com>
2911
2912 * sem_ch12.adb (Analyze_Package_Instantiation,
2913 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2914 mode.
2915
29162011-08-05 Ed Schonberg <schonberg@adacore.com>
2917
2918 * sem_type.adb (Specific_Type): in an instance, the type-specific
2919 operand of an equality check that involves null may have a private
2920 type. Use full view to determine legality of construct.
2921
822868aa
AC
29222011-08-05 Vincent Celier <celier@adacore.com>
2923
2924 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2925 delete or close the file when the call to gnatmake was successful.
2926
29272011-08-05 Yannick Moy <moy@adacore.com>
2928
2929 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2930 Global_Discard_Names.
2931
29322011-08-05 Ed Schonberg <schonberg@adacore.com>
2933
2934 * sinfo.ads: comments on use of entity field for aspect specifications.
2935
29362011-08-05 Ed Schonberg <schonberg@adacore.com>
2937
2938 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2939 node is not itself an entity but a selected component, it is a
2940 rewritten parameterless call to an en enclosing synchronized operation,
2941 and this expansion will be performed again in the instance, so there is
2942 no global information to preserve.
2943
44a10091
AC
29442011-08-05 Javier Miranda <miranda@adacore.com>
2945
2946 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2947 for renamings of predefined primitives.
2948 (In_Predef_Prims_DT): New subprogram.
2949
29502011-08-05 Ed Schonberg <schonberg@adacore.com>
2951
2952 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2953 possible interpretation of name is a reference type, add an
2954 interpretation that is the designated type of the reference
2955 discriminant of that type.
2956 * sem_res.adb (resolve): If the interpretation imposed by context is an
2957 implicit dereference, rewrite the node as the deference of the
2958 reference discriminant.
2959 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2960 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2961 parent type or base type.
2962 * sem_ch4.adb (Process_Indexed_Component,
2963 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2964 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2965 Check for implicit dereference.
2966 (List_Operand_Interps): Indicate when an implicit dereference is
2967 ambiguous.
2968 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2969
29702011-08-05 Thomas Quinot <quinot@adacore.com>
2971
2972 * scos.ads: Update documentation of SCO table. Pragma statements can now
2973 be marked as disabled (using 'p' instead of 'P' as the statement kind).
2974 * par_sco.ads, par_sco.adb: Implement the above change.
2975 (Process_Decisions_Defer): Generate a P decision for the first parameter
2976 of a dyadic pragma Debug.
2977 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2978 necessary.
2979 * put_scos.adb: Code simplification based on above change.
2980
bb3c784c
AC
29812011-08-05 Robert Dewar <dewar@adacore.com>
2982
2983 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2984 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2985 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2986 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2987
29882011-08-05 Bob Duff <duff@adacore.com>
2989
2990 * a-stunau.ads, g-spipat.adb: Update comments.
2991
36f686f9
BD
29922011-08-05 Bob Duff <duff@adacore.com>
2993
2994 * a-fihema.ads: Minor comment fix.
2995 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2996 correct.
2997 (Attach, Detach): Remove some unnecessary code.
2998 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2999
7882673f
BD
30002011-08-05 Bob Duff <duff@adacore.com>
3001
3002 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3003 allocation for Objects component. This simplifies the code somewhat. It
3004 is also a little more efficient in the not-so-unusual case where there
3005 are no controlled objects allocated.
3006 Make Finalization_Started flag atomic.
3007 (Finalize): Avoid unnecessary detachment of items from the list.
3008 (pcol): Minor cleanup.
3009
d34cd274
AC
30102011-08-05 Ed Schonberg <schonberg@adacore.com>
3011
3012 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3013 package whose name is the same as that of the generic unit, or its
3014 ultimate prefix.
3015
30162011-08-05 Bob Duff <duff@adacore.com>
3017
3018 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3019 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3020 Minor comment fixes.
3021
00332244
AC
30222011-08-05 Arnaud Charlet <charlet@adacore.com>
3023
3024 * make.adb (Linking_Phase): No longer need to set source search path
3025 before calling gnatlink in CodePeer mode.
3026 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3027 gcc in CodePeer mode, since the binder generated file no longer has a
3028 'with Main'.
3029 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3030 * switch-c.adb: Update comment.
3031
30322011-08-05 Thomas Quinot <quinot@adacore.com>
3033
3034 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3035
30362011-08-05 Nicolas Roche <roche@adacore.com>
3037
3038 * gnat_ugn.texi: Fix minor syntax error issue.
3039
30402011-08-05 Vincent Celier <celier@adacore.com>
3041
3042 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3043 delete or close the file when the call to gnatmake returns a non
3044 successful return code.
3045
30462011-08-05 Ed Schonberg <schonberg@adacore.com>
3047
3048 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3049 check, indicate that the copy of the original node does not come from
3050 source, to prevent an infinite recursion of the expansion.
3051
30522011-08-05 Johannes Kanig <kanig@adacore.com>
3053
3054 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3055 VC generation for subprogram bodies.
3056
30572011-08-05 Yannick Moy <moy@adacore.com>
3058
3059 * einfo.ads: Typo.
3060 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3061 the base type with the smallest allowed base type.
3062
30632011-08-05 Sergey Rybin <rybin@adacore.com>
3064
3065 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3066 aspects.
3067
30682011-08-05 Ed Schonberg <schonberg@adacore.com>
3069
3070 * sem_ch12.ads: minor comment updates.
3071
30722011-08-05 Ed Schonberg <schonberg@adacore.com>
3073
3074 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3075 instantiation and a formal package the compiler generates a package
3076 renaming declaration so that the generic name within the declaration
3077 is interpreted as a renaming of the instance. At the end of a formal
3078 package declaration, this renaming must become invisible.
3079
0da80d7d
AC
30802011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3081
3082 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3083 comparison and rely on concrete entities instead.
3084
30852011-08-05 Ed Schonberg <schonberg@adacore.com>
3086
3087 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3088 and discriminants, to indicate that the type has an access discriminant
3089 that supports implicit dereference.
3090 * snames.ads-tmpl: Add names of aspects and attributes related to
3091 Ada2012 iterators: constant_indexing, default_iterator,
3092 iterator_element, implicit_dereference, variable_indexing.
3093 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3094 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3095 iterator-related aspects.
3096 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3097
30982011-08-05 Sergey Rybin <rybin@adacore.com>
3099
3100 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3101 metrics in gnatmetric to cover new kinds of coupling mentrics.
3102
31032011-08-05 Steve Baird <baird@adacore.com>
3104
3105 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 3106 of calling the user-defined main subprogram.
0da80d7d
AC
3107 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3108 is set) Call_Main_Subprogram ahead of, as opposed to
3109 inside of, Main.
3110 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3111 generation of a "with" of the user-defined main subprogram.
3112 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3113 (which is now called from Gen_Main instead).
3114
73242473
AC
31152011-08-05 Emmanuel Briot <briot@adacore.com>
3116
3117 * projects.texi: Added reference to the Makefile package.
3118
31192011-08-05 Thomas Quinot <quinot@adacore.com>
3120
3121 * exp_ch7.adb: Minor comment rewording.
3122
31232011-08-05 Ed Falis <falis@adacore.com>
3124
3125 * env.c: Fix comment.
3126
31272011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3128
3129 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3130 character comparison and rely on concrete entities instead.
3131
97ed5872
AC
31322011-08-05 Ed Schonberg <schonberg@adacore.com>
3133
3134 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3135 suggested by AI95-0068.
3136
31372011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3138
3139 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3140 the two potential initialization calls. This accounts for any
3141 access-before-elaboration checks which may precede the initialization
3142 calls.
3143 (Next_Suitable_Statement): New routine. Returns the next real statement
3144 after the input node while skipping generated checks.
3145 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3146 with comment on usage.
3147 Do not generate Elaborate_All when the trigger is a finalization call
3148 coming from a type init proc.
3149 (Check_Elab_Call): Propagate the initialization procedure context to
3150 subsequent calls to Check_A_Call.
3151 (Check_Internal_Call_Continue): Propagate the initialization procedure
3152 context to subsequent calls to Check_Elab_Call.
3153 (Is_Finalization_Procedure): New routine. Returns True if the input
3154 entity denotes a [Deep_]Finalize routine.
3155 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3156 along with comment on usage.
3157
31582011-08-05 Vadim Godunko <godunko@adacore.com>
3159
3160 * s-atocou.ads: Add list of supported platforms.
3161
31622011-08-05 Yannick Moy <moy@adacore.com>
3163
3164 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3165
3166 * opt.ads (Disable_ALI_File): new Boolean flag
3167 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3168
31692011-08-05 Ed Falis <falis@adacore.com>
3170
3171 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3172 environ is properly defined.
3173
31742011-08-05 Vincent Celier <celier@adacore.com>
3175
3176 * make.adb (Compilation_Phase): Exit immediately when all objects have
3177 been found up to date, to avoid multiple exit messages.
3178 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3179 same project for languages with no compiler.
3180 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3181 -eI.
9aff36e9
RD
31822011-08-05 Robert Dewar <dewar@adacore.com>
3183
3184 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3185 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3186 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3187 s-atocou-builtin.adb: Minor reformatting.
3188
406935b6
AC
31892011-08-05 Yannick Moy <moy@adacore.com>
3190
3191 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3192 if the node to wrap is a pragma check, this node and enclosed
3193 expression are not expanded, so do not apply any transformations here.
3194 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3195 introducing transient scopes.
3196
31972011-08-05 Jose Ruiz <ruiz@adacore.com>
3198
3199 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3200 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3201 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3202 routine is available, so we use the default implementation of these
3203 functions.
3204 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3205 support for copying attributes on VxWorks 6.
3206
32072011-08-05 Yannick Moy <moy@adacore.com>
3208
3209 * debug.adb: Remove use of -gnatd.D.
3210 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3211 * opt.ads: Simplify variables for ALFA mode, to keep one only
3212 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3213 to ALFA mode.
3214
32152011-08-05 Vincent Celier <celier@adacore.com>
3216
3217 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3218 Builder'Default_Switches.
3219
32202011-08-05 Vincent Celier <celier@adacore.com>
3221
3222 * makeusg.adb: Add lines for --create-map-file switches.
3223
32242011-08-05 Ed Schonberg <schonberg@adacore.com>
3225
3226 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3227 profile is incomplete and the full view is available, replace it with
3228 the full view.
3229 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3230 incomplete, freezing the subprogram is delayed until the full view is
3231 frozen.
3232 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3233 fixed-point multiplication operator and the predefined operator is
3234 resolved in favor of the user-defined one.
3235
96c891b3
RO
32362011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3237
3238 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3239 CONST_CAST.
3240
276e7ed0
AC
32412011-08-04 Ed Schonberg <schonberg@adacore.com>
3242
3243 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3244 whether a type lacks user-defined Read or Write operations, or has a
3245 component that lacks them.
3246 * sem_attr.adb (Check_Stream_Attribute): if restriction
3247 No_Default_Stream_Attributes is active, verify that all subcomponent
3248 types of the target have user-defined stream operations, and report
3249 error otherwise.
3250 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3251 * exp_strm.adb: Build_Elementary_Input_Call,
3252 Build_Elementary_Write_Call): remove checks for restriction
3253 No_Default_Stream_Attributes, now checked in semantics.
3254
32552011-08-04 Vincent Celier <celier@adacore.com>
3256
3257 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3258 switches on the command line, look for all valid --RTS switches in the
3259 Builder switches and for each language use the first runtime name found
3260 to invoke gprconfig.
3261 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3262 command line and there is no auto-configuration.
3263 (Runtime_Name_Set_For): New function.
3264
32652011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3266
3267 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3268 elaborate initialization expression for variable Abort when processing
3269 a package body or a declaration.
3270 (Create_Finalizer): Propagate the package context when creating the
3271 exception-related variables.
3272 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3273 For_Package along with usage comment.
3274
19172ae9
AC
32752011-08-04 Arnaud Charlet <charlet@adacore.com>
3276
3277 * gcc-interface/Makefile.in: Clean up targets.
3278 Enable new package for atomic counters and copy-on-write implementation
3279 of unbounded strings on x86 platforms.
3280 * gcc-interface/Make-lang.in: Update dependencies.
3281
0319cacc
AC
32822011-08-04 Robert Dewar <dewar@adacore.com>
3283
3284 * exp_ch7.adb: Minor reformatting.
3285
32862011-08-04 Robert Dewar <dewar@adacore.com>
3287
3288 * exp_strm.adb: Minor reformatting.
3289
32902011-08-04 Vadim Godunko <godunko@adacore.com>
3291
3292 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3293 operations are not supported.
3294 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3295 * s-atocou-x86.adb: New file.
3296 * Makefile.rtl: Add s-atocou.o file
3297
32982011-08-04 Arnaud Charlet <charlet@adacore.com>
3299
3300 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3301 (Compilation_Phase): ... here.
3302 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3303
33042011-08-04 Thomas Quinot <quinot@adacore.com>
3305
3306 * Make-generated.in: Fix minor typo in comment.
3307
26e7e1a0
AC
33082011-08-04 Thomas Quinot <quinot@adacore.com>
3309
3310 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3311 the project path.
3312
33132011-08-04 Robert Dewar <dewar@adacore.com>
3314
3315 * a-coinho.adb: Minor reformatting.
3316
33172011-08-04 Robert Dewar <dewar@adacore.com>
3318
3319 * a-coinho.ads: Minor reformatting.
3320
33212011-08-04 Vadim Godunko <godunko@adacore.com>
3322
3323 * s-atocou.ads, s-atocou.adb: New files.
3324 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3325 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3326 direct use of GCC's atomic builtins and replace them by use of new
3327 atomic counter package.
3328
33292011-08-04 Ed Schonberg <schonberg@adacore.com>
3330
3331 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3332
33332011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3334
3335 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3336 with a call to Get_External_Tag.
3337 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3338 subprogram usage. Remove the guard against package declarations and
3339 bodies since Build_Cleanup_Statements is no longer invoked in that
3340 context.
3341 (Build_Components): Initialize Tagged_Type_Stmts when the context
3342 contains at least one library-level tagged type.
3343 (Build_Finalizer): New local variables Has_Tagged_Types and
3344 Tagged_Type_Stmts along with associated comments on usage. Update the
3345 logic to include tagged type processing.
3346 (Create_Finalizer): Insert all library-level tagged type unregistration
3347 code before the jump block circuitry.
3348 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3349 (Expand_N_Package_Declaration): Remove the call to
3350 Build_Cleanup_Statements.
3351 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3352 unregister the external tag of a tagged type.
3353 (Processing_Actions): Reimplemented to handle tagged types.
3354 (Process_Declarations): Detect the declaration of a library-level
3355 tagged type and carry out the appropriate actions.
3356 (Unregister_Tagged_Types): Removed. The machinery has been directly
3357 merged with Build_Finalizer.
3358
7483c888
AC
33592011-08-04 Robert Dewar <dewar@adacore.com>
3360
3361 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3362 gnatls.adb, exp_ch3.adb: Minor reformatting.
3363
33642011-08-04 Marc Sango <sango@adacore.com>
3365
3366 * sem_attr.adb (Analyze_Attribute): Replace the message
3367 "invisible attribute of}" of the spark restriction violation in
3368 attribute reference by the simple message "invisible attribute of type".
3369 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3370 two insertion characters: '&' and '}'.
3371
33722011-08-04 Vadim Godunko <godunko@adacore.com>
3373
3374 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3375 * a-coinho.ads, a-coinho.adb: New file.
3376 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3377
5207696c
AC
33782011-08-04 Nicolas Roche <roche@adacore.com>
3379
3380 * alfa_test.adb: Not all ali files are containing alfa information even
3381 if compiled with -gnatd.F. So suppress warning about missing ALFA
3382 information.
3383
33842011-08-04 Yannick Moy <moy@adacore.com>
3385
3386 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3387 scope.
3388 * put_alfa.adb: Check that scope name is not empty.
3389
33902011-08-04 Ed Schonberg <schonberg@adacore.com>
3391
3392 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3393 Needs_Elementary_Stream_Operation, to determine whether user-defined
3394 Read and Write attributes are available for the elementary components
3395 of the given type. If only the predefined attributes are available,
3396 then when restriction No_Default_Stream_Attributes is active the
3397 predefined stream attributes for the composite type cannot be created.
3398
33992011-08-04 Robert Dewar <dewar@adacore.com>
3400
3401 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3402 Put routines in alpha order
3403
2bd2d858
JR
34042011-08-04 Jose Ruiz <ruiz@adacore.com>
3405
3406 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3407 * gcc-interface/Make-lang.in: Update dependencies.
3408
8fae6016
AC
34092011-08-04 Arnaud Charlet <charlet@adacore.com>
3410
3411 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3412 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3413 gnat1why).
3414
a54d0eb4
AC
34152011-08-04 Robert Dewar <dewar@adacore.com>
3416
3417 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3418 lib-xref-alfa.adb: Minor reformatting.
3419
34202011-08-04 Marc Sango <sango@adacore.com>
3421
3422 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3423 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3424 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3425 mode.
3426
34272011-08-04 Tristan Gingold <gingold@adacore.com>
3428
3429 * bindgen.adb (Gen_Adainit_C): Remove.
3430 (Gen_Adafinal_C): Ditto.
3431 (Gen_Elab_Externals_C): Ditto.
3432 (Gen_Elab_Calls_C): Ditto.
3433 (Gen_Elab_Order_C): Ditto.
3434 (Gen_Elab_Defs_C): Ditto.
3435 (Gen_Finalize_Library_C): Ditto.
3436 (Gen_Finalize_Library_Defs_C): Ditto.
3437 (Gen_Main_C): Ditto.
3438 (Gen_Output_File_C): Ditto.
3439 (Gen_Restrictions_C): Ditto.
3440 (Gen_Versions_C): Ditto.
3441 (Write_Info_Ada_C): Ditto.
3442 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3443 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3444 Always call Gen_Output_File_Ada.
3445 * gnatlink.adb (Begin_Info): Now a constant.
3446 (End_Info): Ditto.
3447 (Ada_Bind_File): Remove
3448 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3449 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3450 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3451 * opt.ads (Ada_Bind_File): Remove.
3452
34532011-08-04 Thomas Quinot <quinot@adacore.com>
3454
3455 * projects.texi: Document target-specific directory in default project
3456 path for gnatmake.
3457
34582011-08-04 Thomas Quinot <quinot@adacore.com>
3459
3460 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3461 path in all cases .
3462
24558db8
AC
34632011-08-04 Yannick Moy <moy@adacore.com>
3464
3465 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3466 opt.ads, lib-xref.ads: Code clean up.
3467
34682011-08-04 Yannick Moy <moy@adacore.com>
3469
3470 * gnat_rm.texi: Update description of Test_Case
3471 * gnat_ugn.texi: Typo.
3472
34732011-08-04 Ed Falis <falis@adacore.com>
3474
3475 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3476
34772011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3478
3479 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3480 it is of type Root_Controlled. This action eliminates fields Prev and
3481 Next from type equality.
3482
34832011-08-04 Yannick Moy <moy@adacore.com>
3484
3485 * lib-xref-alfa.adb: Correct typo.
3486
34872011-08-04 Matthew Heaney <heaney@adacore.com>
3488
3489 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3490 component.
3491
1f9939b5
AC
34922011-08-04 Yannick Moy <moy@adacore.com>
3493
3494 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3495 (Analyze_Pragma): allow static string expression for name of Test_Case,
3496 instead of simply string literals.
3497 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3498 expressions.
3499
35002011-08-04 Vincent Celier <celier@adacore.com>
3501
3502 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3503 case suffixes to find truncated main sources.
3504
35052011-08-04 Tristan Gingold <gingold@adacore.com>
3506
3507 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3508 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3509 (Compute_Current_Task): Ditto.
3510
35112011-08-04 Tristan Gingold <gingold@adacore.com>
3512
3513 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3514
35152011-08-04 Yannick Moy <moy@adacore.com>
3516
3517 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3518 library-level constant.
3519 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3520 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3521 used as selector of parameter association, in ALFA mode.
3522
15d8a51d
AC
35232011-08-04 Robert Dewar <dewar@adacore.com>
3524
3525 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3526 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3527 reformatting.
3528
35292011-08-04 Arnaud Charlet <charlet@adacore.com>
3530
3531 * make.adb (Linking_Phase): Set source search path before calling
3532 gnatlink in CodePeer mode.
3533
f46faa08
AC
35342011-08-04 Javier Miranda <miranda@adacore.com>
3535
3536 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3537 Remove code which takes care of building TSDs.
3538 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3539 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3540 the accessibility check in VM targets.
3541 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3542 (Building_Static_DT): Now returns false for VM targets.
3543 (Build_VM_TSDs): Removed.
3544 (Expand_Interface_Conversion): Generate missing runtime check for
3545 conversions to interface types whose target type is unknown at compile
3546 time.
3547 (Make_VM_TSD): Add missing code to disable the generation of calls to
3548 Check_TSD if the tagged type is not defined at library level, or not
3549 has a representation clause specifying its external tag, or -gnatdQ is
3550 active.
3551 * exp_disp.ads (Build_VM_TSDs): Removed.
3552 (Make_VM_TSDs): Spec relocated from exp_disp.adb
3553 * sem_disp.adb (Check_Dispatching_Operation): No code required to
3554 register primitives in the dispatch tables in VM targets.
3555 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3556 initialization of class-wide interface objects in VM targets.
3557 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3558 of Make_DT).
3559
35602011-08-04 Jerome Lambourg <lambourg@adacore.com>
3561
3562 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3563 when dotnet-ld cannot be found.
3564
35652011-08-04 Arnaud Charlet <charlet@adacore.com>
3566
3567 * bindgen.adb: Simplify significantly generation of binder body file in
3568 CodePeer mode.
3569 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3570 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3571 not expanded).
3572
2ba7e31e
AC
35732011-08-04 Yannick Moy <moy@adacore.com>
3574
3575 * sem_prag.adb, sem.ads: Code cleanup.
3576
35772011-08-04 Tristan Gingold <gingold@adacore.com>
3578
3579 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3580 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3581 results if possible.
3582 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3583 * gnat_ugn.texi: Update dynamic stack usage section.
3584
35852011-08-04 Steve Baird <baird@adacore.com>
3586
3587 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3588 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3589 contains only a call to the user-defined main subprogram.
3590 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3591 call the "wrapper" subprogram instead of directly
3592 calling the user-defined main subprogram.
3593
35942011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3595
3596 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3597 alternatives of a case statement for controlled objects. Rename local
3598 variable A to Dead_Alt.
3599 (Expand_N_If_Statement): Check the then and else statements of an if
3600 statement for controlled objects. Check the then statements of all
3601 elsif parts of an if statement for controlled objects.
3602 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3603 objects.
3604 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3605 detects a loop associated with the expansion of an array object.
3606 Augment the processing of the loop statements to account for a possible
3607 wrap done by Process_Statements_For_Controlled_Objects.
3608 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3609 statements and abortable part of an asynchronous select for controlled
3610 objects.
3611 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3612 conditional entry call for controlled objects.
3613 (Expand_N_Selective_Accept): Check the alternatives of a selective
3614 accept for controlled objects.
3615 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3616 alternatives of a timed entry call for controlled objects.
3617 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3618 exception handler for controlled objects.
3619 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3620 Add formal parameter Nested_Constructs along with its associated
3621 comment.
3622 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3623 Requires_Cleanup_Actions.
3624 (Process_Statements_For_Controlled_Objects): New routine.
3625 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3626 routine. Inspect a node which contains a non-handled sequence of
3627 statements for controlled objects. If such an object is found, the
3628 statements are wrapped in a block.
3629
1bf773bb
AC
36302011-08-04 Bob Duff <duff@adacore.com>
3631
3632 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3633 need to compare with Class_Wide_Type (T2), in order to get at the
3634 original class-wide type node.
3635 * sem_type.ads (Covers): Improve the comment.
3636 * einfo.ads (Class_Wide_Type): Improve the comment.
3637 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3638 the type of the Deref.
3639
36402011-08-04 Yannick Moy <moy@adacore.com>
3641
3642 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3643 separate declarations.
3644 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3645 check identifier of pragma argument.
3646 (Chain_TC): check that no other test case associated to the same entity
3647 share the same name.
3648 (Check_Test_Case): disallow test case inside subprogram body
3649 (Analyze_Pragma): correct call to check identifier and not argument
3650 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3651 function gets name from test case pragma.
3652
dac3bede
YM
36532011-08-04 Yannick Moy <moy@adacore.com>
3654
3655 * gnat_rm.texi: Document new pragma and aspect.
3656 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3657 (No_Duplicates_Allowed): new constant array defining whether duplicates
3658 aspects of each kind can appear on the same declaration.
3659 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3660 field, which points to a node holding the previous Spec_PPC_List.
3661 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3662 through the indirection with Contract.
3663 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3664 * par-prag.adb (Prag): do nothing on Test_Case pragma
3665 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3666 be called directly.
3667 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3668 component Ensures of Test_Case.
3669 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3670 (Analyze_Generic_Subprogram_Declaration,
3671 Analyze_Subprogram_Instantiation,
3672 Analyze_Abstract_Subprogram_Declaration,
3673 Analyze_Subprogram_Body_Helper,
3674 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3675 insert contract in subprogram node at point of definition
3676 * sem_ch13.adb
3677 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3678 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3679 corresponding pragma
3680 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3681 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3682 similar to the analysis of pre/post
3683 (Derive_Subprogram): insert contract in subprogram node at point of
3684 derivation.
3685 * sem_prag.adb, sem_prag.ads
3686 (Check_Arg_Is_String_Literal, Check_Identifier):
3687 new checking procedures to be called in treatment of pragmas
3688 (Check_Test_Case): new procedure to check that a Test_Case aspect or
3689 pragma is well-formed. This does not check currently that 'Result is
3690 used only in the Ensures component of a Test_Case.
3691 (Analyze_Pragma): add case for Test_Case
3692 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3693 components of a Test_Case.
3694 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3695 expressions in the 3rd (and 4th if present) arguments of a Test_Case
3696 pragma, treated as spec expressions.
3697 (Sig_Flags): add value -1 for Test_Case.
3698 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3699 Get_Requires_From_Test_Case_Pragma): getters for both expression
3700 components of a Test_Case.
3701 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3702 indirection between an entry or [generic] subprogram entity and its
3703 pre/post + test-cases.
3704 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3705 get/set for fields of an N_Contract node.
3706 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3707 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3708 names and pragma for Test_Case.
3709 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3710
6a2e5d0f
AC
37112011-08-04 Vincent Celier <celier@adacore.com>
3712
3713 * gnat_ugn.texi: Improve documentation of gnatmake switch
3714 --source-info-file=.
3715
37162011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3717
3718 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3719 type). Initialize Atyp to the appropriate type which is later checked
3720 for completion. Rewrite the assertion associated with private type
3721 completion.
3722
37232011-08-04 Ed Falis <falis@adacore.com>
3724
3725 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3726 initialize the number of CPUs.
3727
37282011-08-04 Ed Schonberg <schonberg@adacore.com>
3729
3730 * sem_type.adb (Disambiguate): New subsidiary routine
3731 In_Same_Declaration_List, to implement AI05-0020: a user-defined
3732 equality on an anonymous access type whose designated type is private
3733 does not lead to an ambiguity with the universal access equality
3734 operator in the body or child units of the defining package. The same
3735 is true for a multiplication operator on a private type completed with
3736 a fixed-point-type.
3737
37382011-08-04 Javier Miranda <miranda@adacore.com>
3739
3740 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3741 (Normalize_Scalars_Config): Removed.
3742 * opt.adb
3743 (Register_Opt_Config_Switches): Remove registering config values of
3744 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3745 (Restore_Opt_Config_Switches): Remove code which restores the values of
3746 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3747 Init_Or_Norm_Scalars.
3748 (Save_Opt_Config_Switches): Remove code which saves values of
3749 Init_Or_Norm_Scalars and Normalize_Scalars.
3750 (Set_Opt_Config_Switches): Remove code which restores config values of
3751 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3752 Init_Or_Norm_Scalars.
3753
37542011-08-04 Yannick Moy <moy@adacore.com>
3755
3756 * frontend.adb (Frontend): remove previous patch to avoid full
3757 qualification in ALFA mode.
3758 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3759 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3760 unique name for an entity, which could be used to identify the entity
3761 across compilation units.
3762
37632011-08-04 Thomas Quinot <quinot@adacore.com>
3764
3765 * prj-env.adb
3766 (Initialize_Default_Project_Path): Add target specific directory
3767 ($prefix/$target/lib/gnat) in front of project path in all cases
3768 (making gnatmake's behaviour consistent with gprbuild).
3769 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3770 Pass target name from Sdefault to project subsystem.
3771 * gnatls.adb: Show new target specific default project directory.
3772
37732011-08-04 Johannes Kanig <kanig@adacore.com>
3774
3775 * cstand.adb: Add Information to Identifier in Standard
3776 (Identifer_For): Set Entity to the corresponding entity
3777
483361a6
AC
37782011-08-04 Sergey Rybin <rybin@adacore.com>
3779
3780 * gnat_ugn.texi: Update doc on gnatcheck.
3781
37822011-08-04 Yannick Moy <moy@adacore.com>
3783
3784 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3785 xrefs in a scope.
3786
37872011-08-04 Yannick Moy <moy@adacore.com>
3788
3789 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3790 performing expansion.
3791 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3792 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3793 it is not called in ALFA mode.
3794
ef5569c6
AC
37952011-08-04 Emmanuel Briot <briot@adacore.com>
3796
3797 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
3798 after all, so removed.
3799
38002011-08-04 Sergey Rybin <rybin@adacore.com>
3801
3802 * vms_data.ads: Add missing VMS qualifiers.
3803
1ab4a286
EB
38042011-08-04 Emmanuel Briot <briot@adacore.com>
3805
3806 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
3807 the list of files on the command line after processing it through
3808 Complete_Mains.
3809
7ae0d98c
AC
38102011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3811
3812 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
3813 processing for .NET/JVM. These targets can now benefit from
3814 Raise_From_Controlled_Operation and they share the same processing with
3815 standard targets.
3816 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
3817 These targets need transient scopes in order to properly finalize short
3818 lived controlled objects.
3819 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
3820 NET/JVM. These targets can now benefit from
3821 Raise_From_Controlled_Operation and they share the same processing with
3822 standard targets.
3823
38242011-08-04 Geert Bosch <bosch@adacore.com>
3825
3826 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
3827
38282011-08-04 Ed Schonberg <schonberg@adacore.com>
3829
3830 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
3831 Expand_Record_Aggregate, to determine whether aggregate must be
3832 expanded into assignments. This is the case if the ancestor part is
3833 private, regarless of the setting of the flag Has_Private_Ancestor.
3834
38352011-08-04 Ed Falis <falis@adacore.com>
3836
3837 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
3838
38392011-08-04 Bob Duff <duff@adacore.com>
3840
3841 * sinfo.ads: Fix comment.
3842
38432011-08-04 Steve Baird <baird@adacore.com>
3844
3845 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
3846 choose a package name in much the same way as is
3847 done for JGNAT when VM_Target /= No_VM, except that
3848 a slightly more distinctive prefix string is used.
3849
38502011-08-04 Emmanuel Briot <briot@adacore.com>
3851
3852 * makeutl.adb (Complete_Mains): no longer accept unit names on the
3853 gnatmake command line.
3854 This behavior was never documented (and was supported only because of
3855 an early bug in the code). This case might lead to ambiguous cases
3856 (between unit names and truncated base names without suffixes).
3857
87729e5a
AC
38582011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3859
3860 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
3861 Remove the external tag of a tagged type from the internal hash table.
3862 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
3863 expanded usage of the routine. Strenghten the check for Is_Master. Add
3864 processing for tagged types.
3865 (Build_Finalizer): Create all the necessary lists used in finalizer
3866 creation when the processed context is a package that may contain
3867 tagged types.
3868 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
3869 Requires_Cleanup_Actions.
3870 (Expand_N_Package_Body): Package bodies may need clean up code
3871 depending on whether they contain tagged types.
3872 (Expand_N_Package_Declaration): Package declarations may need clean up
3873 code depending on whether they contain tagged types.
3874 (Unregister_Tagged_Types): New routine. Search through a list of
3875 declarations or statements, looking for non-abstract Ada tagged types.
3876 For each such type, generate code to unregister the external tag.
3877 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
3878 Requires_Cleanup_Actions.
3879 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
3880 through a list of declarations or statements looking for non-abstract
3881 Ada tagged types or controlled objects.
3882 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
3883 Requires_Cleanup_Actions.
3884 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
3885 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
3886 RE_Unit_Table.
3887
38882011-08-04 Vincent Celier <celier@adacore.com>
3889
3890 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
3891 has Ada sources, not project Project, because if the root project
3892 Project has no sources of its own, all projects will be deemed without
3893 sources.
3894
38952011-08-04 Gary Dismukes <dismukes@adacore.com>
3896
3897 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
3898 of the No_Param_Proc acc-to-subp type used for initialization of
3899 __gnat_finalize_library_objects so that it's declared at library level
3900 rather than nested inside of the adainit routine.
3901
39022011-08-04 Javier Miranda <miranda@adacore.com>
3903
3904 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
3905 if the tagged type has a representation clause which specifies its
3906 external tag.
3907
39082011-08-04 Ed Schonberg <schonberg@adacore.com>
3909
3910 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3911 Remove previous procedure with that name.
3912 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3913 when appropriate.
3914 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3915 subtype mark, the ancestor cannot have unknown discriminants.
3916 (Resolve_Record_Aggregate): if the type has invisible components
3917 because of a private ancestor, the aggregate is illegal.
3918
39192011-08-04 Vincent Celier <celier@adacore.com>
3920
3921 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3922 account switches -gnat2005, -gnat12 and -gnat2012.
3923
39242011-08-04 Bob Duff <duff@adacore.com>
3925
3926 * s-tasdeb.ads: Minor comment fix.
3927
39282011-08-04 Arnaud Charlet <charlet@adacore.com>
3929
3930 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3931 CodePeer mode.
3932 * switch.ads, switch.adb (Is_Language_Switch): New function.
3933
39342011-08-04 Vincent Celier <celier@adacore.com>
3935
3936 * switch-c.adb: Minor comment addition.
3937
39382011-08-04 Vincent Celier <celier@adacore.com>
3939
3940 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3941 ending with '=' is followed by a space (missing file name).
3942
39432011-08-04 Pascal Obry <obry@adacore.com>
3944
3945 * g-regist.ads: Fix size of HKEY on x86_64-windows.
3946
39472011-08-04 Ed Schonberg <schonberg@adacore.com>
3948
3949 * sem_ch12.adb (Analyze_Associations): New routine
3950 Check_Overloaded_Formal_Subprogram to reject a formal package when
3951 there is a named association or a box initialisation for an overloaded
3952 formal subprogram of the corresponding generic.
3953
39542011-08-04 Yannick Moy <moy@adacore.com>
3955
3956 * alfa.ads (ALFA_Xref_Record): add component for type of entity
3957 * get_alfa.adb, put_alfa.adb: Read and write new component of
3958 cross-reference.
3959 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3960
88f47280
AC
39612011-08-04 Pascal Obry <obry@adacore.com>
3962
3963 * urealp.adb: Minor reformatting.
3964
39652011-08-04 Tristan Gingold <gingold@adacore.com>
3966
3967 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3968 Handle the case when Cleanup_Protected_Object returns Empty.
3969
39702011-08-04 Yannick Moy <moy@adacore.com>
3971
3972 * frontend.adb (Frontend): only qualify names in non-ALFA mode
3973
39742011-08-04 Ed Schonberg <schonberg@adacore.com>
3975
3976 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3977 call, ignore functions.
3978
05c53a69
GB
39792011-08-04 Geert Bosch <bosch@adacore.com>
3980
3981 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3982 point.
3983
23cc1ace
EB
39842011-08-04 Emmanuel Briot <briot@adacore.com>
3985
3986 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3987 as an index for Builder'Switches. This conforms to the documentation.
3988 * make.adb (Insert_Project_Sources): avoid duplicate code
3989
cef14201
AC
39902011-08-04 Emmanuel Briot <briot@adacore.com>
3991
3992 * makeutl.adb (Complete_Mains): if the user has passed a relative file
3993 name on the command line (for instance "../dummy"), never assume it can
3994 be a unit name.
3995
39962011-08-04 Tristan Gingold <gingold@adacore.com>
3997
3998 * bindgen.adb: Remove code the reference or create the
3999 Break_Start/__gnat_break_start procedure.
4000 * s-stalib.adb (Break_Start): Removed.
4001
e2fee30d
EB
40022011-08-04 Emmanuel Briot <briot@adacore.com>
4003
4004 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4005 shared with gprbuild.
4006
2d395256
AC
40072011-08-04 Yannick Moy <moy@adacore.com>
4008
4009 * par-ch4.adb (P_Primary): preferentially issue an error message about
4010 a missing parenthesis arount a conditional or case expression in Ada
4011 2012 mode, if we detect that the alignment is not correct for a
4012 statement.
4013
40142011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4015
4016 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4017 tag-to-class-wide conversion as needing finalization actions.
4018 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4019 a tag-to-class-wide conversion as needing finalization actions.
4020 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4021 conversion does not need finalization actions.
4022 (Is_Tag_To_CW_Conversion): New routine.
4023 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4024 whether an object is the result of a tag-to-class-wide conversion.
4025
40262011-08-04 Yannick Moy <moy@adacore.com>
4027
4028 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4029 the left-hand-side and right-hand-side of a conjunct are inserted when
4030 translating a pre- or postcondition
4031 * sem_ch6.adb: Correct typo in comment
4032
40332011-08-04 Ed Schonberg <schonberg@adacore.com>
4034
4035 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4036 Unchecked_Conversion and Unchecked_Deallocation.
4037
40382011-08-04 Thomas Quinot <quinot@adacore.com>
4039
4040 * make.adb: Minor reformatting.
4041
767ab2fd
EB
40422011-08-04 Emmanuel Briot <briot@adacore.com>
4043
4044 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4045 sources in the project and its imported projects, but not in the whole
4046 tree.
4047
8fb3f5df
AC
40482011-08-04 Emmanuel Briot <briot@adacore.com>
4049
4050 * make.adb: Remove debug trace.
4051
40522011-08-04 Vincent Celier <celier@adacore.com>
4053
4054 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4055 path in canonical form, to be able to compare path names on platforms
4056 such as Windows or Darwin.
4057
40582011-08-04 Thomas Quinot <quinot@adacore.com>
4059
4060 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4061 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4062 * scos.ads: Update documentation accordingly.
4063 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4064 pragmas.
4065
9515740f
AC
40662011-08-04 Ed Schonberg <schonberg@adacore.com>
4067
4068 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4069 attribute only if prefix type is scalar.
4070
40712011-08-04 Emmanuel Briot <briot@adacore.com>
4072
4073 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4074 in gnatmake for specifying mains on the command line that do not belong
4075 to the main project. These mains must currently all belong to the same
4076 project, though.
4077 (Ultimate_Extension_Of): removed, since duplicated
4078 Ultimate_Extending_Project.
4079
92966893
AC
40802011-08-04 Arnaud Charlet <charlet@adacore.com>
4081
4082 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4083 instead.
4084 (CodePeer_Mode_String): New.
4085 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4086 CodePeer mode.
4087 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4088 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4089 mode, since no useful elaboration subprogram is needed by CodePeer.
4090 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4091 In this mode, compile binder file with -gnatC and do stop after this
4092 step.
4093
40942011-08-04 Vincent Celier <celier@adacore.com>
4095
4096 * exp_ch7.adb: Minor comment fix.
4097
5969611f
RD
40982011-08-04 Robert Dewar <dewar@adacore.com>
4099
4100 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4101 exp_ch4.adb, makeutl.adb: Minor reformatting.
4102
6367dd30
AC
41032011-08-04 Emmanuel Briot <briot@adacore.com>
4104
4105 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4106 Create several new subprograms to move code out of Make. This makes the
4107 code more readable, removes code duplication, and is a preparation work
4108 for adding support for aggregate projects.
4109
41102011-08-04 Tristan Gingold <gingold@adacore.com>
4111
4112 * s-po32gl.ads, s-po32gl.adb: New files.
4113 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4114 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4115 (Build_Finalization_Collection): Use it.
4116 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4117 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4118 literals.
4119 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4120 * gcc-interface/Make-lang.in: Update dependencies.
4121
cd8bfe35
EB
41222011-08-04 Emmanuel Briot <briot@adacore.com>
4123
4124 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4125 the command line.
4126
7db29ea7
EB
41272011-08-04 Emmanuel Briot <briot@adacore.com>
4128
4129 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4130 command line is not a file name, also check whether it could be a unit
4131 name.
4132
d9b056ea
AC
41332011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4134
4135 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4136 the header of the finalization routine.
4137 If the unit has no finalizer but is a body whose spec has one, then
4138 generate the decrement of the elaboration entity only.
4139 If the unit has a finalizer and is a spec, then do not generate the
4140 decrement of the elaboration entity.
4141 (Gen_Finalize_Library_C): Likewise.
4142
41432011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4144
4145 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4146 (Bounds_Size_Expression): Removed.
4147 (Double_Alignment_Of): New subsidiary routine.
4148 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4149 for a hole in the dope vector of unconstrained arrays due to different
4150 index and element alignments.
4151
41522011-08-04 Ed Schonberg <schonberg@adacore.com>
4153
4154 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4155 raise program_error because body has not been seen yet.
4156
41572011-08-04 Ed Schonberg <schonberg@adacore.com>
4158
4159 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4160 an unresolved name.
4161
41622011-08-04 Vincent Celier <celier@adacore.com>
4163
4164 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4165
41662011-08-04 Yannick Moy <moy@adacore.com>
4167
4168 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4169 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4170
41712011-08-04 Thomas Quinot <quinot@adacore.com>
4172
4173 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4174 instantiation in RCI.
4175
41762011-08-04 Emmanuel Briot <briot@adacore.com>
4177
4178 * make.adb: Share more code with gprbuild
4179
f5fc5b9d
AC
41802011-08-04 Emmanuel Briot <briot@adacore.com>
4181
4182 * projects.texi: Added documentation for the IDE'Gnat project file
4183 attribute.
4184
41852011-08-04 Nicolas Roche <roche@adacore.com>
4186
4187 * gnat_rm.texi: Minor editing.
4188
41892011-08-04 Javier Miranda <miranda@adacore.com>
4190
4191 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4192 and the library case for VM targets.
4193 (Gen_Adainit_Ada): Likewise.
4194
41952011-08-04 Robert Dewar <dewar@adacore.com>
4196
4197 * g-altive.ads: Minor comment updates.
4198 * prj-nmsc.adb: Minor reformatting.
4199
42002011-08-04 Javier Miranda <miranda@adacore.com>
4201
4202 * opt.ads
4203 (Normalize_Scalars_Config): Value of the configuration switch set by
4204 pragma Normalize_Scalars when it appears in the gnat.adc file.
4205 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4206 to save and restore settings of this pragma.
4207 * opt.adb
4208 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4209 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4210
42112011-08-04 Vincent Celier <celier@adacore.com>
4212
4213 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4214
0c4683cf
AC
42152011-08-04 Arnaud Charlet <charlet@adacore.com>
4216
4217 * makeutl.adb: Minor reformatting.
4218
42192011-08-04 Olivier Hainque <hainque@adacore.com>
4220
4221 * g-altive.ads: Update comments to reflect that only the soft
4222 binding is available today.
4223
2598ee6d
RD
42242011-08-04 Robert Dewar <dewar@adacore.com>
4225
4226 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4227 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4228 * gcc-interface/Make-lang.in: Update dependencies.
4229
c2db4b32
AC
42302011-08-04 Arnaud Charlet <charlet@adacore.com>
4231
4232 * prj-env.adb: Remove local debug traces.
4233
42342011-08-04 Yannick Moy <moy@adacore.com>
4235
4236 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4237 was used instead of Hi_OK, which could cause a read of an uninitialized
4238 value later on. Detected while working on the new warning.
4239 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4240 to local variable.
4241 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4242 in more cases, in order to detect more unreferenced values.
4243 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4244 object for expression, if any.
4245
42462011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4247
4248 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4249 the operand types instead of the Esize.
4250
42512011-08-04 Steve Baird <baird@adacore.com>
4252
4253 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4254 enable CodePeer_Mode.
4255 * bindusg.adb (Display): Add help message describing -P binder switch.
4256 * gnat_ugn.texi: Document -P binder switch.
4257 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4258 user-defined main program directly.
4259 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4260 user-defined main program in the context clause of the package body.
4261
ad05f2e9
AC
42622011-08-04 Yannick Moy <moy@adacore.com>
4263
4264 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4265 duplicate of Defining_Entity
4266 (Get_Unique_Entity_For_Decl): rename function into
4267 Unique_Defining_Entity
4268 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4269 (Formal_Proof_On): remove synthesized flag
4270 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4271 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4272 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4273 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4274 Annotate (Formal_Proof)
4275
42762011-08-04 Emmanuel Briot <briot@adacore.com>
4277
4278 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4279 source files with non-standard naming schemes, in imported projects
4280
756ef2a0
AC
42812011-08-04 Emmanuel Briot <briot@adacore.com>
4282
4283 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4284 specified on the gprbuild command line, we need to compile all units
4285 within that file, not just the first one we find
4286 Fix error message for mains that are not found.
4287
42882011-08-04 Thomas Quinot <quinot@adacore.com>
4289
4290 * sem_ch6.adb: Update comment.
4291 * sem_ch12.adb: Minor reformatting.
4292
42932011-08-04 Bob Duff <duff@adacore.com>
4294
4295 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4296 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4297 race condition whose symptom is to fail to lock Parent. That, in turn,
4298 causes Parent.Awake_Count to be accessed without locking Parent, which
4299 causes another race condition whose symptom is that Parent.Awake_Count
4300 can be off by 1 (either too high or too low). The solution is to lock
4301 Parent unconditionally, and then lock Acceptor, before reading
4302 Acceptor.Terminate_Alternative.
4303
4fdebd93
AC
43042011-08-04 Arnaud Charlet <charlet@adacore.com>
4305
4306 * debug.adb: Update comment.
4307
43082011-08-04 Robert Dewar <dewar@adacore.com>
4309
4310 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4311 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4312 exp_ch6.adb: Minor reformatting.
4313
43142011-08-04 Gary Dismukes <dismukes@adacore.com>
4315
4316 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4317 checks for -gnateE.
4318
43192011-08-04 Ed Schonberg <schonberg@adacore.com>
4320
4321 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4322
43232011-08-04 Thomas Quinot <quinot@adacore.com>
4324
4325 * sinfo.ads: Minor reformatting.
4326
43272011-08-04 Emmanuel Briot <briot@adacore.com>
4328
4329 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4330 even if there is no location.
4331
6aaa0587
ES
43322011-08-04 Ed Schonberg <schonberg@adacore.com>
4333
4334 * sem_res.adb, sem_ch4.adb: move check for restriction
4335 No_Task_Hierarchy to resolve_allocator.
4336
35a1c212
AC
43372011-08-04 Thomas Quinot <quinot@adacore.com>
4338
4339 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4340 This flag of N_Pragma nodes is not used, remove it as well as all of
4341 the associated circuitry.
4342
43432011-08-04 Javier Miranda <miranda@adacore.com>
4344
4345 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4346 runtime check on duplicated externa tags
4347 * debug.adb Document switch -gnatdQ.
4348
43492011-08-04 Gary Dismukes <dismukes@adacore.com>
4350
4351 * a-fihema.ads: Minor typo fix.
4352
43532011-08-04 Yannick Moy <moy@adacore.com>
4354
4355 * sem_ch10.adb: Minor comment update.
4356
43572011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4358
4359 * einfo.adb: Update the node field usage to reflect the renaming of
4360 Return_Flag to Return_ Flag_Or_Transient_Decl.
4361 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4362 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4363 (Write_Field15_Name): Change Return_Flag to
4364 Return_Flag_Or_Transient_Decl.
4365 * einfo.ads: Rename node field Return_Flag to
4366 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4367 occurrences in entities.
4368 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4369 associated Inline pragma.
4370 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4371 associated Inline pragma.
4372 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4373 routine.
4374 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4375 Return_Flag and Set_Return_Flag.
4376 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4377 objects generated for controlled transients declared inside an
4378 Exception_With_Actions. Update the calls to Return_Flag.
4379 (Process_Object_Declaration): Add code to add a null guard for hook
4380 objects generated for controlled transients declared inside an
4381 Exception_With_Actions. Update related comment.
4382 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4383 objects generated for controlled transients declared inside an
4384 Exception_With_Actions. Update the calls to Return_Flag.
4385 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4386
43872011-08-04 Ed Schonberg <schonberg@adacore.com>
4388
4389 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4390 positional aggregate.
4391
43922011-08-04 Vincent Celier <celier@adacore.com>
4393
4394 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4395 SLOC only for pragmas.
4396
43972011-08-04 Emmanuel Briot <briot@adacore.com>
4398
4399 * projects.texi: Minor typo fix.
4400
44012011-08-04 Emmanuel Briot <briot@adacore.com>
4402
4403 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4404 on case-sensitive file systems.
4405
c2873f74
TQ
44062011-08-04 Thomas Quinot <quinot@adacore.com>
4407
4408 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4409 nested in a disabled pragma.
4410 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4411 enclosing pragma, if any, for X decisions.
4412
44132011-08-04 Thomas Quinot <quinot@adacore.com>
4414
4415 * sem_prag.adb: Minor reformatting.
4416
46414266
VC
44172011-08-04 Vincent Celier <celier@adacore.com>
4418
4419 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4420 allowed in no run time mode.
4421
44222011-08-04 Vincent Celier <celier@adacore.com>
4423
4424 * make.adb (Check): When -gnatc is used, check for the source file
4425 inside the ALI file with a canonical case file name.
4426
afab164f
EB
44272011-08-04 Emmanuel Briot <briot@adacore.com>
4428
4429 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4430 overriding the separator.
4431
fe0ec02f
AC
44322011-08-04 Robert Dewar <dewar@adacore.com>
4433
4434 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4435 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4436
44372011-08-04 Robert Dewar <dewar@adacore.com>
4438
4439 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4440
44412011-08-04 Yannick Moy <moy@adacore.com>
4442
4443 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4444 'Result only appears in postcondition of function.
4445
44462011-08-04 Thomas Quinot <quinot@adacore.com>
4447
4448 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4449 external tag, include the value of the external tag in the exception
4450 message.
4451
0180fd26
AC
44522011-08-04 Yannick Moy <moy@adacore.com>
4453
4454 * sem_attr.adb (Result): modify error message for misplaced 'Result
4455
44562011-08-04 Sergey Rybin <rybin@adacore.com>
4457
4458 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4459 clear that the second argument must be an identifier.
4460
44612011-08-04 Thomas Quinot <quinot@adacore.com>
4462
4463 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4464 -fpreserve-control-flow, insert an IF statement on the barrier
4465 condition to ensure that a conditional branch instruction is generated.
4466
44672011-08-04 Emmanuel Briot <briot@adacore.com>
4468
4469 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4470 (Processing_Flags.Ignore_Missing_With): new flag.
4471
44722011-08-04 Emmanuel Briot <briot@adacore.com>
4473
4474 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4475 Source_List_File on case-insensitive systems where the file is actually
4476 on a case-sensitive file system (NFS,...).
4477
44782011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4479
4480 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4481 function return contains a controlled [extension] aggregate and the
4482 return statement is not part of a handled sequence of statements, wrap
4483 the return in a block. This ensures that all controlled temporaries
4484 generated during aggregate resolution will be picked up by the
4485 finalization machinery.
4486
44872011-08-04 Ed Schonberg <schonberg@adacore.com>
4488
4489 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4490 components, freeze type before resolution, to ensure that default
4491 initializations are present for all components.
4492 * sem_res.adb (Resolve_Actuals): the designated object of an
4493 accces-to-constant type is a legal actual in a call to an
4494 initialization procedure.
4495
44962011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4497
4498 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4499 N_Unchecked_Type_Conversion to the possible containers of a renamed
4500 transient variable.
4501
78efd712
AC
45022011-08-04 Yannick Moy <moy@adacore.com>
4503
4504 * par-ch13.adb (Aspect_Specifications_Present): recognize
4505 "with Identifier'Class =>" as an aspect, so that a meaningful warning
4506 is issued in Strict mode.
4507 * par.adb: Fix typos in comments.
4508
45092011-08-04 Yannick Moy <moy@adacore.com>
4510
4511 * sem_attr.adb (Result): modify error message to take into account Post
4512 aspect when compiling Ada 2012 (or newer) code.
4513
45142011-08-04 Nicolas Roche <roche@adacore.com>
4515
4516 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 4517 remove need for GCC exceptions.
78efd712
AC
4518
45192011-08-04 Vincent Celier <celier@adacore.com>
4520
4521 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4522 project, not the source file name.
4523 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4524 excluded, continue looking. This excluded source will only be returned
4525 if there is no other source with the same base name that is not locally
4526 removed.
4527
45282011-08-04 Ed Schonberg <schonberg@adacore.com>
4529
4530 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4531 private and one of the operands is a real literal, use a qualified
4532 expression rather than a conversion which is not meaningful to the
4533 back-end.
4534
0170a691
AC
45352011-08-04 Yannick Moy <moy@adacore.com>
4536
4537 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4538 corresponding aspect X'Class are allowed, proceed with analysis of the
4539 aspect instead of skipping it.
4540
45412011-08-04 Tristan Gingold <gingold@adacore.com>
4542
4543 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4544 This will allow to have an Ada implementation for the subprogram.
4545
deb4f5ba
ES
45462011-08-04 Ed Schonberg <schonberg@adacore.com>
4547
4548 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4549 completion and aspects are present, apply them to the entity for the
4550 type which is currently the partial view, but which is the one that
4551 will be frozen.
4552 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4553 applies to a partial view, indicate that the full view has predicates
4554 and delayed aspects.
4555 (Replace_Type_Reference): Handle properly predicates that apply to the
4556 full view of a private completion.
4557
fc893455
AC
45582011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4559
4560 * layout.adb (Layout_Type): For composite types, do not set Esize.
4561 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4562 set Esize.
4563 (Size_Known): Look at the RM size of components instead of the Esize.
4564 (Freeze_Record_Type): Look at the RM size instead of the Esize to
4565 issue warning and activate Implicit_Packing.
4566 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
4567 if the Esize is not known.
4568 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4569 for elementary types only.
4570 (Analyze_Record_Representation_Clause): Look at the RM size instead
4571 of the Esize to issue errors.
4572 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4573 is not known.
4574 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 4575 obsolete block.
fc893455
AC
4576 Look at the RM size instead of the Esize for types if the latter is
4577 not known.
4578 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4579
45802011-08-04 Ed Schonberg <schonberg@adacore.com>
4581
4582 * sem_type.adb: proper handling of equality not involving anonymous
4583 access types.
4584
b37d5bc6
AC
45852011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4586
4587 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4588 Vis_Decls. When creating a library-level finalizer for a package spec,
4589 both the declaration and body of the finalizer are inserted either in
4590 the visible or private declarations of the package spec.
4591
45922011-08-04 Javier Miranda <miranda@adacore.com>
4593
4594 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4595 use of the full-view of a type when invoking Is_Ancestor.
4596 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4597 the full-view of private parents is requested, then use also the
4598 full-view of the parent of the first derivation.
4599
7ab4d95a
AC
46002011-08-04 Tristan Gingold <gingold@adacore.com>
4601
4602 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4603 instead of the locally imported procedure.
4604 * s-taprop-mingw.adb (Enter_Task): Ditto.
4605 * s-valrea.adb (Scan_Real): Ditto.
4606 * s-imgrea.adb (Set_Image_Real): Ditto.
4607 * s-flocon.ads: Make the package pure.
4608
46092011-08-04 Thomas Quinot <quinot@adacore.com>
4610
4611 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4612 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4613 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4614 New subprogram, moved here from...
4615 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4616 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4617 rewriting of the last argument into a procedure call statement here...
4618 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4619 instead.
4620
46212011-08-04 Thomas Quinot <quinot@adacore.com>
4622
4623 * par_sco.adb: Minor reformatting.
4624
51c400f5
AC
46252011-08-04 Robert Dewar <dewar@adacore.com>
4626
4627 * erroutc.adb: Minor reformatting.
4628
46292011-08-04 Thomas Quinot <quinot@adacore.com>
4630
4631 * par_sco.adb: Comment update.
4632
46332011-08-04 Tristan Gingold <gingold@adacore.com>
4634
4635 * s-flocon.ads: New file.
4636 * g-flocon.ads: Now a renaming of s-flocon.
4637 * Makefile.rtl: Add s-flocon.o
4638
6a49f110
AC
46392011-08-04 Javier Miranda <miranda@adacore.com>
4640
4641 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4642 constrained, do not attempt to build a subtype of it.
4643
46442011-08-04 Yannick Moy <moy@adacore.com>
4645
4646 * errout.ads Change comments: remove 'R'M as an example where quotes
4647 are needed; add ALFA as another case where quotes are not needed
4648 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4649 case where quotes are not needed.
4650 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4651 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4652 Remove all occurrences of 'A'L'F'A
4653
46542011-08-04 Ed Schonberg <schonberg@adacore.com>
4655
4656 * sem_ch13.adb: check legality of invariant pragma.
4657
a4640a39
AC
46582011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4659
4660 * bindgen.adb: Add comments.
4661
46622011-08-04 Yannick Moy <moy@adacore.com>
4663
4664 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4665 synthesized flag.
4666 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4667 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4668
46692011-08-04 Robert Dewar <dewar@adacore.com>
4670
4671 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4672 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4673 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4674
39ade2f9
AC
46752011-08-04 Thomas Quinot <quinot@adacore.com>
4676
4677 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4678
46792011-08-04 Thomas Quinot <quinot@adacore.com>
4680
4681 PR ada/47880
4682 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4683 allocated object.
4684
46852011-08-04 Robert Dewar <dewar@adacore.com>
4686
4687 * einfo.ads, exp_ch4.adb: Minor reformatting.
4688
46892011-08-04 Jerome Lambourg <lambourg@adacore.com>
4690
4691 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4692
7efc3f2d
AC
46932011-08-04 Ed Schonberg <schonberg@adacore.com>
4694
4695 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4696 type in all cases to compute list of primitive operations, because full
4697 view may be an itype that is not attached to the list of declarations.
4698
46992011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4700
4701 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4702 library has already been finalized.
4703 (Gen_Adafinal_C): Likewise.
4704 (Gen_Adainit_Ada): Generate an early return if the library has
4705 already been elaborated.
4706 (Gen_Adainit_C): Likewise.
4707 (Gen_Output_File_Ada): Generate an elaboration flag.
4708 (Gen_Output_File_C): Likewise.
4709
f65df609
HK
47102011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4711
4712 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4713 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4714 built in the first place.
4715 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4716 for CodePeer because Finalize_Address was not built to begin with.
4717 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4718
a0fb8fe8
AC
47192011-08-04 Pascal Obry <obry@adacore.com>
4720
4721 * adaint.c (__gnat_tmp_name): Use current process id to create temp
4722 filenames, this ensures unicity of filenames across processes.
4723
47242011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4725
4726 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4727 Raise_Controlled to Raise_From_Controlled_Operation. Update the
4728 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4729 Add False as the actual to From_Abort in the generated call to
4730 Raise_From_Controlled_Operation.
4731
47322011-08-04 Jerome Lambourg <lambourg@adacore.com>
4733
4734 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4735 so that the ali file name can be retrieved from outside of this package.
4736 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4737 doing nothing in the general case, but used to update the object file
4738 timestamp if directly generated by the backend.
4739 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4740 to a later time than the ali file one.
4741
9534ab17
AC
47422011-08-04 Yannick Moy <moy@adacore.com>
4743
4744 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4745 entities whose body contains an Annotate pragma which forces formal
4746 proof on this body.
4747 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4748 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4749 Mark_Non_ALFA_Subprogram to pass in a message and node.
4750 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4751 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4752 surrounding subprogram.
4753 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4754 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4755 as not in ALFA is annotated with Formal_Proof being On, then an error
4756 is issued based on the additional parameters for message and node.
4757 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4758 * gcc-interface/Make-lang.in: Update dependencies.
4759
47602011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4761
4762 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4763 Finalize_Address when CodePeer is enabled.
4764
47652011-08-04 Pascal Obry <obry@adacore.com>
4766
4767 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4768 the latter returns a pointer to a static buffer which is deallocated
4769 at the end of the routine.
4770
5c0e97dd
AC
47712011-08-04 Yannick Moy <moy@adacore.com>
4772
4773 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4774 after index creation; mark unconstrained base array type generated as
4775 being in/not in ALFA as well
4776 (Make_Index): mark subtype created as in/not in ALFA
4777 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4778 over a loop as in/not in ALFA, depending on its type and form of loop
4779 iteration.
4780
47812011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4782
4783 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4784 directly to False on .NET and JVM.
4785
7a93c64b
YM
47862011-08-04 Yannick Moy <moy@adacore.com>
4787
4788 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4789 constraint that subtype must come from source code to be in ALFA, so
4790 that anonymous subtypes can be in ALFA too.
4791
e9a1ed9b
YM
47922011-08-04 Yannick Moy <moy@adacore.com>
4793
4794 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
4795 reference for ALFA mode.
4796 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
4797 procedure public so as to use it from formal verification back-end.
4798
8e293fbd
AC
47992011-08-04 Jerome Lambourg <lambourg@adacore.com>
4800
4801 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
4802 invalid checks of the Parameter, making Remove_Switch not working
4803 correctly.
4804
48052011-08-04 Arnaud Charlet <charlet@adacore.com>
4806
4807 * targparm.ads: Update header: no run-time exception is needed on this
4808 file.
4809
48102011-08-04 Vincent Celier <celier@adacore.com>
4811
4812 * a-fihema.adb: Use System.IO instead of GNAT.IO
4813
48142011-08-04 Thomas Quinot <quinot@adacore.com>
4815
4816 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
4817 are forbidden in Compiler_Unit mode.
4818
cfae2bed
AC
48192011-08-04 Robert Dewar <dewar@adacore.com>
4820
4821 * sem_util.adb: Minor reformatting.
4822
48232011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4824
4825 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
4826 library-level finalizers.
4827 (Gen_Finalize_Library_C): Update the import string for library-level
4828 finalizers.
4829 (Gen_Finalize_Library_Defs_C): Update the definition name of a
4830 library-level finalizer.
4831 * exp_ch7.adb: Remove with and use clauses for Stringt.
4832 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
4833 Spec_Decl. Add local variable Body_Id. The names of library-level
4834 finalizers are now manually fully qualified and are no longer external.
4835 A single name is now capable of servicing .NET, JVM and non-VM targets.
4836 Pragma Export is no longer required to provide visibility for the name.
4837 (Create_Finalizer_String): Removed.
4838 (New_Finalizer_Name): New routine which mimics New_..._Name.
4839
01f0729a
AC
48402011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4841
4842 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
4843 elaboration counter to Standard_Short_Integer.
4844 * sem_util.adb (Build_Elaboration_Entity): Likewise.
4845 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
4846 (Gen_Elab_Externals_C): Likewise.
4847
48482011-08-04 Ed Falis <falis@adacore.com>
4849
4850 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4851 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4852 system-vxworks-mips.ads, system-vxworks-x86.ads
4853 (Always_Compatible_Rep): set to False for all VxWorks targets.
4854
2c1b72d7
AC
48552011-08-04 Robert Dewar <dewar@adacore.com>
4856
4857 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
4858 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
4859 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
4860 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
4861 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
4862 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
4863 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
4864 Minor reformatting and code reorganization.
4865
48662011-08-04 Emmanuel Briot <briot@adacore.com>
4867
4868 * projects.texi: Added doc for aggregate projects.
4869
824e9320
AC
48702011-08-04 Emmanuel Briot <briot@adacore.com>
4871
4872 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4873 Add support for overriding the Project_Path in aggregate projects.
4874
48752011-08-04 Robert Dewar <dewar@adacore.com>
4876
4877 * a-cofove.ads: Minor reformatting.
4878
48792011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4880
4881 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
4882 on the generated code.
4883 (Build_Finalize_Statements): Update the comment on the generated code.
4884 (Build_Initialize_Statements): Update the comment on the generated code.
4885 (Build_Object_Declarations): Add local variable Result. The object
4886 declarations are now built in sequence.
4887 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
4888 RE_Unit_Table.
4889
48902011-08-04 Robert Dewar <dewar@adacore.com>
4891
4892 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
4893
48942011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4895
4896 * einfo.ads (Elaboration_Entity): Document new definition and use.
4897 (Elaboration_Entity_Required): Adjust to above change.
4898 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
4899 * exp_ch12.adb: And with and use for Snames.
4900 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
4901 * exp_util.adb (Set_Elaboration_Flag): Likewise.
4902 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
4903 <Check_Unit_Name>: Deal with N_Expanded_Name.
4904 <Attribute_Elaborated>: Extend to all unit names.
4905 * sem_elab.adb: And with and use for Uintp.
4906 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4907 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4908 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4909 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4910 from Gen_Adainit_Ada.
4911 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4912 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
4913 case, do not call System.Standard_Library.Adafinal; instead call
4914 finalize_library if needed.
4915 (Gen_Adafinal_C): Likewise.
4916 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4917 non-main program case.
4918 (Gen_Adainit_C): Generate a couple of external declarations here.
4919 In the main program case, set SSL.Finalize_Library_Objects.
4920 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4921 (Gen_Elab_Calls_C): Likewise.
4922 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
4923 (Gen_Finalize_Library_C): Likewise. Generate a full function.
4924 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4925 objects here.
4926 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4927 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
4928 Gen_Adafinal_Ada.
4929 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4930 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 4931 of external declarations. Call Gen_Finalize_Library_C.
824e9320 4932
316d9d4f
EB
49332011-08-04 Emmanuel Briot <briot@adacore.com>
4934
4935 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4936 Compute_Compilation_Phases): new subprogram.
4937 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4938 The number of mains as well as the various compilation phases that
4939 need to be run are now project tree specific, since various
4940 aggregated trees might have different requirements. In particular,
4941 they do not all require bind or link phases.
4942
9434c32e
EB
49432011-08-04 Emmanuel Briot <briot@adacore.com>
4944
4945 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4946 (Project_Tree_Appdata): New type.
4947 It is now possible to associate application-specific data to a project
4948 tree. In particular, this is used in the gprbuild builder to avoid a
4949 number of global tables and htables, especially now that there can be
4950 several project trees loaded at once because of aggregate projects.
4951 (Debug_Name): new procedure.
4952 * projects.texi: Clarify syntax of "**" for Source_Dirs
4953
41ba34db
EB
49542011-08-03 Emmanuel Briot <briot@adacore.com>
4955
4956 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4957 the "roots" for a main.
4958 (Fill_From_Project): add support for aggregate projects. Main units
4959 in aggregated projects are now automatically added in the list of
4960 files to build (although this fails later on in gprbuild, because
4961 these files are not using the root proejct tree, so this needs
4962 further cleanup)
4963 * gcc-interface/Make-lang.in: Update dependencies.
4964
fccd42a9
AC
49652011-08-03 Yannick Moy <moy@adacore.com>
4966
4967 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4968 conditional expression in ALFA.
4969 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4970 expressions as not in ALFA.
4971
49722011-08-03 Robert Dewar <dewar@adacore.com>
4973
4974 * a-cofove.adb: Minor reformatting.
4975
49762011-08-03 Emmanuel Briot <briot@adacore.com>
4977
4978 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4979 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4980 gprbuild sources.
4981 These packages are more logically placed in the Queue package, since
4982 they manipulate the queue. It is also likely that they can be adapted
4983 for gnatmake, thus sharing more code.
4984 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4985 that we could move the above.
4986
49872011-08-03 Emmanuel Briot <briot@adacore.com>
4988
4989 * errutil.adb (Finalize): clean up the list of error messages on exit.
4990 Calling this subprogram multiple times will no longer show duplicate
4991 error messages on stderr.
4992
49932011-08-03 Emmanuel Briot <briot@adacore.com>
4994
4995 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4996 Getopt_Switches when we have already define a command line
4997 configuration.
4998
5e8c8e44
YM
49992011-08-03 Yannick Moy <moy@adacore.com>
5000
5001 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5002 in ALFA. Instead, they are considered as assertions to prove.
5003 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5004 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5005 if they have no ELSE part, or if they occur in pre- and postconditions,
5006 where the Condition cannot have side-effects in ALFA
5007 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5008 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5009 Instead, include type conversion between scalar types in ALFA.
5010 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5011 if-and-only-if its type is in ALFA.
5012
5ffe0bab
AC
50132011-08-03 Thomas Quinot <quinot@adacore.com>
5014
5015 * scos.adb, get_scos.adb, put_scos.adb
5016 New code letter for decisions: G (entry guard)
5017 * par_sco.adb
5018 (Traverse_Subprogram_Body): Rename to...
5019 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5020 (Traverse_Protected_Body): New subprogram
5021 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5022 protected bodies and entry bodies.
5023
50242011-08-03 Yannick Moy <moy@adacore.com>
5025
5026 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5027 entities with get/set subprograms, which is set on procedure entities
5028 generated by the compiler for a postcondition.
5029 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5030 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5031 entity for a declaration
5032 (Get_Unique_Entity_For_Decl): new function returning an entity which
5033 represents a declaration, so that matching spec and body have the same
5034 entity.
5035
50362011-08-03 Robert Dewar <dewar@adacore.com>
5037
5038 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5039 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5040
50412011-08-03 Yannick Moy <moy@adacore.com>
5042
5043 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5044 library-level because retriction No_Implicit_Dynamic_Code in the
5045 front-end prevents its definition as a local subprogram
5046 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5047 for reuse in other contexts
5048 (Traverse_Declarations_Or_Statements,
5049 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5050 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5051 procedures take a callback parameter to be called on all declarations
5052 * lib-xref.ads
5053 (Traverse_All_Compilation_Units): new generic function to traverse a
5054 compilation unit and call a callback parameter on all declarations
5055
f9ad6b62
AC
50562011-08-03 Javier Miranda <miranda@adacore.com>
5057
5058 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5059 in Java since they are always enclosed in a namespace that
5060 differentiates them, and overloaded entities are supported by the VM.
5061
50622011-08-03 Ed Schonberg <schonberg@adacore.com>
5063
5064 * checks.adb (Determine_Range): If a computed bound of an operation is
5065 outside the range of the base type of the expression, and overflow
5066 checks are enabled, the result is unknown and cannot be used for any
5067 subsequent constant folding.
5068 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5069 unknown, so is the result of the comparison.
5070
50712011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5072
5073 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5074 From_Abort. When finalization was triggered by an abort, propagate
5075 Standard'Abort_Signal rather than Program_Error.
5076 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5077 From_Abort.
5078 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5079 From_Abort. When finalization was triggered by an abort, propagate
5080 Standard'Abort_Signal rather than Program_Error.
5081 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5082 From_Abort.
5083 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5084 Abort_Id. Update the calls to Build_Object_Declarations and
5085 Build_Raise_Statement to include Abort_Id.
5086 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5087 calls to Build_Object_Declarations and Build_Raise_Statement to include
5088 Abort_Id.
5089 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5090 calls to Build_Object_Declarations and Build_Raise_Statement to include
5091 Abort_Id.
5092 (Build_Components): Create an entity for Abort_Id when exceptions are
5093 allowed on the target.
5094 (Build_Finalizer): New local variable Abort_Id.
5095 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5096 calls to Build_Object_Declarations and Build_Raise_Statement to include
5097 Abort_Id.
5098 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5099 declaration of flag Abort_Id to preserve the original abort status
5100 before finalization code is executed.
5101 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5102 runtime routine Raise_From_Controlled_Operation.
5103 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5104 Abort_Id. Update the call to Build_Object_Declarations to include
5105 Abort_Id. Update the layout of the finalizer body.
5106 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5107 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5108 clunky code to create all flags and objects related to
5109 exception propagation and replace it with a call to
5110 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5111 include Abort_Id.
5112 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5113 Add new formal Abort_Id and associated comment on its use.
5114 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5115 on its use.
5116 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5117 Remove the clunky code to create all flags and objects related to
5118 exception propagation and replace it with a call to
5119 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5120
51212011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5122
5123 * s-tassta.adb: Fix minor typos.
5124
51252011-08-03 Robert Dewar <dewar@adacore.com>
5126
5127 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5128 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5129
1cdfa9be
AC
51302011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5131
5132 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5133 to packages. This ensures that the finalizer body will not end up
5134 inside the freeze node.
5135 (Process_Declarations): Add code to detect whether a freeze node has a
5136 nested finalization collection.
5137
51382011-08-03 Pascal Obry <obry@adacore.com>
5139
5140 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5141 (Current_Session): Return a not null access to Session_Type.
5142 (Default_Session): Likewise.
5143
243cae0a
AC
51442011-08-03 Robert Dewar <dewar@adacore.com>
5145
5146 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5147 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5148
51492011-08-03 Pascal Obry <obry@adacore.com>
5150
5151 * g-awk.ads: Minor comment fix.
5152
51532011-08-03 Sergey Rybin <rybin@adacore.com>
5154
5155 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5156 the tree structure related to discriminant constraints.
5157 Original_Discriminant cannot be used any more for computing the
5158 defining name for the reference to a discriminant.
5159
51602011-08-03 Ed Schonberg <schonberg@adacore.com>
5161
5162 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5163 function is not visibly tagged, this is not a dispatching call and
5164 therfore is not Tag_Indeterminate, even if the function is marked as
5165 dispatching on result.
5166
f553e7bc
AC
51672011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5168
5169 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5170 (Expand_N_Free_Statement): Add a guard to protect against run-times
5171 which do not support controlled types.
5172 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5173 against run-times which do not support controlled types.
5174 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5175 against run-times which do not support controlled types.
5176 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5177 against run-times which do not support controlled types.
5178 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5179 protect against run-times which do not support controlled types.
5180
51812011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5182
5183 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5184 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5185
e4982b64
AC
51862011-08-03 Ed Schonberg <schonberg@adacore.com>
5187
5188 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5189 modified in the source, to prevent spurious warnings when compiling
5190 with -gnatg.
5191
51922011-08-03 Thomas Quinot <quinot@adacore.com>
5193
5194 * a-except-2005.adb: Minor reformatting.
5195
51962011-08-03 Ed Schonberg <schonberg@adacore.com>
5197
5198 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5199 is a renaming declaration in the private part of a package, do not emit
5200 a warning that the with_clause could be moved because the renaming may
5201 be used in the body or in a child unit.
5202
52032011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5204
5205 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5206 Propagate the Comes_From_Source attribute from the original return
5207 object to the renaming.
5208
52092011-08-03 Jose Ruiz <ruiz@adacore.com>
5210
5211 * exp_ch7.adb (Build_Raise_Statement): Do not call
5212 Raise_From_Controlled_Operation when this routine is not present in
5213 the run-time library.
5214 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5215 libraries (Ravenscar), tasks are non-terminating, and protected objects
5216 and tasks can only appear at library level, so we do not want
5217 finalization of protected objects nor tasks.
5218 * exp_intr.adb: Minor clarification in comment.
5219 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5220 Gen_Output_File_C): Remove references to finalization of library-level
5221 objects when using restricted run-time libraries.
5222
52232011-08-03 Ed Schonberg <schonberg@adacore.com>
5224
5225 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5226 Original_Discriminant only if the parent type is a generic formal.
5227
deb8dacc
HK
52282011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5229
5230 * exp_ch13.adb: Add with and use clause for Targparm;
5231 (Expand_N_Free_Statement): Prevent the generation of a custom
5232 Deallocate on .NET/JVM targets since this requires pools and address
5233 arithmetic.
5234 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5235 .NET/JVM targets, attach the newly allocated object to the access
5236 type's finalization collection. Do not generate a call to
5237 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5238 exist in the runtime.
5239 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5240 create a custom Allocate for object that do not require initialization.
5241 Attach a newly allocated object to the access type's finalization
5242 collection on .NET/JVM.
5243 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5244 assignment of controlled types on .NET/JVM. The two hidden pointers
5245 Prev and Next and stored and later restored after the assignment takes
5246 place.
5247 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5248 kludge for .NET/JVM to recognize a particular piece of code coming from
5249 Heap_Management and change the call to Finalize into Deep_Finalize.
5250 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5251 finalization collections on .NET/JVM only for types derived from
5252 Controlled. Separate the association of storage pools with a collection
5253 and only allow it on non-.NET/JVM targets.
5254 (Make_Attach_Call): New routine.
5255 (Make_Detach_Call): New routine.
5256 (Process_Object_Declarations): Suppress the generation of
5257 build-in-place return object clean up code on .NET/JVM since it uses
5258 pools.
5259 * exp_ch7.ads (Make_Attach_Call): New routine.
5260 (Make_Detach_Call): New routine.
5261 * exp_intr.adb Add with and use clause for Targparm.
5262 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5263 on .NET/JVM targets.
5264 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5265 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5266 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5267 names used in finalization.
5268
52692011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5270
5271 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5272 (Attach, Detach): Lock the current task when chaining an object onto a
5273 collection.
5274
df3e68b1
HK
52752011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5276
5277 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5278 Rewritten to create the message strings when the exception is not
5279 raised by an abort during finalization.
5280 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5281 Raise_From_Controlled_Operation and update its associated comment.
5282 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5283 Ada.Finalization.Heap_Management provides key functionality
5284 associated with controlled objects on the heap, their creation,
5285 finalization and reclamation. Type Finalization_Collection is
5286 effectively a wrapper which sits ontop of a storage pool and performs
5287 all necessary bookkeeping for all the objects it contains. Each
5288 access-to-controlled or access-to-class-wide type receives a collection
5289 as part of its expansion. The compiler generates buffer code and
5290 invokes Allocate / Deallocate to create and destroy allocated
5291 controlled objects.
5292 * a-finali.adb ("="): Removed.
5293 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5294 fields Prev and Next.
5295 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5296 A library unit with at least one controlled object on the library level
5297 has a special finalizer which is invoked by the binder. To signal this,
5298 ali files carry field PF.
5299 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5300 associated comment on field usage.
5301 * a-tags.adb (Get_RC_Offset): Removed.
5302 (Needs_Finalization): New routine.
5303 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5304 Dispatch tables now carry field Needs_Finalization which provides
5305 runtime indication whether a type is controlled or has controlled
5306 components or both. Remove field RC_Offset.
5307 (Get_RC_Offset): Removed along with its associated pragma Export.
5308 Since tagged types with controlled components no longer carry hidden
5309 field _controller, the special mechanism to retrieve its location is no
5310 longer needed.
5311 (Needs_Finalization): New routine.
5312 * atree.ads, atree.adb (Elist24): New routine.
5313 (Set_Elist24): New routine.
5314 * atree.h: Add a define clause for Elist24.
5315 * bindgen.adb New library-level variable Lib_Final_Built.
5316 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5317 presence of a VM target, the routine generates calls to the proper
5318 library finalization routine.
5319 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5320 targets. Set the correct library finalization routine depending on
5321 whether the library has controlled objects or this is a VM compilation.
5322 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5323 to library-level finalizers of compiled units in reverse order of
5324 elaboration. It also produces exception management code and reraises a
5325 potential exception after all units have been finalized.
5326 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5327 library-level finalizers of compiled units in reverse order of
5328 elaboration.
5329 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5330 definitions of all library-level finalizers available to the compilation
5331 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5332 dependent code.
5333 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5334 System.Standard_Library.Adafinal directly. If the library needs
5335 finalization actions, create the sequence of finalization calls.
5336 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5337 Generate a with clause for System.Soft_Links when compiling for a VM.
5338 Remove the code which imports System.Standard_Library.Adafinal as
5339 Do_Finalize. Generate the library finalization routine.
5340 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5341 If the library needs finalization actions, create all the definitions
5342 of library- level finalizers.
5343 (Has_Finalizer): New routine. Determines whether at least one compiled
5344 unit has a library-level finalizer.
5345 Add type Qualification_Mode.
5346 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5347 * einfo.adb: New usage of field 15 as Return_Flag.
5348 Remove Finalization_Chain_Entity from the usages of field 19.
5349 Remove Associated_Final_Chain from the usages of field 23.
5350 New usage of field 23 as Associated_Collection.
5351 New usage of field 24 as Finalizer.
5352 New usage of flag 252 as Is_Processed_Transient.
5353 (Associated_Final_Chain): Removed.
5354 (Associated_Collection): New routine.
5355 (Finalization_Chain_Entity): Removed.
5356 (Finalizer): New routine.
5357 (Is_Finalizer): New routine.
5358 (Is_Processed_Transient): New routine.
5359 (Return_Flag): New routine.
5360 (Set_Associated_Final_Chain): Removed.
5361 (Set_Associated_Collection): New routine.
5362 (Set_Finalization_Chain_Entity): Removed.
5363 (Set_Finalizer): New routine.
5364 (Set_Is_Processed_Transient): New routine.
5365 (Set_Return_Flag): New routine.
5366 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5367 displayed flags.
5368 (Write_Field8_Name): Alphabetize the output.
5369 (Write_Field11_Name): Alphabetize the output.
5370 (Write_Field12_Name): Alphabetize the output.
5371 (Write_Field13_Name): Alphabetize the output.
5372 (Write_Field14_Name): Alphabetize the output.
5373 (Write_Field15_Name): Alphabetize the output.
5374 (Write_Field16_Name): Alphabetize the output.
5375 (Write_Field17_Name): Alphabetize the output.
5376 (Write_Field18_Name): Alphabetize the output.
5377 (Write_Field19_Name): Alphabetize the output. Remove the output of
5378 Finalization_Chain_Entity.
5379 (Write_Field20_Name): Alphabetize the output.
5380 (Write_Field21_Name): Alphabetize the output.
5381 (Write_Field22_Name): Alphabetize the output.
5382 (Write_Field23_Name): Alphabetize the output. Remove the output of
5383 Associated_Final_Chain. Add output for Associated_Collection.
5384 (Write_Field24_Name): Alphabetize the output.
5385 (Write_Field25_Name): Add output for Finalizer.
5386 (Write_Field26_Name): Alphabetize the output.
5387 (Write_Field27_Name): Alphabetize the output.
5388 (Write_Field28_Name): Alphabetize the output.
5389 * einfo.ads: Add new field description for Associated_Collection and
5390 its uses in nodes.
5391 Remove Associated_Final_Chain and its uses in nodes.
5392 Remove Finalization_Chain_Entity and its uses in nodes.
5393 Add new field description for Finalizer and its uses in nodes.
5394 Add new synthesized attribute Is_Finalizer.
5395 Add new flag description for Is_Processed_Transient and its uses in
5396 nodes.
5397 Add new field description for Return_Flag and its uses in nodes.
5398 (Associated_Final_Chain): Removed along with its pragma Inline.
5399 (Associated_Collection): New routine and pragma Inline.
5400 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5401 (Finalizer): New routine and pragma Inline.
5402 (Is_Finalizer): New routine and pragma Inline.
5403 (Is_Processed_Transient): New routine and pragma Inline.
5404 (Return_Flag): New routine and pragma Inline.
5405 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5406 (Set_Associated_Collection): New routine and pragma Inline.
5407 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5408 (Set_Finalizer): New routine and pragma Inline.
5409 (Set_Is_Processed_Transient): New routine and pragma Inline.
5410 (Set_Return_Flag): New routine and pragma Inline.
5411 * exp_aggr.adb: Alphabetize subprograms.
5412 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5413 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5414 associated comments. Remove local variables External_Final_List and
5415 Attach.
5416 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5417 Ancestor. Remove the retrieval of finalization lists. Update the call to
5418 Make_Adjust_Call.
5419 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5420 lists. Update the call to Late_Expansion.
5421 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5422 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5423 (Gen_Assign): Remove the retrieval of the finalization list used to
5424 build the assignment. Update the calls to Make_Init_Call and
5425 Make_Adjust_Call.
5426 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5427 Remove the mechanism to determine attachment levels and finalization
5428 list retrieval. Remove the processing for coextensions.
5429 (Init_Controller): Removed. Controllers no longer exist.
5430 (Late_Expansion): Remove formals Flist and Obj along with their
5431 associated comments. Update the calls to Build_Record_Aggr_Code and
5432 Build_Array_Aggr_Code.
5433 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5434 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5435 appear in entry bodies, protected subprograms and task bodies.
5436 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5437 * exp_ch3.adb (Add_Final_Chain): Removed.
5438 (Build_Array_Init_Proc): Alphabetize local variables.
5439 (Build_Assignment): Alphabetize local variables. Update the call to
5440 Maked_Adjust_Call.
5441 (Build_Class_Wide_Master): Rename local variables to better reflect
5442 their role.
5443 (Build_Discriminant_Assignments): Code reformatting.
5444 (Build_Init_Call_Thru): Code reformatting.
5445 (Build_Init_Procedure): Code reformatting. Generate a special version
5446 of Deep_Finalize which is capable of finalizing all initialized
5447 components and ignore the rest.
5448 (Build_Init_Statements): Rename local variables to better reflect their
5449 role.
5450 Reimplement the mechanism to include the creation and update of an index
5451 variable called a "counter". It is used as a bookmark for tracing
5452 initialized and non-initialized components.
5453 (Build_Initialization_Call): Remove local variable Controller_Typ.
5454 Alphabetize all local variables. Remove the initialization of the
5455 record controller and update the call to Make_Init_Call.
5456 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5457 New local variable Counter.
5458 (Constrain_Array): Alphabetize.
5459 (Expand_Freeze_Array_Type): Create a collection instead of a
5460 finalization list.
5461 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5462 Finalize_Address which is used in conjunction with allocated controlled
5463 objects.
5464 (Expand_N_Object_Declaration): Remove the creation of a finalization
5465 list for anonymous access types. Update the calls to Make_Init_Call and
5466 Make_Adjust_Call.
5467 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5468 retrieval of finalization lists. Remove the expansion of the record
5469 controller. Create TSS primitive Finalize_Address used in conjunction
5470 with controlled objects on the heap. Create finalization collections
5471 for access-to-controlled record components.
5472 (Expand_Record_Controller): Removed.
5473 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5474 class-wide types now requires additional processing. Create
5475 finalization collections for access-to-controlled types.
5476 (Increment_Counter): New routine.
5477 (Make_Counter): New routine.
5478 (Make_Eq_If): Remove the mention of Name_uController.
5479 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5480 types coming from System.Finalization_Root.
5481 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5482 (Predefined_Primitive_Bodies): There is no longer need to skip types
5483 coming from System.Finalization_Root.
5484 (Stream_Operation_OK): Do not generate stream routines for
5485 type Ada.Finalization.Heap_Management.Finalization_Collection.
5486 * exp_ch3.ads: Alphabetize subprograms.
5487 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5488 Add with and use clause for Lib.
5489 (Complete_Coextension_Finalization): Removed.
5490 (Complete_Controlled_Allocation): New routine. Create a finalization
5491 collection for anonymous access-to-controlled types. Create a custom
5492 Allocate which interfaces with the back end and the machinery in
5493 Heap_Management.
5494 (Expand_Allocator_Expression): Add necessary calls to
5495 Complete_Controlled_Allocation. Remove the retrieval of finalization
5496 lists. Update the calls to Make_Adjust_Call. Generate a call to
5497 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5498 the associated collection.
5499 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5500 Code clean up. Remove the retrieval of finalization lists and
5501 attachment levels.
5502 Update the call to Make_Init_Call. Generate a call to
5503 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5504 the associated collection.
5505 (Get_Allocator_Final_List): Removed. Finalization lists are not
5506 available.
5507 (Suitable_Element): Remove the mention of Name_uController.
5508 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5509 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5510 the left hand side, carry out the assignment and adjust the left hand
5511 side.
5512 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5513 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5514 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5515 BIP_Collection and BIPcollection.
5516 (Build_Heap_Allocator): New routine used to allocate the return object
5517 of a build-in-place function onto a collection.
5518 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5519 (Expand_Call): Do not replace direct calls to Deep routines with their
5520 aliases.
5521 (Expand_N_Extended_Return_Statement): Give all variables shorter names
5522 and update their occurrences. Add a special return flag to monitor the
5523 [ab]normal execution of the function. The flag is set right before the
5524 return statement.
5525 Rewrite the mechanism used to allocate a build-in-place return object
5526 on the heap or on a storage pool.
5527 (Is_Direct_Deep_Call): New routine.
5528 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5529 build-in-place function call instead of a final list. Build a call to
5530 Set_Finalize_Address_Ptr to decorate the associated collection.
5531 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5532 order to name the build-in-place function call's result for later
5533 finalization. Add a collection to a build-in-place function call
5534 instead of a final list.
5535 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5536 build-in-place function call instead of a final list. Remove the code
5537 which moves one final list and transforms it into the actual in a
5538 nested build-in-place call.
5539 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5540 build-in-place function call instead of a final list.
5541 (Move_Final_List): Removed.
5542 (Needs_BIP_Collection): New routine.
5543 (Needs_BIP_Final_List): Removed.
5544 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5545 enumeration type BIP_Formal_Kind.
5546 Update the related comment.
5547 (Needs_BIP_Collection): New routine.
5548 (Needs_BIP_Final_List): Removed.
5549 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5550 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5551 majority of subprograms in this unit. Add Name_Finalize_Address to
5552 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5553 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5554 statements for an array type.
5555 (Build_Adjust_Statements): Create the adjust statements for a record
5556 type.
5557 (Build_Cleanup_Statements): New routine. A procedure which given any
5558 construct containing asynchronous calls, references to _master, or is a
5559 task body, a task allocation or a protected body produces the necessary
5560 runtime calls to clean up these constructs.
5561 (Build_Exception_Handler): New routine.
5562 (Build_Final_List): Removed.
5563 (Build_Finalization_Collection): New routine. A core procedure which
5564 creates a collection to service heap allocated controlled objects
5565 associated with an access-to-controlled type.
5566 (Build_Finalize_Statements): Create the finalization statements for a
5567 record types.
5568 (Build_Finalizer): New routine. A core procedure which given any
5569 construct with declarations and/or statements detects all objects which
5570 need any type of clean up (controlled objects, protected objects) and
5571 generates all necessary code to clean up the said objects in the proper
5572 order.
5573 (Build_Finalizer_Call): New routine.
5574 (Build_Initialize_Statements): Create the initialization statements for
5575 an array type. The generated routine contains code to finalize partially
5576 initialized arrays.
5577 (Build_Object_Declarations): New routine.
5578 (Build_Raise_Statement): New routine.
5579 (Clean_Simple_Protected_Objects): Removed.
5580 (Controller_Component): Removed.
5581 (Enclosing_Function): New routine.
5582 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5583 either declarations or statements or both.
5584 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5585 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5586 package.
5587 (Find_Final_List): Removed.
5588 (Global_Flist_Ref): Removed.
5589 (In_Finalization_Root): Removed.
5590 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5591 scope in terms of tree nodes. Process all transient variables within
5592 that range.
5593 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5594 generated after the adjust.
5595 (Make_Attach_Call): Removed.
5596 (Make_Call): New routine.
5597 (Make_Clean): Removed.
5598 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5599 build routines.
5600 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5601 in Deep routines.
5602 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5603 build routines.
5604 (Make_Final_Call): Modified to simply create a call to either
5605 Deep_Finalize or Finalize.
5606 (Make_Finalize_Address_Body): New routine.
5607 (Make_Finalize_Address_Stmts): New routine. A function which produces
5608 TSS primitive Finalize_Address used in conjunction with heap allocated
5609 controlled objects.
5610 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5611 (Make_Init_Call): Rewritten. There is no longer an attach call
5612 generated after initialization.
5613 (Make_Local_Deep_Finalize): New routine.
5614 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5615 (Make_Transient_Block): Remove the finalization list retrieval and
5616 manipulation.
5617 (Needs_Finalization): Moved to Exp_Util.
5618 (Parent_Field_Type): New routine.
5619 (Preprocess_Components): New routine.
5620 (Process_Transient_Objects): New routine.
5621 (Wrap_HSS_In_Block): New routine.
5622 (Wrap_Transient_Declaration): Remove finalization list management and
5623 controller insertion.
5624 (Wrap_Transient_Expression): Code reformatting.
5625 (Wrap_Transient_Statement): Code reformatting.
5626 * exp_ch7.ads (Build_Final_List): Removed.
5627 (Build_Finalization_Collection): New routine.
5628 (Build_Raise_Statement): New routine.
5629 (Controller_Component): Removed.
5630 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5631 (Find_Final_List): Removed.
5632 (In_Finalization_Root): Removed.
5633 (Is_Simple_Protected_Type): Update related comment.
5634 (Make_Adjust_Call): New parameter profile and associated comments.
5635 (Make_Attach_Call): Removed.
5636 (Make_Final_Call): New parameter profile and associated comments.
5637 (Make_Finalize_Address_Body): New routine.
5638 (Make_Init_Call): New parameter profile and associated comments.
5639 (Make_Local_Deep_Finalize): New routine.
5640 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5641 (Needs_Finalization): Moved to Exp_Util.
5642 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5643 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5644 (Find_Protection_Type): Moved to Exp_Util.
5645 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5646 (Make_DT): Update sequence of dispatch table initialization. Remove the
5647 initialization of field RC_Offset. Add initialization of field Needs_
5648 Finalization.
5649 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5650 Reimplement how an object is first finalized, then deallocated.
5651 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5652 Code reformatting.
5653 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5654 Register TSS_Finalize_Address with type TSS_Names.
5655 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5656 procedure provides the interface between an allocation / deallocation
5657 and the support machinery in Ada.Finalization.Heap_Management.
5658 (Find_Init_Call): Code reformatting.
5659 (Find_Init_Call_In_List): Code reformatting.
5660 (Find_Protection_Type): Moved from Exp_Ch9.
5661 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5662 (Has_Controlled_Coextensions): Removed.
5663 (Has_Controlled_Objects): New routine.
5664 (In_Library_Level_Package_Body): New routine.
5665 (Insert_Action_After): New routine.
5666 (Is_Finalizable_Transient): New routine. This predicate determines
5667 whether an object declaration is one of the many variants of controlled
5668 transients.
5669 (Is_Null_Access_BIP_Func_Call): New routine.
5670 (Is_Non_BIP_Func_Call): New routine.
5671 (Is_Related_To_Func_Return): New routine.
5672 (Needs_Finalization): Moved from Exp_Ch7.
5673 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5674 (Find_Protection_Type): Moved from Exp_Ch9.
5675 (Has_Controlled_Coextensions): Removed.
5676 (Has_Controlled_Objects): New routine.
5677 (In_Library_Level_Package_Body): New routine.
5678 (Insert_Action_After): New routine.
5679 (Is_Finalizable_Transient): New routine.
5680 (Is_Null_Access_BIP_Func_Call): New routine.
5681 (Is_Non_BIP_Func_Call): New routine.
5682 (Is_Related_To_Func_Return): New routine.
5683 (Needs_Finalization): Moved from Exp_ch7.
5684 * expander.adb (Expand): Add a case for N_Free_Statement.
5685 * freeze.adb (Freeze_All): Replace the generation of a finalization
5686 list with a collection for access-to-controlled types.
5687 (Freeze_Entity): Code reformatting.
5688 (Freeze_Record_Type): Remove the freezing of a record controller
5689 component.
5690 (Freeze_Subprogram): Code reformatting.
5691 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5692 finalization list.
5693 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5694 has a library-level finalizer.
5695 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5696 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5697 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5698 files. Add a-fihema to the list of object files.
5699 * par-ch4.adb:
5700 Alphabetize the associations in type Is_Parameterless_Attribute.
5701 * rtsfind.ads: Ada.Finalization_List.Controller and
5702 System.Finalization_Implementation are no longer a GNAT unit.
5703 Update the range of type Ada_Finalization_Child. Remove the following
5704 recoverable entities:
2c7f9cc0 5705
df3e68b1
HK
5706 RE_Attach_To_Final_List
5707 RE_Deep_Tag_Attach
5708 RE_Finalize_List
5709 RE_Finalize_One
5710 RE_Finalizable_Ptr_Ptr
5711 RE_Global_Final_List
5712 RE_Limited_Record_Controller
5713 RE_List_Controller
5714 RE_Move_Final_List
5715 RE_Record_Controller
5716 RE_Simple_List_Controller
2c7f9cc0 5717
df3e68b1 5718 Add the following recoverable entities:
2c7f9cc0 5719
df3e68b1
HK
5720 RE_Add_Offset_To_Address
5721 RE_Allocate
5722 RE_Base_Pool
5723 RE_Deallocate
5724 RE_Exception_Identity
5725 RE_Finalization_Collection
5726 RE_Finalization_Collection_Ptr
5727 RE_Needs_Finalization
5728 RE_Save_Library_Occurrence
5729 RE_Set_Finalize_Address_Ptr
5730 RE_Set_Storage_Pool_Ptr
5731 RE_Storage_Count
5732 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5733 Name_uController.
5734 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5735 (First_Stored_Discriminant): Remove the mention of Name_uController.
5736 * sem_aux.ads: Comment reformatting.
5737 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5738 to redecorate an already existing class-wide type.
5739 (Decorate_Tagged_Type): New parameter profile and associated comment.
5740 Create a "shadow class-wide type" for a shadow entity.
5741 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5742 of the final chain along with the associated comment.
5743 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5744 Full_Desig and set it to the full view of the designated type.
5745 Initialize the finalization collection to empty.
5746 (Build_Derived_Record_Type): Alphabetize local variables. Code
5747 reformatting.
5748 (Collect_Fixed_Components): Remove the mention of Name_uController.
5749 (Create_Constrained_Components): Remove the mention of Name_uController.
5750 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5751 class-wide type of a shadow entity.
5752 (Process_Full_View): Update the machinery which marks type
5753 Limited_Controlled's entity as limited.
5754 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5755 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5756 list, instead make a collection build-in-place formal.
5757 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5758 a designated type in order to establish a match between the renaming
5759 and the renamed entity.
5760 (Find_Selected_Component): Add guard to prevent spurious exceptions
5761 from being raised on .NET/JVM.
5762 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5763 to the list of primitive that need special processing. Update arrays
5764 C_Names and D_Names.
5765 (Replace_Types): Handle class-wide types.
5766 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5767 different parameter profile, look at the first formal.
5768 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5769 use clauses for Exp_Util.
5770 * sem_res.adb: Remove with and use clauses for Elists.
5771 (Propagate_Coextensions): Removed.
5772 (Resolve_Allocator): Do not propagate the list of coextensions from one
5773 allocator to another.
5774 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5775 Deaccessed_T to Desig_Typ.
5776 (Enter_Name): Remove the mention of Name_uController.
5777 (Gather_Components): Remove the mention of Name_uController.
5778 (Incomplete_Or_Private_View): New routine.
5779 (Is_Coextension_Root): Removed.
5780 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5781 * sem_util.ads (Incomplete_Or_Private_View): New routine.
5782 (Is_Coextension_Root): Removed.
5783 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5784 Controlled types are now derived from a null tagged record. Remove
5785 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5786 * sinfo.adb (Coextensions): Removed.
5787 (Set_Coextensions): Removed.
5788 * sinfo.ads: Remove Coextensions from the explanation of node fields
5789 and its uses in nodes.
5790 Update the field usage of N_Allocator.
5791 (Coextensions): Removed along with its pragma Inline.
5792 (Set_Coextensions): Removed along with its pragma Inline.
5793 * snames.ads-tmpl: Remove names
2c7f9cc0 5794
df3e68b1
HK
5795 Name_uClean
5796 Name_uController
5797 Name_uFinal_List
5798 Name_uLocal_Final_List
5799 Name_Finalization_Root
5800 Name_Next
5801 Name_Prev
2c7f9cc0 5802
df3e68b1 5803 Add names
2c7f9cc0 5804
df3e68b1
HK
5805 Name_uFinalizer
5806 Name_Finalize_Address
5807 * s-pooglo.adb (Allocate): Add overriding indicator.
5808 (Deallocate): Add overriding indicator.
5809 (Storage_Size): Add overriding indicator.
5810 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
5811 than Finalize_Global_List.
5812 (Null_Finalize_Global_List): Removed.
5813 (Save_Library_Occurrence): New routine.
5814 * s-soflin.ads: Remove variable Finalize_Global_List along with its
5815 initialization. Add variable Finalize_Library_Objects along with its
5816 pragma Export. Add variables Library_Exception and
5817 Library_Exception_Set along with their pragma Export.
5818 (Null_Finalize_Global_List): Removed.
5819 (Save_Library_Occurrence): New routine.
5820 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
5821 rather than Finalize_Global_List.
5822 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
5823 of the constructed node.
5824
2ee06322
RO
58252011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5826
5827 * link.c: Include "auto-host.h" before system headers.
5828
f77b022b
VC
58292011-08-03 Vincent Celier <celier@adacore.com>
5830
5831 * make.adb (Gnatmake): Add to table Library_Projs only library projects
5832 that are not extended. Do not check if a library project that is
5833 extended should be regenerated. Do not add to table Library_Paths the
5834 libraries that are in extended projects. Link only with libraries that
5835 are in libray projects that are not extended.
5836 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
5837 for a library project that is extended.
5838
0187b60e
AC
58392011-08-03 Gary Dismukes <dismukes@adacore.com>
5840
5841 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
5842 conforming subprogram renamings that appear to be completions if they
5843 are not fully conformant.
5844 Such renamings are homographs but not completions.
5845 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
5846 names in a subprogram renaming that appears in an instance.
5847
58482011-08-03 Ed Schonberg <schonberg@adacore.com>
5849
5850 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
5851 not immutably limited, build actual subtype from expression to provide
5852 proper bounds to caller.
5853
58542011-08-03 Gary Dismukes <dismukes@adacore.com>
5855
5856 * sem_ch8.adb: Minor comment correction.
5857
58582011-08-03 Thomas Quinot <quinot@adacore.com>
5859
5860 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
5861 returning a limited array, use an extended return statement.
5862
58632011-08-03 Vincent Celier <celier@adacore.com>
5864
5865 * make.adb (Initialize): If --subdirs= is used, but no project file is
5866 specified, attempt to create the specify subdir if it does not already
5867 exist and use it as the object directory as if -D had been specified.
5868
58692011-08-03 Arnaud Charlet <charlet@adacore.com>
5870
5871 * s-tpopsp-vms.adb: New file.
5872 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
5873 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
5874
e280f981
AC
58752011-08-03 Emmanuel Briot <briot@adacore.com>
5876
5877 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
5878 package.
5879
58802011-08-03 Yannick Moy <moy@adacore.com>
5881
5882 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
5883 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
5884 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
5885 detect that an array has static bounds.
5886
98c99a5a
AC
58872011-08-03 Thomas Quinot <quinot@adacore.com>
5888
5889 * exp_dist.adb: Minor reformatting.
5890
58912011-08-03 Arnaud Charlet <charlet@adacore.com>
5892
5893 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
5894 (ATCB_Key): Removed, not always used.
5895
58962011-08-03 Emmanuel Briot <briot@adacore.com>
5897
5898 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
5899 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
5900 most remaining global variables.
5901
686d0984
AC
59022011-08-03 Robert Dewar <dewar@adacore.com>
5903
5904 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
5905 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5906 reformatting.
5907
59082011-08-03 Javier Miranda <miranda@adacore.com>
5909
5910 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5911 that must be passed by copy in VM targets.
5912
59132011-08-03 Emmanuel Briot <briot@adacore.com>
5914
5915 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5916 duplicates a similar htable now in the project tree.
5917
59182011-08-03 Claire Dross <dross@adacore.com>
5919
5920 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5921 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5922 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5923 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5924 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5925 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5926 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5927 update.
5928
59292011-08-03 Arnaud Charlet <charlet@adacore.com>
5930
5931 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5932 (ATCB_Key): Removed, not always used.
5933 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5934 s-taprop-posix.adb.
5935 * s-tpopsp-tls.adb: New file.
5936 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5937 x86/x64/ia64/powerpc/sparc Linux.
5938
59392011-08-03 Arnaud Charlet <charlet@adacore.com>
5940
5941 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5942 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5943
59442011-08-03 Thomas Quinot <quinot@adacore.com>
5945
5946 * rtsfind.ads, exp_dist.adb, exp_dist.ads
5947 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5948 Fix type selection for mapping integer types to PolyORB types.
5949
59502011-08-03 Bob Duff <duff@adacore.com>
5951
5952 * sem_ch7.adb: Minor comment clarification.
5953
59542011-08-03 Bob Duff <duff@adacore.com>
5955
5956 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5957 an error analyzing a choice, skip further processing. Further
5958 processing could cause a crash or cascade errors.
5959
40ecf2f5
EB
59602011-08-03 Emmanuel Briot <briot@adacore.com>
5961
5962 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5963 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5964 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5965 prj-env.ads (Shared_Project_Tree_Data): new type
5966 An aggregate project and its aggregated trees need to share the common
5967 data structures used for lists of strings, packages,... This makes the
5968 code simpler since otherwise we have to pass the root tree (also used
5969 for the configuration file data) in addition to the current project
5970 tree. This also avoids ambiguities as to which tree should be used.
5971 And finally this saves a bit of memory.
5972 (For_Every_Project_Imported): new parameter Tree.
5973 Since aggregated projects are using a different tree, we need to let
5974 the caller know which tree to use to manipulate the returned project.
5975
9fde638d
RD
59762011-08-03 Robert Dewar <dewar@adacore.com>
5977
5978 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5979 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5980 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5981 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5982
95eb8b69
AC
59832011-08-03 Javier Miranda <miranda@adacore.com>
5984
5985 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5986 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5987
59882011-08-03 Bob Duff <duff@adacore.com>
5989
5990 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5991 the Base_Type.
5992
59932011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
5994
5995 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5996 g-sehash.ads: Fix typo. Update header.
5997
59982011-08-03 Thomas Quinot <quinot@adacore.com>
5999
6000 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6001 expansion.
6002
60032011-08-03 Gary Dismukes <dismukes@adacore.com>
6004
6005 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6006 prefixes of private types along with records, since the selector may be
6007 a discriminant.
6008 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6009 private types along with records, since the selector may be a
6010 discriminant.
6011
92e77027
AC
60122011-08-03 Emmanuel Briot <briot@adacore.com>
6013
b2f7ebc1 6014 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
6015
60162011-08-03 Javier Miranda <miranda@adacore.com>
6017
6018 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6019 Tagged_Type_Expansion.
6020
60212011-08-03 Yannick Moy <moy@adacore.com>
6022
b2f7ebc1
GP
6023 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6024 violation when the argument of concatenation is the name of a
6025 constant.
92e77027 6026
ab29a348
EB
60272011-08-03 Emmanuel Briot <briot@adacore.com>
6028
6029 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6030 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6031 (Process_Declarative_Items): new parameter Child_Env.
6032
9466892f
AC
60332011-08-03 Yannick Moy <moy@adacore.com>
6034
589ef536
GP
6035 * alfa.ads: Update format of ALFA section in ALI file in order to
6036 add a mapping from bodies to specs when both are present.
6037 (ALFA_Scope_Record): Add components for spec file/scope.
6038 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6039 present.
6040 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6041 collected, fill in the spec information when relevant.
6042 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
6043 present.
6044
60452011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6046
6047 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6048 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 6049
9466892f
AC
60502011-08-03 Javier Miranda <miranda@adacore.com>
6051
6052 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
6053 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6054 be handled by copy in VM targets.
9466892f
AC
6055
60562011-08-03 Emmanuel Briot <briot@adacore.com>
6057
589ef536 6058 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
6059 code with Makeutl.Get_Switches.
6060 * prj-tree.adb: Update comment.
6061
b5ea9143
AC
60622011-08-03 Thomas Quinot <quinot@adacore.com>
6063
6064 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6065 subprogram with a limited formal that does not support external
6066 streaming.
6067
60682011-08-03 Yannick Moy <moy@adacore.com>
6069
6070 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6071 continuation line
6072 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6073 not from current unit in two phases, because it is not possible to
6074 change the table while iterating over its content.
6075 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6076
60772011-08-03 Sergey Rybin <rybin@adacore.com>
6078
6079 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6080 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6081
668a19bc
ES
60822011-08-03 Ed Schonberg <schonberg@adacore.com>
6083
6084 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6085 and the component type is composite, this is ambiguous for predefined
6086 concatenation, but if the node is not overloaded and the entity is a use
6087 -defined function its profile can be used to resolve that aggregate.
6088
170b2989
AC
60892011-08-03 Robert Dewar <dewar@adacore.com>
6090
6091 * exp_ch4.adb: Minor code cleanup.
6092
60932011-08-03 Thomas Quinot <quinot@adacore.com>
6094
6095 * exp_dist.adb: Do not generate distribution stubs if serious errors
6096 have been diagnosed.
6097
60982011-08-03 Ed Schonberg <schonberg@adacore.com>
6099
6100 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6101 the first formal of a primitive operation, go to the base type to
6102 handle properly an access to a derived type with constrained
6103 discriminants.
6104 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6105 user-defined function that is only use-visible.
170b2989 6106
e917aec2
RD
61072011-08-03 Robert Dewar <dewar@adacore.com>
6108
6109 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6110 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6111 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6112 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6113 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6114 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6115 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6116 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6117
61182011-08-03 Robert Dewar <dewar@adacore.com>
6119
6120 * repinfo.adb (List_Mechanism): Add handling of
6121 Convention_Ada_Pass_By_XXX.
6122 * sem_mech.adb (Set_Mechanism): Ditto.
6123 * sem_prag.adb (Process_Convention): Add entries for
6124 Convention_Ada_Pass_By_XXX.
6125 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6126
49bfcf43
AC
61272011-08-03 Pascal Obry <obry@adacore.com>
6128
6129 * makeutl.adb: Minor reformatting.
6130
61312011-08-03 Vincent Celier <celier@adacore.com>
6132
6133 * fname-uf.adb
6134 (Get_File_Name) If the file cannot be found when there are no config
6135 pragmas file and May_Fail is True, return No_File instead of the file
6136 name, to be consistent.
6137
61382011-08-03 Pascal Obry <obry@adacore.com>
6139
6140 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6141 to null pointer.
6142
61432011-08-03 Javier Miranda <miranda@adacore.com>
6144
6145 * sem_ch13.adb
6146 (Same_Representation): In VM targets the representation of arrays with
6147 aliased components differs from arrays with non-aliased components.
6148
34798441
EB
61492011-08-03 Emmanuel Briot <briot@adacore.com>
6150
6151 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6152 not systematically lower case attribute indexes that contain no "."
6153 Fix definition of several Naming attributes, which take
6154 a unit name as index and therefore should be case insensitive.
6155 Minor refactoring (reduce length of variable names).
6156
61572011-08-03 Emmanuel Briot <briot@adacore.com>
6158
6159 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6160
4437a530
EB
61612011-08-03 Emmanuel Briot <briot@adacore.com>
6162
6163 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6164 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6165 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6166 prj-tree.ads (Prj.Tree.Environment): new type.
6167
804fe3c4
EB
61682011-08-03 Emmanuel Briot <briot@adacore.com>
6169
6170 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6171 prj-tree.adb, prj-tree.ads (Environment): new type.
6172
c565bc66
AC
61732011-08-03 Emmanuel Briot <briot@adacore.com>
6174
6175 * prj-tree.ads: Remove unused variable.
6176
61772011-08-03 Yannick Moy <moy@adacore.com>
6178
6179 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6180 issuing messages related to SPARK restriction violation.
6181
4ee646da
AC
61822011-08-03 Ed Schonberg <schonberg@adacore.com>
6183
6184 * sem_ch6.adb: guard against error nodes in return statements.
6185
61862011-08-03 Arnaud Charlet <charlet@adacore.com>
6187
6188 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6189 a warning can only appear on a configuration file, so emit warning
6190 without further checks.
6191
61922011-08-03 Arnaud Charlet <charlet@adacore.com>
6193
6194 * s-interr.ads: add overriding keyword.
6195
61962011-08-03 Geert Bosch <bosch@adacore.com>
6197
6198 * exp_attr.adb: Fix minor typo.
6199
62002011-08-03 Ed Schonberg <schonberg@adacore.com>
6201
6202 * par-ch4.adb: improve error recovery.
6203
c0e538ad
AC
62042011-08-03 Emmanuel Briot <briot@adacore.com>
6205
6206 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6207 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6208 to Errout_Handling.
6209
62102011-08-03 Emmanuel Briot <briot@adacore.com>
6211
6212 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6213 "external" as an attribute name in aggregate projects.
6214
62152011-08-03 Jose Ruiz <ruiz@adacore.com>
6216
6217 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6218 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6219 from 0, so we need to adjust.
6220
62212011-08-03 Emmanuel Briot <briot@adacore.com>
6222
6223 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6224 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6225
c4d67e2d
AC
62262011-08-03 Yannick Moy <moy@adacore.com>
6227
6228 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6229 restriction on overloaded entity if the entity is not an operator.
6230
62312011-08-03 Yannick Moy <moy@adacore.com>
6232
6233 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6234 restrict.ads: Rename remaining Check_Formal_Restriction* into
6235 Check_SPARK_Restriction*.
6236
62372011-08-03 Emmanuel Briot <briot@adacore.com>
6238
6239 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6240 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6241 qualifier.
6242 (Project_Empty): removed
6243 (Empty_Project): new parameter Qualifier
6244 This is used to have fields specific to aggregate projects, cleaner
6245 New field to store the list of aggregated projects.
6246 (Check_Aggregate_Project): removed
6247 (Process_Aggregated_Projects, Free): new subprograms.
6248
3f5a8fee
AC
62492011-08-03 Olivier Hainque <hainque@adacore.com>
6250
6251 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6252
62532011-08-03 Ed Schonberg <schonberg@adacore.com>
6254
6255 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6256 explicit dereference of an unconstrained type, create a constrained
6257 subtype for it, as is done for function calls that return an
6258 unconstrained type.
6259
62602011-08-03 Thomas Quinot <quinot@adacore.com>
6261
6262 * g-pehage.adb (Finalize): Avoid possible double-free.
6263
62642011-08-03 Steve Baird <baird@adacore.com>
6265
6266 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6267 Elab_Spec/Body attrs in CodePeer_Mode.
6268
62692011-08-03 Javier Miranda <miranda@adacore.com>
6270
6271 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6272 low bound is not known at compile time but they have no others choice.
6273 Done because in this case the bounds can be obtained directly from the
6274 aggregate.
6275
62762011-08-03 Ed Falis <falis@adacore.com>
6277
6278 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6279 on VxWorks SMP. Remove unusable constant ANY_CPU.
6280
a96ca600
EB
62812011-08-03 Emmanuel Briot <briot@adacore.com>
6282
6283 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6284 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6285 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6286 Prj.Env.Initialize_Empty): new subprograms
6287 (Get_Env, Find_Project): remove parameter Target_Name.
6288
3e582869
AC
62892011-08-03 Gary Dismukes <dismukes@adacore.com>
6290
6291 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6292 as a condition for the delayed call to Derived_Subprograms done for the
6293 case of the rewriting of a derived type that constrains the
6294 discriminants of its parent type.
6295 Avoids redundant subprogram derivations for private subtype derivations.
6296
62972011-08-03 Javier Miranda <miranda@adacore.com>
6298
6299 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6300 Build_Record_Aggr_Code.
6301 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6302 discriminants in extension aggregates.
6303
63042011-08-03 Emmanuel Briot <briot@adacore.com>
6305
6306 * prj-pp.adb (Print): also output project qualifiers, since in
6307 particular "aggregate" is mandatory in an aggregate project.
6308
63092011-08-03 Emmanuel Briot <briot@adacore.com>
6310
6311 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6312 (Debug_Output): new function.
6313
56e94186
AC
63142011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6315
6316 * gnat_ugn.texi: Document -Wstack-usage.
6317 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6318
63192011-08-03 Thomas Quinot <quinot@adacore.com>
6320
6321 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6322 have keyword LIMITED.
6323
63242011-08-03 Yannick Moy <moy@adacore.com>
6325
6326 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6327 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6328 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6329 section (does not happen in compiler, only if code directly calls
6330 Scan_ALI).
6331 * get_alfa.adb, get_alfa.ads: New files.
6332 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6333 needed.
6334 * lib-xref-alfa.adb: New file.
6335 * lib-xref.adb, lib-xref.ads
6336 (Xref_Entry): redefine information needed in cross-references for ALFA.
6337 Push ALFA treatments in separated local package.
6338 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6339 identifiers. Return entity of package body instead of spec. Return
6340 Empty for a scope with no location.
6341 (Generate_Reference): adapt to new components for ALFA information.
6342 Remove the need for D references on definitions.
6343 (Is_Local_Reference): moved to ALFA local package
6344 (Output_References): extract subfunction as Extract_Source_Name
6345 (Output_Local_References): remove procedure, replaced by filtering of
6346 cross-references in package ALFA and printing in Put_ALFA.
6347 (Write_Entity_Name): remove procedure
6348 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6349 print exact name of entity as it appears in source file
6350 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6351 * put_alfa.adb, put_alfa.ads: New files.
6352 * xref_lib.adb (Search_Xref): protect read of cross-references against
6353 reading other sections of the ALI file, in gnatxref
6354 (Search): protect read of cross-references against reading other
6355 sections of the ALI file, in gnatfind.
6356 * gcc-interface/Make-lang.in: Update dependencies.
6357
63582011-08-03 Thomas Quinot <quinot@adacore.com>
6359
6360 * sem_ch3.adb: Minor reformatting.
6361
63622011-08-03 Jose Ruiz <ruiz@adacore.com>
6363
6364 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6365 raising an exception.
6366
63672011-08-03 Ed Schonberg <schonberg@adacore.com>
6368
6369 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6370 type, always use 1 as the lower bound or string, even if lower bound of
6371 context is not static, to handle properly null strings in a non-static
6372 context.
6373
63742011-08-03 Bob Duff <duff@adacore.com>
6375
6376 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6377 always legal on the right-hand side of an assignment statement; there
6378 is always an applicable index constraint in this case. Therefore, the
6379 check for Pkind = N_Assignment_Statement is now unconditional -- it
6380 doesn't depend on whether Is_Constrained (Typ).
6381
4317e442
AC
63822011-08-03 Robert Dewar <dewar@adacore.com>
6383
6384 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6385
63862011-08-03 Ed Schonberg <schonberg@adacore.com>
6387
6388 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6389 for an itype created within a generic unit.
6390
63912011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6392
6393 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6394 suppresses all inlining.
6395
53f29d4f
AC
63962011-08-03 Robert Dewar <dewar@adacore.com>
6397
6398 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6399 exp_aggr.adb: Minor reformatting.
6400
64012011-08-03 Thomas Quinot <quinot@adacore.com>
6402
6403 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6404 tagged assignment when discriminant checks are suppressed. This is
6405 useless and extremely costly in terms of static stack usage.
6406
64072011-08-03 Bob Duff <duff@adacore.com>
6408
6409 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6410 of generics, because this leads to the wrong entity in the wrong scope,
6411 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6412 an instance.
6413 (Process_Interface_Name): Follow Alias for instances of generics, to
6414 correct for the above change.
6415
64162011-08-03 Ed Schonberg <schonberg@adacore.com>
6417
6418 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6419 is an integer literal it is always safe to replace the reference. In
6420 addition, if the reference appears in the generated code for an object
6421 declaration it is necessary to copy because otherwise the reference
6422 might be to the uninitilized value of the discriminant of the object
6423 itself.
6424
64252011-08-03 Pascal Obry <obry@adacore.com>
6426
6427 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6428 ACL used, in this case we want to check for ending .exe, not .exe
6429 anywhere in the path.
6430
64312011-08-03 Sergey Rybin <rybin@adacore.com>
6432
6433 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6434 the tree structure (semantic decoration of references to record
6435 discriminants).
6436
c0b11850
AC
64372011-08-03 Gary Dismukes <dismukes@adacore.com>
6438
6439 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6440 choices of a named array aggregate, bail out when any choices are
6441 marked as Errors_Posted.
6442
64432011-08-03 Ed Schonberg <schonberg@adacore.com>
6444
6445 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6446 in which entity is frozen, to handle properly loop variables in
6447 iterators.
6448
64492011-08-03 Ed Schonberg <schonberg@adacore.com>
6450
6451 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6452 subtype is not static, compute the upper bound using attributes, to
6453 handle properly index types that are not integer types.
6454
64552011-08-03 Bob Duff <duff@adacore.com>
6456
6457 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6458 Update copyright notice.
6459
64602011-08-03 Ed Schonberg <schonberg@adacore.com>
6461
6462 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6463 Original_Discriminant if within an instance.
6464 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6465
64662011-08-03 Thomas Quinot <quinot@adacore.com>
6467
6468 * einfo.ads: Minor reformatting.
6469
64702011-08-03 Ed Schonberg <schonberg@adacore.com>
6471
6472 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6473 composite type with an unfrozen subcomponent, in the profile of a
6474 primitive operation.
6475
5c34e9cd
AC
64762011-08-03 Robert Dewar <dewar@adacore.com>
6477
6478 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6479
64802011-08-03 Ed Schonberg <schonberg@adacore.com>
6481
6482 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6483 unconstrained type with discriminants is initialized with an aggregate,
6484 use the constrained subtype of the aggregate as the type of the object,
6485 because it is immutable, and this allows the back-end to generate no
6486 code for the object declaration.
6487
abcd9db2
AC
64882011-08-03 Robert Dewar <dewar@adacore.com>
6489
6490 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6491 comparison operand is variable, and turns out to be zero or negative.
6492
64932011-08-03 Javier Miranda <miranda@adacore.com>
6494
6495 * exp_intr.adb
6496 (Expand_Dispatching_Constructor_Call): Disable expansion of
6497 code required for native targets. Done to avoid generating
6498 references to unavailable runtime entities in VM targets.
6499 * exp_ch3.adb
6500 (Expand_N_Object_Declaration): Add missing support to handle
6501 the explicit initialization of class-wide interface objects.
6502 Fix documentation.
6503
65042011-08-03 Matthew Heaney <heaney@adacore.com>
6505
6506 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6507
65082011-08-03 Matthew Heaney <heaney@adacore.com>
6509
6510 * a-cbdlli.adb (Splice): move source items from first to last
6511
65122011-08-03 Yannick Moy <moy@adacore.com>
6513
6514 * sem_util.ads: comment added.
6515
65162011-08-03 Javier Miranda <miranda@adacore.com>
6517
6518 * exp_aggr.adb
6519 (Expand_Record_Aggregate): In VM targets disable the expansion into
6520 assignments of aggregates whose type is not known at compile time.
6521
b474d6c3
ES
65222011-08-03 Ed Schonberg <schonberg@adacore.com>
6523
6524 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6525 protected entries and task entries, to build the proper renaming
6526 declaration for entry formals, used in debugging.
6527 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6528 parameters in the same way.
6529
0580d807
AC
65302011-08-02 Robert Dewar <dewar@adacore.com>
6531
6532 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6533 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6534 code reorganization.
6535
65362011-08-02 Robert Dewar <dewar@adacore.com>
6537
6538 * debug.adb: Debug flag d.P to suppress length comparison optimization
6539 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6540 comparison of Length by comparing First/Last instead.
6541
65422011-08-02 Matthew Heaney <heaney@adacore.com>
6543
6544 * a-cobove.ads: Code clean up.
6545
b191a125
AC
65462011-08-02 Vincent Celier <celier@adacore.com>
6547
6548 * adaint.c (file_names_case_sensitive_cache): New static int.
6549 (__gnat_get_file_names_case_sensitive): Cache the return value in
6550 file_names_case_sensitive_cache at the first invocation, to avoid
6551 multiple calls to getenv.
6552
65532011-08-02 Bob Duff <duff@adacore.com>
6554
6555 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6556
316a0661
AC
65572011-08-02 Yannick Moy <moy@adacore.com>
6558
6559 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6560 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6561 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6562 indicate that we are in a precondition or postcondition. This is used in
6563 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6564 decide whether to flag the spec or body of the current subprogram as
6565 not in ALFA.
6566
65672011-08-02 Fabien Chouteau <chouteau@adacore.com>
6568
6569 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6570 list.
6571 * a-extiin.ads: New file.
6572
65732011-08-02 Bob Duff <duff@adacore.com>
6574
6575 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6576 now raises Name_Error instead of Use_Error in certain cases. The other
6577 parts of this AI were already implemented properly.
6578
f9adb9d4
AC
65792011-08-02 Vincent Celier <celier@adacore.com>
6580
6581 * link.c: Only import "auto-host.h" when building the gnattools.
6582
65832011-08-02 Yannick Moy <moy@adacore.com>
6584
6585 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6586 which calls a local subprogram, so extract subprogram
6587 from Mark_Non_ALFA_Subprogram_Body.
6588
65892011-08-02 Javier Miranda <miranda@adacore.com>
6590
6591 * exp_ch9.adb
6592 (Extract_Dispatching_Call): If the type of the dispatching object is an
6593 access type then return an explicit dereference in the Object out-mode
6594 parameter.
6595
65962011-08-02 Gary Dismukes <dismukes@adacore.com>
6597
6598 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6599 compatibility checks for all indexes of an array subtype, not just the
6600 first. Reset Has_Dynamic_Range_Check on the subtype before each
6601 potential check to ensure that Insert_Range_Checks will not elide any
6602 of the dynamic checks.
6603
66042011-08-02 Yannick Moy <moy@adacore.com>
6605
6606 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6607 SPARK restriction at parsing time.
6608 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6609 directive only if the SPARK restriction is set for this unit.
6610
83f33150
YM
66112011-08-02 Yannick Moy <moy@adacore.com>
6612
6613 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6614 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6615 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6616 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6617 Mark_Non_ALFA_Subprogram_Body.
6618 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6619 inlined.
6620
7b98672f
YM
66212011-08-02 Yannick Moy <moy@adacore.com>
6622
6623 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6624 might be costly.
6625
052e0603
AC
66262011-08-02 Robert Dewar <dewar@adacore.com>
6627
6628 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6629 exp_ch3.adb: Minor reformatting.
6630
66312011-08-02 Emmanuel Briot <briot@adacore.com>
6632
6633 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6634 files, not any regular file.
6635 (__gnat_locate_file_with_predicate): new subprogram.
6636
66372011-08-02 Yannick Moy <moy@adacore.com>
6638
6639 * sinfo.adb, sinfo.ads: Restrict the use of flags
6640 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6641 nodes, plus N_Subtype_Declaration for the 2nd one.
6642
4fbad0ba
AC
66432011-08-02 Sergey Rybin <rybin@adacore.com>
6644
6645 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6646 - fix bugs in the description of Source_Trace;
6647 - get rid of UNIT_NAME;
6648
052e0603
AC
66492011-08-02 Javier Miranda <miranda@adacore.com>
6650
6651 * exp_ch9.adb
6652 (Build_Dispatching_Requeue): Adding support for VM targets
6653 since we cannot directly reference the Tag entity.
6654 * exp_sel.adb (Build_K): Adding support for VM targets.
6655 (Build_S_Assignment): Adding support for VM targets.
6656 * exp_disp.adb
6657 (Default_Prim_Op_Position): In VM targets do not restrict availability
6658 of predefined interface primitives to compiling in Ada 2005 mode.
6659 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6660 restricted to compiling in Ada 2005 mode.
6661 (Make_VM_TSD): Generate code that declares and initializes the OSD
6662 record. Needed to support dispatching calls through synchronized
6663 interfaces.
6664 * exp_ch3.adb
6665 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6666 primitives associated with synchronized interfaces.
6667 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6668 primitives associated with synchronized interfaces.
6669
66702011-08-02 Yannick Moy <moy@adacore.com>
6671
6672 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6673 statements hidden in SPARK if preceded by the HIDE directive
6674 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6675 exception handlers as hidden in SPARK if preceded by the HIDE directive
6676 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6677 if starting with the HIDE directive
6678 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6679 starting with the HIDE directive; mark the declarations in a private
6680 part as hidden in SPARK if the private part starts with the HIDE
6681 directive
6682 * restrict.adb, restrict.ads
6683 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6684 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6685 argument node belongs to a part which is hidden in SPARK
6686 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6687 parts in SPARK; protect the possibly costly call to
6688 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6689 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6690 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6691 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6692 Tok_SPARK_Hide.
6693 (Scan): recognize special comment starting with '#' and followed by
6694 SPARK keyword "hide" as a HIDE directive.
6695
66962011-08-02 Yannick Moy <moy@adacore.com>
6697
6698 * types.ads, erroutc.ads: Minor reformatting.
6699
67002011-08-02 Vincent Celier <celier@adacore.com>
6701
6702 * link.c: Add response file support for cross platforms.
6703
67042011-08-02 Ed Schonberg <schonberg@adacore.com>
6705
6706 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6707 in an association, set parent field of copy before partial analysis.
6708 * sem_res.adb (Resolve_Slice): create reference to itype only when
6709 expansion is enabled.
6710
67112011-08-02 Yannick Moy <moy@adacore.com>
6712
6713 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6714 for new flag denoting which subprogram bodies are in ALFA
6715 * restrict.adb, sem_ch7.adb: Update comment
6716 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6717 sem_ch9.adb, sem_res.adb: Add calls to
6718 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6719 * sem_ch6.adb (Analyze_Function_Return): add calls to
6720 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6721 middle of the body, and extended return.
6722 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6723 False when missing return.
6724 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6725 to True for subprograms whose spec is in ALFA. Remove later on the flag
6726 on the entity used for a subprogram body when there exists a separate
6727 declaration.
6728 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6729 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6730 False, otherwise do nothing.
6731
67322011-08-02 Robert Dewar <dewar@adacore.com>
6733
6734 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6735
67362011-08-02 Yannick Moy <moy@adacore.com>
6737
6738 * sem_ch4.ads: minor formatting.
6739
67402011-08-02 Yannick Moy <moy@adacore.com>
6741
6742 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6743 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6744 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6745 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6746 opt.ads: cleanup of SPARK mode
6747
67482011-08-02 Yannick Moy <moy@adacore.com>
6749
6750 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6751 types.
6752 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6753 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6754 * sem_ch3.adb
6755 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6756 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6757 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6758 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6759 types.
6760 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6761 non-static range.
6762 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6763 functions whose return type is not in ALFA.
6764 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6765 specifications.
6766 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6767 parameter's type is not in ALFA.
6768 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6769 types are in ALFA.
6770
67712011-08-02 Ed Schonberg <schonberg@adacore.com>
6772
6773 * sem_ch6 (Analyze_Expression_Function): treat the function as
6774 Inline_Always, and introduce a subprogram declaration for it when it is
6775 not a completion.
6776 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6777 expression functions, so that the back-end can determine whether they
6778 can in fact be inlined.
6779 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6780 a function body comes from an expression function.
6781
67822011-08-02 Gary Dismukes <dismukes@adacore.com>
6783
6784 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6785 null exclusions to test Can_Never_Be_Null on the anonymous access types
6786 of the formals rather than testing the formals themselves. Exclude this
6787 check in cases where the Old_Formal is marked as a controlling formal,
6788 to avoid issuing spurious errors for bodies completing dispatching
6789 operations (due to the flag not getting set on controlling access
6790 formals in body specs).
6791 (Find_Corresponding_Spec): When checking full and subtype conformance of
6792 subprogram bodies in instances, pass Designated and E in that order, for
6793 consistency with the expected order of the formals (New_Id followed by
6794 Old_Id).
6795
67962011-08-02 Robert Dewar <dewar@adacore.com>
6797
6798 * sem_ch8.adb: Minor reformatting.
6799
68002011-08-02 Ed Schonberg <schonberg@adacore.com>
6801
6802 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6803 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6804 primitive operations of class-wide actuals.
6805
68062011-08-02 Javier Miranda <miranda@adacore.com>
6807
6808 * exp_atag.ads, exp_atag.adb
6809 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6810 since its value is implicitly passed in argument Typ.
6811 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6812 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6813 Build_Common_Dispatching_Select_Statements.
6814
68152011-08-02 Robert Dewar <dewar@adacore.com>
6816
6817 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
6818 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
6819 Minor reformatting.
6820
68212011-08-02 Robert Dewar <dewar@adacore.com>
6822
6823 * sem_res.adb: Minor reformatting.
6824 * sem_prag.adb: Minor reformatting.
6825
68262011-08-02 Javier Miranda <miranda@adacore.com>
6827
6828 * exp_atag.adb, exp_atags.ads
6829 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
6830 by the tagged type Entity. Required to use this routine in the VM
6831 targets since we do not have available the Tag entity in the VM
6832 platforms.
6833 * exp_ch6.adb
6834 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
6835 Ada.Tags has not been previously loaded.
6836 * exp_ch7.adb
6837 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
6838 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
6839 * sem_aux.adb
6840 (Enclosing_Dynamic_Scope): Add missing support to handle the full
6841 view of enclosing scopes. Required to handle enclosing scopes that
6842 are synchronized types whose full view is a task type.
6843 * exp_disp.adb
6844 (Build_VM_TSDs): Minor code improvement to avoid generating and
6845 analyzing lists with empty nodes.
6846 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
6847 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
6848 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
6849 (Make_Disp_Timed_Select_Body): Add support for VM targets.
6850 (Make_Select_Specific_Data_Table): Add support for VM targets.
6851 (Make_VM_TSD): Generate code to initialize the SSD structure of
6852 the TSD.
6853
68542011-08-02 Yannick Moy <moy@adacore.com>
6855
6856 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
6857 cross-references section in ALI.
6858 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
6859 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
6860 Sub).
6861 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
6862 subprogram or package entity of a node
6863 (Is_Local_Reference_Type): new function returns True for references
6864 selected in local cross-references.
6865 (Lt): function extracted from Lt in Output_References
6866 (Write_Entity_Name): function extracted from Output_References
6867 (Generate_Definition): generate reference with type 'D' for definition
6868 of objects (object declaration and parameter specification), with
6869 appropriate locations and units, for use in local cross-references.
6870 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
6871 references of type 'I' for initialization in object definition.
6872 (Output_References): move part of function Lt and procedure
6873 Write_Entity_Name outside of the body. Ignore references of types 'D'
6874 and 'I' introduced for local cross-references.
6875 (Output_Local_References): new procedure to output the local
6876 cross-references sections.
6877 (Lref_Entity_Status): new array defining whether an entity is a local
6878 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
6879 with 'I' type when initialization expression is present.
6880 * get_scos.adb, get_scos.ads: Correct comments and typos
6881
68822011-08-02 Javier Miranda <miranda@adacore.com>
6883
6884 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
6885 the JVM target.
6886 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
6887 the JVM target.
6888 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
6889 TSD support.
6890
68912011-08-02 Vincent Celier <celier@adacore.com>
6892
6893 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
6894 (No_Space_Img): New function
6895 (Find_Excluded_Sources): When reading from a file, record the file name
6896 and the line number for each excluded source.
6897 (Mark_Excluded_Sources): When reporting an error, if the excluded
6898 sources were read from a file, include file name and line number in
6899 the error message.
6900
69012011-08-02 Ed Schonberg <schonberg@adacore.com>
6902
6903 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
6904
69052011-08-02 Robert Dewar <dewar@adacore.com>
6906
6907 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6908
69092011-08-02 Javier Miranda <miranda@adacore.com>
6910
6911 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6912 generation of TSDs to the DOTNET compiler.
6913 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6914 generation of TSDs to the DOTNET compiler.
6915
69162011-08-02 Javier Miranda <miranda@adacore.com>
6917
6918 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6919 record of all the tagged types declared inside library level package
6920 declarations, library level package bodies or library level subprograms.
6921 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6922 associated with a given tagged type.
6923 (Build_VM_TSDs): New subprogram.
6924 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6925 compilation units that are subprograms.
6926 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6927 compilation units that are package bodies.
6928 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6929 units that are a package declaration or a package instantiation.
6930 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6931 reorganization to improve the error generated by the frontend when the
6932 function Ada.Tags.Secondary_Tag is not available.
6933 * rtsfind.ads (RE_Register_TSD): New runtime entity.
6934 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6935
69362011-08-02 Javier Miranda <miranda@adacore.com>
6937
6938 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6939
69402011-08-02 Robert Dewar <dewar@adacore.com>
6941
6942 * s-imenne.ads: Minor reformatting.
6943
69442011-08-02 Robert Dewar <dewar@adacore.com>
6945
6946 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6947 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6948 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6949
69502011-08-02 Robert Dewar <dewar@adacore.com>
6951
6952 * einfo.ads (Materialize_Entity): Document this is only for renamings
6953 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6954 required debug information in the case where we transform the object
6955 declaration into a renaming declaration.
6956 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6957 object
6958 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6959 Materialize_Entity.
6960
69612011-08-02 Robert Dewar <dewar@adacore.com>
6962
6963 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6964 Suppress_Init_Procs.
6965 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6966 Suppress_Initialization/Initialization_Suppressed.
6967 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6968 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6969 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6970 * sem_prag.adb: New processing for pragma Suppress_Initialization.
6971
69722011-08-02 Robert Dewar <dewar@adacore.com>
6973
6974 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6975 Minor reformatting.
6976
69772011-08-02 Ed Schonberg <schonberg@adacore.com>
6978
6979 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6980 only have inheritable classwide pre/postconditions.
6981
69822011-08-02 Javier Miranda <miranda@adacore.com>
6983
6984 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6985 * rtsfind.ads (RE_Check_TSD): New runtime entity.
6986 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6987 checks if the external tag of a type is the same as the external tag
6988 of some other declaration.
6989
69902011-08-02 Thomas Quinot <quinot@adacore.com>
6991
6992 * s-taskin.ads: Minor reformatting.
6993
69942011-08-02 Emmanuel Briot <briot@adacore.com>
6995
6996 * g-comlin.adb (Display_Help): swap the order in which it prints the
6997 short help and the general usage.
6998
69992011-08-02 Ed Schonberg <schonberg@adacore.com>
7000
7001 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7002 the aspect declarations and attach them to the generic copy for
7003 subsequent analysis.
7004 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7005 declarations of the generic tree to the new subprogram declarations.
7006 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7007 conditions that apply to a subprogram instance.
7008
70092011-08-02 Robert Dewar <dewar@adacore.com>
7010
7011 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7012
70132011-08-02 Ed Schonberg <schonberg@adacore.com>
7014
7015 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7016 private type with a tagged full view is not derived in the immediate
7017 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7018
70192011-08-02 Robert Dewar <dewar@adacore.com>
7020
7021 * exp_ch4.adb: Minor reformatting.
7022
70232011-08-02 Ed Schonberg <schonberg@adacore.com>
7024
7025 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7026 Ada2012 iterator, the loop will be rewritten during expansion into a
7027 while loop with a cursor and an element declaration. Do not analyze the
7028 body in this case, because if the container is for indefinite types the
7029 actual subtype of the elements will only be determined when the cursor
7030 declaration is analyzed.
7031
70322011-08-02 Arnaud Charlet <charlet@adacore.com>
7033
7034 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7035 size/alignment related attributes in CodePeer_Mode.
7036
70372011-08-02 Gary Dismukes <dismukes@adacore.com>
7038
7039 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7040 Prepend_Element, since this can result in the operation getting the
7041 wrong slot in the full type's dispatch table if the full type has
7042 inherited operations. The incomplete type's operation will get added
7043 to the proper position in the full type's primitives
7044 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7045 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7046 dispatching operations, since there are cases where nonprimitive
7047 subprograms can get added to the list of incomplete dependents (such
7048 as subprograms in nested packages).
7049 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7050 private part when determining whether to add a primitive with a
7051 parameter of a tagged incomplete type to the Private_Dependents list.
7052 Such primitives can also occur in the visible part, and should not have
7053 been excluded from being private dependents.
7054 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7055 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7056 list of a Taft-amendment incomplete type is a primitive before issuing
7057 an error that the full type must appear in the same unit. There are
7058 cases where nonprimitives can be in the list (such as subprograms in
7059 nested packages).
7060 * sem_disp.adb (Derives_From): Use correct condition for checking that
7061 a formal's type is derived from the type of the corresponding formal in
7062 the parent subprogram (the condition was completely wrong). Add
7063 checking that was missing for controlling result types being derived
7064 from the result type of the parent operation.
7065
70662011-08-02 Yannick Moy <moy@adacore.com>
7067
7068 * errout.adb (First_Node): minor renaming
7069 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7070 first node.
7071
70722011-08-02 Yannick Moy <moy@adacore.com>
7073
7074 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7075 before accessing operands.
7076 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7077 decide whether an initialization expression respects SPARK rules, as
7078 the plain node is the expanded one. This allows for more valid warnings
7079 to be issued.
7080 * gnat_rm.texi: Minor update.
7081
70822011-08-02 Arnaud Charlet <charlet@adacore.com>
7083
7084 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7085 previous change.
7086
70872011-08-02 Robert Dewar <dewar@adacore.com>
7088
7089 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7090
70912011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7092
7093 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7094 loop statements and the element renaming declaration with a block when
7095 the element type is controlled.
7096
70972011-08-02 Yannick Moy <moy@adacore.com>
7098
7099 * sinfo.ads: Minor formatting.
7100
71012011-08-02 Ed Schonberg <schonberg@adacore.com>
7102
7103 * sem_aggr.adb (Add_Association): if the association has a box and no
7104 expression, use the Sloc of the aggregate itself for the new
7105 association.
7106 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7107 the Original_Node.
7108
71092011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7110
7111 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7112 When a container is provided via a function call, generate a renaming
7113 of the function result. This avoids the creation of a transient scope
7114 and the premature finalization of the container.
7115 * exp_ch7.adb (Is_Container_Cursor): Removed.
7116 (Wrap_Transient_Declaration): Remove the supression of the finalization
7117 of the list controller when the declaration denotes a container cursor,
7118 it is not needed.
7119
71202011-08-02 Yannick Moy <moy@adacore.com>
7121
7122 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7123 node is from source, instead of the original node being from source.
7124 * sem_aggr.adb
7125 (Resolve_Array_Aggregate): refine the check for a static expression, to
7126 recognize also static ranges
7127 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7128 Array_Type_Declaration): postpone the test for the type being a subtype
7129 mark after the type has been resolved, so that component-selection and
7130 expanded-name are discriminated.
7131 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7132 to distinguish the case of an iteration scheme, so that an error is
7133 issed on a non-static range in SPARK except in an iteration scheme.
7134 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7135 In_Iter_Schm = True.
7136 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7137 user-defined operators so that they are allowed in renaming
7138 * sem_ch8.adb
7139 (Find_Selected_Component): refine the check for prefixing of operators
7140 so that they are allowed in renaming. Move the checks for restrictions
7141 on selector name after analysis discriminated between
7142 component-selection and expanded-name.
7143 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7144 concatenation argument of string type if it is static.
7145 * sem_util.adb, sem_util.ads
7146 (Check_Later_Vs_Basic_Declarations): add a new function
7147 Is_Later_Declarative_Item to decice which declarations are allowed as
7148 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7149 mode, add that renamings are considered as later items.
7150 (Enclosing_Package): new function to return the enclosing package
7151 (Enter_Name): correct the rule for homonyms in SPARK
7152 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7153 from source (result of expansion) to avoid issuing wrong warnings.
7154
71552011-08-02 Ed Schonberg <schonberg@adacore.com>
7156
7157 * errout.adb: On anything but an expression First_Node returns its
7158 argument.
7159
71602011-08-02 Pascal Obry <obry@adacore.com>
7161
7162 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7163
71642011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7165
7166 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7167 Set the associated loop as the related expression of internally
7168 generated cursors.
7169 * exp_ch7.adb (Is_Container_Cursor): New routine.
7170 (Wrap_Transient_Declaration): Supress the finalization of the list
7171 controller when the declaration denotes a container cursor.
7172
71732011-08-02 Yannick Moy <moy@adacore.com>
7174
7175 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7176 command line now.
7177 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7178 expression is a simple expression. This check cannot be performed in
7179 the semantics, so just drop it.
7180 (P_Index_Or_Discriminant_Constraint): move check that the index or
7181 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7182 semantics. Other cases were previously checked in the semantics.
7183 * par-ch4.adb (P_Name): move checks that a selector name is not
7184 character literal or an operator symbol to Find_Selected_Component in
7185 the semantics
7186 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7187 declarations are not placed after later declarations in a separate
7188 procedure in Sem_Util (possibly not the best choice?), to be used both
7189 during parsing, for Ada 83 mode, and during semantic analysis, for
7190 SPARK mode.
7191 * par-endh.adb (Check_End): move check that end label is not missing
7192 to Process_End_Label in the semantics
7193 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7194 the special case for SPARK restriction
7195 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7196 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7197 parameter Force to issue the error message even on internal node (used
7198 for generated end label). Call Check_Restriction to check when an error
7199 must be issued. In SPARK mode, issue an error message even if the
7200 restriction is not set.
7201 (Check_Restriction): new procedure with an additional out parameter to
7202 inform the caller that a message has been issued
7203 * sem_aggr.adb: Minor modification of message
7204 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7205 instead of issuing an error message directly
7206 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7207 declarations are not placed after later declarations, by calling
7208 Check_Later_Vs_Basic_Declarations
7209 (Analyze_Subtype_Declaration): move here the check that an index or
7210 discriminant constraint must be a subtype mark. Change the check that
7211 a subtype of String must start at one so that it works on subtype marks.
7212 * sem_ch4.adb (Analyze_Call): move here the check that a named
7213 association cannot follow a positional one in a call
7214 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7215 instead of issuing an error message directly
7216 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7217 selector name is not a character literal or an operator symbol. Move
7218 here the check that the prefix of an expanded name cannot be a
7219 subprogram or a loop statement.
7220 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7221 procedure called from parsing and semantics to check that basic
7222 declarations are not placed after later declarations
7223 (Process_End_Label): move here the check that end label is not missing
7224
72252011-08-02 Arnaud Charlet <charlet@adacore.com>
7226
7227 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7228 representation clause in codepeer mode, since it confuses CodePeer and
7229 does not bring useful info.
7230
72312011-08-02 Ed Falis <falis@adacore.com>
7232
7233 * init.c: initialize fp hw on MILS.
7234
72352011-08-02 Ed Schonberg <schonberg@adacore.com>
7236
7237 * errout.adb (First_Node): for bodies, return the node itself (small
7238 optimization). For other nodes, do not check source_unit if the node
7239 comes from Standard.
7240
72412011-08-02 Robert Dewar <dewar@adacore.com>
7242
7243 * exp_ch3.adb: Minor comment additions.
7244 * sem_ch13.adb: Minor reformatting.
7245
72462011-08-02 Pascal Obry <obry@adacore.com>
7247
7248 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7249
72502011-08-02 Robert Dewar <dewar@adacore.com>
7251
7252 * sem_attr.adb: Minor reformatting.
7253
72542011-08-02 Robert Dewar <dewar@adacore.com>
7255
7256 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7257 (Has_Default_Component_Value): Removed
7258 * einfo.ads Comment updates
7259 (Has_Default_Aspect): Replaces Has_Default_Value
7260 (Has_Default_Component_Value): Removed
7261 * exp_ch13.adb
7262 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7263 * exp_ch3.adb
7264 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7265 (Get_Simple_Init_Val): Handle Default_Value aspect
7266 (Needs_Simple_Initialization): Handle Default_Value aspect
7267 * exp_ch3.ads: Needs_Simple_Initialization
7268 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7269 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7270 * sem_ch13.adb
7271 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7272 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7273 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7274
72752011-08-02 Ed Schonberg <schonberg@adacore.com>
7276
7277 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7278 package containing iteration primitives.
7279 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7280
72812011-08-02 Ed Schonberg <schonberg@adacore.com>
7282
7283 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7284 "of", pre-analyze expression in case it is a function call with
7285 finalization actions that must be placed ahead of the loop.
7286 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7287 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7288
72892011-08-02 Geert Bosch <bosch@adacore.com>
7290
7291 * cstand.adb (Create_Float_Types): Only consider C's long double for
7292 Long_Long_Float, in addition to double.
7293
72942011-08-02 Robert Dewar <dewar@adacore.com>
7295
7296 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7297 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7298 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7299 Minor reformatting.
7300
73012011-08-02 Ed Schonberg <schonberg@adacore.com>
7302
7303 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7304 indexed component.
7305
73062011-08-02 Javier Miranda <miranda@adacore.com>
7307
7308 * einfo.ads, einfo.adb
7309 (Original_Access_Type): Move this attribute to Node26 since there was
7310 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7311 which causes conflicts and breaks the generation of the .NET compiler.
7312 (Interface_Name): Add missing documentation on JGNAT only uses of
7313 this attribute.
7314
73152011-08-02 Geert Bosch <bosch@adacore.com>
7316
7317 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7318 (Find_Back_End_Float_Type): Likewise
7319 (Create_Back_End_Float_Types): Likewise
7320 (Create_Float_Types): Likewise
7321 (Register_Float_Type): Likewise
7322 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7323 Nlist and split out type selection in new local Find_Base_Type function.
7324 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7325 Nlist
7326 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7327
73282011-08-02 Robert Dewar <dewar@adacore.com>
7329
7330 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7331 alpha order).
7332 * opt.ads: Minor comment change.
7333 * sem_ch12.adb: Minor code reorganization.
7334
73352011-08-02 Gary Dismukes <dismukes@adacore.com>
7336
7337 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7338 subtype's list of rep items to the list on the full subtype in the case
7339 where the lists are the same.
7340
73412011-08-02 Geert Bosch <bosch@adacore.com>
7342
7343 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7344 using the one from System.Strings, which also deallocates all strings.
7345
73462011-08-02 Geert Bosch <bosch@adacore.com>
7347
7348 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7349 function.
7350 * gcc-interface/Make-lang.in: Update dependencies.
7351
73522011-08-02 Olivier Hainque <hainque@adacore.com>
7353
7354 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7355 end_locus.
7356
73572011-08-02 Javier Miranda <miranda@adacore.com>
7358
7359 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7360 associated with anonymous access to subprograms.
7361
73622011-08-02 Geert Bosch <bosch@adacore.com>
7363
7364 * opt.ads
7365 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7366 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7367 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7368 (Add_Symbol_Definition): Move to switch-c.adb
7369 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7370 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7371 (Add_Symbol_Definition): Move to switch-c.adb.
7372 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7373 * sem_warn.adb
7374 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7375 Move to warnsw.adb.
7376 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7377 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7378 Move to warnsw.adb.
7379 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7380 (Add_Symbol_Definition): Moved from Prepcomp.
7381 * switch-c.ads: Update copyright notice. Use String_List instead of
7382 Argument_List, removing dependency on System.OS_Lib.
7383
73842011-08-02 Yannick Moy <moy@adacore.com>
7385
7386 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7387 mode on initialization expression which does not respect SPARK
7388 restrictions.
7389 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7390 if the tree referenced by its argument represents an initialization
7391 expression in SPARK, suitable for initializing an object in an object
7392 declaration.
7393
73942011-08-02 Javier Miranda <miranda@adacore.com>
7395
7396 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7397 internally generated access to subprogram with its associated protected
7398 subprogram type.
7399 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7400
74012011-08-02 Geert Bosch <bosch@adacore.com>
7402
7403 * cstand.adb (Register_Float_Type): Print information about type to
7404 register, if the Debug_Flag_Dot_B is set.
7405 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7406 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7407 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7408 with a requested precision of more than Max_Digits digits and no more
7409 than Max_Base_Digits digits, if a range specification is present and the
7410 Predefined_Float_Types list has a suitable type to derive from.
7411 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7412 case of type completion with pragma Import
7413 * sem_prag.adb
7414 (Process_Import_Predefined_Type): Processing to complete a type
7415 with pragma Import. Currently supports floating point types only.
7416 (Set_Convention_From_Pragma): Do nothing without underlying type.
7417 (Process_Convention): Guard against absence of underlying type,
7418 which may happen when importing incomplete types.
7419 (Process_Import_Or_Interface): Handle case of importing predefined
7420 types. Tweak error message.
7421
74222011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7423
7424 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7425 functions to previous change. Reorganize code slightly.
7426
74272011-08-02 Geert Bosch <bosch@adacore.com>
7428
7429 * back_end.ads (Register_Type_Proc): New call back procedure type for
7430 allowing the back end to provide information about available types.
7431 (Register_Back_End_Types): New procedure to register back end types.
7432 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7433 available types.
7434 * cstand.adb (Back_End_Float_Types): New list for floating point types
7435 supported by the back end.
7436 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7437 (Copy_Float_Type): New procedure to make new copies of predefined types.
7438 (Register_Float_Type): New call back procedure to populate the BEFT list
7439 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7440 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7441 (Create_Float_Types): New procedure to create entities for floating
7442 point types predefined in Standard, and put these and any remaining
7443 BEFTs on the Predefined_Float_Types list.
7444 * stand.ads (Predefined_Float_Types): New list for predefined floating
7445 point types that do not have declarations in package Standard.
7446
74472011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7448
7449 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7450 entity node for the unit containing the parameter.
7451 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7452 (Add_Inlined_Subprogram): Likewise.
7453 * gcc-interface/Make-lang.in: Update dependencies.
7454
74552011-08-02 Thomas Quinot <quinot@adacore.com>
7456
7457 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7458 suitable value.
7459
74602011-08-02 Geert Bosch <bosch@adacore.com>
7461
7462 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7463
74642011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7465
7466 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7467 computed value of Base_Type.
7468
74692011-08-02 Yannick Moy <moy@adacore.com>
7470
7471 * restrict.adb (Check_Restriction): issue an error for any use of
7472 class-wide, even if the No_Dispatch restriction is not set.
7473 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7474 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7475 when completing a private extension, the type named in the private part
7476 is not the same as that named in the visible part.
7477 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7478 of an inherited primitive operations of a tagged type or type extension
7479 that returns the tagged type.
7480 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7481 function which returns True for an implicit operation inherited by the
7482 derived type declaration for the argument type.
7483 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7484 order.
7485
74862011-08-02 Ed Schonberg <schonberg@adacore.com>
7487
7488 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7489 Process_Bounds, to perform analysis with expansion of a range or an
7490 expression that is the iteration scheme for a loop.
7491 (Analyze_Iterator_Specification): If domain of iteration is given by a
7492 function call with a controlled result, as is the case if call returns
7493 a predefined container, ensure that finalization actions are properly
7494 generated.
7495 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7496
74972011-08-02 Javier Miranda <miranda@adacore.com>
7498
7499 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7500 * gcc-interface/Make-lang.in: Update dependencies.
7501
75022011-08-02 Javier Miranda <miranda@adacore.com>
7503
7504 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7505 determine if the analysis is performed using N or Original_Node (N).
7506 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7507 functionality of routine Is_Variable avoids code duplication.
7508 * checks.adb (Determine_Range): Handle temporaries generated by
7509 Remove_Side_Effects.
7510
75112011-08-02 Javier Miranda <miranda@adacore.com>
7512
7513 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7514 expansion of the condition. Required since the previous analysis was
7515 done with expansion disabled (see Resolve_Quantified_Expression) and
7516 hence checks were not inserted and record comparisons have not been
7517 expanded.
7518
75192011-08-02 Ed Falis <falis@adacore.com>
7520
7521 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7522 Update header.
7523
75242011-08-02 Bob Duff <duff@adacore.com>
7525
7526 * opt.ads: Minor comment fix.
7527
75282011-08-02 Bob Duff <duff@adacore.com>
7529
7530 * sem_ch12.adb (Analyze_Package_Instantiation,
7531 Analyze_Subprogram_Instantiation): Turn off style checking while
7532 analyzing an instance. Whatever style checks that apply to the generic
7533 unit should apply, so it makes no sense to apply them in an instance.
7534 This was causing trouble when compiling an instance of a runtime
7535 unit that violates the -gnatyO switch.
7536 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7537 one of the two case statements, causing spurious errors.
7538
75392011-08-02 Robert Dewar <dewar@adacore.com>
7540
7541 * uname.adb: Minor reformatting.
7542 * gnatcmd.adb: Minor reformatting.
7543 * exp_attr.adb: Minor reformatting.
7544
75452011-08-02 Ed Schonberg <schonberg@adacore.com>
7546
7547 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7548 No_Dispatching_Calls, do not look for the Assign primitive, because
7549 predefined primitives are not created in this case.
7550
75512011-08-02 Bob Duff <duff@adacore.com>
7552
7553 * stylesw.ads: Minor comment fixes.
7554
75552011-08-02 Robert Dewar <dewar@adacore.com>
7556
7557 * freeze.adb (Add_To_Result): New procedure.
7558
75592011-08-02 Jose Ruiz <ruiz@adacore.com>
7560
7561 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7562 time, if the specific run-time routines for handling streams of strings
7563 are not available, use the default mechanism.
7564
75652011-08-02 Arnaud Charlet <charlet@adacore.com>
7566
7567 * s-regpat.ads: Fix typo.
7568
75692011-08-02 Vincent Celier <celier@adacore.com>
7570
7571 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7572 not null, call it to create the in memory config project file without
7573 parsing an existing default config project file.
7574
75752011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7576
7577 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7578
75792011-08-02 Ed Schonberg <schonberg@adacore.com>
7580
7581 * sem_elim.adb: an abstract subprogram does not need an eliminate
7582 pragma for its descendant to be eliminable.
7583
75842011-08-02 Ed Falis <falis@adacore.com>
7585
7586 * init.c: revert to handling before previous checkin for VxWorks
7587 * s-intman-vxworks.adb: delete unnecessary declarations related to
7588 using Ada interrupt facilities for handling signals.
7589 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7590 * s-intman-vxworks.ads: Import __gnat_install_handler as
7591 Initialize_Interrupts.
7592 * s-taprop-vxworks.adb: Delete Signal_Mask.
7593 (Abort_Handler): change construction of mask to unblock exception
7594 signals.
7595
75962011-08-02 Jerome Guitton <guitton@adacore.com>
7597
7598 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7599 Debug_Raise_Exception before propagation starts.
7600
76012011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7602
7603 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7604 to Restriction_Check_Required.
7605 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7606 * sem_res.adb (Resolve_Call): Likewise.
7607 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7608
76092011-08-02 Bob Duff <duff@adacore.com>
7610
7611 * stylesw.ads: Update comment.
7612 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7613 * errout.ads: Remove obsolete comment.
7614
76152011-08-02 Javier Miranda <miranda@adacore.com>
7616
7617 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7618 (Set_Is_Safe_To_Reevaluate): new procedure.
7619 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7620 assignment is allowed on safe-to-reevaluate variables.
7621 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7622 temporary created to remove side effects in expressions that use
7623 the secondary stack as safe-to-reevaluate.
7624 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7625 variables that are not true constants.
7626
76272011-08-02 Robert Dewar <dewar@adacore.com>
7628
7629 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7630 sem_res.adb, sem_ch6.adb: Minor reformatting.
7631
76322011-08-02 Jerome Guitton <guitton@adacore.com>
7633
7634 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7635
76362011-08-02 Ed Schonberg <schonberg@adacore.com>
7637
7638 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7639 not set Overridden_Operation if subprogram is an initialization
7640 procedure.
7641
76422011-08-02 Yannick Moy <moy@adacore.com>
7643
7644 * par-ch6.adb: Correct obsolete name in comments
7645 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7646 which takes two message arguments (existing function takes one), with
7647 second message used for continuation.
7648 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7649 block statements that originate from a source block statement, not
7650 generated block statements
7651 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7652 symmetry with procedure case
7653 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7654 function to issue an error in formal mode if a package specification
7655 contains more than one tagged type or type extension.
7656 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7657 parameters matching formals of tagged types are objects (or ancestor
7658 type conversions of objects), not general expressions. Issue an error
7659 on view conversions that are not involving ancestor conversion of an
7660 extended type.
7661 (Resolve_Type_Conversion): in formal mode, issue an error on the
7662 operand of an ancestor type conversion which is not an object
7663 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7664 procedure so that it works also for actuals of function calls
7665 (Is_Actual_Tagged_Parameter): new function which determines if its
7666 argument is an actual parameter of a formal of tagged type in a
7667 subprogram call
7668 (Is_SPARK_Object_Reference): new function which determines if the tree
7669 referenced by its argument represents an object in SPARK
7670
76712011-08-02 Robert Dewar <dewar@adacore.com>
7672
7673 * sem_ch3.adb: Minor reformatting
7674 Minor comment addition
7675 Minor error msg text change
7676
76772011-08-02 Javier Miranda <miranda@adacore.com>
7678
7679 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7680 function. Used to be more precise when we generate a variable plus one
7681 assignment to remove side effects in the evaluation of the Bound
7682 expressions.
7683 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7684 of the bound expression to force its re-analysis and thus expand the
7685 associated transient scope (if required). Code cleanup replacing the
7686 previous code that declared the constant entity by an invocation to
7687 routine Force_Evaluation which centralizes this work in the frontend.
7688
76892011-08-02 Robert Dewar <dewar@adacore.com>
7690
7691 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7692 (Base_Type): Now uses improved Is_Base_Type function
7693 * einfo.ads (Base_Type): Inline this function
7694
76952011-08-02 Robert Dewar <dewar@adacore.com>
7696
7697 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7698 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7699
77002011-08-02 Arnaud Charlet <charlet@adacore.com>
7701
7702 * gcc-interface/Make-lang.in: Update dependencies.
7703 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7704 targets.
7705
77062011-08-02 Yannick Moy <moy@adacore.com>
7707
7708 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7709 non-simple expression used in delta constraint
7710 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7711 index constraint which is not a subtype mark
7712 * par.adb: With and use Restrict
7713 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7714 mode on component type which is not a subtype mark and default
7715 expression on component
7716 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7717 of string which does not have a lower index bound equal to 1
7718 (Array_Type_Declaration): issue an error in formal mode on index or
7719 component type which is not a subtype mark, and on aliased keyword on
7720 component
7721 (Derived_Type_Declaration): issue an error in formal mode on interface,
7722 limited or abstract type
7723 (Record_Type_Declaration): issue an error in formal mode on interface
7724 (Record_Type_Definition): issue an error in formal mode on tagged types
7725 and type extensions not declared in the specification of a library unit
7726 package; on null non-tagged record; on variant part
7727
77282011-08-02 Vincent Celier <celier@adacore.com>
7729
7730 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7731 not declared for qualified library project when Library_Name is not
7732 declared, but Library_Dir is.
7733
77342011-08-02 Robert Dewar <dewar@adacore.com>
7735
7736 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7737 pragmas (affects aspects [Component_]Default_Value
7738 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7739 component type for the resolution
7740
77412011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7742
7743 * einfo.adb (Base_Type): Tune implementation for speed.
7744
77452011-08-02 Robert Dewar <dewar@adacore.com>
7746
7747 * freeze.adb: Minor reformatting.
7748
77492011-08-02 Thomas Quinot <quinot@adacore.com>
7750
7751 * scos.ads: Update comments.
7752
77532011-08-02 Ed Schonberg <schonberg@adacore.com>
7754
7755 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7756 base type, because the parent may be a subtype of a private type whose
7757 convention is established in a private part.
7758
77592011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7760
7761 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7762 statement in a block when the expansion of the return expression has
7763 created a finalization chain.
7764 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7765 with the parent node.
7766 Add N_Extended_Return_Statement to handle the case where a transient
7767 object declaration appears in the Return_Object_Declarations list of
7768 an extended return statement.
7769
77702011-08-02 Matthew Gingell <gingell@adacore.com>
7771
7772 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7773 unused parameter 'name'.
7774
77752011-08-02 Ed Schonberg <schonberg@adacore.com>
7776
7777 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7778 inherited operation, check whether its alias, which is the source
7779 operastion that it renames, has been marked eliminated.
7780
77812011-08-02 Javier Miranda <miranda@adacore.com>
7782
7783 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7784 in-mode parameter whose type is an access type since it can be used to
7785 modify its designated object. Enforce code that handles as safe an
7786 access type that is not access-to-constant but it is the result of a
7787 previous removal of side-effects.
7788 (Remove_Side_Effects): Minor code reorganization of cases which require
7789 no action. Done to incorporate documentation on new cases uncovered
7790 working in this ticket: no action needed if this routine was invoked
7791 too early and the nodes are not yet decorated.
7792 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7793 to routine Remove_Side_Effects by calls to Force_Evaluation since they
7794 were issued with actuals that are implicitly provided by
7795 Force_Evaluation.
7796
77972011-08-02 Robert Dewar <dewar@adacore.com>
7798
7799 * sem_ch3.adb, sem_res.adb: Minor reformatting.
7800
78012011-08-02 Yannick Moy <moy@adacore.com>
7802
7803 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7804 to issue an error in formal mode on attribute not supported in this mode
7805 (Analyze_Attribute): issue errors on standard attributes not supported
7806 in formal mode.
7807 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7808 comment, and issue error in formal mode on modulus which is not a power
7809 of 2.
7810 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7811 range.
7812 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7813 subtype mark.
7814 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7815 operator on modular type (except 'not').
7816
78172011-08-02 Robert Dewar <dewar@adacore.com>
7818
7819 * gnat_rm.texi: Minor reformatting.
7820
78212011-08-02 Arnaud Charlet <charlet@adacore.com>
7822
7823 * s-osinte-linux.ads: Minor comment update and reformatting.
7824 * i-cexten.ads: Make this unit pure, as for its parent.
7825 Will allow its usage in more contexts if needed.
7826
78272011-08-02 Robert Dewar <dewar@adacore.com>
7828
7829 * s-utf_32.ads: Minor comment fix.
7830
78312011-08-02 Ed Schonberg <schonberg@adacore.com>
7832
7833 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
7834 operation of a tagged synchronized type, handle the case where the
7835 controlling argument is overloaded.
7836
78372011-08-02 Yannick Moy <moy@adacore.com>
7838
7839 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
7840 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
7841 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
7842 SPARK mode and formal verification mode on processing SPARK restriction
7843 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
7844 requiring consistency checking.
7845
78462011-08-02 Robert Dewar <dewar@adacore.com>
7847
7848 * sem_res.adb: Minor reformatting.
7849
78502011-08-02 Robert Dewar <dewar@adacore.com>
7851
7852 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7853 a-cforse.ads: Remove unneeded with of Ada.Containers
7854 Remove commented out pragma Inline's
7855 Move specifications of new subprograms to the actual specs
7856
78572011-08-02 Yannick Moy <moy@adacore.com>
7858
7859 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7860 a-cforse.ads: Update comments.
7861
78622011-08-02 Ed Schonberg <schonberg@adacore.com>
7863
7864 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
7865
78662011-08-02 Robert Dewar <dewar@adacore.com>
7867
7868 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7869 a-cforse.ads, a-cofove.ads: Minor reformatting.
7870
78712011-08-02 Claire Dross <dross@adacore.com>
7872
7873 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
7874 a-cofove.ads: Add comments.
7875
78762011-08-02 Yannick Moy <moy@adacore.com>
7877
7878 * gnat_rm.texi: Document formal containers.
7879
78802011-08-02 Emmanuel Briot <briot@adacore.com>
7881
7882 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
7883 are empty sections.
7884
78852011-08-02 Robert Dewar <dewar@adacore.com>
7886
7887 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
7888 reformatting.
7889
78902011-08-02 Robert Dewar <dewar@adacore.com>
7891
7892 * aspects.adb: New aspects Default_Value and Default_Component_Value
7893 New format of Aspect_Names table checks for omitted entries
7894 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
7895 handling of boolean aspects for derived types.
7896 New aspects Default_Value and Default_Component_Value
7897 New format of Aspect_Names table checks for omitted entries
7898 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
7899 (Has_Default_Value): New flag
7900 (Has_Default_Component_Value): New flag
7901 (Has_Default_Value): New flag
7902 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
7903 table.
7904 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
7905 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
7906 Default_Value and Default_Component_Value
7907 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7908 New aspects Default_Value and Default_Component_Value
7909 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7910 * sprint.adb: Print N_Aspect_Specification node when called from gdb
7911
79122011-08-02 Vincent Celier <celier@adacore.com>
7913
7914 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7915 inherit library kind.
7916
79172011-08-02 Ed Schonberg <schonberg@adacore.com>
7918
7919 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7920 Minor reformatting.
7921
79222011-08-02 Robert Dewar <dewar@adacore.com>
7923
7924 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7925
79262011-08-02 Yannick Moy <moy@adacore.com>
7927
7928 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7929
79302011-08-02 Robert Dewar <dewar@adacore.com>
7931
7932 * impunit.adb: Add comment.
7933
79342011-08-02 Yannick Moy <moy@adacore.com>
7935
7936 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7937 qualification of aggregates in formal mode
7938 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7939 another aggregate
7940 (Resolve_Aggregate): complete the test that an aggregate is adequately
7941 qualified in formal mode
7942
79432011-08-02 Pascal Obry <obry@adacore.com>
7944
7945 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7946 * mlib-prj.adb: Supress warning when compiling binder generated file.
7947 (Build_Library): Supress all warnings when compiling the binder
7948 generated file.
7949
79502011-08-02 Yannick Moy <moy@adacore.com>
7951
7952 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7953 from here...
7954 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7955 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7956 Add with/use clauses to make Check_Formal_Restriction visible
7957
79582011-08-02 Ed Schonberg <schonberg@adacore.com>
7959
7960 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7961 in-parameters when type of the generic formal is private in the generic
7962 spec and non-private in the body.
7963
79642011-08-02 Claire Dross <dross@adacore.com>
7965
7966 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7967 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7968 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7969 * impunit.adb, Makefile.rtl: Take new files into account.
7970
79712011-08-02 Robert Dewar <dewar@adacore.com>
7972
7973 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7974 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7975
79762011-08-02 Yannick Moy <moy@adacore.com>
7977
7978 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7979 formal mode
7980 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7981 matching static array bounds, taking into account the special case of
7982 string literals
7983 * sem_ch3.adb: Typo in comment.
7984
79852011-08-02 Yannick Moy <moy@adacore.com>
7986
7987 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7988 which issues an error in formal mode if its argument node is originally
7989 from source
7990 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7991 has a discriminant specification so that it does not include the case
7992 of derived types
7993 (Derived_Type_Declaration): move here the test that a derived type has a
7994 discriminant specification
7995 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7996 first element of a component association before accessing its choices
7997 (presence of component association is not enough)
7998 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7999 declaration is a library item before accessing the next element in a
8000 list, as library items are not member of lists
8001 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8002 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8003 Check_Formal_Restriction whenever possible.
8004
80052011-08-02 Ed Schonberg <schonberg@adacore.com>
8006
8007 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8008 reference when needed.
8009
80102011-08-02 Bob Duff <duff@adacore.com>
8011
8012 * gnat_ugn.texi: Fix typo.
8013
80142011-08-02 Vincent Celier <celier@adacore.com>
8015
8016 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8017 archive file name. Do not use the full path name of archives for Open
8018 VMS.
8019
80202011-08-02 Robert Dewar <dewar@adacore.com>
8021
8022 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8023 Analyze_Aspect_Specifications
8024 * sem_ch13.adb
8025 (Analyze_Aspect_Specifications): New handling for boolean aspects
8026 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8027 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8028 sequence for Analyze_Aspect_Specifications
8029 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8030 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8031
80322011-08-02 Robert Dewar <dewar@adacore.com>
8033
8034 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8035 aspects, since these no longer exist.
8036
80372011-08-02 Robert Dewar <dewar@adacore.com>
8038
8039 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8040 semicolon, do not try to see if there are aspects following it.
8041 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8042 aspect spec.
8043
80442011-08-02 Robert Dewar <dewar@adacore.com>
8045
8046 * sem_ch8.adb, aspects.ads: Minor reformatting.
8047
80482011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8049
8050 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8051 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8052 extracted from...
8053 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8054
80552011-08-02 Yannick Moy <moy@adacore.com>
8056
8057 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8058 mode on subprogram declaration outside of package specification, unless
8059 it is followed by a pragma Import
8060 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8061 Access_Type_Declaration): issue error in formal mode on access type
8062 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8063 incomplete type
8064 (Analyze_Object_Declaration): issue error in formal mode on object
8065 declaration which does not respect SPARK restrictions
8066 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8067 declaration which does not respect SPARK restrictions
8068 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8069 error in formal mode on digits or delta constraint
8070 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8071 decimal fixed point type
8072 (Derived_Type_Declaration): issue error in formal mode on derived type
8073 other than type extensions of tagged record types
8074 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8075 with check on access definition
8076 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8077 mode on protected definition.
8078 (Analyze_Task_Definition): issue error in formal mode on task definition
8079
80802011-08-02 Robert Dewar <dewar@adacore.com>
8081
8082 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8083
80842011-08-02 Javier Miranda <miranda@adacore.com>
8085
8086 * sem_ch6.adb (Can_Override_Operator): New function.
8087 (Verify_Overriding_Indicator): Add missing code to check overriding
8088 indicator in operators. Fixes regression.
8089 (Check_Overriding_Indicator): Minor reformating after replacing the
8090 code that evaluates if the subprogram can override an operator by
8091 invocations to the above new function.
8092 * einfo.adb
8093 (Write_Field26_Name): Add missing code to ensure that, following
8094 the documentation in einfo.ads, this field is not shown as attribute
8095 "Static_Initialization" on non-dispatching functions.
8096
80972011-08-02 Jose Ruiz <ruiz@adacore.com>
8098
8099 * sem_res.adb (Resolve_Call): A call to
8100 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8101 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8102 i.e., when the second parameter is of type Time_Span.
8103
81042011-08-02 Vincent Celier <celier@adacore.com>
8105
8106 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8107 with an archive instead of -L<library dir> -l<library name>.
8108
81092011-08-02 Ed Schonberg <schonberg@adacore.com>
8110
8111 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8112 mark the base types In_Use in addition to making the operations
8113 use_visible.
8114
81152011-08-02 Ed Falis <falis@adacore.com>
8116
8117 * init.c: add and setup __gnat_signal_mask for the exception signals
8118 * s-inmaop-vxworks.adb: new file.
8119 * s-intman-vxworks.adb: remove unnecessary initializations and
8120 simplify remaining
8121 * s-intman-vxworks.ads: remove unnecessary variable
8122 * s-taprop-vxworks.adb: simplify signal initialization
8123
81242011-08-02 Robert Dewar <dewar@adacore.com>
8125
8126 * sem_ch8.adb: Minor code reorganization, comment updates.
8127
81282011-08-02 Robert Dewar <dewar@adacore.com>
8129
8130 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8131 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8132 here from Sem_Res.
8133 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8134 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8135
81362011-08-02 Ed Schonberg <schonberg@adacore.com>
8137
8138 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8139 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8140 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8141 use_type_clauses, to handle more efficiently use_type and use_all_type
8142 constructs.
8143 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8144 Ada2012 Use_All_Type clause.
8145 (Use_Class_Wide_Operations): new procedure.
8146
81472011-08-02 Robert Dewar <dewar@adacore.com>
8148
8149 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8150 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8151 expression to expression function.
8152
81532011-08-02 Ed Schonberg <schonberg@adacore.com>
8154
8155 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8156 if types are compatible.
8157
81582011-08-02 Yannick Moy <moy@adacore.com>
8159
8160 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8161 returns True if its argument array types have same dimension and same
8162 static bounds at each index.
8163 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8164 OUT or IN OUT paramaters which are not view conversions in SPARK.
8165 (Resolve_Arithmetic_Op): issue an error in formal mode on
8166 multiplication or division with operands of fixed point types which are
8167 not qualified or explicitly converted.
8168 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8169 Boolean or array type (except String) operands.
8170 (Resolve_Equality_Op): issue an error in formal mode on equality
8171 operators for array types other than String with non-matching static
8172 bounds.
8173 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8174 for array types with non-matching static bounds. Factorize the code in
8175 Matching_Static_Array_Bounds.
8176 (Resolve_Qualified_Expression): issue an error in formal mode on
8177 qualified expressions for array types with non-matching static bounds.
8178 (Resolve_Type_Conversion): issue an error in formal mode on type
8179 conversion for array types with non-matching static bounds
8180
81812011-08-02 Robert Dewar <dewar@adacore.com>
8182
8183 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8184
81852011-08-02 Ed Schonberg <schonberg@adacore.com>
8186
8187 * par-ch9.adb: save location of entry for proper error message.
8188
81892011-08-02 Javier Miranda <miranda@adacore.com>
8190
8191 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8192 (Use_Full_View) which permits this routine to climb through the
8193 ancestors using the full-view of private parents.
8194 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8195 Use_Full_View to true in calls to Is_Ancestor.
8196 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8197 true in call to Is_Ancestor.
8198 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8199 Use_Full_View to true in call to Is_Ancestor.
8200 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8201 call to Is_Ancestor.
8202 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8203 Use_Full_View to true in calls to Is_Ancestor.
8204 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8205 Make_Select_Specific_Data_Table, Register_Primitive,
8206 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8207 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8208 to true in call to Is_Ancestor.
8209 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8210 Use_Full_View to true in calls to Is_Ancestor.
8211 * exp_cg.adb
8212 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8213 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8214
82152011-08-02 Robert Dewar <dewar@adacore.com>
8216
8217 * gnat_rm.texi: Minor reformatting.
8218 * sem_prag.adb: Minor reformatting.
8219
82202011-08-02 Tristan Gingold <gingold@adacore.com>
8221
8222 * vms_data.ads: Add VMS qualifier for -gnateP.
8223
82242011-08-02 Robert Dewar <dewar@adacore.com>
8225
8226 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8227 * par-ch7.adb (P_Package): Proper placement of aspects for package
8228 decl/instantiation.
8229 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8230 (End_Statements): Add Is_Sloc parameterr
8231 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8232 (Check_End): Ad Is_Sloc parameter
8233 (End_Statements): Add Is_Sloc parameterr
8234
82352011-08-02 Vincent Celier <celier@adacore.com>
8236
8237 * ug_words: Add VMS qualifier equivalent to -gnateP:
8238 /SYMBOL_PREPROCESSING.
8239
82402011-08-02 Jose Ruiz <ruiz@adacore.com>
8241
8242 * gnat-style.texi: For hexadecimal numeric literals the typical
8243 grouping of digits is 4 to represent 2 bytes.
8244 A procedure spec which is split into several lines is indented two
8245 characters.
8246
82472011-08-02 Yannick Moy <moy@adacore.com>
8248
8249 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8250 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8251 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8252 properly qualified
8253 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8254 choice in array aggregate
8255 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8256 mark as ancestor
8257 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8258 positional and named aggregate for record, or others in record
8259 aggregate, or multiple choice in record aggregate
8260 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8261 array operands to logical operations AND, OR and XOR do not have the
8262 same static lower and higher bounds
8263 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8264
82652011-08-01 Robert Dewar <dewar@adacore.com>
8266
8267 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8268 Replaces Last_Source_Node_In_Sequence.
8269 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8270 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8271 parens and blank in string (this was inconsistently implemented).
8272 * errout.ads
8273 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8274 blank in string (this was inconsistently implemented).
8275 * gnat1drv.adb
8276 (Set_Global_Switches): Set formal mode switches appropriately
8277 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8278 * par-prag.adb
8279 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8280 call Set_Error_Msg_Lang to set "spark" as language name.
8281 * par.adb: Remove unnecessary call to set formal language for errout
8282 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8283 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8284 name.
8285 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8286 calls to it, moved after resolution so that types are known
8287 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8288 result of concatenation is not of type String
8289 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8290 concatenation is not properly restricted
8291 * gnat_rm.texi: Add doc on pragma Spark_95.
8292 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8293 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8294 * gcc-interface/Make-lang.in: Update dependencies.
8295
82962011-08-01 Javier Miranda <miranda@adacore.com>
8297
8298 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8299 condition that detects if the overridden operation must replace an
8300 existing entity.
8301
83022011-08-01 Javier Miranda <miranda@adacore.com>
8303
8304 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8305 code declarations inserted by Insert_Actions in each alternative of the
8306 N_Case_Expression node.
8307
83082011-08-01 Robert Dewar <dewar@adacore.com>
8309
8310 * sem_ch6.adb: Minor code reorganization.
8311 * sem_util.adb: Minor reformatting.
8312
83132011-08-01 Pascal Obry <obry@adacore.com>
8314
8315 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8316 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8317
83182011-08-01 Yannick Moy <moy@adacore.com>
8319
8320 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8321 literal or operator symbol which is prefixed
8322 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8323 mode on access attributes.
8324 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8325 that concatenation operands are properly restricted in formal mode
8326 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8327 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8328 result of the concatenation has a type different from String.
8329 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8330 Analyze_Quantified_Expression, Analyze_Slice,
8331 Analyze_Null): issue an error in formal mode on unsupported constructs
8332 * sem_ch5.adb
8333 (Analyze_Block_Statement): only issue error on source block statement
8334 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8335 function which returns the last node in a list of nodes for which
8336 Comes_From_Source returns True, if any
8337 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8338 Last_Source_Node_In_Sequence
8339 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8340 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8341 mode on unsupported constructs
8342 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8343 rest of the actions may be needed later on since the error is marked as
8344 not serious.
8345 * sinfo.ads: Typos in comments.
8346
83472011-08-01 Pascal Obry <obry@adacore.com>
8348
8349 * projects.texi: Minor editing.
8350
83512011-08-01 Yannick Moy <moy@adacore.com>
8352
8353 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8354 insertion character ~~
8355 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8356 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8357 with insertion character ~~
8358 (Set_Msg_Text): treat insertion character ~~
8359 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8360 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8361 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8362 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8363 errors related to the formal language restriction not serious
8364 (insertion character |).
8365 * par.adb (Par): set formal language for error messages if needed
8366 * sem_ch6.adb (Check_Missing_Return): take into account possible
8367 generated statements at the end of the function
8368 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8369 enumeration value to define a new pragma SPARK_95
8370 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8371 SPARK_Version): new type and variables to store the SPARK version
8372 (none by default).
8373 (SPARK_Mode): return True when SPARK_Version is set
8374 * par-prag.adb: Correct indentation
8375 (Prag): take Pragma_SPARK_95 into account
8376 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8377 into account.
8378
83792011-08-01 Robert Dewar <dewar@adacore.com>
8380
8381 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8382 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8383 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8384
83852011-08-01 Pascal Obry <obry@adacore.com>
8386
8387 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8388 Target_Name to Get_Path call.
8389 (Parse_Single_Project): Likewise.
8390 (Post_Parse_Context_Clause): Likewise.
8391 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8392 Call Initialise_Project_Path with the proper Target_Name.
8393 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8394 search path.
8395 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8396 with the proper Target_Name.
8397 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8398 Part.Parse routine.
8399 (Parse_Project_And_Apply_Config): Likewise.
8400 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8401 This is fine as this part of the code is supporting only native
8402 compilation.
8403 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8404 is fine as this part of the code is supporting only native compilation.
8405
84062011-08-01 Yannick Moy <moy@adacore.com>
8407
8408 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8409 of homonym, unless the homonym is one of the cases allowed in SPARK
8410 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8411 package declaration occurring after a body.
8412
84132011-08-01 Robert Dewar <dewar@adacore.com>
8414
8415 * checks.adb, exp_ch4.adb: Minor reformatting.
8416
84172011-08-01 Javier Miranda <miranda@adacore.com>
8418
8419 * einfo.ads (Access_Disp_Table): Fix documentation.
8420 (Dispatch_Table_Wrappers): Fix documentation.
8421
84222011-08-01 Pascal Obry <obry@adacore.com>
8423
8424 * prj-env.adb, prj-env.ads: Minor reformatting.
8425
84262011-08-01 Yannick Moy <moy@adacore.com>
8427
8428 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8429 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8430 procedures out of these packages.
2c7f9cc0 8431 * errout.ads, errout.adb
052e0603
AC
8432 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8433 procedures in of this package
8434 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8435 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8436 on misplaced later vs initial declarations, like in Ada 83
8437 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8438 formal mode on attribute of private type whose full type declaration
8439 is not visible
8440 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8441 package declaration inside a package specification
8442 (Analyze_Full_Type_Declaration): issue error in formal mode on
8443 controlled type or discriminant type
8444 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8445 user-defined operator means that it should come from the source
8446 (New_Overloaded_Entity): issue error in formal mode on overloaded
8447 entity.
8448 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8449
84502011-08-01 Thomas Quinot <quinot@adacore.com>
8451
8452 * atree.adb: Minor reformatting.
8453 * checks.adb: Minor reformatting.
8454
84552011-08-01 Vincent Celier <celier@adacore.com>
8456
8457 * s-parame-vms-ia64.ads: Fix typo in comment
8458 Minor reformatting
8459 * s-parame-vms-restrict.ads: Removed, unused.
8460
84612011-08-01 Javier Miranda <miranda@adacore.com>
8462
8463 * exp_ch3.adb
8464 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8465 * sem_ch3.adb
8466 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8467 * sem_ch3.ads, sem_ch3.adb
8468 (Is_Constant_Bound): New extended version of the subprogram that was
8469 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8470 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8471 * sem_aux.ads (Constant_Value): Fix typo in comment.
8472 * checks.adb (Generate_Index_Checks): New implementation which, for
8473 array objects with constant bounds, generates the runtime check
8474 referencing the bounds of the array type. For other cases this routine
8475 provides its previous behavior obtaining such values from the array
8476 object.
8477 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8478 parent type.
8479 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8480 we cannot have semantic interpretations of the new node.
8481
84822011-08-01 Ed Schonberg <schonberg@adacore.com>
8483
8484 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8485 expressions.
8486
84872011-08-01 Arnaud Charlet <charlet@adacore.com>
8488
8489 * sem_ch8.adb: Minor code editing.
8490 * s-vxwext.adb: Remove trailing space.
8491 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8492 consistency with other files.
8493
84942011-08-01 Thomas Quinot <quinot@adacore.com>
8495
8496 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8497
84982011-08-01 Ed Schonberg <schonberg@adacore.com>
8499
8500 * par-ch10.adb: reject parameterized expressions as compilation unit.
8501 * sem_ch4.adb: handle properly conditional expression with overloaded
8502 then_clause and no else_clause.
8503
85042011-08-01 Tristan Gingold <gingold@adacore.com>
8505
8506 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8507 like done by System.Aux_DEC.
8508 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8509
85102011-08-01 Yannick Moy <moy@adacore.com>
8511
8512 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8513 missing label at end of declaration (subprogram or package)
8514 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8515 of positional and named parameter association
8516 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8517 Error_Msg_SP which adds a prefix to the error message giving the name
8518 of the formal language analyzed
8519 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8520 access result type in subprogram, unconstrained array as result type,.
8521 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8522 procedure
8523 * sem_ch8.adb: Code clean up.
8524
85252011-08-01 Javier Miranda <miranda@adacore.com>
8526
8527 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8528 * einfo.ads (Access_Disp_Table): Fix documentation.
8529 (Dispatch_Table_Wrappers): Fix documentation.
8530 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8531 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8532 to enforce the documentation of this attribute.
8533 (Set_Is_Interface): Cleanup the assertion.
8534 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8535 the Underlying_Type entity before reading attribute Access_Disp_Table.
8536 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8537 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8538 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8539 the Underlying_Type entity before reading attribute Access_Disp_Table.
8540 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8541 Locate the Underlying_Type entity before reading attribute
8542 Access_Disp_Table.
8543
85442011-08-01 Ed Schonberg <schonberg@adacore.com>
8545
8546 * s-poosiz.ads: Additional overriding indicators.
8547
85482011-08-01 Yannick Moy <moy@adacore.com>
8549
8550 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8551 formal mode.
8552 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8553 parameter specification does not include a subtype mark.
8554 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8555 formal mode on abstract subprogram.
8556 (Analyze_Subprogram_Specification): issue error in formal mode on
8557 user-defined operator.
8558 (Process_Formals): issue error in formal mode on access parameter and
8559 default expression.
8560 * sem_ch9.adb (Analyze_Abort_Statement,
8561 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8562 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8563 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8564 Analyze_Requeue, Analyze_Selective_Accept,
8565 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8566 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8567 issue error in formal mode on user-defined raise statement.
8568
85692011-08-01 Thomas Quinot <quinot@adacore.com>
8570
8571 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8572 declaration being hidden when overriding an implicit inherited
8573 subprogram.
8574 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8575 (-gnats), do not complain about a source file that contains only a
8576 pragma No_Body.
8577
85782011-08-01 Ed Schonberg <schonberg@adacore.com>
8579
8580 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8581 variable if already set.
8582
85832011-08-01 Arnaud Charlet <charlet@adacore.com>
8584
8585 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8586 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8587 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8588 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8589 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8590 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8591 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8592 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8593 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8594 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8595 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8596 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8597 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8598 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8599 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8600 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8601 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8602 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8603 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8604 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8605 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8606 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8607 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8608 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8609 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8610 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8611 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8612 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8613 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8614 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8615 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8616 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8617 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8618 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8619 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8620 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8621 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8622 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8623 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8624 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8625 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8626 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8627 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8628 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8629 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8630 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8631 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8632 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8633 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8634 Use GNAT instead of GNARL.
8635
86362011-08-01 Bob Duff <duff@adacore.com>
8637
8638 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8639 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8640 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8641 reformatting.
8642
86432011-08-01 Yannick Moy <moy@adacore.com>
8644
8645 * debug.adb (d.D) reverve flag for the SPARK mode
8646 (d.E) reverve flag for SPARK generation mode
8647 (d.F) reverve flag for Why generation mode
2c7f9cc0 8648 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
8649 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8650 functions which return True when the corresponding modes are set
8651 (Formal_Language): return "spark" or "alfa" when in formal verification
8652 mode.
8653 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8654 Error_Msg to prefix the error message with a tag giving the formal
8655 language
8656 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8657 message with a tag giving the formal language
8658 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8659 block statement
8660 (Analyze_Case_Statement): issue error in formal mode on case statement
8661 with a single "others" case alternative
8662 (Analyze_Exit_Statement): issue errors in formal mode on exit
8663 statements which do not respect SPARK restrictions
8664 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8665 (Check_Unreachable_Code): always issue an error (not a warning) in
8666 formal mode on unreachable code (concerns both code after an infinite
8667 loop and after an unconditional jump, both not allowed in SPARK)
8668 * sem_ch6.adb (Analyze_Return_Statement): add call to
8669 Set_Return_Present for a procedure containing a return statement
8670 (already done for functions in Analyze_Function_Return)
8671 (Analyze_Function_Return): issue error in formal mode on extended
8672 return or if return is not last statement in function
8673 (Check_Missing_Return): issue error in formal mode if function does
8674 not end with return or if procedure contains a return
8675 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8676 function to detect if there is an inner scope of its parameter S which
8677 is a loop.
8678
86792011-08-01 Thomas Quinot <quinot@adacore.com>
8680
8681 * sem_ch6.ads: Minor reformatting.
8682
86832011-08-01 Javier Miranda <miranda@adacore.com>
8684
8685 * sem_util.adb (Abstract_Interface_List): Complete condition when
8686 processing private type declarations to avoid reading unavailable
8687 attribute.
8688 (Is_Synchronized_Tagged_Type): Complete condition when processing
8689 private extension declaration nodes to avoid reading unavailable
8690 attribute.
8691
86922011-08-01 Thomas Quinot <quinot@adacore.com>
8693
8694 * sem_ch3.adb: Minor reformatting.
8695
86962011-08-01 Thomas Quinot <quinot@adacore.com>
8697
8698 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8699 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8700 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8701 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8702 for VMS, instead parametrize the common implementation with
8703 System.Parameters declarations.
8704
87052011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8706
8707 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8708
87092011-08-01 Tristan Gingold <gingold@adacore.com>
8710
8711 * seh_init.c: Fix SEH handler installation on win64.
8712
87132011-08-01 Ed Schonberg <schonberg@adacore.com>
8714
8715 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8716 double analysis of an anonymous access to subprogram, because it can
8717 lead to improper sharing of profiles and a back-end crash.
8718
87192011-08-01 Robert Dewar <dewar@adacore.com>
8720
8721 * make.adb, sem_ch4.adb: Minor reformatting.
8722 * gcc-interface/Make-lang.in: Update dependencies.
8723 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8724
87252011-08-01 Arnaud Charlet <charlet@adacore.com>
8726
8727 * gnat_rm.texi: Fix definition of Long_Integer.
8728
87292011-08-01 Ed Schonberg <schonberg@adacore.com>
8730
8731 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8732 to prevent storage exhaustion.
8733 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8734 finalized is a function body, insert the cleanup code before the final
8735 return statement, to prevent spurious warnings.
8736 * s-pooglo.ads: add overriding indicator.
8737
87382011-08-01 Ed Schonberg <schonberg@adacore.com>
8739
8740 * sem_ch4.adb (Operator_Check): improve error message when both a
8741 with_clause and a use_clause are needed to make operator usage legal.
8742 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8743 determine whether a compilation unit is visible within an other,
8744 either through a with_clause in the current unit, or a with_clause in
8745 its library unit or one one of its parents.
8746
87472011-08-01 Ed Schonberg <schonberg@adacore.com>
8748
8749 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8750 over an arbitrary expression of an array or container type.
8751 * lib-xref.adb: clarify comment.
8752
87532011-08-01 Bob Duff <duff@adacore.com>
8754
8755 * einfo.ads: Minor reformatting.
8756 * debug.adb: Minor comment improvement.
8757
87582011-08-01 Javier Miranda <miranda@adacore.com>
8759
8760 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8761 consider hidden subprograms as valid candidates.
8762
87632011-08-01 Arnaud Charlet <charlet@adacore.com>
8764
8765 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8766
87672011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8768
8769 * gnat_ugn.texi: Fix typo.
8770
87712011-08-01 Robert Dewar <dewar@adacore.com>
8772
8773 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8774 lib-xref.adb: Minor reformatting
8775
87762011-08-01 Gary Dismukes <dismukes@adacore.com>
8777
8778 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8779 when to generate a call to Move_Final_List.
8780 (Has_Controlled_Parts): Remove this function.
8781
87822011-08-01 Geert Bosch <bosch@adacore.com>
8783
8784 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8785 "," in choice list.
8786
87872011-08-01 Thomas Quinot <quinot@adacore.com>
8788
8789 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8790 explicit raise of a predefined exception as Comes_From_Source if the
8791 original N_Raise_Statement comes from source.
8792
87932011-08-01 Robert Dewar <dewar@adacore.com>
8794
8795 * sinfo.ads: Add comment.
8796 * sem_ch6.adb: Minor reformatting.
8797
87982011-08-01 Robert Dewar <dewar@adacore.com>
8799
8800 * freeze.adb (Freeze_Entity): Refine check for bad component size
8801 clause to avoid rejecting confirming clause when atomic/aliased present.
8802
88032011-08-01 Ed Schonberg <schonberg@adacore.com>
8804
8805 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8806 better determine whether an entity reference is a write.
8807 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8808 subcomponent.
8809 * lib-xref.adb (Output_References): Do no suppress a read reference at
8810 the same location as an immediately preceeding modify-reference, to
8811 handle properly in-out actuals.
8812
88132011-08-01 Tristan Gingold <gingold@adacore.com>
8814
8815 * env.c (__gnat_setenv) [VMS]: Refine previous change.
8816
88172011-08-01 Quentin Ochem <ochem@adacore.com>
8818
8819 * i-cstrin.adb (New_String): Changed implementation, now uses only the
8820 heap to compute the result.
8821
88222011-08-01 Robert Dewar <dewar@adacore.com>
8823
8824 * atree.ads: Minor reformatting.
8825
88262011-08-01 Emmanuel Briot <briot@adacore.com>
8827
8828 * g-expect.adb (Get_Command_Output): Fix memory leak.
8829
88302011-08-01 Geert Bosch <bosch@adacore.com>
8831
8832 * cstand.adb (P_Float_Type): New procedure to print the definition of
8833 predefined fpt types.
8834 (P_Mixed_Name): New procedure to print a name using mixed case
8835 (Print_Standard): Use P_Float_Type for printing floating point types
8836 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
8837 precision IEEE float.
8838
88392011-08-01 Thomas Quinot <quinot@adacore.com>
8840
8841 * sem_ch3.adb: Minor reformatting.
8842
88432011-08-01 Ed Schonberg <schonberg@adacore.com>
8844
8845 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
8846 the completion of a generic function, insert the new body rather than
8847 rewriting the original.
8848
88492011-08-01 Yannick Moy <moy@adacore.com>
8850
8851 * sinfo.ads, errout.ads: Typos in comments.
8852
88532011-08-01 Robert Dewar <dewar@adacore.com>
8854
8855 * par-endh.adb: Minor reformatting.
8856
88572011-08-01 Robert Dewar <dewar@adacore.com>
8858
8859 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
8860 (Pre_Post_Aspects): New subtype.
8861 * par-ch12.adb (P_Generic): New syntax for aspects in packages
8862 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
8863 * par-ch7.adb (P_Package): Remove Decl parameter
8864 (P_Package): Handle new syntax for aspects (before IS)
8865 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
8866 new aspect syntax
8867 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
8868 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
8869 (P_Package): Remove Decl parameter
8870 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
8871 aspects
8872 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
8873 specs
8874 * sem_util.ads, sem_util.adb (Static_Boolean): New function
8875 * sinfo.ads: Document new syntax for aspects in packages etc.
8876 * sprint.adb: Handle new syntax of aspects before IS in package
8877
88782011-08-01 Thomas Quinot <quinot@adacore.com>
8879
8880 * atree.ads: Minor reformatting.
8881 * sem_prag.adb: Minor reformatting.
8882
88832011-08-01 Robert Dewar <dewar@adacore.com>
8884
8885 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
8886 case expr alternative.
8887
88882011-08-01 Ed Schonberg <schonberg@adacore.com>
8889
8890 * sem_ch12.adb: Fix typo.
8891
88922011-08-01 Geert Bosch <bosch@adacore.com>
8893
8894 * sem_prag.adb (Check_No_Link_Name): New procedure.
8895 (Process_Import_Or_Interface): Use Check_No_Link_Name.
8896 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
8897 instead of Standard_Long_Long_Float_Size global. Preparation for
8898 eventual removal of per type constants.
8899 * exp_util.ads (Get_Stream_Size): New function returning the stream
8900 size value of subtype E.
8901 * exp_util.adb (Get_Stream_Size): Implement new function.
8902 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
8903 function.
8904 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
8905 * einfo.adb:
8906 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8907
89082011-08-01 Geert Bosch <bosch@adacore.com>
8909
8910 * cstand.adb: Fix comments.
8911 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8912 count of arguments.
8913
89142011-08-01 Robert Dewar <dewar@adacore.com>
8915
8916 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8917
89182011-08-01 Geert Bosch <bosch@adacore.com>
8919
8920 * atree.ads: Fix comment.
8921
89222011-08-01 Robert Dewar <dewar@adacore.com>
8923
8924 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8925 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8926 * par.adb: Add with for Namet.Sp.
8927 * par-tchk.adb: Minor reformatting.
8928
89292011-08-01 Vincent Celier <celier@adacore.com>
8930
8931 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8932 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8933 of the init procedure of a SAL.
8934 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8935 New procedure.
8936
89372011-08-01 Thomas Quinot <quinot@adacore.com>
8938
8939 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8940 reformatting.
8941
89422011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8943
8944 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8945
89462011-08-01 Thomas Quinot <quinot@adacore.com>
8947
8948 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8949 conformant with its spec (return True only for types that have
8950 an overriding Initialize primitive operation that prevents them from
8951 having preelaborable initialization).
8952 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8953 initialization for controlled types in Ada 2005 or later mode.
8954
89552011-08-01 Robert Dewar <dewar@adacore.com>
8956
8957 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8958 Postcondition.
8959 (Same_Aspect): New function.
8960 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8961 Type_Invariant, Precondition, Postcondition.
8962 * snames.ads-tmpl: Add Name_Type_Invariant.
8963
89642011-08-01 Robert Dewar <dewar@adacore.com>
8965
8966 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8967 here.
8968 (Freeze_All_Ent): Fix error in handling inherited aspects.
8969 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8970 already analyzed, but don't skip entire processing of a declaration,
8971 that's wrong in some cases of declarations being rewritten.
8972 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8973 Don't delay for integer, string literals
8974 Treat predicates in usual manner for delay, remove special case code,
8975 not needed.
8976 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8977 (Build_Predicate_Function): Update saved expression in aspect
8978 (Build_Invariant_Procedure): Update saved expression in aspect
8979 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8980 of replacement of discriminant references if the reference is simple.
8981
89822011-08-01 Robert Dewar <dewar@adacore.com>
8983
8984 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8985 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8986 Static_Predicate and Dynamic_Predicate.
8987 (Build_Predicate_Function): Add processing for Static_Predicate
8988 and Dynamic_Predicate.
8989 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8990 (From_Static_Predicate): New flag
8991 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8992
89932011-08-01 Robert Dewar <dewar@adacore.com>
8994
8995 * usage.adb: Documentation cleanup for Ada version modes in usage.
8996 * expander.adb: Minor reformatting.
8997
89982011-08-01 Robert Dewar <dewar@adacore.com>
8999
9000 * atree.ads: Minor comment fix.
9001 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9002 a-witeio.ads, sem_prag.adb: Minor reformatting.
9003
90042011-08-01 Doug Rupp <rupp@adacore.com>
9005
9006 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9007 pointers. Use descrip.h header file for convenience. Add some
9008 comments.
9009
90102011-08-01 Robert Dewar <dewar@adacore.com>
9011
9012 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9013 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9014 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9015 New procedure.
9016 (Check_Aspect_At_End_Of_Declarations): New procedure
9017 (Analye_Aspect_Specification): Minor changes for above procedures
9018 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9019 specification node as well.
9020
90212011-08-01 Pascal Obry <obry@adacore.com>
9022
9023 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9024 Windows files. Use GetFilesAttributes() in this case to check for file
9025 existence instead of returning with an error code.
9026
90272011-08-01 Vincent Celier <celier@adacore.com>
9028
9029 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9030 High is above Source length.
9031
90322011-08-01 Robert Dewar <dewar@adacore.com>
9033
9034 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9035
90362011-08-01 Robert Dewar <dewar@adacore.com>
9037
9038 * aspects.ads (Boolean_Aspects): New subtype.
9039 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9040 for derived types in cases where the parent type and derived type have
9041 aspects.
9042 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9043 with aspects when parent type also has aspects.
9044 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9045 boolean expression at this point).
9046 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9047 accordance with final decision on the Ada 2012 feature.
9048 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9049
90502011-08-01 Matthew Heaney <heaney@adacore.com>
9051
9052 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9053
90542011-08-01 Pascal Obry <obry@adacore.com>
9055
9056 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9057 Fix Replace_Slice when High is above current string size.
9058 (Replace_Slice): Fix DL computation when High is above current
9059 string length.
9060
90612011-08-01 Gary Dismukes <dismukes@adacore.com>
9062
9063 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9064
90652011-08-01 Matthew Heaney <heaney@adacore.com>
9066
9067 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9068 of node.
9069
90702011-08-01 Pascal Obry <obry@adacore.com>
9071
9072 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9073 reformatting.
9074
90752011-08-01 Ed Schonberg <schonberg@adacore.com>
9076
9077 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9078 access to protected subprograms in generic bodies.
9079 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9080 protected type, indicate that the convention of the subprogram is
9081 Convention_Protected, because it may be used in subsequent declarations
9082 within the protected declaration.
9083
90842011-08-01 Vincent Celier <celier@adacore.com>
9085
9086 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9087 and "final" procedures when the name of the library is "ada", to avoid
9088 duplicate symbols "adainit" and "adafinal" in executables.
9089
90902011-08-01 Ed Schonberg <schonberg@adacore.com>
9091
9092 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9093 quantified expression that appears within a postcondition and uses the
9094 Ada2012 'Result attribute.
9095
90962011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9097
9098 * init.c (__gnat_error_handler): Cast reason to int.
9099 (__gnat_install_handler): Explain sa_sigaction use.
9100
91012011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9102
9103 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9104 subprogram has copy-in copy-out parameters, try to promote the mode of
9105 the return type if it is passed in registers.
9106
91072011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9108
9109 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9110 left operand as addressable.
9111
91122011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9113
9114 * gcc-interface/gigi.h (build_function_stub): Remove.
9115 (build_return_expr): Likewise.
9116 (convert_vms_descriptor): Declare.
9117 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9118 (build_function_stub): Move to...
9119 * gcc-interface/utils2.c (build_return_expr): Move to...
9120 * gcc-interface/trans.c (build_function_stub): ...here.
9121 (build_return_expr): ...here.
9122 (Subprogram_Body_to_gnu): Add local variable for language_function.
9123 Disconnect the parameter attributes cache, if any, once done with it.
9124 Call end_subprog_body only after setting the end_locus.
9125 Build the stub associated with the function, if any, at the very end.
9126 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9127 variables and streamline control flow.
9128
91292011-07-23 Arnaud Charlet <charlet@adacore.com>
9130
9131 PR ada/49819
9132 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9133 g-trasym-dwarf.adb.
9134
91352011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9136
9137 PR bootstrap/49794
9138 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9139 Assign to act.sa_sigaction.
9140 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9141 current->return_address to char * before arithmetic.
9142
91432011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9144
9145 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9146 Correct argument types.
9147 Extract code from reason.
9148 (__gnat_install_handler): Assign to act.sa_sigaction.
9149
91502011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9151
9152 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9153 (GNAT1_OBJS): ...here.
9154
91552011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9156
9157 PR ada/48711
9158 * g-socthi-mingw.adb (Fill): Fix formatting.
9159
9160 * gcc-interface/gigi.h: Move around comment.
9161
91622011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9163
9164 PR ada/46350
9165 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9166
91672011-07-14 Florian Weimer <fw@deneb.enyo.de>
9168
9169 PR ada/48711
9170 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9171
91722011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9173
9174 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9175 range comparison if Pmode is SImode.
9176
91772011-07-12 Laurent GUERBY <laurent@guerby.net>
9178 Eric Botcazou <ebotcazou@adacore.com>
9179
9180 * adadecode.c: Wrap up in extern "C" block.
9181 * adadecode.h: Likewise.
9182 * adaint.c: Likewise. Remove 'const' keyword.
9183 * adaint.h: Likewise.
9184 * argv.c: Likewise.
9185 * atree.h: Likewise.
9186 * cio.c: Likewise.
9187 * cstreams.c: Likewise.
9188 * env.c: Likewise.
9189 * exit.c: Likewise.
9190 * fe.h: Likewise.
9191 * final.c: Likewise.
9192 * init.c: Likewise.
9193 * initialize.c: Likewise.
9194 * link.c: Likewise.
9195 * namet.h: Likewise.
9196 * nlists.h: Likewise.
9197 * raise.c: Likewise.
9198 * raise.h: Likewise.
9199 * repinfo.h: Likewise.
9200 * seh_init.c: Likewise.
9201 * targext.c: Likewise.
9202 * tracebak.c: Likewise.
9203 * uintp.h: Likewise.
9204 * urealp.h: Likewise.
9205 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9206 * xsinfo.adb: Likewise.
9207 * xsnamest.adb: Likewise.
9208 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9209 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9210 * gcc-interface/misc.c: Likewise.
9211 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9212 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9213 ada/targext.o here...
9214 (GNAT_ADA_OBJS): ...and not here.
9215 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9216 (GNATBIND_OBJS): Reorder.
9217
92182011-07-07 Richard Henderson <rth@redhat.com>
9219
9220 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9221 dwarf2out_frame_init.
9222
92232011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9224
9225 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9226
92272011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9228
9229 PR target/39150
9230 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9231
92322011-07-06 Richard Guenther <rguenther@suse.de>
9233
9234 * gcc-interface/misc.c (gnat_init): Merge calls to
9235 build_common_tree_nodes and build_common_tree_nodes_2.
9236 Re-initialize boolean_false_node.
9237
92382011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9239 Olivier Hainque <hainque@adacore.com>
9240 Nicolas Setton <setton@adacore.com>
9241
9242 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9243 the type according to the ARTIFICIAL_P parameter.
9244 (create_type_decl): Likewise.
9245 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9246
92472011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9248
9249 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9250 (gnatbind): Likewise.
9251
92522011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9253
9254 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9255
92562011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9257
9258 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9259 local variable throughout. Remove useless call to Base_Type.
9260 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9261 Take it also into account for the volatileness of the field. Set the
9262 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9263
92642011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9265
9266 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9267 on a dereference built for a by-ref object if it has an address clause.
9268
92692011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9270
9271 * einfo.ads (Address_Taken): Document use for the second argument of
9272 Asm_Input and Asm_Output attributes.
9273 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9274 argument is an entity name, then set Address_Taken on it.
9275 <Attribute_Asm_Output>: Likewise.
9276 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9277 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9278 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9279 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9280
92812011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9282
9283 PR middle-end/46500
9284 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9285
92862011-06-14 Joseph Myers <joseph@codesourcery.com>
9287
9288 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9289 (ada/utils.o): Update dependencies.
9290 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9291 ../../../libcpp/libcpp.a.
9292 * gcc-interface/utils.c: Include common/common-target.h.
9293 (process_attributes): Use targetm_common.have_named_sections.
9294
92952011-06-07 Richard Guenther <rguenther@suse.de>
9296
9297 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9298 set_sizetype.
9299
93002011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9301
9302 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9303 TREE_THIS_NOTRAP flag.
9304
93052011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9306
9307 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9308 Fix thinko.
9309
93102011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9311
9312 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9313 constants whose full view has discriminants specially.
9314
93152011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9316
9317 * gcc-interface/utils.c: Include diagnostic.h.
9318 (gnat_write_global_declarations): Output debug information for all
9319 global type declarations before finalizing the compilation unit.
9320 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9321
93222011-05-25 Jakub Jelinek <jakub@redhat.com>
9323
9324 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9325
93262011-05-25 Kai Tietz <ktietz@redhat.com>
9327
9328 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9329 initialization instead of const/none-const pointer assignment.
9330
93312011-05-24 Joseph Myers <joseph@codesourcery.com>
9332
9333 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9334 $(EXTRA_GNAT1_OBJS).
9335 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9336 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9337 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9338 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9339 libcommon-target.a instead of prefix.o.
9340
93412011-05-21 Joseph Myers <joseph@codesourcery.com>
9342
9343 PR ada/49097
9344 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9345
93462011-05-20 Joseph Myers <joseph@codesourcery.com>
9347
9348 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9349 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9350 instead of version.o.
9351
93522011-05-18 Kai Tietz <ktietz@redhat.com>
9353
9354 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9355 boolean_false_node instead of integer_zero_node.
9356 (convert_with_check): Likewise.
9357 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9358
93592011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9360
9361 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9362 type of the parameter is an unconstrained array, convert the actual to
9363 the type of the formal in the In Out and Out cases as well.
9364
93652011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9366
9367 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9368 call build_function_type_array or build_varargs_function_type_array
9369 instead.
9370 (create_subprog_type): Don't call build_function_type; call
9371 build_function_type_vec instead.
9372
93732011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9374
9375 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9376 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9377 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9378
93792011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9380
9381 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9382
9383 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9384 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9385
93862011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9387
9388 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9389
93902011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9391
9392 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9393 instead of accessing TYPE_ARG_TYPES directly.
9394 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9395
93962011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9397
9398 PR ada/48844
9399 * gcc-interface/gigi.h (get_variant_part): Declare.
9400 * gcc-interface/decl.c (get_variant_part): Make global.
9401 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9402 types have the same constant size, are record types and T1 has a
9403 variant part while T2 doesn't.
9404
94052011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9406
9407 * gcc-interface/utils.c (begin_subprog_body): Do not call
9408 get_pending_sizes.
9409 (end_subprog_body): Likewise.
9410
94112011-05-04 Richard Guenther <rguenther@suse.de>
9412
9413 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9414 int_const_binop.
9415 (pos_to_constructor): Likewise.
9416
94172011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 9418 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9419
9420 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9421 of build_function_type. Adjust calls to...
9422 (build_raise_check): ...this. Do not take a void_tree parameter.
9423 Call build_function_type_list instead of build_function_type.
9424 Fix head comment and swap couple of conditional blocks.
9425
94262011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9427
9428 * gnatvsn.ads (Library_Version): Bump to 4.7.
9429 (Current_Year): Bump to 2011.
9430
94312011-04-29 Michael Matz <matz@suse.de>
9432
9433 * gcc-interface/misc.c (gnat_handle_option): Set
9434 warn_maybe_uninitialized.
9435
94362011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9437
9438 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9439 the Watson/McCabe paper.
9440
94412011-04-23 Jim Meyering <meyering@redhat.com>
9442
9443 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9444
94452011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9446
9447 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9448 onto the new type.
9449
94502011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9451
9452 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9453 parameter.
9454 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9455 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9456 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9457 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9458 <all>: Do not set flags on the reused DECL node coming from an alias.
9459 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9460 don't need debug info here...
9461 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9462 (gigi): Adjust calls to create_subprog_decl.
9463 (build_raise_check): Likewise.
9464 (establish_gnat_vms_condition_handler): Likewise.
9465 (Compilation_Unit_to_gnu): Likewise.
9466 (gnat_to_gnu): Likewise.
9467
94682011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9469
9470 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9471 (NO_REORDER_ADAFLAGS): New variable.
9472 (EXTRA_GNATTOOLS): Always define.
9473 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9474 Clean up and adjust list of files compiled with special options.
9475 * gcc-interface/Make-lang.in: Likewise.
9476 (ada/decl.o): Cosmetical change.
9477 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9478
94792011-04-20 Jim Meyering <meyering@redhat.com>
9480
9481 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9482
94832011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9484
9485 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9486 $(CFLAGS) on the link line.
9487
94882011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9489
9490 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9491 padded type built for the return type if it is unconstrained.
9492
94932011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9494
9495 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9496
94972011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9498
9499 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9500 before calling TREE_CHAIN.
9501 * gcc-interface/misc.c (gnat_init_ts): New function.
9502 (LANG_HOOKS_INIT_TS): Define.
9503
95042011-04-12 Martin Jambor <mjambor@suse.cz>
9505
9506 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9507 instead of cgraph_node.
9508
95092011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9510
9511 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9512 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9513 mechanism.
9514
95152011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9516
9517 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9518 of aggregate types that contain a placeholder.
9519
95202011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9521
9522 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9523 TYPE_ARG_TYPES.
9524 (handle_type_generic_attribute): Likewise.
9525
95262011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9527
9528 PR ada/47163
9529 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9530
95312011-04-04 Kai Tietz <ktietz@redhat.com>
9532
9533 PR ada/47163
9534 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9535 to flag value.
9536
95372011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9538
9539 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9540 type case, do not strip a padding type around the array type.
9541
95422011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9543
9544 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9545 types.
9546
95472011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9548
9549 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9550 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9551 code for -feliminate-unused-debug-types.
9552 (gnat_post_options): Likewise.
9553
95542011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9555
9556 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9557 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9558 distinct copy.
9559
95602011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9561
9562 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9563 DECL_ARTIFICIAL flag on enumeration types.
9564
95652011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9566
9567 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9568 fat pointer types artificial unconditionally.
9569 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9570 isn't artificial.
9571
95722011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9573
9574 * gcc-interface/gigi.h (get_dummy_type): Declare.
9575 (build_dummy_unc_pointer_types): Likewise.
9576 (finish_fat_pointer_type): Likewise.
9577 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9578 fat pointer type has been built, complete it in place.
9579 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9580 and thin pointers. Remove useless variable.
9581 (finish_fat_pointer_type): Make global and move to...
9582 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9583 (get_dummy_type): New function.
9584 (build_dummy_unc_pointer_types): Likewise.
9585 (gnat_pushdecl): Propage the name to the anonymous variants only.
9586 (update_pointer_to): Only adjust the pointer types in the unconstrained
9587 array case.
9588
95892011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9590
9591 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9592 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9593 if this is a Taft amendment type and the full declaration is available.
9594 * gcc-interface/trans.c (process_type): Likewise.
9595 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9596 (process_freeze_entity): Likewise.
9597 * gcc-interface/utils.c (dummy_global): New static variable.
9598 (gnat_write_global_declarations): If there are types declared as used
9599 at the global level, insert them in the global hash table.
9600
96012011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9602
9603 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9604 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9605 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9606 copy.
9607 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9608 flag of the type accordingly.
9609 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9610
96112011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9612
9613 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9614 finalizing types when updating the pointers to the designated type.
9615 <all>: Finalize the deferred types even if we didn't defer processing
9616 of incomplete types in this invocation.
9617
96182011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
9619 Nicolas Setton <setton@adacore.com>
9620 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9621
9622 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9623 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9624
96252011-03-28 Kai Tietz <ktietz@redhat.com>
9626
9627 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9628 Windows targets.
9629 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9630 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9631
9632 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9633
96342011-03-28 Tristan Gingold <gingold@adacore.com>
9635
9636 PR ada/44431
9637 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9638 Use ada output of gnatbind.
9639 (ada/b_gnatb.adb): Ditto.
9640 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9641 (ada.mostlyclean, ada.stage1)
9642 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9643 (ada.stagefeedback): Adjust.
9644 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9645 Use ada output of gnatbind.
9646 (b_gnatm.adb): Ditto.
9647 (b_gnatl.o, b_gnatm.o): New rules.
9648
96492011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9650
9651 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9652 for the padded type built to support a specified size or alignment.
9653
96542011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9655
9656 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9657 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9658 unconditionally to the end of the unit when the designated type is
9659 limited_with'ed.
9660 <all>: Rename local variable. Attempt to un-defer types only and do it
9661 for limited_with'ed types as well.
9662 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9663 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9664 consistently and remove redundant call to finalize_from_with_types.
9665
96662011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9667
9668 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9669 subprograms without a previous spec declared in the same unit.
9670 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9671 subprograms at the end of the unit instead of at the beginning.
9672 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9673 isn't public for the special handling of non-inline functions nested
9674 inside inline external functions.
9675
96762011-03-25 Jeff Law <law@redhat.com>
9677
9678 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9679
96802011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9681
9682 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9683 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9684 to compute Set_Size_Depends_On_Discriminant.
9685 (Layout_Type): Call it on array types in back-end layout mode.
9686 * sem_util.adb (Requires_Transient_Scope): Return true for array
9687 types only if the size depends on the value of discriminants.
9688 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9689 type if the RHS is a call to a function that returns an unconstrained
9690 type with default discriminant.
9691
96922011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9693
9694 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9695 non-conversion to the nominal result type at the end.
9696
96972011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9698
9699 * gcc-interface/trans.c (create_temporary): New function taken from...
9700 (create_init_temporary): ...here. Call it.
9701 (call_to_gnu): Create the temporary for the return value early, if any.
9702 Create it for a function with copy-in/copy-out parameters if there is
9703 no target; in other cases of copy-in/copy-out, use another temporary.
9704 Push the new binding level lazily. Add and rename local variables.
9705
97062011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9707
9708 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9709 error message.
9710 (set_rm_size): Likewise.
9711
97122011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9713
9714 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9715 for the padded type built in order to support a specified alignment.
9716 Fix incorrect formatting.
9717
97182011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9719
9720 PR bootstrap/48216
9721 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9722
97232011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9724
9725 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9726 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9727 to the end of the list. Adjust recursive call. Rename local variable.
9728 If REORDER is true, reorder components of the record type.
9729 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9730 components_to_record and adjust the parameter list.
9731
97322011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9733
9734 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9735 disabled, use the variable for bounds of loop iteration scheme.
9736
97372011-03-21 Kai Tietz <ktietz@redhat.com>
9738
9739 PR target/12171
9740 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9741
97422011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9743
9744 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9745 out whether the expression is read-only. Short-circuit placeholder
9746 case and rename a couple of local variables.
9747
97482011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9749
9750 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9751 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9752 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9753 (convert): Deal with conversions from a smaller form type specially.
9754
97552011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9756
9757 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9758 its argument, except for the special -I- switch.
9759
97602011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9761
9762 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9763 "Ada Issues".
9764
97652011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9766
9767 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9768
97692011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9770
9771 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9772 GNAT_FORMAL.
9773 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9774 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9775 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9776 Do not generate the check directly, instead instantiate the template
9777 check present in the descriptor.
9778 (make_descriptor_field): Move around.
9779 (build_vms_descriptor32): Build a template check in the POINTER field.
9780 (build_vms_descriptor): Remove useless suffixes.
9781 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9782
97832011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9784
9785 PR bootstrap/47467
9786 * targext.c: Include target files if IN_RTS is defined.
9787
97882011-01-26 Richard Guenther <rguenther@suse.de>
9789
9790 PR bootstrap/47467
9791 * targext.c: Include config.h.
9792 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9793 dependency.
9794
97952011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 9796 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9797
9798 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9799
98002011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9801
9802 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9803 end-of-case on the end label and its associated gotos, if any.
9804
98052011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9806
9807 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9808 expressions of the parameter cache within the statement group of
9809 the CICO mechanism.
9810
98112011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 9812 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9813
9814 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9815 (set_end_locus_from_node): New function.
9816 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
9817 make and the function end_locus.
9818 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
9819 for the elaboration subprogram.
9820 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
9821 set the end_locus of the expression as well.
9822
98232011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9824
9825 PR ada/47131
9826 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
9827 variables that are referenced in exception handlers volatile.
9828
9829
9830\f
9831Copyright (C) 2011 Free Software Foundation, Inc.
9832
9833Copying and distribution of this file, with or without modification,
9834are permitted in any medium without royalty provided the copyright
9835notice and this notice are preserved.
9836
9837 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9838 - fix bugs in the description of Source_Trace;
9839 - get rid of UNIT_NAME;
9840
4fbad0ba
AC
98412011-08-02 Javier Miranda <miranda@adacore.com>
9842
9843 * exp_ch9.adb
9844 (Build_Dispatching_Requeue): Adding support for VM targets
9845 since we cannot directly reference the Tag entity.
9846 * exp_sel.adb (Build_K): Adding support for VM targets.
9847 (Build_S_Assignment): Adding support for VM targets.
9848 * exp_disp.adb
9849 (Default_Prim_Op_Position): In VM targets do not restrict availability
9850 of predefined interface primitives to compiling in Ada 2005 mode.
9851 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9852 restricted to compiling in Ada 2005 mode.
9853 (Make_VM_TSD): Generate code that declares and initializes the OSD
9854 record. Needed to support dispatching calls through synchronized
9855 interfaces.
9856 * exp_ch3.adb
9857 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9858 primitives associated with synchronized interfaces.
9859 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9860 primitives associated with synchronized interfaces.
9861
98622011-08-02 Yannick Moy <moy@adacore.com>
9863
9864 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9865 statements hidden in SPARK if preceded by the HIDE directive
9866 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9867 exception handlers as hidden in SPARK if preceded by the HIDE directive
9868 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9869 if starting with the HIDE directive
9870 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9871 starting with the HIDE directive; mark the declarations in a private
9872 part as hidden in SPARK if the private part starts with the HIDE
9873 directive
9874 * restrict.adb, restrict.ads
9875 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9876 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9877 argument node belongs to a part which is hidden in SPARK
9878 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9879 parts in SPARK; protect the possibly costly call to
9880 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9881 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9882 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9883 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9884 Tok_SPARK_Hide.
9885 (Scan): recognize special comment starting with '#' and followed by
9886 SPARK keyword "hide" as a HIDE directive.
9887
98882011-08-02 Yannick Moy <moy@adacore.com>
9889
9890 * types.ads, erroutc.ads: Minor reformatting.
9891
98922011-08-02 Vincent Celier <celier@adacore.com>
9893
9894 * link.c: Add response file support for cross platforms.
9895
6ff6152d
ES
98962011-08-02 Ed Schonberg <schonberg@adacore.com>
9897
9898 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9899 in an association, set parent field of copy before partial analysis.
9900 * sem_res.adb (Resolve_Slice): create reference to itype only when
9901 expansion is enabled.
9902
975c6896
YM
99032011-08-02 Yannick Moy <moy@adacore.com>
9904
9905 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9906 for new flag denoting which subprogram bodies are in ALFA
9907 * restrict.adb, sem_ch7.adb: Update comment
9908 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9909 sem_ch9.adb, sem_res.adb: Add calls to
9910 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9911 * sem_ch6.adb (Analyze_Function_Return): add calls to
9912 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9913 middle of the body, and extended return.
9914 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9915 False when missing return.
9916 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9917 to True for subprograms whose spec is in ALFA. Remove later on the flag
9918 on the entity used for a subprogram body when there exists a separate
9919 declaration.
9920 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9921 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9922 False, otherwise do nothing.
9923
afc8324d
AC
99242011-08-02 Robert Dewar <dewar@adacore.com>
9925
9926 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9927
99282011-08-02 Yannick Moy <moy@adacore.com>
9929
9930 * sem_ch4.ads: minor formatting.
9931
2ba431e5
YM
99322011-08-02 Yannick Moy <moy@adacore.com>
9933
9934 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9935 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9936 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9937 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9938 opt.ads: cleanup of SPARK mode
9939
0f853035
YM
99402011-08-02 Yannick Moy <moy@adacore.com>
9941
9942 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9943 types.
9944 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9945 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9946 * sem_ch3.adb
9947 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9948 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9949 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9950 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9951 types.
9952 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9953 non-static range.
9954 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9955 functions whose return type is not in ALFA.
9956 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9957 specifications.
9958 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9959 parameter's type is not in ALFA.
9960 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9961 types are in ALFA.
9962
d2b10647
ES
99632011-08-02 Ed Schonberg <schonberg@adacore.com>
9964
9965 * sem_ch6 (Analyze_Expression_Function): treat the function as
9966 Inline_Always, and introduce a subprogram declaration for it when it is
9967 not a completion.
9968 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9969 expression functions, so that the back-end can determine whether they
9970 can in fact be inlined.
9971 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9972 a function body comes from an expression function.
9973
c7b9d548
AC
99742011-08-02 Gary Dismukes <dismukes@adacore.com>
9975
9976 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9977 null exclusions to test Can_Never_Be_Null on the anonymous access types
9978 of the formals rather than testing the formals themselves. Exclude this
9979 check in cases where the Old_Formal is marked as a controlling formal,
9980 to avoid issuing spurious errors for bodies completing dispatching
9981 operations (due to the flag not getting set on controlling access
9982 formals in body specs).
9983 (Find_Corresponding_Spec): When checking full and subtype conformance of
9984 subprogram bodies in instances, pass Designated and E in that order, for
9985 consistency with the expected order of the formals (New_Id followed by
9986 Old_Id).
9987
99882011-08-02 Robert Dewar <dewar@adacore.com>
9989
9990 * sem_ch8.adb: Minor reformatting.
9991
1138cf59
AC
99922011-08-02 Ed Schonberg <schonberg@adacore.com>
9993
9994 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9995 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9996 primitive operations of class-wide actuals.
9997
99982011-08-02 Javier Miranda <miranda@adacore.com>
9999
10000 * exp_atag.ads, exp_atag.adb
10001 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10002 since its value is implicitly passed in argument Typ.
10003 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10004 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10005 Build_Common_Dispatching_Select_Statements.
10006
7b9db926
RD
100072011-08-02 Robert Dewar <dewar@adacore.com>
10008
10009 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10010 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10011 Minor reformatting.
10012
e8374e7a
AC
100132011-08-02 Robert Dewar <dewar@adacore.com>
10014
10015 * sem_res.adb: Minor reformatting.
10016 * sem_prag.adb: Minor reformatting.
10017
100182011-08-02 Javier Miranda <miranda@adacore.com>
10019
10020 * exp_atag.adb, exp_atags.ads
10021 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10022 by the tagged type Entity. Required to use this routine in the VM
10023 targets since we do not have available the Tag entity in the VM
10024 platforms.
10025 * exp_ch6.adb
10026 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10027 Ada.Tags has not been previously loaded.
10028 * exp_ch7.adb
10029 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10030 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10031 * sem_aux.adb
10032 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10033 view of enclosing scopes. Required to handle enclosing scopes that
10034 are synchronized types whose full view is a task type.
10035 * exp_disp.adb
10036 (Build_VM_TSDs): Minor code improvement to avoid generating and
10037 analyzing lists with empty nodes.
10038 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10039 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10040 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10041 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10042 (Make_Select_Specific_Data_Table): Add support for VM targets.
10043 (Make_VM_TSD): Generate code to initialize the SSD structure of
10044 the TSD.
10045
100462011-08-02 Yannick Moy <moy@adacore.com>
10047
10048 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10049 cross-references section in ALI.
10050 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10051 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10052 Sub).
10053 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10054 subprogram or package entity of a node
10055 (Is_Local_Reference_Type): new function returns True for references
10056 selected in local cross-references.
10057 (Lt): function extracted from Lt in Output_References
10058 (Write_Entity_Name): function extracted from Output_References
10059 (Generate_Definition): generate reference with type 'D' for definition
10060 of objects (object declaration and parameter specification), with
10061 appropriate locations and units, for use in local cross-references.
10062 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10063 references of type 'I' for initialization in object definition.
10064 (Output_References): move part of function Lt and procedure
10065 Write_Entity_Name outside of the body. Ignore references of types 'D'
10066 and 'I' introduced for local cross-references.
10067 (Output_Local_References): new procedure to output the local
10068 cross-references sections.
10069 (Lref_Entity_Status): new array defining whether an entity is a local
10070 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10071 with 'I' type when initialization expression is present.
10072 * get_scos.adb, get_scos.ads: Correct comments and typos
10073
1f6439e3
AC
100742011-08-02 Javier Miranda <miranda@adacore.com>
10075
10076 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10077 the JVM target.
10078 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10079 the JVM target.
10080 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10081 TSD support.
10082
100832011-08-02 Vincent Celier <celier@adacore.com>
10084
10085 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10086 (No_Space_Img): New function
10087 (Find_Excluded_Sources): When reading from a file, record the file name
10088 and the line number for each excluded source.
10089 (Mark_Excluded_Sources): When reporting an error, if the excluded
10090 sources were read from a file, include file name and line number in
10091 the error message.
10092
100932011-08-02 Ed Schonberg <schonberg@adacore.com>
10094
10095 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10096
ab027d28
RD
100972011-08-02 Robert Dewar <dewar@adacore.com>
10098
10099 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10100
b3b28b0c
JM
101012011-08-02 Javier Miranda <miranda@adacore.com>
10102
10103 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10104 generation of TSDs to the DOTNET compiler.
10105 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10106 generation of TSDs to the DOTNET compiler.
10107
9732e886
JM
101082011-08-02 Javier Miranda <miranda@adacore.com>
10109
10110 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10111 record of all the tagged types declared inside library level package
10112 declarations, library level package bodies or library level subprograms.
10113 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10114 associated with a given tagged type.
10115 (Build_VM_TSDs): New subprogram.
10116 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10117 compilation units that are subprograms.
10118 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10119 compilation units that are package bodies.
10120 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10121 units that are a package declaration or a package instantiation.
10122 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10123 reorganization to improve the error generated by the frontend when the
10124 function Ada.Tags.Secondary_Tag is not available.
10125 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10126 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10127
e526d0c7
AC
101282011-08-02 Javier Miranda <miranda@adacore.com>
10129
10130 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10131
101322011-08-02 Robert Dewar <dewar@adacore.com>
10133
10134 * s-imenne.ads: Minor reformatting.
10135
101362011-08-02 Robert Dewar <dewar@adacore.com>
10137
10138 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10139 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10140 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10141
101422011-08-02 Robert Dewar <dewar@adacore.com>
10143
10144 * einfo.ads (Materialize_Entity): Document this is only for renamings
10145 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10146 required debug information in the case where we transform the object
10147 declaration into a renaming declaration.
10148 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10149 object
10150 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10151 Materialize_Entity.
10152
5b1e6aca
RD
101532011-08-02 Robert Dewar <dewar@adacore.com>
10154
10155 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10156 Suppress_Init_Procs.
10157 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10158 Suppress_Initialization/Initialization_Suppressed.
10159 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10160 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10161 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10162 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10163
5ad4969d
RD
101642011-08-02 Robert Dewar <dewar@adacore.com>
10165
10166 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10167 Minor reformatting.
10168
8c4ee6f5
AC
101692011-08-02 Ed Schonberg <schonberg@adacore.com>
10170
10171 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10172 only have inheritable classwide pre/postconditions.
10173
101742011-08-02 Javier Miranda <miranda@adacore.com>
10175
10176 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10177 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10178 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10179 checks if the external tag of a type is the same as the external tag
10180 of some other declaration.
10181
0b3d16c0
AC
101822011-08-02 Thomas Quinot <quinot@adacore.com>
10183
10184 * s-taskin.ads: Minor reformatting.
10185
101862011-08-02 Emmanuel Briot <briot@adacore.com>
10187
10188 * g-comlin.adb (Display_Help): swap the order in which it prints the
10189 short help and the general usage.
10190
101912011-08-02 Ed Schonberg <schonberg@adacore.com>
10192
10193 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10194 the aspect declarations and attach them to the generic copy for
10195 subsequent analysis.
10196 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10197 declarations of the generic tree to the new subprogram declarations.
10198 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10199 conditions that apply to a subprogram instance.
10200
102012011-08-02 Robert Dewar <dewar@adacore.com>
10202
10203 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10204
102052011-08-02 Ed Schonberg <schonberg@adacore.com>
10206
10207 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10208 private type with a tagged full view is not derived in the immediate
10209 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10210
4637729f
AC
102112011-08-02 Robert Dewar <dewar@adacore.com>
10212
10213 * exp_ch4.adb: Minor reformatting.
10214
102152011-08-02 Ed Schonberg <schonberg@adacore.com>
10216
10217 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10218 Ada2012 iterator, the loop will be rewritten during expansion into a
10219 while loop with a cursor and an element declaration. Do not analyze the
10220 body in this case, because if the container is for indefinite types the
10221 actual subtype of the elements will only be determined when the cursor
10222 declaration is analyzed.
10223
102242011-08-02 Arnaud Charlet <charlet@adacore.com>
10225
10226 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10227 size/alignment related attributes in CodePeer_Mode.
10228
102292011-08-02 Gary Dismukes <dismukes@adacore.com>
10230
10231 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10232 Prepend_Element, since this can result in the operation getting the
10233 wrong slot in the full type's dispatch table if the full type has
10234 inherited operations. The incomplete type's operation will get added
10235 to the proper position in the full type's primitives
10236 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10237 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10238 dispatching operations, since there are cases where nonprimitive
10239 subprograms can get added to the list of incomplete dependents (such
10240 as subprograms in nested packages).
10241 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10242 private part when determining whether to add a primitive with a
10243 parameter of a tagged incomplete type to the Private_Dependents list.
10244 Such primitives can also occur in the visible part, and should not have
10245 been excluded from being private dependents.
10246 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10247 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10248 list of a Taft-amendment incomplete type is a primitive before issuing
10249 an error that the full type must appear in the same unit. There are
10250 cases where nonprimitives can be in the list (such as subprograms in
10251 nested packages).
10252 * sem_disp.adb (Derives_From): Use correct condition for checking that
10253 a formal's type is derived from the type of the corresponding formal in
10254 the parent subprogram (the condition was completely wrong). Add
10255 checking that was missing for controlling result types being derived
10256 from the result type of the parent operation.
10257
4c60de0c
YM
102582011-08-02 Yannick Moy <moy@adacore.com>
10259
10260 * errout.adb (First_Node): minor renaming
10261 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10262 first node.
10263
f5afb270
AC
102642011-08-02 Yannick Moy <moy@adacore.com>
10265
10266 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10267 before accessing operands.
10268 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10269 decide whether an initialization expression respects SPARK rules, as
10270 the plain node is the expanded one. This allows for more valid warnings
10271 to be issued.
10272 * gnat_rm.texi: Minor update.
10273
102742011-08-02 Arnaud Charlet <charlet@adacore.com>
10275
10276 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10277 previous change.
10278
102792011-08-02 Robert Dewar <dewar@adacore.com>
10280
10281 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10282
102832011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10284
10285 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10286 loop statements and the element renaming declaration with a block when
10287 the element type is controlled.
10288
102892011-08-02 Yannick Moy <moy@adacore.com>
10290
10291 * sinfo.ads: Minor formatting.
10292
102932011-08-02 Ed Schonberg <schonberg@adacore.com>
10294
10295 * sem_aggr.adb (Add_Association): if the association has a box and no
10296 expression, use the Sloc of the aggregate itself for the new
10297 association.
10298 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10299 the Original_Node.
10300
db72f10a
AC
103012011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10302
10303 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10304 When a container is provided via a function call, generate a renaming
10305 of the function result. This avoids the creation of a transient scope
10306 and the premature finalization of the container.
10307 * exp_ch7.adb (Is_Container_Cursor): Removed.
10308 (Wrap_Transient_Declaration): Remove the supression of the finalization
10309 of the list controller when the declaration denotes a container cursor,
10310 it is not needed.
10311
103122011-08-02 Yannick Moy <moy@adacore.com>
10313
10314 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10315 node is from source, instead of the original node being from source.
10316 * sem_aggr.adb
10317 (Resolve_Array_Aggregate): refine the check for a static expression, to
10318 recognize also static ranges
10319 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10320 Array_Type_Declaration): postpone the test for the type being a subtype
10321 mark after the type has been resolved, so that component-selection and
10322 expanded-name are discriminated.
10323 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10324 to distinguish the case of an iteration scheme, so that an error is
10325 issed on a non-static range in SPARK except in an iteration scheme.
10326 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10327 In_Iter_Schm = True.
10328 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10329 user-defined operators so that they are allowed in renaming
10330 * sem_ch8.adb
10331 (Find_Selected_Component): refine the check for prefixing of operators
10332 so that they are allowed in renaming. Move the checks for restrictions
10333 on selector name after analysis discriminated between
10334 component-selection and expanded-name.
10335 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10336 concatenation argument of string type if it is static.
10337 * sem_util.adb, sem_util.ads
10338 (Check_Later_Vs_Basic_Declarations): add a new function
10339 Is_Later_Declarative_Item to decice which declarations are allowed as
10340 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10341 mode, add that renamings are considered as later items.
10342 (Enclosing_Package): new function to return the enclosing package
10343 (Enter_Name): correct the rule for homonyms in SPARK
10344 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10345 from source (result of expansion) to avoid issuing wrong warnings.
10346
103472011-08-02 Ed Schonberg <schonberg@adacore.com>
10348
10349 * errout.adb: On anything but an expression First_Node returns its
10350 argument.
10351
23685ae6
AC
103522011-08-02 Pascal Obry <obry@adacore.com>
10353
10354 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10355
103562011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10357
10358 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10359 Set the associated loop as the related expression of internally
10360 generated cursors.
10361 * exp_ch7.adb (Is_Container_Cursor): New routine.
10362 (Wrap_Transient_Declaration): Supress the finalization of the list
10363 controller when the declaration denotes a container cursor.
10364
103652011-08-02 Yannick Moy <moy@adacore.com>
10366
10367 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10368 command line now.
10369 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10370 expression is a simple expression. This check cannot be performed in
10371 the semantics, so just drop it.
10372 (P_Index_Or_Discriminant_Constraint): move check that the index or
10373 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10374 semantics. Other cases were previously checked in the semantics.
10375 * par-ch4.adb (P_Name): move checks that a selector name is not
10376 character literal or an operator symbol to Find_Selected_Component in
10377 the semantics
10378 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10379 declarations are not placed after later declarations in a separate
10380 procedure in Sem_Util (possibly not the best choice?), to be used both
10381 during parsing, for Ada 83 mode, and during semantic analysis, for
10382 SPARK mode.
10383 * par-endh.adb (Check_End): move check that end label is not missing
10384 to Process_End_Label in the semantics
10385 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10386 the special case for SPARK restriction
10387 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10388 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10389 parameter Force to issue the error message even on internal node (used
10390 for generated end label). Call Check_Restriction to check when an error
10391 must be issued. In SPARK mode, issue an error message even if the
10392 restriction is not set.
10393 (Check_Restriction): new procedure with an additional out parameter to
10394 inform the caller that a message has been issued
10395 * sem_aggr.adb: Minor modification of message
10396 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10397 instead of issuing an error message directly
10398 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10399 declarations are not placed after later declarations, by calling
10400 Check_Later_Vs_Basic_Declarations
10401 (Analyze_Subtype_Declaration): move here the check that an index or
10402 discriminant constraint must be a subtype mark. Change the check that
10403 a subtype of String must start at one so that it works on subtype marks.
10404 * sem_ch4.adb (Analyze_Call): move here the check that a named
10405 association cannot follow a positional one in a call
10406 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10407 instead of issuing an error message directly
10408 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10409 selector name is not a character literal or an operator symbol. Move
10410 here the check that the prefix of an expanded name cannot be a
10411 subprogram or a loop statement.
10412 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10413 procedure called from parsing and semantics to check that basic
10414 declarations are not placed after later declarations
10415 (Process_End_Label): move here the check that end label is not missing
10416
104172011-08-02 Arnaud Charlet <charlet@adacore.com>
10418
10419 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10420 representation clause in codepeer mode, since it confuses CodePeer and
10421 does not bring useful info.
10422
104232011-08-02 Ed Falis <falis@adacore.com>
10424
10425 * init.c: initialize fp hw on MILS.
10426
104272011-08-02 Ed Schonberg <schonberg@adacore.com>
10428
10429 * errout.adb (First_Node): for bodies, return the node itself (small
10430 optimization). For other nodes, do not check source_unit if the node
10431 comes from Standard.
10432
d2d9cc22
AC
104332011-08-02 Robert Dewar <dewar@adacore.com>
10434
10435 * exp_ch3.adb: Minor comment additions.
10436 * sem_ch13.adb: Minor reformatting.
10437
104382011-08-02 Pascal Obry <obry@adacore.com>
10439
10440 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10441
a01b9df6
AC
104422011-08-02 Robert Dewar <dewar@adacore.com>
10443
10444 * sem_attr.adb: Minor reformatting.
10445
104462011-08-02 Robert Dewar <dewar@adacore.com>
10447
10448 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10449 (Has_Default_Component_Value): Removed
10450 * einfo.ads Comment updates
10451 (Has_Default_Aspect): Replaces Has_Default_Value
10452 (Has_Default_Component_Value): Removed
10453 * exp_ch13.adb
10454 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10455 * exp_ch3.adb
10456 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10457 (Get_Simple_Init_Val): Handle Default_Value aspect
10458 (Needs_Simple_Initialization): Handle Default_Value aspect
10459 * exp_ch3.ads: Needs_Simple_Initialization
10460 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10461 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10462 * sem_ch13.adb
10463 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10464 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10465 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10466
104672011-08-02 Ed Schonberg <schonberg@adacore.com>
10468
10469 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10470 package containing iteration primitives.
10471 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10472
75c90775
AC
104732011-08-02 Ed Schonberg <schonberg@adacore.com>
10474
10475 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10476 "of", pre-analyze expression in case it is a function call with
10477 finalization actions that must be placed ahead of the loop.
10478 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10479 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10480
104812011-08-02 Geert Bosch <bosch@adacore.com>
10482
10483 * cstand.adb (Create_Float_Types): Only consider C's long double for
10484 Long_Long_Float, in addition to double.
10485
ded8909b
AC
104862011-08-02 Robert Dewar <dewar@adacore.com>
10487
10488 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10489 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10490 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10491 Minor reformatting.
10492
104932011-08-02 Ed Schonberg <schonberg@adacore.com>
10494
10495 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10496 indexed component.
10497
104982011-08-02 Javier Miranda <miranda@adacore.com>
10499
10500 * einfo.ads, einfo.adb
10501 (Original_Access_Type): Move this attribute to Node26 since there was
10502 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10503 which causes conflicts and breaks the generation of the .NET compiler.
10504 (Interface_Name): Add missing documentation on JGNAT only uses of
10505 this attribute.
10506
70c34e1c
AC
105072011-08-02 Geert Bosch <bosch@adacore.com>
10508
10509 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10510 (Find_Back_End_Float_Type): Likewise
10511 (Create_Back_End_Float_Types): Likewise
10512 (Create_Float_Types): Likewise
10513 (Register_Float_Type): Likewise
10514 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10515 Nlist and split out type selection in new local Find_Base_Type function.
10516 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10517 Nlist
10518 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10519
105202011-08-02 Robert Dewar <dewar@adacore.com>
10521
10522 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10523 alpha order).
10524 * opt.ads: Minor comment change.
10525 * sem_ch12.adb: Minor code reorganization.
10526
b715bc59
AC
105272011-08-02 Gary Dismukes <dismukes@adacore.com>
10528
10529 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10530 subtype's list of rep items to the list on the full subtype in the case
10531 where the lists are the same.
10532
105332011-08-02 Geert Bosch <bosch@adacore.com>
10534
10535 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10536 using the one from System.Strings, which also deallocates all strings.
10537
002bdd68
AC
105382011-08-02 Geert Bosch <bosch@adacore.com>
10539
10540 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10541 function.
10542 * gcc-interface/Make-lang.in: Update dependencies.
10543
105442011-08-02 Olivier Hainque <hainque@adacore.com>
10545
10546 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10547 end_locus.
10548
499769ec
AC
105492011-08-02 Javier Miranda <miranda@adacore.com>
10550
10551 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10552 associated with anonymous access to subprograms.
10553
105542011-08-02 Geert Bosch <bosch@adacore.com>
10555
10556 * opt.ads
10557 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10558 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10559 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10560 (Add_Symbol_Definition): Move to switch-c.adb
10561 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10562 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10563 (Add_Symbol_Definition): Move to switch-c.adb.
10564 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10565 * sem_warn.adb
10566 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10567 Move to warnsw.adb.
10568 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10569 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10570 Move to warnsw.adb.
10571 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10572 (Add_Symbol_Definition): Moved from Prepcomp.
10573 * switch-c.ads: Update copyright notice. Use String_List instead of
10574 Argument_List, removing dependency on System.OS_Lib.
10575
aa1e353a
AC
105762011-08-02 Yannick Moy <moy@adacore.com>
10577
10578 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10579 mode on initialization expression which does not respect SPARK
10580 restrictions.
10581 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10582 if the tree referenced by its argument represents an initialization
10583 expression in SPARK, suitable for initializing an object in an object
10584 declaration.
10585
105862011-08-02 Javier Miranda <miranda@adacore.com>
10587
10588 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10589 internally generated access to subprogram with its associated protected
10590 subprogram type.
10591 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10592
15b682ca
GB
105932011-08-02 Geert Bosch <bosch@adacore.com>
10594
10595 * cstand.adb (Register_Float_Type): Print information about type to
10596 register, if the Debug_Flag_Dot_B is set.
10597 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10598 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10599 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10600 with a requested precision of more than Max_Digits digits and no more
10601 than Max_Base_Digits digits, if a range specification is present and the
10602 Predefined_Float_Types list has a suitable type to derive from.
10603 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10604 case of type completion with pragma Import
10605 * sem_prag.adb
10606 (Process_Import_Predefined_Type): Processing to complete a type
10607 with pragma Import. Currently supports floating point types only.
10608 (Set_Convention_From_Pragma): Do nothing without underlying type.
10609 (Process_Convention): Guard against absence of underlying type,
10610 which may happen when importing incomplete types.
10611 (Process_Import_Or_Interface): Handle case of importing predefined
10612 types. Tweak error message.
10613
f8726f2b
AC
106142011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10615
10616 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10617 functions to previous change. Reorganize code slightly.
10618
106192011-08-02 Geert Bosch <bosch@adacore.com>
10620
10621 * back_end.ads (Register_Type_Proc): New call back procedure type for
10622 allowing the back end to provide information about available types.
10623 (Register_Back_End_Types): New procedure to register back end types.
10624 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10625 available types.
10626 * cstand.adb (Back_End_Float_Types): New list for floating point types
10627 supported by the back end.
10628 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10629 (Copy_Float_Type): New procedure to make new copies of predefined types.
10630 (Register_Float_Type): New call back procedure to populate the BEFT list
10631 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10632 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10633 (Create_Float_Types): New procedure to create entities for floating
10634 point types predefined in Standard, and put these and any remaining
10635 BEFTs on the Predefined_Float_Types list.
10636 * stand.ads (Predefined_Float_Types): New list for predefined floating
10637 point types that do not have declarations in package Standard.
10638
feecad68
AC
106392011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10640
10641 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10642 entity node for the unit containing the parameter.
10643 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10644 (Add_Inlined_Subprogram): Likewise.
10645 * gcc-interface/Make-lang.in: Update dependencies.
10646
106472011-08-02 Thomas Quinot <quinot@adacore.com>
10648
10649 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10650 suitable value.
10651
12f0c50c
AC
106522011-08-02 Geert Bosch <bosch@adacore.com>
10653
10654 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10655
106562011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10657
10658 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10659 computed value of Base_Type.
10660
106612011-08-02 Yannick Moy <moy@adacore.com>
10662
10663 * restrict.adb (Check_Restriction): issue an error for any use of
10664 class-wide, even if the No_Dispatch restriction is not set.
10665 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10666 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10667 when completing a private extension, the type named in the private part
10668 is not the same as that named in the visible part.
10669 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10670 of an inherited primitive operations of a tagged type or type extension
10671 that returns the tagged type.
10672 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10673 function which returns True for an implicit operation inherited by the
10674 derived type declaration for the argument type.
10675 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10676 order.
10677
fb86fe11
ES
106782011-08-02 Ed Schonberg <schonberg@adacore.com>
10679
10680 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10681 Process_Bounds, to perform analysis with expansion of a range or an
10682 expression that is the iteration scheme for a loop.
10683 (Analyze_Iterator_Specification): If domain of iteration is given by a
10684 function call with a controlled result, as is the case if call returns
10685 a predefined container, ensure that finalization actions are properly
10686 generated.
10687 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10688
62be5d0a
JM
106892011-08-02 Javier Miranda <miranda@adacore.com>
10690
10691 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10692 * gcc-interface/Make-lang.in: Update dependencies.
10693
106942011-08-02 Javier Miranda <miranda@adacore.com>
10695
10696 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10697 determine if the analysis is performed using N or Original_Node (N).
10698 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10699 functionality of routine Is_Variable avoids code duplication.
10700 * checks.adb (Determine_Range): Handle temporaries generated by
10701 Remove_Side_Effects.
10702
107032011-08-02 Javier Miranda <miranda@adacore.com>
10704
10705 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10706 expansion of the condition. Required since the previous analysis was
10707 done with expansion disabled (see Resolve_Quantified_Expression) and
10708 hence checks were not inserted and record comparisons have not been
10709 expanded.
10710
a20f4389
AC
107112011-08-02 Ed Falis <falis@adacore.com>
10712
10713 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10714 Update header.
10715
107162011-08-02 Bob Duff <duff@adacore.com>
10717
10718 * opt.ads: Minor comment fix.
10719
107202011-08-02 Bob Duff <duff@adacore.com>
10721
10722 * sem_ch12.adb (Analyze_Package_Instantiation,
10723 Analyze_Subprogram_Instantiation): Turn off style checking while
10724 analyzing an instance. Whatever style checks that apply to the generic
10725 unit should apply, so it makes no sense to apply them in an instance.
10726 This was causing trouble when compiling an instance of a runtime
10727 unit that violates the -gnatyO switch.
10728 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10729 one of the two case statements, causing spurious errors.
10730
107312011-08-02 Robert Dewar <dewar@adacore.com>
10732
10733 * uname.adb: Minor reformatting.
10734 * gnatcmd.adb: Minor reformatting.
10735 * exp_attr.adb: Minor reformatting.
10736
90878b12
AC
107372011-08-02 Ed Schonberg <schonberg@adacore.com>
10738
10739 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10740 No_Dispatching_Calls, do not look for the Assign primitive, because
10741 predefined primitives are not created in this case.
10742
107432011-08-02 Bob Duff <duff@adacore.com>
10744
10745 * stylesw.ads: Minor comment fixes.
10746
107472011-08-02 Robert Dewar <dewar@adacore.com>
10748
10749 * freeze.adb (Add_To_Result): New procedure.
10750
107512011-08-02 Jose Ruiz <ruiz@adacore.com>
10752
10753 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10754 time, if the specific run-time routines for handling streams of strings
10755 are not available, use the default mechanism.
10756
107572011-08-02 Arnaud Charlet <charlet@adacore.com>
10758
10759 * s-regpat.ads: Fix typo.
10760
107612011-08-02 Vincent Celier <celier@adacore.com>
10762
10763 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10764 not null, call it to create the in memory config project file without
10765 parsing an existing default config project file.
10766
107672011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10768
10769 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10770
107712011-08-02 Ed Schonberg <schonberg@adacore.com>
10772
10773 * sem_elim.adb: an abstract subprogram does not need an eliminate
10774 pragma for its descendant to be eliminable.
10775
107762011-08-02 Ed Falis <falis@adacore.com>
10777
10778 * init.c: revert to handling before previous checkin for VxWorks
10779 * s-intman-vxworks.adb: delete unnecessary declarations related to
10780 using Ada interrupt facilities for handling signals.
10781 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10782 * s-intman-vxworks.ads: Import __gnat_install_handler as
10783 Initialize_Interrupts.
10784 * s-taprop-vxworks.adb: Delete Signal_Mask.
10785 (Abort_Handler): change construction of mask to unblock exception
10786 signals.
10787
273adcdf
AC
107882011-08-02 Jerome Guitton <guitton@adacore.com>
10789
10790 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10791 Debug_Raise_Exception before propagation starts.
10792
107932011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10794
10795 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10796 to Restriction_Check_Required.
10797 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10798 * sem_res.adb (Resolve_Call): Likewise.
10799 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10800
108012011-08-02 Bob Duff <duff@adacore.com>
10802
10803 * stylesw.ads: Update comment.
10804 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10805 * errout.ads: Remove obsolete comment.
10806
108072011-08-02 Javier Miranda <miranda@adacore.com>
10808
10809 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10810 (Set_Is_Safe_To_Reevaluate): new procedure.
10811 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10812 assignment is allowed on safe-to-reevaluate variables.
10813 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10814 temporary created to remove side effects in expressions that use
10815 the secondary stack as safe-to-reevaluate.
10816 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10817 variables that are not true constants.
10818
6320f5e1
AC
108192011-08-02 Robert Dewar <dewar@adacore.com>
10820
10821 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10822 sem_res.adb, sem_ch6.adb: Minor reformatting.
10823
108242011-08-02 Jerome Guitton <guitton@adacore.com>
10825
10826 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10827
2fe829ae
ES
108282011-08-02 Ed Schonberg <schonberg@adacore.com>
10829
10830 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10831 not set Overridden_Operation if subprogram is an initialization
10832 procedure.
10833
e24329cd
YM
108342011-08-02 Yannick Moy <moy@adacore.com>
10835
10836 * par-ch6.adb: Correct obsolete name in comments
10837 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10838 which takes two message arguments (existing function takes one), with
10839 second message used for continuation.
10840 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10841 block statements that originate from a source block statement, not
10842 generated block statements
10843 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10844 symmetry with procedure case
10845 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10846 function to issue an error in formal mode if a package specification
10847 contains more than one tagged type or type extension.
10848 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10849 parameters matching formals of tagged types are objects (or ancestor
10850 type conversions of objects), not general expressions. Issue an error
10851 on view conversions that are not involving ancestor conversion of an
10852 extended type.
10853 (Resolve_Type_Conversion): in formal mode, issue an error on the
10854 operand of an ancestor type conversion which is not an object
10855 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10856 procedure so that it works also for actuals of function calls
10857 (Is_Actual_Tagged_Parameter): new function which determines if its
10858 argument is an actual parameter of a formal of tagged type in a
10859 subprogram call
10860 (Is_SPARK_Object_Reference): new function which determines if the tree
10861 referenced by its argument represents an object in SPARK
10862
176dadf6
AC
108632011-08-02 Robert Dewar <dewar@adacore.com>
10864
10865 * sem_ch3.adb: Minor reformatting
10866 Minor comment addition
10867 Minor error msg text change
10868
108692011-08-02 Javier Miranda <miranda@adacore.com>
10870
10871 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10872 function. Used to be more precise when we generate a variable plus one
10873 assignment to remove side effects in the evaluation of the Bound
10874 expressions.
10875 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10876 of the bound expression to force its re-analysis and thus expand the
10877 associated transient scope (if required). Code cleanup replacing the
10878 previous code that declared the constant entity by an invocation to
10879 routine Force_Evaluation which centralizes this work in the frontend.
10880
d8b962d8
AC
108812011-08-02 Robert Dewar <dewar@adacore.com>
10882
10883 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10884 (Base_Type): Now uses improved Is_Base_Type function
10885 * einfo.ads (Base_Type): Inline this function
10886
108872011-08-02 Robert Dewar <dewar@adacore.com>
10888
10889 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10890 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10891
108922011-08-02 Arnaud Charlet <charlet@adacore.com>
10893
10894 * gcc-interface/Make-lang.in: Update dependencies.
10895 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10896 targets.
10897
108982011-08-02 Yannick Moy <moy@adacore.com>
10899
10900 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10901 non-simple expression used in delta constraint
10902 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10903 index constraint which is not a subtype mark
10904 * par.adb: With and use Restrict
10905 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10906 mode on component type which is not a subtype mark and default
10907 expression on component
10908 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10909 of string which does not have a lower index bound equal to 1
10910 (Array_Type_Declaration): issue an error in formal mode on index or
10911 component type which is not a subtype mark, and on aliased keyword on
10912 component
10913 (Derived_Type_Declaration): issue an error in formal mode on interface,
10914 limited or abstract type
10915 (Record_Type_Declaration): issue an error in formal mode on interface
10916 (Record_Type_Definition): issue an error in formal mode on tagged types
10917 and type extensions not declared in the specification of a library unit
10918 package; on null non-tagged record; on variant part
10919
109202011-08-02 Vincent Celier <celier@adacore.com>
10921
10922 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10923 not declared for qualified library project when Library_Name is not
10924 declared, but Library_Dir is.
10925
109262011-08-02 Robert Dewar <dewar@adacore.com>
10927
10928 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10929 pragmas (affects aspects [Component_]Default_Value
10930 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10931 component type for the resolution
10932
f96b2d85
AC
109332011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10934
10935 * einfo.adb (Base_Type): Tune implementation for speed.
10936
109372011-08-02 Robert Dewar <dewar@adacore.com>
10938
10939 * freeze.adb: Minor reformatting.
10940
8b3c6430
AC
109412011-08-02 Thomas Quinot <quinot@adacore.com>
10942
10943 * scos.ads: Update comments.
10944
109452011-08-02 Ed Schonberg <schonberg@adacore.com>
10946
10947 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10948 base type, because the parent may be a subtype of a private type whose
10949 convention is established in a private part.
10950
109512011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10952
10953 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10954 statement in a block when the expansion of the return expression has
10955 created a finalization chain.
10956 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10957 with the parent node.
10958 Add N_Extended_Return_Statement to handle the case where a transient
10959 object declaration appears in the Return_Object_Declarations list of
10960 an extended return statement.
10961
109622011-08-02 Matthew Gingell <gingell@adacore.com>
10963
10964 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10965 unused parameter 'name'.
10966
109672011-08-02 Ed Schonberg <schonberg@adacore.com>
10968
10969 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10970 inherited operation, check whether its alias, which is the source
10971 operastion that it renames, has been marked eliminated.
10972
cae81f17
JM
109732011-08-02 Javier Miranda <miranda@adacore.com>
10974
10975 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10976 in-mode parameter whose type is an access type since it can be used to
10977 modify its designated object. Enforce code that handles as safe an
10978 access type that is not access-to-constant but it is the result of a
10979 previous removal of side-effects.
10980 (Remove_Side_Effects): Minor code reorganization of cases which require
10981 no action. Done to incorporate documentation on new cases uncovered
10982 working in this ticket: no action needed if this routine was invoked
10983 too early and the nodes are not yet decorated.
10984 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10985 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10986 were issued with actuals that are implicitly provided by
10987 Force_Evaluation.
10988
218e6dee
RD
109892011-08-02 Robert Dewar <dewar@adacore.com>
10990
10991 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10992
7a489a2b
AC
109932011-08-02 Yannick Moy <moy@adacore.com>
10994
10995 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10996 to issue an error in formal mode on attribute not supported in this mode
10997 (Analyze_Attribute): issue errors on standard attributes not supported
10998 in formal mode.
10999 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11000 comment, and issue error in formal mode on modulus which is not a power
11001 of 2.
11002 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11003 range.
11004 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11005 subtype mark.
11006 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11007 operator on modular type (except 'not').
11008
110092011-08-02 Robert Dewar <dewar@adacore.com>
11010
11011 * gnat_rm.texi: Minor reformatting.
11012
cb7fa356
AC
110132011-08-02 Arnaud Charlet <charlet@adacore.com>
11014
11015 * s-osinte-linux.ads: Minor comment update and reformatting.
11016 * i-cexten.ads: Make this unit pure, as for its parent.
11017 Will allow its usage in more contexts if needed.
11018
110192011-08-02 Robert Dewar <dewar@adacore.com>
11020
11021 * s-utf_32.ads: Minor comment fix.
11022
110232011-08-02 Ed Schonberg <schonberg@adacore.com>
11024
11025 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11026 operation of a tagged synchronized type, handle the case where the
11027 controlling argument is overloaded.
11028
110292011-08-02 Yannick Moy <moy@adacore.com>
11030
11031 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11032 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11033 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11034 SPARK mode and formal verification mode on processing SPARK restriction
11035 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11036 requiring consistency checking.
11037
5cc9353d
RD
110382011-08-02 Robert Dewar <dewar@adacore.com>
11039
11040 * sem_res.adb: Minor reformatting.
11041
e51537ff
RD
110422011-08-02 Robert Dewar <dewar@adacore.com>
11043
11044 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11045 a-cforse.ads: Remove unneeded with of Ada.Containers
11046 Remove commented out pragma Inline's
11047 Move specifications of new subprograms to the actual specs
11048
83fa09c5
AC
110492011-08-02 Yannick Moy <moy@adacore.com>
11050
11051 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11052 a-cforse.ads: Update comments.
11053
110542011-08-02 Ed Schonberg <schonberg@adacore.com>
11055
11056 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11057
d11cfaf8
RD
110582011-08-02 Robert Dewar <dewar@adacore.com>
11059
11060 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11061 a-cforse.ads, a-cofove.ads: Minor reformatting.
11062
300b98bb
AC
110632011-08-02 Claire Dross <dross@adacore.com>
11064
11065 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11066 a-cofove.ads: Add comments.
11067
110682011-08-02 Yannick Moy <moy@adacore.com>
11069
11070 * gnat_rm.texi: Document formal containers.
11071
110722011-08-02 Emmanuel Briot <briot@adacore.com>
11073
11074 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11075 are empty sections.
11076
19fb051c
AC
110772011-08-02 Robert Dewar <dewar@adacore.com>
11078
11079 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11080 reformatting.
11081
110822011-08-02 Robert Dewar <dewar@adacore.com>
11083
11084 * aspects.adb: New aspects Default_Value and Default_Component_Value
11085 New format of Aspect_Names table checks for omitted entries
11086 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11087 handling of boolean aspects for derived types.
11088 New aspects Default_Value and Default_Component_Value
11089 New format of Aspect_Names table checks for omitted entries
11090 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11091 (Has_Default_Value): New flag
11092 (Has_Default_Component_Value): New flag
11093 (Has_Default_Value): New flag
11094 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11095 table.
11096 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11097 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11098 Default_Value and Default_Component_Value
11099 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11100 New aspects Default_Value and Default_Component_Value
11101 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11102 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11103
111042011-08-02 Vincent Celier <celier@adacore.com>
11105
11106 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11107 inherit library kind.
11108
111092011-08-02 Ed Schonberg <schonberg@adacore.com>
11110
11111 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11112 Minor reformatting.
11113
111142011-08-02 Robert Dewar <dewar@adacore.com>
11115
11116 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11117
5f7747af
AC
111182011-08-02 Yannick Moy <moy@adacore.com>
11119
11120 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11121
111222011-08-02 Robert Dewar <dewar@adacore.com>
11123
11124 * impunit.adb: Add comment.
11125
a5fe697b
AC
111262011-08-02 Yannick Moy <moy@adacore.com>
11127
11128 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11129 qualification of aggregates in formal mode
11130 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11131 another aggregate
11132 (Resolve_Aggregate): complete the test that an aggregate is adequately
11133 qualified in formal mode
11134
111352011-08-02 Pascal Obry <obry@adacore.com>
11136
11137 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11138 * mlib-prj.adb: Supress warning when compiling binder generated file.
11139 (Build_Library): Supress all warnings when compiling the binder
11140 generated file.
11141
bd65a2d7 111422011-08-02 Yannick Moy <moy@adacore.com>
d4487611 11143
bd65a2d7
AC
11144 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11145 from here...
11146 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11147 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11148 Add with/use clauses to make Check_Formal_Restriction visible
11149
111502011-08-02 Ed Schonberg <schonberg@adacore.com>
11151
11152 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11153 in-parameters when type of the generic formal is private in the generic
11154 spec and non-private in the body.
11155
111562011-08-02 Claire Dross <dross@adacore.com>
11157
11158 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11159 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11160 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11161 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
11162
111632011-08-02 Robert Dewar <dewar@adacore.com>
11164
11165 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11166 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11167
bd434b3f
YM
111682011-08-02 Yannick Moy <moy@adacore.com>
11169
11170 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11171 formal mode
11172 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11173 matching static array bounds, taking into account the special case of
11174 string literals
11175 * sem_ch3.adb: Typo in comment.
11176
fe5d3068
YM
111772011-08-02 Yannick Moy <moy@adacore.com>
11178
11179 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11180 which issues an error in formal mode if its argument node is originally
11181 from source
11182 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11183 has a discriminant specification so that it does not include the case
11184 of derived types
11185 (Derived_Type_Declaration): move here the test that a derived type has a
11186 discriminant specification
11187 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11188 first element of a component association before accessing its choices
11189 (presence of component association is not enough)
11190 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11191 declaration is a library item before accessing the next element in a
11192 list, as library items are not member of lists
11193 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11194 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11195 Check_Formal_Restriction whenever possible.
11196
b60a3f26
AC
111972011-08-02 Ed Schonberg <schonberg@adacore.com>
11198
11199 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11200 reference when needed.
11201
112022011-08-02 Bob Duff <duff@adacore.com>
11203
11204 * gnat_ugn.texi: Fix typo.
11205
112062011-08-02 Vincent Celier <celier@adacore.com>
11207
11208 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11209 archive file name. Do not use the full path name of archives for Open
11210 VMS.
11211
eaba57fb
RD
112122011-08-02 Robert Dewar <dewar@adacore.com>
11213
11214 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11215 Analyze_Aspect_Specifications
11216 * sem_ch13.adb
11217 (Analyze_Aspect_Specifications): New handling for boolean aspects
11218 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11219 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11220 sequence for Analyze_Aspect_Specifications
11221 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11222 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11223
112242011-08-02 Robert Dewar <dewar@adacore.com>
11225
11226 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11227 aspects, since these no longer exist.
11228
112292011-08-02 Robert Dewar <dewar@adacore.com>
11230
11231 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11232 semicolon, do not try to see if there are aspects following it.
11233 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11234 aspect spec.
11235
8830d1d2
AC
112362011-08-02 Robert Dewar <dewar@adacore.com>
11237
11238 * sem_ch8.adb, aspects.ads: Minor reformatting.
11239
112402011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11241
11242 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11243 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11244 extracted from...
11245 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11246
7ff2d234
AC
112472011-08-02 Yannick Moy <moy@adacore.com>
11248
11249 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11250 mode on subprogram declaration outside of package specification, unless
11251 it is followed by a pragma Import
11252 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11253 Access_Type_Declaration): issue error in formal mode on access type
11254 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11255 incomplete type
11256 (Analyze_Object_Declaration): issue error in formal mode on object
11257 declaration which does not respect SPARK restrictions
11258 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11259 declaration which does not respect SPARK restrictions
11260 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11261 error in formal mode on digits or delta constraint
11262 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11263 decimal fixed point type
11264 (Derived_Type_Declaration): issue error in formal mode on derived type
11265 other than type extensions of tagged record types
11266 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11267 with check on access definition
11268 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11269 mode on protected definition.
11270 (Analyze_Task_Definition): issue error in formal mode on task definition
11271
112722011-08-02 Robert Dewar <dewar@adacore.com>
11273
11274 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11275
806f6d37
AC
112762011-08-02 Javier Miranda <miranda@adacore.com>
11277
11278 * sem_ch6.adb (Can_Override_Operator): New function.
11279 (Verify_Overriding_Indicator): Add missing code to check overriding
11280 indicator in operators. Fixes regression.
11281 (Check_Overriding_Indicator): Minor reformating after replacing the
11282 code that evaluates if the subprogram can override an operator by
11283 invocations to the above new function.
11284 * einfo.adb
11285 (Write_Field26_Name): Add missing code to ensure that, following
11286 the documentation in einfo.ads, this field is not shown as attribute
11287 "Static_Initialization" on non-dispatching functions.
11288
112892011-08-02 Jose Ruiz <ruiz@adacore.com>
11290
11291 * sem_res.adb (Resolve_Call): A call to
11292 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11293 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11294 i.e., when the second parameter is of type Time_Span.
11295
112962011-08-02 Vincent Celier <celier@adacore.com>
11297
11298 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11299 with an archive instead of -L<library dir> -l<library name>.
11300
113012011-08-02 Ed Schonberg <schonberg@adacore.com>
11302
11303 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11304 mark the base types In_Use in addition to making the operations
11305 use_visible.
11306
113072011-08-02 Ed Falis <falis@adacore.com>
11308
11309 * init.c: add and setup __gnat_signal_mask for the exception signals
11310 * s-inmaop-vxworks.adb: new file.
11311 * s-intman-vxworks.adb: remove unnecessary initializations and
11312 simplify remaining
11313 * s-intman-vxworks.ads: remove unnecessary variable
11314 * s-taprop-vxworks.adb: simplify signal initialization
11315
780d052e
RD
113162011-08-02 Robert Dewar <dewar@adacore.com>
11317
11318 * sem_ch8.adb: Minor code reorganization, comment updates.
11319
113202011-08-02 Robert Dewar <dewar@adacore.com>
11321
11322 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11323 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11324 here from Sem_Res.
11325 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11326 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11327
29efbb8c
ES
113282011-08-02 Ed Schonberg <schonberg@adacore.com>
11329
11330 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11331 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11332 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11333 use_type_clauses, to handle more efficiently use_type and use_all_type
11334 constructs.
11335 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11336 Ada2012 Use_All_Type clause.
11337 (Use_Class_Wide_Operations): new procedure.
11338
b0186f71
AC
113392011-08-02 Robert Dewar <dewar@adacore.com>
11340
11341 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11342 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11343 expression to expression function.
11344
113452011-08-02 Ed Schonberg <schonberg@adacore.com>
11346
11347 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11348 if types are compatible.
11349
113502011-08-02 Yannick Moy <moy@adacore.com>
11351
11352 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11353 returns True if its argument array types have same dimension and same
11354 static bounds at each index.
11355 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11356 OUT or IN OUT paramaters which are not view conversions in SPARK.
11357 (Resolve_Arithmetic_Op): issue an error in formal mode on
11358 multiplication or division with operands of fixed point types which are
11359 not qualified or explicitly converted.
11360 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11361 Boolean or array type (except String) operands.
11362 (Resolve_Equality_Op): issue an error in formal mode on equality
11363 operators for array types other than String with non-matching static
11364 bounds.
11365 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11366 for array types with non-matching static bounds. Factorize the code in
11367 Matching_Static_Array_Bounds.
11368 (Resolve_Qualified_Expression): issue an error in formal mode on
11369 qualified expressions for array types with non-matching static bounds.
11370 (Resolve_Type_Conversion): issue an error in formal mode on type
11371 conversion for array types with non-matching static bounds
11372
767bb4e8
AC
113732011-08-02 Robert Dewar <dewar@adacore.com>
11374
11375 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11376
113772011-08-02 Ed Schonberg <schonberg@adacore.com>
11378
11379 * par-ch9.adb: save location of entry for proper error message.
11380
4ac2477e
JM
113812011-08-02 Javier Miranda <miranda@adacore.com>
11382
11383 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11384 (Use_Full_View) which permits this routine to climb through the
11385 ancestors using the full-view of private parents.
11386 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11387 Use_Full_View to true in calls to Is_Ancestor.
11388 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11389 true in call to Is_Ancestor.
11390 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11391 Use_Full_View to true in call to Is_Ancestor.
11392 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11393 call to Is_Ancestor.
11394 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11395 Use_Full_View to true in calls to Is_Ancestor.
11396 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11397 Make_Select_Specific_Data_Table, Register_Primitive,
11398 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11399 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11400 to true in call to Is_Ancestor.
11401 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11402 Use_Full_View to true in calls to Is_Ancestor.
11403 * exp_cg.adb
11404 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11405 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11406
9f90d123
AC
114072011-08-02 Robert Dewar <dewar@adacore.com>
11408
11409 * gnat_rm.texi: Minor reformatting.
11410 * sem_prag.adb: Minor reformatting.
11411
114122011-08-02 Tristan Gingold <gingold@adacore.com>
11413
11414 * vms_data.ads: Add VMS qualifier for -gnateP.
11415
114162011-08-02 Robert Dewar <dewar@adacore.com>
11417
11418 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11419 * par-ch7.adb (P_Package): Proper placement of aspects for package
11420 decl/instantiation.
11421 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11422 (End_Statements): Add Is_Sloc parameterr
11423 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11424 (Check_End): Ad Is_Sloc parameter
11425 (End_Statements): Add Is_Sloc parameterr
11426
114272011-08-02 Vincent Celier <celier@adacore.com>
11428
11429 * ug_words: Add VMS qualifier equivalent to -gnateP:
11430 /SYMBOL_PREPROCESSING.
11431
114322011-08-02 Jose Ruiz <ruiz@adacore.com>
11433
11434 * gnat-style.texi: For hexadecimal numeric literals the typical
11435 grouping of digits is 4 to represent 2 bytes.
11436 A procedure spec which is split into several lines is indented two
11437 characters.
11438
114392011-08-02 Yannick Moy <moy@adacore.com>
11440
11441 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11442 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11443 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11444 properly qualified
11445 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11446 choice in array aggregate
11447 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11448 mark as ancestor
11449 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11450 positional and named aggregate for record, or others in record
11451 aggregate, or multiple choice in record aggregate
11452 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11453 array operands to logical operations AND, OR and XOR do not have the
11454 same static lower and higher bounds
11455 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11456
2933b16c
RD
114572011-08-01 Robert Dewar <dewar@adacore.com>
11458
11459 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11460 Replaces Last_Source_Node_In_Sequence.
11461 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11462 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11463 parens and blank in string (this was inconsistently implemented).
11464 * errout.ads
11465 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11466 blank in string (this was inconsistently implemented).
11467 * gnat1drv.adb
11468 (Set_Global_Switches): Set formal mode switches appropriately
11469 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11470 * par-prag.adb
11471 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11472 call Set_Error_Msg_Lang to set "spark" as language name.
11473 * par.adb: Remove unnecessary call to set formal language for errout
11474 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11475 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11476 name.
11477 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11478 calls to it, moved after resolution so that types are known
11479 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11480 result of concatenation is not of type String
11481 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11482 concatenation is not properly restricted
11483 * gnat_rm.texi: Add doc on pragma Spark_95.
11484 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11485 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11486 * gcc-interface/Make-lang.in: Update dependencies.
11487
05dbd302
AC
114882011-08-01 Javier Miranda <miranda@adacore.com>
11489
11490 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11491 condition that detects if the overridden operation must replace an
11492 existing entity.
11493
114942011-08-01 Javier Miranda <miranda@adacore.com>
11495
11496 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11497 code declarations inserted by Insert_Actions in each alternative of the
11498 N_Case_Expression node.
11499
115002011-08-01 Robert Dewar <dewar@adacore.com>
11501
11502 * sem_ch6.adb: Minor code reorganization.
11503 * sem_util.adb: Minor reformatting.
11504
af9e051f
PO
115052011-08-01 Pascal Obry <obry@adacore.com>
11506
11507 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11508 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11509
1d801f21
AC
115102011-08-01 Yannick Moy <moy@adacore.com>
11511
11512 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11513 literal or operator symbol which is prefixed
11514 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11515 mode on access attributes.
11516 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11517 that concatenation operands are properly restricted in formal mode
11518 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11519 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11520 result of the concatenation has a type different from String.
11521 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11522 Analyze_Quantified_Expression, Analyze_Slice,
11523 Analyze_Null): issue an error in formal mode on unsupported constructs
11524 * sem_ch5.adb
11525 (Analyze_Block_Statement): only issue error on source block statement
11526 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11527 function which returns the last node in a list of nodes for which
11528 Comes_From_Source returns True, if any
11529 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11530 Last_Source_Node_In_Sequence
11531 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11532 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11533 mode on unsupported constructs
11534 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11535 rest of the actions may be needed later on since the error is marked as
11536 not serious.
11537 * sinfo.ads: Typos in comments.
11538
115392011-08-01 Pascal Obry <obry@adacore.com>
11540
11541 * projects.texi: Minor editing.
11542
53beff22
YM
115432011-08-01 Yannick Moy <moy@adacore.com>
11544
11545 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11546 insertion character ~~
11547 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11548 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11549 with insertion character ~~
11550 (Set_Msg_Text): treat insertion character ~~
11551 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11552 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11553 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11554 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11555 errors related to the formal language restriction not serious
11556 (insertion character |).
11557 * par.adb (Par): set formal language for error messages if needed
11558 * sem_ch6.adb (Check_Missing_Return): take into account possible
11559 generated statements at the end of the function
11560 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11561 enumeration value to define a new pragma SPARK_95
11562 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11563 SPARK_Version): new type and variables to store the SPARK version
11564 (none by default).
11565 (SPARK_Mode): return True when SPARK_Version is set
11566 * par-prag.adb: Correct indentation
11567 (Prag): take Pragma_SPARK_95 into account
11568 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11569 into account.
11570
8d606a78
RD
115712011-08-01 Robert Dewar <dewar@adacore.com>
11572
11573 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11574 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11575 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11576
1982d5a8
PO
115772011-08-01 Pascal Obry <obry@adacore.com>
11578
11579 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11580 Target_Name to Get_Path call.
11581 (Parse_Single_Project): Likewise.
11582 (Post_Parse_Context_Clause): Likewise.
11583 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11584 Call Initialise_Project_Path with the proper Target_Name.
11585 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11586 search path.
11587 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11588 with the proper Target_Name.
11589 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11590 Part.Parse routine.
11591 (Parse_Project_And_Apply_Config): Likewise.
11592 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11593 This is fine as this part of the code is supporting only native
11594 compilation.
11595 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11596 is fine as this part of the code is supporting only native compilation.
11597
0d53d36b
AC
115982011-08-01 Yannick Moy <moy@adacore.com>
11599
11600 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11601 of homonym, unless the homonym is one of the cases allowed in SPARK
11602 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11603 package declaration occurring after a body.
11604
116052011-08-01 Robert Dewar <dewar@adacore.com>
11606
11607 * checks.adb, exp_ch4.adb: Minor reformatting.
11608
116092011-08-01 Javier Miranda <miranda@adacore.com>
11610
11611 * einfo.ads (Access_Disp_Table): Fix documentation.
11612 (Dispatch_Table_Wrappers): Fix documentation.
11613
116142011-08-01 Pascal Obry <obry@adacore.com>
11615
11616 * prj-env.adb, prj-env.ads: Minor reformatting.
11617
8ed68165
AC
116182011-08-01 Yannick Moy <moy@adacore.com>
11619
11620 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11621 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11622 procedures out of these packages.
2c7f9cc0 11623 * errout.ads, errout.adb
8ed68165
AC
11624 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11625 procedures in of this package
11626 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11627 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11628 on misplaced later vs initial declarations, like in Ada 83
11629 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11630 formal mode on attribute of private type whose full type declaration
11631 is not visible
11632 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11633 package declaration inside a package specification
11634 (Analyze_Full_Type_Declaration): issue error in formal mode on
11635 controlled type or discriminant type
11636 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11637 user-defined operator means that it should come from the source
11638 (New_Overloaded_Entity): issue error in formal mode on overloaded
11639 entity.
11640 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11641
116422011-08-01 Thomas Quinot <quinot@adacore.com>
11643
11644 * atree.adb: Minor reformatting.
11645 * checks.adb: Minor reformatting.
11646
4230bdb7
AC
116472011-08-01 Vincent Celier <celier@adacore.com>
11648
11649 * s-parame-vms-ia64.ads: Fix typo in comment
11650 Minor reformatting
11651 * s-parame-vms-restrict.ads: Removed, unused.
11652
116532011-08-01 Javier Miranda <miranda@adacore.com>
11654
11655 * exp_ch3.adb
11656 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11657 * sem_ch3.adb
11658 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11659 * sem_ch3.ads, sem_ch3.adb
11660 (Is_Constant_Bound): New extended version of the subprogram that was
11661 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11662 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11663 * sem_aux.ads (Constant_Value): Fix typo in comment.
11664 * checks.adb (Generate_Index_Checks): New implementation which, for
11665 array objects with constant bounds, generates the runtime check
11666 referencing the bounds of the array type. For other cases this routine
11667 provides its previous behavior obtaining such values from the array
11668 object.
11669 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11670 parent type.
11671 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11672 we cannot have semantic interpretations of the new node.
11673
2010d078
AC
116742011-08-01 Ed Schonberg <schonberg@adacore.com>
11675
11676 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11677 expressions.
11678
116792011-08-01 Arnaud Charlet <charlet@adacore.com>
11680
11681 * sem_ch8.adb: Minor code editing.
11682 * s-vxwext.adb: Remove trailing space.
11683 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11684 consistency with other files.
11685
116862011-08-01 Thomas Quinot <quinot@adacore.com>
11687
11688 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11689
116902011-08-01 Ed Schonberg <schonberg@adacore.com>
11691
11692 * par-ch10.adb: reject parameterized expressions as compilation unit.
11693 * sem_ch4.adb: handle properly conditional expression with overloaded
11694 then_clause and no else_clause.
11695
116962011-08-01 Tristan Gingold <gingold@adacore.com>
11697
11698 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11699 like done by System.Aux_DEC.
11700 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11701
daec8eeb
YM
117022011-08-01 Yannick Moy <moy@adacore.com>
11703
11704 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11705 missing label at end of declaration (subprogram or package)
11706 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11707 of positional and named parameter association
11708 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11709 Error_Msg_SP which adds a prefix to the error message giving the name
11710 of the formal language analyzed
11711 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11712 access result type in subprogram, unconstrained array as result type,.
11713 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11714 procedure
11715 * sem_ch8.adb: Code clean up.
11716
38171f43
AC
117172011-08-01 Javier Miranda <miranda@adacore.com>
11718
11719 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11720 * einfo.ads (Access_Disp_Table): Fix documentation.
11721 (Dispatch_Table_Wrappers): Fix documentation.
11722 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11723 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11724 to enforce the documentation of this attribute.
11725 (Set_Is_Interface): Cleanup the assertion.
11726 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11727 the Underlying_Type entity before reading attribute Access_Disp_Table.
11728 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11729 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11730 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11731 the Underlying_Type entity before reading attribute Access_Disp_Table.
11732 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11733 Locate the Underlying_Type entity before reading attribute
11734 Access_Disp_Table.
11735
117362011-08-01 Ed Schonberg <schonberg@adacore.com>
11737
11738 * s-poosiz.ads: Additional overriding indicators.
11739
117402011-08-01 Yannick Moy <moy@adacore.com>
11741
11742 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11743 formal mode.
11744 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11745 parameter specification does not include a subtype mark.
11746 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11747 formal mode on abstract subprogram.
11748 (Analyze_Subprogram_Specification): issue error in formal mode on
11749 user-defined operator.
11750 (Process_Formals): issue error in formal mode on access parameter and
11751 default expression.
11752 * sem_ch9.adb (Analyze_Abort_Statement,
11753 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11754 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11755 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11756 Analyze_Requeue, Analyze_Selective_Accept,
11757 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11758 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11759 issue error in formal mode on user-defined raise statement.
11760
1f250383
AC
117612011-08-01 Thomas Quinot <quinot@adacore.com>
11762
11763 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11764 declaration being hidden when overriding an implicit inherited
11765 subprogram.
11766 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11767 (-gnats), do not complain about a source file that contains only a
11768 pragma No_Body.
11769
117702011-08-01 Ed Schonberg <schonberg@adacore.com>
11771
11772 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11773 variable if already set.
11774
607d0635
AC
117752011-08-01 Arnaud Charlet <charlet@adacore.com>
11776
11777 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11778 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11779 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11780 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11781 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11782 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11783 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11784 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11785 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11786 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11787 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11788 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11789 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11790 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11791 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11792 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11793 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11794 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11795 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11796 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11797 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11798 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11799 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11800 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11801 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11802 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11803 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11804 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11805 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11806 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11807 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11808 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11809 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11810 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11811 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11812 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11813 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11814 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11815 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11816 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11817 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11818 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11819 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11820 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11821 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11822 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11823 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11824 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11825 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11826 Use GNAT instead of GNARL.
11827
118282011-08-01 Bob Duff <duff@adacore.com>
11829
11830 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11831 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11832 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11833 reformatting.
11834
118352011-08-01 Yannick Moy <moy@adacore.com>
11836
11837 * debug.adb (d.D) reverve flag for the SPARK mode
11838 (d.E) reverve flag for SPARK generation mode
11839 (d.F) reverve flag for Why generation mode
2c7f9cc0 11840 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
11841 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11842 functions which return True when the corresponding modes are set
11843 (Formal_Language): return "spark" or "alfa" when in formal verification
11844 mode.
11845 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11846 Error_Msg to prefix the error message with a tag giving the formal
11847 language
11848 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11849 message with a tag giving the formal language
11850 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11851 block statement
11852 (Analyze_Case_Statement): issue error in formal mode on case statement
11853 with a single "others" case alternative
11854 (Analyze_Exit_Statement): issue errors in formal mode on exit
11855 statements which do not respect SPARK restrictions
11856 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11857 (Check_Unreachable_Code): always issue an error (not a warning) in
11858 formal mode on unreachable code (concerns both code after an infinite
11859 loop and after an unconditional jump, both not allowed in SPARK)
11860 * sem_ch6.adb (Analyze_Return_Statement): add call to
11861 Set_Return_Present for a procedure containing a return statement
11862 (already done for functions in Analyze_Function_Return)
11863 (Analyze_Function_Return): issue error in formal mode on extended
11864 return or if return is not last statement in function
11865 (Check_Missing_Return): issue error in formal mode if function does
11866 not end with return or if procedure contains a return
11867 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11868 function to detect if there is an inner scope of its parameter S which
11869 is a loop.
11870
118712011-08-01 Thomas Quinot <quinot@adacore.com>
11872
11873 * sem_ch6.ads: Minor reformatting.
11874
d8b3ccb9
AC
118752011-08-01 Javier Miranda <miranda@adacore.com>
11876
11877 * sem_util.adb (Abstract_Interface_List): Complete condition when
11878 processing private type declarations to avoid reading unavailable
11879 attribute.
11880 (Is_Synchronized_Tagged_Type): Complete condition when processing
11881 private extension declaration nodes to avoid reading unavailable
11882 attribute.
11883
118842011-08-01 Thomas Quinot <quinot@adacore.com>
11885
11886 * sem_ch3.adb: Minor reformatting.
11887
118882011-08-01 Thomas Quinot <quinot@adacore.com>
11889
11890 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11891 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11892 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11893 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11894 for VMS, instead parametrize the common implementation with
11895 System.Parameters declarations.
11896
0bb9276c
AC
118972011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11898
11899 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11900
119012011-08-01 Tristan Gingold <gingold@adacore.com>
11902
11903 * seh_init.c: Fix SEH handler installation on win64.
11904
119052011-08-01 Ed Schonberg <schonberg@adacore.com>
11906
11907 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11908 double analysis of an anonymous access to subprogram, because it can
11909 lead to improper sharing of profiles and a back-end crash.
11910
6a2e4f0b
AC
119112011-08-01 Robert Dewar <dewar@adacore.com>
11912
11913 * make.adb, sem_ch4.adb: Minor reformatting.
11914 * gcc-interface/Make-lang.in: Update dependencies.
11915 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11916
119172011-08-01 Arnaud Charlet <charlet@adacore.com>
11918
11919 * gnat_rm.texi: Fix definition of Long_Integer.
11920
119212011-08-01 Ed Schonberg <schonberg@adacore.com>
11922
11923 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11924 to prevent storage exhaustion.
11925 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11926 finalized is a function body, insert the cleanup code before the final
11927 return statement, to prevent spurious warnings.
11928 * s-pooglo.ads: add overriding indicator.
11929
4561baf7
ES
119302011-08-01 Ed Schonberg <schonberg@adacore.com>
11931
11932 * sem_ch4.adb (Operator_Check): improve error message when both a
11933 with_clause and a use_clause are needed to make operator usage legal.
11934 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11935 determine whether a compilation unit is visible within an other,
11936 either through a with_clause in the current unit, or a with_clause in
11937 its library unit or one one of its parents.
11938
383e179e
AC
119392011-08-01 Ed Schonberg <schonberg@adacore.com>
11940
11941 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11942 over an arbitrary expression of an array or container type.
11943 * lib-xref.adb: clarify comment.
11944
119452011-08-01 Bob Duff <duff@adacore.com>
11946
11947 * einfo.ads: Minor reformatting.
11948 * debug.adb: Minor comment improvement.
11949
119502011-08-01 Javier Miranda <miranda@adacore.com>
11951
11952 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11953 consider hidden subprograms as valid candidates.
11954
119552011-08-01 Arnaud Charlet <charlet@adacore.com>
11956
11957 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11958
119592011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11960
11961 * gnat_ugn.texi: Fix typo.
11962
61c161b2
AC
119632011-08-01 Robert Dewar <dewar@adacore.com>
11964
11965 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11966 lib-xref.adb: Minor reformatting
11967
119682011-08-01 Gary Dismukes <dismukes@adacore.com>
11969
11970 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11971 when to generate a call to Move_Final_List.
11972 (Has_Controlled_Parts): Remove this function.
11973
84df40f7
AC
119742011-08-01 Geert Bosch <bosch@adacore.com>
11975
11976 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11977 "," in choice list.
11978
119792011-08-01 Thomas Quinot <quinot@adacore.com>
11980
11981 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11982 explicit raise of a predefined exception as Comes_From_Source if the
11983 original N_Raise_Statement comes from source.
11984
119852011-08-01 Robert Dewar <dewar@adacore.com>
11986
11987 * sinfo.ads: Add comment.
11988 * sem_ch6.adb: Minor reformatting.
11989
119902011-08-01 Robert Dewar <dewar@adacore.com>
11991
11992 * freeze.adb (Freeze_Entity): Refine check for bad component size
11993 clause to avoid rejecting confirming clause when atomic/aliased present.
11994
119952011-08-01 Ed Schonberg <schonberg@adacore.com>
11996
11997 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11998 better determine whether an entity reference is a write.
11999 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12000 subcomponent.
12001 * lib-xref.adb (Output_References): Do no suppress a read reference at
12002 the same location as an immediately preceeding modify-reference, to
12003 handle properly in-out actuals.
12004
120052011-08-01 Tristan Gingold <gingold@adacore.com>
12006
12007 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12008
120092011-08-01 Quentin Ochem <ochem@adacore.com>
12010
12011 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12012 heap to compute the result.
12013
c7f0d2c0
AC
120142011-08-01 Robert Dewar <dewar@adacore.com>
12015
12016 * atree.ads: Minor reformatting.
12017
120182011-08-01 Emmanuel Briot <briot@adacore.com>
12019
12020 * g-expect.adb (Get_Command_Output): Fix memory leak.
12021
120222011-08-01 Geert Bosch <bosch@adacore.com>
12023
12024 * cstand.adb (P_Float_Type): New procedure to print the definition of
12025 predefined fpt types.
12026 (P_Mixed_Name): New procedure to print a name using mixed case
12027 (Print_Standard): Use P_Float_Type for printing floating point types
12028 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12029 precision IEEE float.
12030
120312011-08-01 Thomas Quinot <quinot@adacore.com>
12032
12033 * sem_ch3.adb: Minor reformatting.
12034
120352011-08-01 Ed Schonberg <schonberg@adacore.com>
12036
12037 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12038 the completion of a generic function, insert the new body rather than
12039 rewriting the original.
12040
120412011-08-01 Yannick Moy <moy@adacore.com>
12042
12043 * sinfo.ads, errout.ads: Typos in comments.
12044
1c54829e
AC
120452011-08-01 Robert Dewar <dewar@adacore.com>
12046
12047 * par-endh.adb: Minor reformatting.
12048
120492011-08-01 Robert Dewar <dewar@adacore.com>
12050
12051 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12052 (Pre_Post_Aspects): New subtype.
12053 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12054 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12055 * par-ch7.adb (P_Package): Remove Decl parameter
12056 (P_Package): Handle new syntax for aspects (before IS)
12057 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12058 new aspect syntax
12059 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12060 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12061 (P_Package): Remove Decl parameter
12062 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12063 aspects
12064 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12065 specs
12066 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12067 * sinfo.ads: Document new syntax for aspects in packages etc.
12068 * sprint.adb: Handle new syntax of aspects before IS in package
12069
120702011-08-01 Thomas Quinot <quinot@adacore.com>
12071
12072 * atree.ads: Minor reformatting.
12073 * sem_prag.adb: Minor reformatting.
12074
120752011-08-01 Robert Dewar <dewar@adacore.com>
12076
12077 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12078 case expr alternative.
12079
120802011-08-01 Ed Schonberg <schonberg@adacore.com>
12081
12082 * sem_ch12.adb: Fix typo.
12083
9eea4346
GB
120842011-08-01 Geert Bosch <bosch@adacore.com>
12085
12086 * sem_prag.adb (Check_No_Link_Name): New procedure.
12087 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12088 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12089 instead of Standard_Long_Long_Float_Size global. Preparation for
12090 eventual removal of per type constants.
12091 * exp_util.ads (Get_Stream_Size): New function returning the stream
12092 size value of subtype E.
12093 * exp_util.adb (Get_Stream_Size): Implement new function.
12094 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12095 function.
12096 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12097 * einfo.adb:
12098 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12099
3d6c3bd7
GB
121002011-08-01 Geert Bosch <bosch@adacore.com>
12101
12102 * cstand.adb: Fix comments.
12103 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12104 count of arguments.
12105
e7d897b8
AC
121062011-08-01 Robert Dewar <dewar@adacore.com>
12107
12108 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12109
121102011-08-01 Geert Bosch <bosch@adacore.com>
12111
12112 * atree.ads: Fix comment.
12113
c228a069
AC
121142011-08-01 Robert Dewar <dewar@adacore.com>
12115
12116 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12117 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12118 * par.adb: Add with for Namet.Sp.
12119 * par-tchk.adb: Minor reformatting.
12120
121212011-08-01 Vincent Celier <celier@adacore.com>
12122
12123 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12124 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12125 of the init procedure of a SAL.
12126 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12127 New procedure.
12128
121292011-08-01 Thomas Quinot <quinot@adacore.com>
12130
12131 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12132 reformatting.
12133
121342011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12135
12136 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12137
121382011-08-01 Thomas Quinot <quinot@adacore.com>
12139
12140 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12141 conformant with its spec (return True only for types that have
12142 an overriding Initialize primitive operation that prevents them from
12143 having preelaborable initialization).
12144 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12145 initialization for controlled types in Ada 2005 or later mode.
12146
857ade1b
RD
121472011-08-01 Robert Dewar <dewar@adacore.com>
12148
12149 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12150 Postcondition.
12151 (Same_Aspect): New function.
12152 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12153 Type_Invariant, Precondition, Postcondition.
12154 * snames.ads-tmpl: Add Name_Type_Invariant.
12155
bd949ee2
RD
121562011-08-01 Robert Dewar <dewar@adacore.com>
12157
12158 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12159 here.
12160 (Freeze_All_Ent): Fix error in handling inherited aspects.
12161 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12162 already analyzed, but don't skip entire processing of a declaration,
12163 that's wrong in some cases of declarations being rewritten.
12164 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12165 Don't delay for integer, string literals
12166 Treat predicates in usual manner for delay, remove special case code,
12167 not needed.
12168 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12169 (Build_Predicate_Function): Update saved expression in aspect
12170 (Build_Invariant_Procedure): Update saved expression in aspect
12171 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12172 of replacement of discriminant references if the reference is simple.
12173
f1c952af
RD
121742011-08-01 Robert Dewar <dewar@adacore.com>
12175
12176 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12177 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12178 Static_Predicate and Dynamic_Predicate.
12179 (Build_Predicate_Function): Add processing for Static_Predicate
12180 and Dynamic_Predicate.
12181 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12182 (From_Static_Predicate): New flag
12183 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12184
121852011-08-01 Robert Dewar <dewar@adacore.com>
12186
12187 * usage.adb: Documentation cleanup for Ada version modes in usage.
12188 * expander.adb: Minor reformatting.
12189
47e11d08
AC
121902011-08-01 Robert Dewar <dewar@adacore.com>
12191
12192 * atree.ads: Minor comment fix.
12193 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12194 a-witeio.ads, sem_prag.adb: Minor reformatting.
12195
121962011-08-01 Doug Rupp <rupp@adacore.com>
12197
12198 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12199 pointers. Use descrip.h header file for convenience. Add some
12200 comments.
12201
122022011-08-01 Robert Dewar <dewar@adacore.com>
12203
12204 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12205 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12206 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12207 New procedure.
12208 (Check_Aspect_At_End_Of_Declarations): New procedure
12209 (Analye_Aspect_Specification): Minor changes for above procedures
12210 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12211 specification node as well.
12212
122132011-08-01 Pascal Obry <obry@adacore.com>
12214
12215 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12216 Windows files. Use GetFilesAttributes() in this case to check for file
12217 existence instead of returning with an error code.
12218
a3a16b21
VC
122192011-08-01 Vincent Celier <celier@adacore.com>
12220
12221 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12222 High is above Source length.
12223
ff58cc69
RD
122242011-08-01 Robert Dewar <dewar@adacore.com>
12225
12226 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12227
6bb88533
AC
122282011-08-01 Robert Dewar <dewar@adacore.com>
12229
12230 * aspects.ads (Boolean_Aspects): New subtype.
12231 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12232 for derived types in cases where the parent type and derived type have
12233 aspects.
12234 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12235 with aspects when parent type also has aspects.
12236 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12237 boolean expression at this point).
12238 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12239 accordance with final decision on the Ada 2012 feature.
12240 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12241
122422011-08-01 Matthew Heaney <heaney@adacore.com>
12243
12244 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12245
060a3f28
AC
122462011-08-01 Pascal Obry <obry@adacore.com>
12247
12248 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12249 Fix Replace_Slice when High is above current string size.
12250 (Replace_Slice): Fix DL computation when High is above current
12251 string length.
12252
122532011-08-01 Gary Dismukes <dismukes@adacore.com>
12254
12255 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12256
e7f567a3
AC
122572011-08-01 Matthew Heaney <heaney@adacore.com>
12258
12259 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12260 of node.
12261
122622011-08-01 Pascal Obry <obry@adacore.com>
12263
12264 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12265 reformatting.
12266
1a265e78
AC
122672011-08-01 Ed Schonberg <schonberg@adacore.com>
12268
12269 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12270 access to protected subprograms in generic bodies.
12271 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12272 protected type, indicate that the convention of the subprogram is
12273 Convention_Protected, because it may be used in subsequent declarations
12274 within the protected declaration.
12275
122762011-08-01 Vincent Celier <celier@adacore.com>
12277
12278 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12279 and "final" procedures when the name of the library is "ada", to avoid
12280 duplicate symbols "adainit" and "adafinal" in executables.
12281
67e28ef8
ES
122822011-08-01 Ed Schonberg <schonberg@adacore.com>
12283
12284 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12285 quantified expression that appears within a postcondition and uses the
12286 Ada2012 'Result attribute.
12287
6da2ca7d
RO
122882011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12289
12290 * init.c (__gnat_error_handler): Cast reason to int.
12291 (__gnat_install_handler): Explain sa_sigaction use.
12292
7d5997c6
EB
122932011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12294
12295 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12296 subprogram has copy-in copy-out parameters, try to promote the mode of
12297 the return type if it is passed in registers.
12298
4b4cfdd5
EB
122992011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12300
12301 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12302 left operand as addressable.
12303
f3d34576
EB
123042011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12305
12306 * gcc-interface/gigi.h (build_function_stub): Remove.
12307 (build_return_expr): Likewise.
12308 (convert_vms_descriptor): Declare.
12309 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12310 (build_function_stub): Move to...
12311 * gcc-interface/utils2.c (build_return_expr): Move to...
12312 * gcc-interface/trans.c (build_function_stub): ...here.
12313 (build_return_expr): ...here.
12314 (Subprogram_Body_to_gnu): Add local variable for language_function.
12315 Disconnect the parameter attributes cache, if any, once done with it.
12316 Call end_subprog_body only after setting the end_locus.
12317 Build the stub associated with the function, if any, at the very end.
12318 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12319 variables and streamline control flow.
12320
0a6ecc08
AC
123212011-07-23 Arnaud Charlet <charlet@adacore.com>
12322
12323 PR ada/49819
12324 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12325 g-trasym-dwarf.adb.
12326
5b6d595b
RO
123272011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12328
12329 PR bootstrap/49794
12330 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12331 Assign to act.sa_sigaction.
12332 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12333 current->return_address to char * before arithmetic.
12334
94017021
RO
123352011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12336
12337 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12338 Correct argument types.
12339 Extract code from reason.
12340 (__gnat_install_handler): Assign to act.sa_sigaction.
12341
52fd02bb
EB
123422011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12343
12344 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12345 (GNAT1_OBJS): ...here.
12346
f39a9ca2
EB
123472011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12348
12349 PR ada/48711
12350 * g-socthi-mingw.adb (Fill): Fix formatting.
12351
9e36aa23
EB
12352 * gcc-interface/gigi.h: Move around comment.
12353
e3aca522
JDA
123542011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12355
12356 PR ada/46350
12357 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12358
696b1960
FW
123592011-07-14 Florian Weimer <fw@deneb.enyo.de>
12360
12361 PR ada/48711
12362 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12363
f542c405
EB
123642011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12365
12366 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12367 range comparison if Pmode is SImode.
12368
9e9bd455
LG
123692011-07-12 Laurent GUERBY <laurent@guerby.net>
12370 Eric Botcazou <ebotcazou@adacore.com>
12371
12372 * adadecode.c: Wrap up in extern "C" block.
12373 * adadecode.h: Likewise.
12374 * adaint.c: Likewise. Remove 'const' keyword.
12375 * adaint.h: Likewise.
12376 * argv.c: Likewise.
12377 * atree.h: Likewise.
12378 * cio.c: Likewise.
12379 * cstreams.c: Likewise.
12380 * env.c: Likewise.
12381 * exit.c: Likewise.
12382 * fe.h: Likewise.
12383 * final.c: Likewise.
12384 * init.c: Likewise.
12385 * initialize.c: Likewise.
12386 * link.c: Likewise.
12387 * namet.h: Likewise.
12388 * nlists.h: Likewise.
12389 * raise.c: Likewise.
12390 * raise.h: Likewise.
12391 * repinfo.h: Likewise.
12392 * seh_init.c: Likewise.
12393 * targext.c: Likewise.
12394 * tracebak.c: Likewise.
12395 * uintp.h: Likewise.
12396 * urealp.h: Likewise.
12397 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12398 * xsinfo.adb: Likewise.
12399 * xsnamest.adb: Likewise.
12400 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12401 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12402 * gcc-interface/misc.c: Likewise.
12403 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12404 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12405 ada/targext.o here...
12406 (GNAT_ADA_OBJS): ...and not here.
12407 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12408 (GNATBIND_OBJS): Reorder.
12409
7644b3c7
RH
124102011-07-07 Richard Henderson <rth@redhat.com>
12411
12412 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12413 dwarf2out_frame_init.
12414
8384ac41
EB
124152011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12416
12417 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12418
fbdd5d87
RO
124192011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12420
12421 PR target/39150
12422 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12423
1a072294
RG
124242011-07-06 Richard Guenther <rguenther@suse.de>
12425
8384ac41
EB
12426 * gcc-interface/misc.c (gnat_init): Merge calls to
12427 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
12428 Re-initialize boolean_false_node.
12429
bc712852
EB
124302011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12431 Olivier Hainque <hainque@adacore.com>
12432 Nicolas Setton <setton@adacore.com>
12433
12434 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12435 the type according to the ARTIFICIAL_P parameter.
12436 (create_type_decl): Likewise.
12437 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12438
2eb22389
EB
124392011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12440
12441 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12442 (gnatbind): Likewise.
12443
4bdaaf2f
RO
124442011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12445
12446 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12447
c020c92b
EB
124482011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12449
12450 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12451 local variable throughout. Remove useless call to Base_Type.
12452 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12453 Take it also into account for the volatileness of the field. Set the
12454 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12455
96769d32
EB
124562011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12457
12458 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12459 on a dereference built for a by-ref object if it has an address clause.
12460
7e4680c1
EB
124612011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12462
12463 * einfo.ads (Address_Taken): Document use for the second argument of
12464 Asm_Input and Asm_Output attributes.
12465 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12466 argument is an entity name, then set Address_Taken on it.
12467 <Attribute_Asm_Output>: Likewise.
12468 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12469 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12470 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12471 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12472
124732011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
12474
12475 PR middle-end/46500
12476 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12477
677f3fa8
JM
124782011-06-14 Joseph Myers <joseph@codesourcery.com>
12479
12480 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12481 (ada/utils.o): Update dependencies.
12482 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12483 ../../../libcpp/libcpp.a.
12484 * gcc-interface/utils.c: Include common/common-target.h.
12485 (process_attributes): Use targetm_common.have_named_sections.
12486
009db074
RG
124872011-06-07 Richard Guenther <rguenther@suse.de>
12488
0bad0e23
EB
12489 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12490 set_sizetype.
009db074 12491
3bfc61cf
EB
124922011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12493
0bad0e23 12494 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
12495 TREE_THIS_NOTRAP flag.
12496
5c4a1c7b
EB
124972011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12498
12499 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12500 Fix thinko.
12501
e9f57686
EB
125022011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12503
12504 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12505 constants whose full view has discriminants specially.
12506
10e4d056
EB
125072011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12508
12509 * gcc-interface/utils.c: Include diagnostic.h.
12510 (gnat_write_global_declarations): Output debug information for all
12511 global type declarations before finalizing the compilation unit.
12512 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12513
0957c029
JJ
125142011-05-25 Jakub Jelinek <jakub@redhat.com>
12515
12516 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12517
52d0a7ac
KT
125182011-05-25 Kai Tietz <ktietz@redhat.com>
12519
12520 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12521 initialization instead of const/none-const pointer assignment.
12522
1ed1641d
JM
125232011-05-24 Joseph Myers <joseph@codesourcery.com>
12524
12525 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12526 $(EXTRA_GNAT1_OBJS).
12527 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12528 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12529 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12530 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12531 libcommon-target.a instead of prefix.o.
12532
9fe72ebd
JM
125332011-05-21 Joseph Myers <joseph@codesourcery.com>
12534
12535 PR ada/49097
0bad0e23 12536 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 12537
2691e6d7
JM
125382011-05-20 Joseph Myers <joseph@codesourcery.com>
12539
0bad0e23
EB
12540 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12541 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12542 instead of version.o.
2691e6d7 12543
bf6490b5
KT
125442011-05-18 Kai Tietz <ktietz@redhat.com>
12545
12546 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12547 boolean_false_node instead of integer_zero_node.
12548 (convert_with_check): Likewise.
12549 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12550
7bf9a5ac
EB
125512011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12552
12553 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12554 type of the parameter is an unconstrained array, convert the actual to
12555 the type of the formal in the In Out and Out cases as well.
12556
e5b00edf
NF
125572011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12558
12559 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12560 call build_function_type_array or build_varargs_function_type_array
12561 instead.
12562 (create_subprog_type): Don't call build_function_type; call
12563 build_function_type_vec instead.
12564
51545682
NF
125652011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12566
12567 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12568 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12569 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12570
c99c0026
EB
125712011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12572
f620bd21
EB
12573 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12574
c99c0026
EB
12575 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12576 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12577
3d528853
NF
125782011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12579
c99c0026 12580 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 12581
d7d058c5
NF
125822011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12583
12584 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12585 instead of accessing TYPE_ARG_TYPES directly.
12586 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12587
805e60a0
EB
125882011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12589
12590 PR ada/48844
12591 * gcc-interface/gigi.h (get_variant_part): Declare.
12592 * gcc-interface/decl.c (get_variant_part): Make global.
12593 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12594 types have the same constant size, are record types and T1 has a
12595 variant part while T2 doesn't.
12596
907a08d9
EB
125972011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12598
12599 * gcc-interface/utils.c (begin_subprog_body): Do not call
12600 get_pending_sizes.
12601 (end_subprog_body): Likewise.
12602
d35936ab
RG
126032011-05-04 Richard Guenther <rguenther@suse.de>
12604
12605 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12606 int_const_binop.
12607 (pos_to_constructor): Likewise.
12608
c1fd8753 126092011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 12610 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
12611
12612 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12613 of build_function_type. Adjust calls to...
12614 (build_raise_check): ...this. Do not take a void_tree parameter.
12615 Call build_function_type_list instead of build_function_type.
12616 Fix head comment and swap couple of conditional blocks.
12617
4fb87d2b
EB
126182011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12619
12620 * gnatvsn.ads (Library_Version): Bump to 4.7.
12621 (Current_Year): Bump to 2011.
12622
fa5e5a76
MM
126232011-04-29 Michael Matz <matz@suse.de>
12624
12625 * gcc-interface/misc.c (gnat_handle_option): Set
12626 warn_maybe_uninitialized.
12627
8d6a2f69
GP
126282011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12629
12630 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12631 the Watson/McCabe paper.
12632
770937fd
JM
126332011-04-23 Jim Meyering <meyering@redhat.com>
12634
12635 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12636
eb601ae1
EB
126372011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12638
12639 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12640 onto the new type.
12641
7d7fcb08
EB
126422011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12643
12644 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12645 parameter.
12646 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12647 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12648 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12649 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12650 <all>: Do not set flags on the reused DECL node coming from an alias.
12651 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12652 don't need debug info here...
12653 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12654 (gigi): Adjust calls to create_subprog_decl.
12655 (build_raise_check): Likewise.
12656 (establish_gnat_vms_condition_handler): Likewise.
12657 (Compilation_Unit_to_gnu): Likewise.
12658 (gnat_to_gnu): Likewise.
12659
e1876cac
EB
126602011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12661
12662 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12663 (NO_REORDER_ADAFLAGS): New variable.
12664 (EXTRA_GNATTOOLS): Always define.
12665 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12666 Clean up and adjust list of files compiled with special options.
12667 * gcc-interface/Make-lang.in: Likewise.
12668 (ada/decl.o): Cosmetical change.
12669 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12670
04695783
JM
126712011-04-20 Jim Meyering <meyering@redhat.com>
12672
12673 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12674
23399579
EB
126752011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12676
12677 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12678 $(CFLAGS) on the link line.
12679
51c5169c
EB
126802011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12681
12682 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12683 padded type built for the return type if it is unconstrained.
12684
61e46a7d
NF
126852011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12686
12687 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12688
81f653d6
NF
126892011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12690
b4867846
EB
12691 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12692 before calling TREE_CHAIN.
81f653d6
NF
12693 * gcc-interface/misc.c (gnat_init_ts): New function.
12694 (LANG_HOOKS_INIT_TS): Define.
12695
a358e188
MJ
126962011-04-12 Martin Jambor <mjambor@suse.cz>
12697
b4867846
EB
12698 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12699 instead of cgraph_node.
a358e188 12700
29b1c5a4
EB
127012011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12702
12703 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12704 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12705 mechanism.
12706
88872b00
EB
127072011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12708
12709 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12710 of aggregate types that contain a placeholder.
12711
dcf0c47e
NF
127122011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12713
12714 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 12715 TYPE_ARG_TYPES.
dcf0c47e
NF
12716 (handle_type_generic_attribute): Likewise.
12717
53e3000c
EB
127182011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12719
12720 PR ada/47163
12721 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12722
ab380bb4
KT
127232011-04-04 Kai Tietz <ktietz@redhat.com>
12724
12725 PR ada/47163
0bad0e23
EB
12726 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12727 to flag value.
ab380bb4 12728
8ffac116
EB
127292011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12730
12731 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12732 type case, do not strip a padding type around the array type.
12733
de9528f0
EB
127342011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12735
12736 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12737 types.
12738
d9d7a26c
EB
127392011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12740
12741 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12742 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 12743 code for -feliminate-unused-debug-types.
d9d7a26c
EB
12744 (gnat_post_options): Likewise.
12745
4cb12a90
EB
127462011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12747
12748 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12749 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12750 distinct copy.
12751
acccc61c
EB
127522011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12753
12754 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12755 DECL_ARTIFICIAL flag on enumeration types.
12756
583eb0c9
EB
127572011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12758
12759 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12760 fat pointer types artificial unconditionally.
12761 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12762 isn't artificial.
12763
e3edbd56
EB
127642011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12765
12766 * gcc-interface/gigi.h (get_dummy_type): Declare.
12767 (build_dummy_unc_pointer_types): Likewise.
12768 (finish_fat_pointer_type): Likewise.
12769 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12770 fat pointer type has been built, complete it in place.
12771 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12772 and thin pointers. Remove useless variable.
12773 (finish_fat_pointer_type): Make global and move to...
12774 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12775 (get_dummy_type): New function.
12776 (build_dummy_unc_pointer_types): Likewise.
12777 (gnat_pushdecl): Propage the name to the anonymous variants only.
12778 (update_pointer_to): Only adjust the pointer types in the unconstrained
12779 array case.
12780
65444786
EB
127812011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12782
12783 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12784 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12785 if this is a Taft amendment type and the full declaration is available.
12786 * gcc-interface/trans.c (process_type): Likewise.
12787 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12788 (process_freeze_entity): Likewise.
12789 * gcc-interface/utils.c (dummy_global): New static variable.
12790 (gnat_write_global_declarations): If there are types declared as used
12791 at the global level, insert them in the global hash table.
12792
1aeb40dd
EB
127932011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12794
12795 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12796 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12797 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12798 copy.
12799 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12800 flag of the type accordingly.
12801 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12802
80ec8b4c
EB
128032011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12804
12805 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12806 finalizing types when updating the pointers to the designated type.
12807 <all>: Finalize the deferred types even if we didn't defer processing
12808 of incomplete types in this invocation.
12809
2a9d769a 128102011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
12811 Nicolas Setton <setton@adacore.com>
12812 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
12813
12814 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12815 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12816
2438d7a6
KT
128172011-03-28 Kai Tietz <ktietz@redhat.com>
12818
333d8aff 12819 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
12820 Windows targets.
12821 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12822 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 12823
80ec8b4c 12824 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 12825
8ad150f6
TG
128262011-03-28 Tristan Gingold <gingold@adacore.com>
12827
12828 PR ada/44431
80ec8b4c
EB
12829 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12830 Use ada output of gnatbind.
8ad150f6
TG
12831 (ada/b_gnatb.adb): Ditto.
12832 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12833 (ada.mostlyclean, ada.stage1)
12834 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12835 (ada.stagefeedback): Adjust.
80ec8b4c 12836 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
12837 Use ada output of gnatbind.
12838 (b_gnatm.adb): Ditto.
12839 (b_gnatl.o, b_gnatm.o): New rules.
12840
51c7954d
EB
128412011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12842
12843 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12844 for the padded type built to support a specified size or alignment.
12845
6ddf9843
EB
128462011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12847
12848 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12849 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12850 unconditionally to the end of the unit when the designated type is
12851 limited_with'ed.
12852 <all>: Rename local variable. Attempt to un-defer types only and do it
12853 for limited_with'ed types as well.
12854 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12855 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12856 consistently and remove redundant call to finalize_from_with_types.
12857
5daed84a
EB
128582011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12859
12860 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12861 subprograms without a previous spec declared in the same unit.
12862 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12863 subprograms at the end of the unit instead of at the beginning.
12864 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12865 isn't public for the special handling of non-inline functions nested
12866 inside inline external functions.
12867
0edf1bb2
JL
128682011-03-25 Jeff Law <law@redhat.com>
12869
5daed84a 12870 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 12871
e3c4580e
EB
128722011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12873
12874 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12875 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12876 to compute Set_Size_Depends_On_Discriminant.
12877 (Layout_Type): Call it on array types in back-end layout mode.
12878 * sem_util.adb (Requires_Transient_Scope): Return true for array
12879 types only if the size depends on the value of discriminants.
12880 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12881 type if the RHS is a call to a function that returns an unconstrained
12882 type with default discriminant.
12883
abbc8c7b
EB
128842011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12885
12886 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12887 non-conversion to the nominal result type at the end.
12888
ddb5a105
EB
128892011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12890
12891 * gcc-interface/trans.c (create_temporary): New function taken from...
12892 (create_init_temporary): ...here. Call it.
12893 (call_to_gnu): Create the temporary for the return value early, if any.
12894 Create it for a function with copy-in/copy-out parameters if there is
12895 no target; in other cases of copy-in/copy-out, use another temporary.
12896 Push the new binding level lazily. Add and rename local variables.
12897
0d853156
EB
128982011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12899
12900 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12901 error message.
12902 (set_rm_size): Likewise.
12903
4184ef1b
EB
129042011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12905
12906 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12907 for the padded type built in order to support a specified alignment.
12908 Fix incorrect formatting.
12909
bf7eefab
EB
129102011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12911
12912 PR bootstrap/48216
12913 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12914
ef0feeb2
EB
129152011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12916
12917 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12918 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12919 to the end of the list. Adjust recursive call. Rename local variable.
12920 If REORDER is true, reorder components of the record type.
12921 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12922 components_to_record and adjust the parameter list.
12923
646f9414
EB
129242011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12925
12926 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12927 disabled, use the variable for bounds of loop iteration scheme.
12928
62d784f7
KT
129292011-03-21 Kai Tietz <ktietz@redhat.com>
12930
12931 PR target/12171
0bad0e23 12932 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 12933
f230d759
EB
129342011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12935
12936 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12937 out whether the expression is read-only. Short-circuit placeholder
12938 case and rename a couple of local variables.
12939
bb1f7929
EB
129402011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12941
12942 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12943 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12944 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12945 (convert): Deal with conversions from a smaller form type specially.
12946
400a2d24
EB
129472011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12948
12949 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12950 its argument, except for the special -I- switch.
12951
c26bc3ad
GP
129522011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12953
0bad0e23
EB
12954 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12955 "Ada Issues".
c26bc3ad 12956
07b8e910
EB
129572011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12958
12959 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12960
31a5a547
EB
129612011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12962
12963 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12964 GNAT_FORMAL.
12965 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12966 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12967 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12968 Do not generate the check directly, instead instantiate the template
12969 check present in the descriptor.
12970 (make_descriptor_field): Move around.
12971 (build_vms_descriptor32): Build a template check in the POINTER field.
12972 (build_vms_descriptor): Remove useless suffixes.
12973 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12974
dcf25f59
EB
129752011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12976
12977 PR bootstrap/47467
12978 * targext.c: Include target files if IN_RTS is defined.
12979
0418e131
RG
129802011-01-26 Richard Guenther <rguenther@suse.de>
12981
12982 PR bootstrap/47467
12983 * targext.c: Include config.h.
12984 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12985 dependency.
12986
c6eecbd8 129872011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 12988 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
12989
12990 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12991
2d3c7e4f
EB
129922011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12993
12994 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12995 end-of-case on the end label and its associated gotos, if any.
12996
0394741f
EB
129972011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12998
12999 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13000 expressions of the parameter cache within the statement group of
13001 the CICO mechanism.
13002
2a02d090 130032011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 13004 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
13005
13006 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13007 (set_end_locus_from_node): New function.
13008 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13009 make and the function end_locus.
13010 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13011 for the elaboration subprogram.
13012 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13013 set the end_locus of the expression as well.
13014
89f5e978
EB
130152011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13016
13017 PR ada/47131
13018 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13019 variables that are referenced in exception handlers volatile.
13020
13021
ad41bd84 13022\f
797103eb 13023Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
13024
13025Copying and distribution of this file, with or without modification,
13026are permitted in any medium without royalty provided the copyright
13027notice and this notice are preserved.