]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
11bc76df
AC
12011-08-31 Robert Dewar <dewar@adacore.com>
2
3 * sem_ch4.adb: Minor reformatting.
4 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5
62011-08-31 Thomas Quinot <quinot@adacore.com>
7
8 * scos.ads: Minor documentation clarification.
9 * put_scos.adb: Do not generate SCO unit header line for a unit that
10 has no SCO lines.
11
876d4394
RD
122011-08-31 Robert Dewar <dewar@adacore.com>
13
14 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
15
36b8f95f
AC
162011-08-31 Tristan Gingold <gingold@adacore.com>
17
18 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
19 hold variables between these following subprograms.
20 (Build_Exception_Handler, Build_Object_Declarations,
21 Build_Raise_Statement): Use the above type as parameter.
22 Make the above adjustments.
23 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
24
252011-08-31 Pascal Obry <obry@adacore.com>
26
27 * projects.texi: Minor reformatting.
28
292011-08-31 Tristan Gingold <gingold@adacore.com>
30
31 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
32 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
33
342011-08-31 Ed Schonberg <schonberg@adacore.com>
35
36 * exp_ch5.adb: Minor code cleanup.
37 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
38 prevent cascaded errors.
39 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
40 variable of an iterator specification in current scope.
41 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
42 postconditions on the stack, as they contain no return statements.
43
442011-08-31 Yannick Moy <moy@adacore.com>
45
46 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
47 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
48 call Qualify_Entity_Names.
49 (Expand_Alfa): call Qualify_Entity_Names in more cases
50 * lib-xref-alfa.adb: Take into account system package.
51 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
52 CodePeer mode in which we are interested in finding bugs even if
53 compiler cannot compile source.
54 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
55 deferred constant.
56
572011-08-31 Gary Dismukes <dismukes@adacore.com>
58
59 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
60 denoted by the subtype mark to ensure getting the concurrent type in
61 the case where the subtype mark denotes a private subtype of a
62 concurrent type (needed when using -gnatc).
63 (Process_Subtype): For the processing specific to type kinds, case on
64 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
65 subtype denotes a private subtype whose base type is nonprivate (needed
66 for subtypes of private fulfilled by task types when compiling with
67 -gnatc).
68
692011-08-31 Gary Dismukes <dismukes@adacore.com>
70
71 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
72 late primitives that override interface operations when the full
73 expander is not active, to avoid blowups in Register_Primitive when
74 types don't have associated secondary dispatch tables.
75
762011-08-31 Yannick Moy <moy@adacore.com>
77
78 * alfa_test.adb: Code clean up.
79
802011-08-31 Marc Sango <sango@adacore.com>
81
82 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
83 by Comes_From_Source (Original_Node (N)) in order to treat also the
84 nodes which have been rewritten.
85 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
86 explicit dereference and slice violation in spark mode on the nodes
87 coming only from the source code.
88
8cf23b91
AC
892011-08-31 Robert Dewar <dewar@adacore.com>
90
91 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
92 lib-xref-alfa.adb: Minor reformatting.
93
942011-08-31 Matthew Heaney <heaney@adacore.com>
95
96 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
97
982011-08-31 Javier Miranda <miranda@adacore.com>
99
100 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
101 only for class-wide subprograms conflicting with entities of concurrent
102 tagged types.
103
1042011-08-31 Matthew Heaney <heaney@adacore.com>
105
106 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
107 node to null value.
108
1092011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
110
111 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
112 general description of the routine.
113
1142011-08-31 Ed Schonberg <schonberg@adacore.com>
115
116 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
117 doubly-linked lists.
118
0bb3bfb8
GD
1192011-08-31 Gary Dismukes <dismukes@adacore.com>
120
121 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
122 check is needed for a left-hand side that is a dereference, and the
123 base type is private without discriminants (whereas the full type does
124 have discriminants), an extra retrieval of the underlying type may be
125 needed in the case where the subtype is a record subtype whose base
126 type is private. Update comments.
127
11fa950b
AC
1282011-08-31 Javier Miranda <miranda@adacore.com>
129
130 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
131 found check if there is a class-wide subprogram covering the primitive.
132
1332011-08-31 Yannick Moy <moy@adacore.com>
134
135 * sem_res.adb: Further cases where full expansion test is needed,
136 rather than expansion test.
137
1382011-08-31 Pascal Obry <obry@adacore.com>
139
140 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
141
1422011-08-31 Ed Schonberg <schonberg@adacore.com>
143
144 * exp_ch5.adb: Handle iterators over derived container types.
145
1462011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
147
148 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
149 (Has_Anonymous_Master): New routine.
150 (Set_Has_Anonymous_Master): New routine.
151 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
152 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
153 (Current_Anonymous_Master): New routine.
154 (Current_Unit_First_Declaration): Removed.
155 (Current_Unit_Scope): Removed.
156 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
157 their objects on a per-unit heterogeneous finalization master.
158
1592011-08-31 Matthew Heaney <heaney@adacore.com>
160
161 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
162 array.
163
1642011-08-31 Jose Ruiz <ruiz@adacore.com>
165
166 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
167 when not needed.
168
1692011-08-31 Gary Dismukes <dismukes@adacore.com>
170
171 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
172 where the actual is an unexpanded call to 'Input.
173
d2b4b3da
AC
1742011-08-31 Yannick Moy <moy@adacore.com>
175
176 * sem_ch4.adb: Code clean up.
177
1782011-08-31 Yannick Moy <moy@adacore.com>
179
180 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
181
1822011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
183
184 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
185 and TSS primitive Finalize_Address if finalization is suppressed.
186 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
187 primitive Finalize_Address if finalization is suppressed.
188
1892011-08-31 Jose Ruiz <ruiz@adacore.com>
190
191 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
192 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
193 sure that the underlying task has already been created before trying
194 to change its affinity.
195 (Set_CPU): Use the term processor instead of CPU, as we do in
196 Assign_Task.
197
1982011-08-31 Vincent Celier <celier@adacore.com>
199
200 * prj-attr.adb: New Compiler attribute Source_File_Switches.
201 * prj-nmsc.adb (Process_Compiler): Process attribute
202 Source_File_Switches.
203 * prj.ads (Language_Config): New name list component
204 Name_Source_File_Switches.
205 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
206
2072011-08-31 Ed Schonberg <schonberg@adacore.com>
208
209 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
210 discriminated component of an actual, expand at once to prevent
211 ouf-of-order references with generated subtypes.
212
2132011-08-31 Yannick Moy <moy@adacore.com>
214
215 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
216 reference to operator in Alfa xrefs.
217
2182011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
219
220 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
221 where the parent instance was frozen before the current instance due to
222 the presence of a source body. Update calls to Insert_After_Last_Decl.
223 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
224 Update the comment which illustrates the purpose of the routine.
225 Package instances are now frozen by source bodies which appear after
226 the instance. This ensures that entities coming from within the
227 instance are available for use in the said bodies.
228 (Install_Body): Add code to handle the case where the parent instance
229 was frozen before the current instance due to the presence of a source
230 body. Update calls to Insert_After_Last_Decl.
231
56812278
AC
2322011-08-31 Jose Ruiz <ruiz@adacore.com>
233
234 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
235 access types.
236 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
237
2382011-08-31 Yannick Moy <moy@adacore.com>
239
240 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
241 full-expander test.
16c3301a
AC
242 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
243 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
244 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
245 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
246 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
247 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
248 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
249 ALFA in Alfa (we dropped acronym).
56812278
AC
250 * einfo.adb (Primitive_Operations): Correctly return list of primitive
251 operations in a case where it returned previously No_Elist.
252
7cda9727
RD
2532011-08-31 Robert Dewar <dewar@adacore.com>
254
255 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
256 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
257 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
258 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
259 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
260 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
261 reformatting.
262
0a190dfd
AC
2632011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
264
265 * sem_ch12 (Check_Private_View): Revert previous change.
266 * sem_res.adb (Conversion_Check): Do not emit the error message if the
267 conversion is in a generic instance.
268
2692011-08-31 Matthew Heaney <heaney@adacore.com>
270
271 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
272 * a-chtgbo.adb (Free): Allow 0 as index value.
273
2742011-08-31 Matthew Heaney <heaney@adacore.com>
275
276 * a-cborma.adb (Insert): Add comment to explain why no element
277 assignment.
278
2792011-08-31 Gary Dismukes <dismukes@adacore.com>
280
281 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
282 spec discriminant is already a concurrent type, in which case just use
283 it, otherwise fetch the Corresponding_Concurrent_Type as before.
284
7d266442
EB
2852011-08-30 Eric Botcazou <ebotcazou@adacore.com>
286
287 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
288 system-linux-mips.ads, system-linux-mipsel.ads,
289 system-linux-mips64el.ads, system-linux-ppc64.ads,
290 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
291
4f1a975c
EB
2922011-08-30 Eric Botcazou <ebotcazou@adacore.com>
293
294 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
295 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
296 (build_unary_op): Likewise.
297
f2991b48
EB
2982011-08-30 Eric Botcazou <ebotcazou@adacore.com>
299
300 * raise-gcc.c: Do not include coretypes.h and tm.h.
301 (setup_to_install): Remove test for compiler macro.
302 * targext.c: Document use for the library.
303 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
304
10a22f43
EB
3052011-08-30 Eric Botcazou <ebotcazou@adacore.com>
306
307 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
308 the expression to the nominal type if the latter is a record type with
309 a variant part and the type of the former is a record type without one.
310
bfa2e39d
AC
3112011-08-30 Yannick Moy <moy@adacore.com>
312
313 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
314 expansion in Alfa mode.
315 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
316 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
317 Alfa mode.
318 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
319 * sem_res.adb: Ditto.
bd34109a 320 * gcc-interface/Make-lang.in: Update dependencies.
bfa2e39d
AC
321
3222011-08-30 Thomas Quinot <quinot@adacore.com>
323
324 * g-socket.ads: Minor documentation adjustment.
325
a0347839
AC
3262011-08-30 Robert Dewar <dewar@adacore.com>
327
328 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
329
3302011-08-30 Yannick Moy <moy@adacore.com>
331
332 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
333 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
334 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
335 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
336 Revert change which introduced files for "light"
337 expansion, to be replaced by a single file for Alfa expansion.
338
3597c0e9
RD
3392011-08-30 Robert Dewar <dewar@adacore.com>
340
341 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
342 Minor code reorg/reformatting.
343
da94696d
AC
3442011-08-30 Yannick Moy <moy@adacore.com>
345
346 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
347 common shorthand for (Expander_Active and not ALFA_Mode) that can be
348 used for testing full expansion, that is active expansion not in the
349 reduced mode for Alfa
350 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
351 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
352 of the verbose (Expander_Active and not ALFA_Mode)
353
3542011-08-30 Tristan Gingold <gingold@adacore.com>
355
356 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
357 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5b8ca141
TG
358 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
359 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
da94696d 360
c199ccf7
AC
3612011-08-30 Gary Dismukes <dismukes@adacore.com>
362
363 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
364 access conversions to check that the conversion is a rewritten node,
365 rather than just having Comes_From_Source set to False, which wasn't
366 sufficient.
367
3682011-08-30 Robert Dewar <dewar@adacore.com>
369
370 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
371 g-socket.ads: Minor reformatting.
372
3732011-08-30 Thomas Quinot <quinot@adacore.com>
374
375 * sem_util.adb: Minor reformatting.
376
3772011-08-30 Tristan Gingold <gingold@adacore.com>
378
379 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
380 to be compliant with the ABI.
381
dff99e1a
AC
3822011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
383
384 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
385 of a designated type when the related access type is an actual in an
386 instance. This ensures that the full view of designated type is
387 available when inside the body of the instance.
388
3892011-08-30 Ed Schonberg <schonberg@adacore.com>
390
391 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
392 in a position to be modified, a slice is treated like an indexed
393 component.
394
63be2a5a
AC
3952011-08-30 Thomas Quinot <quinot@adacore.com>
396
397 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
398 field tv_sec in struct timeval.
399
4002011-08-30 Yannick Moy <moy@adacore.com>
401
402 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
403 blocks of code doing full expansion, previously only guarded by
404 Expander_Active, by anding the test that ALFA_Mode is not set
405
4062011-08-30 Ed Schonberg <schonberg@adacore.com>
407
408 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
409 add the function to the list of private dependents, for subsequent
410 legality check on Taft amendment types.
411 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
412 Private_Dependents, as for other incomplete types.
413 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
414 Taft-amendment type is used as the return type of a function.
415
dd54644b
JM
4162011-08-30 Javier Miranda <miranda@adacore.com>
417
418 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
419 which emits an error by a call to a new routine which report the error.
420 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
421 entity does not cover an existing interface.
422 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
423 code.
424 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
425 protected procedures or entries whose mode is not conformant.
426 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
427 an error by a call to a new routine which report the error.
428
d3ba478e
AC
4292011-08-30 Robert Dewar <dewar@adacore.com>
430
431 * gnat_rm.texi: Minor change.
432 * exp_attr_light.adb: Minor reformatting.
433
4342011-08-30 Ed Schonberg <schonberg@adacore.com>
435
436 * sem_ch3.adb: Patch inheritance of aspects in
437 Complete_Private_Subtype, to avoid infinite loop.
438
c01817d2
AC
4392011-08-30 Javier Miranda <miranda@adacore.com>
440
441 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
442 been reported and a subprogram covering an interface primitive is not
443 found then skip generating the internal entity. Done to avoid crashing
444 the frontend.
445 (Check_Abstract_Overriding): Change text of error of wrong formal of
446 protected subprogram or entry. Done for consistency to emit exactly the
447 same error reported by Check_Synchronized_Overriding. In addition, the
448 error is restricted to protected types (bug found working on AI05-0090)
449
4502011-08-30 Yannick Moy <moy@adacore.com>
451
452 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
453 expansion in Alfa mode.
454 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
455 * exp_light.adb, exp_light.ads: New package defining light expansion.
456 * expander.adb (Expand): Call light expansion in Alfa mode
457 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
458 constructs.
459 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
460 constructs.
461 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
462 * gnat1drv.adb (Adjust_Global_Switches): Comment
463
4642011-08-30 Yannick Moy <moy@adacore.com>
465
466 * lib-xref-alfa.adb: Minor refactoring.
467
4682011-08-30 Yannick Moy <moy@adacore.com>
469
470 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
471 mode.
472 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
473 expansion in Alfa mode.
474 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
475 mode.
476
4772011-08-30 Robert Dewar <dewar@adacore.com>
478
479 * debug_a.adb: Update comment.
480
996c8821
RD
4812011-08-30 Robert Dewar <dewar@adacore.com>
482
483 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
484 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
485 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
486 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
487
4882011-08-30 Robert Dewar <dewar@adacore.com>
489
490 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
491 volatile.
492
3647ca26
HK
4932011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
494
495 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
496 Build_Finalization_Master by supplying an insertion node and enclosing
497 scope. In its old version, the call did not generate a finalization
498 master.
499 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
500 recognize anonymous access-to-controlled components. Rewrite the
501 machinery which creates finalization masters to service anonymous
502 access-to-controlled components of a record type. In its current state,
503 only one heterogeneous master is necessary to handle multiple anonymous
504 components.
505 (Freeze_Type): Comment reformatting.
506 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
507 RE_Unit_Table.
508 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
509 associates TSS primitive Finalize_Address with either the master itself
510 or with the internal hash table depending on the mode of operation of
511 the master.
512
6d4e4fbc
JM
5132011-08-30 Javier Miranda <miranda@adacore.com>
514
515 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
516 interface type then do not generate code to compare this component.
517 Required since they have no components and their equality operator is
518 abstract.
519
d15f9422
AC
5202011-08-30 Steve Baird <baird@adacore.com>
521
522 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
523 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
524 returns the (static) accessibility level of the object. Otherwise, the
525 same as Type_Access_Level.
526 (Dynamic_Accessibility_Level): New function; given an expression which
527 could occur as the rhs of an assignment to a saooaaat (i.e., an
528 expression of an access-to-object type), return the new value for the
529 saooaaat's associated Extra_Accessibility object.
530 (Effective_Extra_Accessibility): New function; same as
531 Einfo.Extra_Accessibility except that object renames are looked through.
532 * sem_util.adb
533 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
534 (Dynamic_Accessibility_Level): New function; see sem_util.ads
535 description.
536 (Effective_Extra_Accessibility): New function; see sem_util.ads
537 description.
538 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
539 (Extra_Accessibility): Update comments.
540 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
541 except RM_Size field (which is only for types) is unaffected.
542 * einfo.adb
543 (Extra_Accessibility): Expand domain to allow objects, not just formals.
544 (Set_Extra_Accessibility): Expand domain to allow objects, not just
545 formals.
546 (Init_Size): Add assertion that we are not trashing the
547 Extra_Accessibility attribute of an object.
548 (Init_Size_Align): Add assertion that we are not trashing the
549 Extra_Accessibility attribute of an object.
550 (Init_Object_Size_Align): New procedure; see einfo.ads description.
551 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
552 differently for the type of a (non-library-level) saooaaat depending
553 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
554 is queried in this set of changes - everything else (in particular,
555 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
556 driven off of the setting of the Is_Local_Anonymous_Access attribute.
557 The special treatment of library-level saooaaats is an optimization,
558 not required for correctnesss. This is based on the observation that the
559 Ada2012 rules (static and dynamic) for saooaaats turn out to be
560 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
561 * exp_ch3.adb
562 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
563 false for the type of a saooaaat, declare and initialize its
564 accessibility level object and set the Extra_Accessibility attribute
565 of the saooaaat to refer to this object.
566 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
567 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
568 calls to Effective_Extra_Accessibility in order to support
569 renames of saooaaats.
570 (Expand_N_Type_Conversion): Add new local function,
571 Has_Extra_Accessibility, and call it when determining whether an
572 accessibility check is needed.
573 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
574 evaluate to True (without raising an exception).
575 * exp_ch5.adb
576 (Expand_N_Assignment_Statement): When assigning to an Ada2012
577 saooaaat, update its associated Extra_Accessibility object (if
578 it has one). This includes an accessibility check.
579 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
580 a saooaaat, update its Extra_Accessibility object too (if it
581 has one).
582 (Expand_Call): Replace a couple of calls to Type_Access_Level
583 with calls to Dynamic_Access_Level to handle cases where
584 passing a literal (any literal) is incorrect.
585 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
586 checks associated with "Saooaat := Some_Object'Access;"; this must
587 be rejected if Some_Object is declared in a more nested scope
588 than Saooaat.
589 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
590 assignment to a saooaaat even if Is_Local_Anonymous_Access
591 returns False for its type (indicating a 2012-style saooaaat).
592 * sem_ch8.adb
593 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
594 (which is only appropriate for objects, not types) with a call
595 of Init_Object_Size_Align in order to avoid trashing the
596 Extra_Accessibility attribute of a rename (the two attributes
597 share storage).
598 * sem_res.adb
599 (Valid_Conversion) Replace six calls to Type_Access_Level with
600 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
601 Ada2012 non-library-level saooaaat, the former returns library level
602 while the latter returns the (static) accessibility level of the
603 saooaaat. A type conversion to the anonymous type of a saooaaat
604 can only occur as part of an assignment to the saooaaat, so we
605 know that such a conversion must be in a lhs context, so Deepest
606 yields the result that we need. If such a conversion could occur,
607 say, as the operand of an equality operator, then this might not
608 be right. Also add a test so that static accessibilty checks are
609 performed for converting to a saooaaat's type even if
610 Is_Local_Anonymous_Access yields False for the type.
611
6122011-08-30 Javier Miranda <miranda@adacore.com>
613
614 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
615 controls generation of a warning associated with late declaration of
616 dispatching functions. Required to avoid generating spurious
617 warnings.
618
6cce2156
GD
6192011-08-30 Gary Dismukes <dismukes@adacore.com>
620
621 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
622 return object has an anonymous access type and the function's type is
623 a named access type.
624 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
625 conversions on implicit conversions, since such conversions can occur
626 for anonymous access cases due to expansion. Issue error for attempt
627 to rename an anonymous expression as an object of a named access type.
628 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
629 to indicate whether this function should report errors on invalid
630 conversions.
631 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
632 the expression is of an anonymous access type and the expected type is
633 a named general access type, rewrite the expression as a type
634 conversion, unless this is an expression of a membership test.
635 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
636 calling of Error_Msg_N on new formal Report_Errs.
637 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
638 calling of Error_Msg_NE on new formal Report_Errs.
639 (Valid_Conversion): Move declaration of this function to the package
640 spec, to allow calls from membership test processing. For Ada 2012,
641 enforce legality restrictions on implicit conversions of anonymous
642 access values to general access types, disallowing such conversions in
643 cases where the expression has a dynamic accessibility level (access
644 parameters, stand-alone anonymous access objects, or a component of a
645 dereference of one of the first two cases).
646 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
647 in the context of a named general access expected type.
648 * exp_ch4.adb Add with and use of Exp_Ch2.
649 (Expand_N_In): Add processing for membership tests applied to
650 expressions of an anonymous access type. First, Valid_Conversion is
651 called to check whether the test is statically False, and then the
652 conversion is expanded to test that the expression's accessibility
653 level is no deeper than that of the tested type. In the case of
654 anonymous access-to-tagged types, a tagged membership test is applied
655 as well.
656 (Tagged_Membership): Extend to handle access type cases, applying the
657 test to the designated types.
658 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
659 accessibility level, and the actual is a 'Access applied to a current
660 instance, pass the accessibility level of the type of the current
661 instance rather than applying Object_Access_Level to the prefix. Add a
662 ??? comment, since this level isn't quite right either (will eventually
663 need to pass an implicit level parameter to init procs).
664
747de90b
AC
6652011-08-30 Bob Duff <duff@adacore.com>
666
667 * s-taskin.ads: Minor comment fix.
668
6692011-08-30 Ed Schonberg <schonberg@adacore.com>
670
671 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
672 component and the selector is a dispatching operation, check if it is
673 a prefixed call before rewriting as a parameterless function call.
674
cdc4cc65
JJ
6752011-08-29 Jakub Jelinek <jakub@redhat.com>
676
677 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
678 tsystem.h into $(RTSDIR) instead of rts.
679
226a7fa4
AC
6802011-08-29 Robert Dewar <dewar@adacore.com>
681
682 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
683 reformatting.
684 * gcc-interface/Make-lang.in: Update dependencies.
685
6862011-08-29 Yannick Moy <moy@adacore.com>
687
688 * alfa.ads (Name_Of_Heap_Variable): New constant name.
689 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
690 table to hold dereferences.
691 (Add_ALFA_Xrefs): Take into account dereferences as special
692 reads/writes to the variable "HEAP".
693 (Enclosing_Subprogram_Or_Package): Move subprogram here.
694 (Generate_Dereference): New procedure to store a read/write dereferencew
695 in the table Drefs.
696 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
697 the special "HEAP" var.
698 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
699 in ALFA mode.
700 * sem_util.adb (Note_Possible_Modification): Store write dereference
701 in ALFA mode.
702
dfbcb149
HK
7032011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
704
705 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
706 ensures that the level of the subpool access type is not deeper than
707 that of the pool object.
708 * sem_util.adb (Object_Access_Level): Expand to handle defining
709 identifiers.
710 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
711 subpool handle name of a rewritten allocator.
712
1df4f514
AC
7132011-08-29 Robert Dewar <dewar@adacore.com>
714
715 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
716
7172011-08-29 Thomas Quinot <quinot@adacore.com>
718
719 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
720 values, we generate multiple triples of parameters in the TypeCode.
721 Bump Choice_Index for each such triple so that a subsequent default
722 choice is associated with the correct index in the typecode.
723
7242011-08-29 Ed Schonberg <schonberg@adacore.com>
725
726 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
727 container.
728 (First, Last): Handle properly an iterator over a null container.
729
7302011-08-29 Bob Duff <duff@adacore.com>
731
732 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
733 processing if we run across a node with no Scope. This can happen if
734 we're with-ing an library-level instance, and that instance got errors
735 that caused "instantiation abandoned".
736 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
737 an exception instead of using Assert, so it won't go into an infinite
738 loop, even when assertions are turned off.
739
7402011-08-29 Ed Schonberg <schonberg@adacore.com>
741
742 * a-coorse.adb: Proper handling of empty ordered sets.
743
14f0f659
AC
7442011-08-29 Johannes Kanig <kanig@adacore.com>
745
746 * debug.adb: Add comments.
747
8027b455
AC
7482011-08-29 Thomas Quinot <quinot@adacore.com>
749
750 * a-except.adb, a-except-2005.adb: Minor comment rewording and
751 reformatting.
752
7532011-08-29 Yannick Moy <moy@adacore.com>
754
755 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
756 declaration for Itypes in Alfa mode.
757
d85fd922
AC
7582011-08-29 Robert Dewar <dewar@adacore.com>
759
760 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
761 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
762 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
763 reformatting.
764
7652011-08-29 Tristan Gingold <gingold@adacore.com>
766
767 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
768 package spec.
769 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
770 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
771 while raising PE.
772
fd3d2680
AC
7732011-08-29 Robert Dewar <dewar@adacore.com>
774
775 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
776
7772011-08-29 Javier Miranda <miranda@adacore.com>
778
779 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
780 renamings of formal subprograms when the actual for a formal type is
781 class-wide.
782
dfbf013f
MH
7832011-08-29 Matthew Heaney <heaney@adacore.com>
784
785 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
786 to Target.
787
7882011-08-29 Matthew Heaney <heaney@adacore.com>
789
790 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
791 components of record type.
792 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
793 to Target.
794
a6dd3a54
ES
7952011-08-29 Ed Schonberg <schonberg@adacore.com>
796
797 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
798 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
799 container packages.
800
c54796e0
AC
8012011-08-29 Robert Dewar <dewar@adacore.com>
802
803 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
804 reformatting.
805
8062011-08-29 Matthew Heaney <heaney@adacore.com>
807
808 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
809 components of record type.
810
8112011-08-29 Bob Duff <duff@adacore.com>
812
813 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
814 by the termination handler.
815
9fd9d2be
AC
8162011-08-29 Yannick Moy <moy@adacore.com>
817
818 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
819 created in Alfa mode, instead of inserting artificial declarations of
820 non-Itypes in the tree.
821 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
822 know if an Itype has a corresponding declaration, as defined in
823 itypes.ads.
824
8252011-08-29 Yannick Moy <moy@adacore.com>
826
827 * gnat1drv.adb: Minor rewrite.
828
8292011-08-29 Bob Duff <duff@adacore.com>
830
831 * s-tasuti.adb (Make_Passive): Work around race condition in
832 Make_Independent, which can cause Wait_Count to be zero. So instead of
833 asserting that Wait_Count > 0, and then decrementing it, decrement it
834 only if Wait_Count > 0.
835 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
836 should be nonnegative, so declare them Natural instead of Integer.
837
833eaa8a
AC
8382011-08-29 Robert Dewar <dewar@adacore.com>
839
840 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
841 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
842 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
843 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
844 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
845
8462011-08-29 Tristan Gingold <gingold@adacore.com>
847
848 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
849
8502011-08-29 Vadim Godunko <godunko@adacore.com>
851
852 * s-parint.ads: Minor comment clarification.
853
8542011-08-29 Vincent Celier <celier@adacore.com>
855
856 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
857 may be used as identifiers.
858
8592011-08-29 Ed Schonberg <schonberg@adacore.com>
860
861 * a-coinho.ads: Minor reformating.
862
3a613a36
AC
8632011-08-29 Ed Schonberg <schonberg@adacore.com>
864
865 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
866 container of a derived type.
867
3a613a36
AC
8682011-08-29 Ed Schonberg <schonberg@adacore.com>
869
870 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
871 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
872
14848f57
AC
8732011-08-29 Pascal Obry <obry@adacore.com>
874
875 * exp_disp.adb: Minor comment fix.
876 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
877 to avoid warnings when compiling with -Wall.
878 (Make_Disp_Conditional_Select_Body): Likewise.
879 (Make_Disp_Timed_Select_Body): Likewise.
880
8812011-08-29 Ed Schonberg <schonberg@adacore.com>
882
883 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
884 an entity name, generate reference for it.
885
8862011-08-29 Ed Schonberg <schonberg@adacore.com>
887
888 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
889 iterator form.
890 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
891 the class-wide type.
892 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
893
8942011-08-29 Ed Schonberg <schonberg@adacore.com>
895
896 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
897 subtype for an object whose type is an unconstrained union.
898
8992011-08-29 Ed Schonberg <schonberg@adacore.com>
900
901 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
902 is allowed in a component definition, by AI95-406.
903
9042011-08-29 Matthew Heaney <heaney@adacore.com>
905
906 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
907
9082011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
909
910 * a-except-2005.adb: Alphabetize all routines.
911 (Triggered_By_Abort): New routine.
912 * a-except-2005.ads (Triggered_By_Abort): New routine.
913 * a-except.adb Alphabetize all routines.
914 (Triggered_By_Abort): New routine.
915 * a-except.ads (Triggered_By_Abort): New routine.
916 * exp_ch7.adb: Update all comments involving the detection of aborts in
917 finalization code.
918 (Build_Object_Declarations): Do not generate code to detect the
919 presence of an abort at the start of finalization code, use a runtime
920 routine istead.
921 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
922 RE_Unit_Table.
923 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
924 allocate a task on a subpool.
925 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
926 The flag disables all actions related to the maintenance of
927 Finalize_Address_Table when subpools are not in use.
928 (Allocate_Any_Controlled): Signal the machinery that subpools are in
929 use.
930 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
931 performs costly task locking when subpools are not in use.
932
57a8057a
AC
9332011-08-29 Yannick Moy <moy@adacore.com>
934
935 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
936 types and dispatching calls in Alfa mode.
937 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
938 correspondance between body and spec scopes, to reuse utility functions
939 (Traverse_Declarations_Or_Statements): Protect access to body for stub
940 by testing the presence of the library unit for the body
941 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
942 mode the expansion of accept statements is skipped
943 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
944 the unique entity corresponding to the one returned by
945 Unique_Defining_Entity applied to the enclosing declaration of the
946 argument.
947
9482011-08-29 Bob Duff <duff@adacore.com>
949
950 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
951 gdb when x is not a node (it can be a node list, name_id, etc). pp is
952 an alias for pn. ppp is an alias for pt.
953
9542011-08-29 Javier Miranda <miranda@adacore.com>
955
956 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
957 aggregate to take a consistent decision on the need to convert into
958 assignments aggregates that initialize constant objects.
959
9602011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
961
962 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
963 Build_Allocate_Deallocate_Proc in order to handle allocation of
964 non-controlled objects on subpools.
965 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
966 to be end-user visible.
967 * s-finmas.adb: Add with and use clause for System.HTable.
968 Add an instantiation of Simple_HTable which provides a mapping between
969 the address of a controlled object and the corresponding
970 Finalize_Address used to clean up the object. The table is used when a
971 master is operating in heterogeneous mode.
972 (Attach): Explain why the input node is not verified on being already
973 attached.
974 (Delete_Finalize_Address): New routine.
975 (Detach): Add pragma Assert which ensures that a node is already
976 attached.
977 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
978 since nodes are no longer removed on traversal. Explain why node
979 detachment is undesirable in this case.
980 (Get_Finalize_Address): New routine.
981 (Hash): New routine.
982 (Is_Empty_List): Removed.
983 (pm): Renamed to Print_Master. Add output for discriminant
984 Is_Homogeneous.
985 Comment reformatting.
986 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
987 * s-finmas.ads: Various comments additions / improvements.
988 Type Finalization_Master has a discriminant which determines the mode of
989 operation.
990 (Delete_Finalize_Address): New routine.
991 (Get_Finalize_Address): New routine.
992 (pm): Renamed to Print_Master.
993 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
994 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
995 use clause for System.IO.
996 (Allocate_Any_Controlled): Add machinery to set TSS primitive
997 Finalize_Address depending on the mode of allocation and the mode of
998 the master.
999 (Deallocate_Any_Controlled): Remove the relation pair object -
1000 Finalize_Address regardless of the master mode. Add comment explaining
1001 the reason.
1002 (Detach): Ensure that fields Prev and Next are null after detachment.
1003 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1004 scheme to check whether the list of subpools is empty. There is no
1005 longer need to store the next subpool or advance the current pointer.
1006 (Is_Empty_List): New routine.
1007 (Print_Pool): New routine.
1008 (Print_Subpool): New routine.
1009 * s-stposu.ads: Various comments additions / improvements.
1010 Field Master of type Root_Subpool is now a heterogeneous collection.
1011 (Print_Pool): New routine.
1012 (Print_Subpool): New routine.
1013
10142011-08-29 Ed Schonberg <schonberg@adacore.com>
1015
1016 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1017 forms, using aspects of container types.
1018 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1019 Has_Implicit_Dereference flags, that may be set on the partial view.
1020 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1021 container type with an indexing aspect.
1022 (Analyze_Quantified_Expression): Analyze construct with expansion
1023 disabled, because it will be rewritten as a loop during expansion.
1024 (Try_Container_Indexing): The prefix itself may be a container type
1025 with an indexing aspect, as with a vector of vectors.
1026 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1027 the original doamin of iteration, for name capture.
1028 (Analyze_Iterator_Specification): If the domain is an expression that
1029 needs finalization, create a separate declaration for it.
1030 For an iterator with "of" retrieve default iterator info from aspect of
1031 container type. For "in" iterator, retrieve type of Iterate function.
1032 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1033 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1034 analysis, to prevent spurious errors about late attributes.
1035 * sprint.adb: Handle quantified expression with either loop or iterator
1036 specification.
1037 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1038 iterator.
1039
ddf67a1d
AC
10402011-08-29 Vincent Celier <celier@adacore.com>
1041
1042 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1043 Binder or Linker of the main project file.
1044
10452011-08-29 Ed Schonberg <schonberg@adacore.com>
1046
1047 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1048 unit.
1049
10502011-08-29 Yannick Moy <moy@adacore.com>
1051
1052 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1053
10542011-08-29 Yannick Moy <moy@adacore.com>
1055
1056 * exp_ch11.adb: Minor expansion of comment.
1057
10582011-08-29 Yannick Moy <moy@adacore.com>
1059
1060 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1061
10622011-08-29 Ed Schonberg <schonberg@adacore.com>
1063
1064 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1065 interpretation, set the type before resolving the operands, because
1066 legality checks on an exponention operand need to know the type of the
1067 context.
1068
10692011-08-29 Ed Schonberg <schonberg@adacore.com>
1070
1071 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1072 cleanups on a master if the instance is within a generic unit.
1073 Complement to the corresponding fix to inline.adb for K520-030.
1074
10752011-08-29 Tristan Gingold <gingold@adacore.com>
1076
1077 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1078 occurrence.
1079 * exp_intr.adb: Minor comment fix.
1080
10812011-08-29 Bob Duff <duff@adacore.com>
1082
1083 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1084 Delay_Required was used as an uninitialized variable.
1085
690943fc
RD
10862011-08-29 Robert Dewar <dewar@adacore.com>
1087
1088 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1089 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1090 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1091
9f0ee988
TQ
10922011-08-29 Thomas Quinot <quinot@adacore.com>
1093
1094 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1095 Remove unused variables.
1096
3e24afaa
AC
10972011-08-29 Ed Schonberg <schonberg@adacore.com>
1098
1099 * sem_res.adb: Remove Build_Explicit_Dereference.
1100 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1101 from sem_res.adb, used in analysis of additional constructs.
1102 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1103 expansion of iterators.
1104 (Is_Object_Reference): Recognize variables rewritten as explicit
1105 dereferences in Ada2012.
1106 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1107 Reversible_Iterator names, for expansion of Ada2012 iterators.
1108 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1109 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1110 linked list container.
1111 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1112 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1113
11142011-08-29 Ed Schonberg <schonberg@adacore.com>
1115
1116 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1117 containers.
1118
11192011-08-29 Vincent Celier <celier@adacore.com>
1120
1121 * make.adb (Gnatmake): Get the maximum number of simultaneous
1122 compilation processes after the Builder switches has been scanned, as
1123 there may include -jnn.
1124
11252011-08-29 Matthew Heaney <heaney@adacore.com>
1126
1127 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1128
11292011-08-29 Tristan Gingold <gingold@adacore.com>
1130
1131 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1132 GNAT_DRIVER_COMMAND_LINE to 255.
1133
11342011-08-29 Pascal Obry <obry@adacore.com>
1135
1136 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1137 reformatting and style fix (class attribute casing).
1138
11392011-08-29 Yannick Moy <moy@adacore.com>
1140
1141 * exp_ch11.adb: Yet another case where expansion should be common
1142 between CodePeer and Alfa.
1143
11442011-08-29 Yannick Moy <moy@adacore.com>
1145
1146 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1147
11482011-08-29 Ed Schonberg <schonberg@adacore.com>
1149
1150 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1151 incomplete type and its completion match.
1152
3ddd922e
AC
11532011-08-29 Yannick Moy <moy@adacore.com>
1154
1155 * exp_ch13.adb: Adjust previous change.
1156
11572011-08-29 Robert Dewar <dewar@adacore.com>
1158
1159 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1160 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1161 Minor reformatting.
1162
444acbdd
AC
11632011-08-29 Emmanuel Briot <briot@adacore.com>
1164
1165 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1166 initialize aggregated projects.
1167
11682011-08-29 Ed Schonberg <schonberg@adacore.com>
1169
1170 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1171 depth of candidates to resolve a potentially spurious ambiguity between
1172 two visible subprograms.
1173
e0296583
AC
11742011-08-29 Yannick Moy <moy@adacore.com>
1175
1176 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1177 Requires/Ensures.
1178 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1179 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1180 Requires/Ensures.
1181
11822011-08-29 Arnaud Charlet <charlet@adacore.com>
1183
1184 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1185 Add comment.
1186
11872011-08-29 Thomas Quinot <quinot@adacore.com>
1188
1189 * sem_res.adb: Minor reformatting.
1190
69794413
JK
11912011-08-29 Johannes Kanig <kanig@adacore.com>
1192
1193 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1194 mode.
1195 * gnat1drv.adb (Adjust_Global_Switches): Set
1196 Use_Expressions_With_Actions to False in ALFA mode.
1197 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1198 ALFA mode.
1199
59e6b23c
AC
12002011-08-29 Yannick Moy <moy@adacore.com>
1201
1202 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1203 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1204 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1205 tagged types and dispatching calls in Alfa mode.
1206
12072011-08-29 Javier Miranda <miranda@adacore.com>
1208
1209 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1210 we do not report an error on an Empty node.
1211
12122011-08-29 Geert Bosch <bosch@adacore.com>
1213
1214 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1215 a-nlrear.o and a-nurear.o.
1216
12172011-08-29 Robert Dewar <dewar@adacore.com>
1218
1219 * freeze.adb: Minor code reorganization.
1220 Minor reformatting.
1221 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1222 sem_ch6.adb: Minor reformatting
1223
12242011-08-29 Tristan Gingold <gingold@adacore.com>
1225
1226 * s-except.ads, s-except.adb: Provide dummy body.
1227
12282011-08-29 Yannick Moy <moy@adacore.com>
1229
1230 * sem_warn.adb (Within_Postcondition): Take into account the case of
1231 an Ensures component in a Test_Case.
1232
4d792549
AC
12332011-08-29 Tristan Gingold <gingold@adacore.com>
1234
1235 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1236 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1237 System_Exceptions_Debug
1238 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1239 * a-except.adb: With and use System.Exceptions_Debug instead of
1240 System.Exceptions.
1241 * a-except-2005.adb: Likewise.
1242 * s-assert.adb: Likewise.
1243 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1244 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1245 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1246 s-excdeb. Update dependencies.
1247 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1248 as these no longer need external libraries.
1249
12502011-08-29 Ed Schonberg <schonberg@adacore.com>
1251
1252 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1253 exponentiation operator on universal values in a context that requires
1254 a fixed-point type.
1255
12562011-08-29 Tristan Gingold <gingold@adacore.com>
1257
1258 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1259 before calling notify_handled_exception.
1260 * a-exextr.adb: Fix comment.
1261
b254da66
AC
12622011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1263
1264 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1265 Finalize_Address of the access type's finalization master.
1266 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1267 access type's finalization master. Add a guard to prevent
1268 Associated_Storage_Pool from being set on .NET/JVM.
1269 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1270 attribute Finalize_Address of the access type's finalization master.
1271 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1272 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1273 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1274 RE_Unit_Table.
1275 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1276 use clause for System.IO
1277 (Detach): Relax the assertion, to be reinstated later.
1278 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1279 Relax the assertion on Finalize_Address, to be reinstated later.
1280 (Is_Empty_List): New routine.
1281 (pm): New debug routine.
1282 (Set_Finalize_Address): New routine.
1283 * s-finmas.ads (pm): New debug routine.
1284 (Set_Finalize_Address): New routine.
1285 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1286
12872011-08-29 Tristan Gingold <gingold@adacore.com>
1288
1289 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1290 Remove convention C.
1291
12922011-08-29 Tristan Gingold <gingold@adacore.com>
1293
1294 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1295 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1296 (Finalize_TCB): Remove its finalization.
1297 (Initialize): Remove assignment of GET_Exc_Stack_Addr
1298 * s-soflin.adb (NT_Exc_Stack): Remove
1299 (Get_Exc_Stack_Addr_NT): Likewise.
1300 (Get_Exc_Stack_Addr_Soft): Likewise.
1301 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1302 (Get_Exc_Stack_Addr): Likewise.
1303 (Get_Exc_Stack_Addr_Soft): Likewise
1304 * s-taspri-vms.ads (Exc_Stack_T): Remove.
1305 (Exc_Stack_Ptr_T): Likewise.
1306 (Private_Data): Remove Exc_Stack_Ptr component.
1307
13082011-08-29 Tristan Gingold <gingold@adacore.com>
1309
1310 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1311
13122011-08-29 Tristan Gingold <gingold@adacore.com>
1313
1314 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1315
13162011-08-29 Geert Bosch <bosch@adacore.com>
1317
1318 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1319 L2_Norm, Swap_Column): New generic subprograms
1320 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1321 L2_Norm, Swap_Column): Implement new subprograms in order to
1322 eliminate dependency on BLAS and LAPACK libraries in
1323 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1324 version. Forward_Eliminate/Back_Substitute can be used to put a
1325 matrix in row echelon or reduced row echelon form using partial
1326 pivoting.
1327 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1328 Swap_Column): Instantiate from System.Generic_Array_Operations.
1329 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1330 (Sqrt): Local function for simple computation of square root without
1331 adding dependencies on Generic_Elementary_Functions.
1332 (Swap): New subprogram to exchange floating point numbers.
1333 (Inverse): Reimplement using Jordan-Gauss elimination.
1334 (Jacobi): New procedure implementing Jacobi's method for computation
1335 of eigensystems, based on Rutishauser's implementation.
1336 (L2_Norm): Implement directly using the inner product.
1337 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1338 decreasing eigenvalue as required by the Ada RM.
1339 (Swap_Column): New helper procedure for Sort_Eigensystem.
1340 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1341 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1342 Sort_Eigensystems.
1343
13442011-08-29 Thomas Quinot <quinot@adacore.com>
1345
1346 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1347 statements line.
1348
60370fb1
AC
13492011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1350
1351 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1352 than the current node.
1353 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1354 Finalization_Master. The list headers have two fields instead of three.
1355 This should fix alignment issue but subpool allocations are now
1356 unusable. Alphabetize subprograms.
1357 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1358 the size of the header when converting the beginning of the object to
1359 a FM_Node. Set the master's Finalize_Address attribute if not already
1360 set.
1361 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1362 header when converting the beginning of the object to a FM_Node.
1363
13642011-08-29 Gary Dismukes <dismukes@adacore.com>
1365
1366 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1367 reraise when compiling for CodePeer.
1368
13692011-08-29 Arnaud Charlet <charlet@adacore.com>
1370
1371 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1372 now needed by a-convec.adb. Fix warning.
1373
13742011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1375
1376 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1377 processing of TSS routine Finalize_Address when compiling in
1378 CodePeer_Mode.
1379
13802011-08-29 Thomas Quinot <quinot@adacore.com>
1381
1382 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1383 sem_warn.adb: Minor reformatting.
1384
13852011-08-29 Emmanuel Briot <briot@adacore.com>
1386
1387 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1388 languages from aggregated projects.
1389
13902011-08-29 Yannick Moy <moy@adacore.com>
1391
1392 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1393 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1394 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1395 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1396 for stubs are traversed too when parameter is set
1397 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1398 (Traverse_Declarations_Or_Statements): Do the special traversing for
1399 stubs when required.
1400 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1401 return subprogram or package body from stub.
1402 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1403 stubs without prior subprogram decl.
1404
14052011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1406
1407 * gnat_ugn.texi: Fix typo.
1408
e9c9d122
HK
14092011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1410
1411 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1412 which accounts for size vs alignment issues and calculates the size of
1413 the list header.
1414 (Deallocate_Any_Controlled): Ditto.
1415 (Nearest_Multiple_Rounded_Up): New routine.
1416
25ebc085
AC
14172011-08-29 Tristan Gingold <gingold@adacore.com>
1418
1419 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1420 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1421 (Set_Exception_Msg): Ditto.
1422 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1423 Private_Data.
1424 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1425 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1426 (Raise_With_Msg): Remove Cleanup_Flag.
1427 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1428 Clean_Flag and Private_Data components.
1429
14302011-08-29 Yannick Moy <moy@adacore.com>
1431
1432 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1433 in CodePeer mode.
1434 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1435 of an explicitly declared type, so that the base types of the original
1436 type and this generated type are the same, and a "type" (not a subtype
1437 like previously).
1438 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1439 small" in Alfa mode, like in CodePeer mode.
1440 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1441 clauses in Alfa mode.
1442
14432011-08-29 Javier Miranda <miranda@adacore.com>
1444
1445 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1446 function to the package spec.
1447 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1448 internally generated bodies of null procedures locate the internally
1449 generated spec enforcing mode conformance.
1450 (Is_Interface_Conformant): Ensure that the controlling formal of the
1451 primitives match.
1452
14532011-08-29 Ed Schonberg <schonberg@adacore.com>
1454
1455 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1456 reject the pragma if it appears to apply to a formal subprogram.
1457
14582011-08-29 Ed Schonberg <schonberg@adacore.com>
1459
1460 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1461 inner expression, to prevent double evaluation.
1462
590549fb
AC
14632011-08-29 Tristan Gingold <gingold@adacore.com>
1464
1465 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1466 they were unused.
1467 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1468 * a-except-2005.adb (Propagate_Exception): Adjust spec.
1469 (Raise_Current_Excep): Adjust call.
1470 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1471
14722011-08-29 Thomas Quinot <quinot@adacore.com>
1473
1474 * exp_disp.adb: Minor reformatting.
1475
62380e66
TG
14762011-08-29 Tristan Gingold <gingold@adacore.com>
1477
1478 * a-exexpr.adb (Setup_Exception): Removed.
1479 * a-exexpr-gcc.adb (Setup_Exception): Removed.
1480 * a-except.adb (Exception_Propagation): Removed.
1481 * a-except-2005.adb (Setup_Exception): Removed.
1482 (Reraise): Remove call to Setup_Exception.
1483 (Reraise_Occurrence): Ditto.
1484 (Reraise_Occurrence_Always): Ditto.
1485 (Reraise_Occurrence_No_Defer): Ditto.
1486 (Transfer_Occurrence): Ditto.
1487 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1488 (Set_Exception_Msg): Ditto.
1489
c95aa61c
AC
14902011-08-29 Robert Dewar <dewar@adacore.com>
1491
1492 * a-convec.adb, exp_disp.adb: Minor reformatting.
1493
14942011-08-29 Tristan Gingold <gingold@adacore.com>
1495
1496 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1497
624e1688
AC
14982011-08-29 Gary Dismukes <dismukes@adacore.com>
1499
1500 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1501 Exception_Handlers to No_List instead of Empty_List in the case where
1502 there are no handlers.
1503
15042011-08-29 Tristan Gingold <gingold@adacore.com>
1505
1506 * gcc-interface/gigi.h (enum standard_datatypes): Add
1507 ADT_reraise_zcx_decl
1508 (reraise_zcx_decl): New macro.
1509 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1510 (gigi): Set reraise_zcx_decl.
1511 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1512 (gnat_to_gnu): Handle N_Raise_Statement.
1513
7134062a
AC
15142011-08-29 Robert Dewar <dewar@adacore.com>
1515
1516 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1517 a-undesu.adb: Minor reformatting.
1518
15192011-08-29 Ed Schonberg <schonberg@adacore.com>
1520
1521 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1522 table, accept an unfrozen untagged component if it is an actual for a
1523 formal incomplete type.
1524 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1525 provide new iterator forms over vectors.
1526 Introduce type Iterator in package body to implement operations of
1527 Reversible_Iterator interface.
1528 * a-iteint.ads: Make package pure so it is usable with new container
1529 packages, that are categorized Remote_Types.
1530
ca5af305
AC
15312011-08-29 Robert Dewar <dewar@adacore.com>
1532
1533 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1534
15352011-08-29 Bob Duff <duff@adacore.com>
1536
1537 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1538 of <>, because this is the routine that checks for dimensionality
1539 errors (for example, for a two-dimensional array, (others => <>) should
1540 be (others => (others => <>)).
1541
15422011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1543
1544 * impunit.adb: Add new run-time units.
1545 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1546 s-stposu.ads, s-stposu.adb: Code clean up.
1547 Handle protected class-wide or task class-wide types
1548 Handle C/C++/CIL/Java types.
1549 * s-spsufi.adb, s-spsufi.ads: New files.
1550
5accd7b6
AC
15512011-08-29 Yannick Moy <moy@adacore.com>
1552
1553 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1554 library-level subprogram.
1555 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1556 placement.
1557 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1558 component.
1559 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1560 component.
1561 * gnat_rm.texi: Update doc for Test_Case pragma.
1562
15632011-08-29 Tristan Gingold <gingold@adacore.com>
1564
1565 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
1566 convention C.
1567 (GCC_Exception_Access): New type.
1568 (Unwind_DeleteException): New imported procedure
1569 (Foreign_Exception): Import it.
1570 (GNAT_GCC_Exception): Simply have the occurrence inside.
1571 (To_GCC_Exception): New function.
1572 (To_GNAT_GCC_Exception): New function.
1573 (GNAT_GCC_Exception_Cleanup): New procedure..
1574 (Propagate_GCC_Exception): New procedure.
1575 (Reraise_GCC_Exception): New procedure.
1576 (Setup_Current_Excep): New procedure.
1577 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
1578 (Unwind_RaiseException): Ditto.
1579 (Unwind_ForcedUnwind): Ditto.
1580 (Remove): Removed.
1581 (Begin_Handler): Change type of parameter.
1582 (End_Handler): Ditto. Now delete the exception if still present.
1583 (Setup_Key): Removed.
1584 (Is_Setup_And_Not_Propagated): Removed.
1585 (Set_Setup_And_Not_Propagated): Ditto.
1586 (Clear_Setup_And_Not_Propagated): Ditto.
1587 (Save_Occurrence_And_Private): Ditto.
1588 (EID_For): Add 'not null' constraint on parameter.
1589 (Setup_Exception): Does nothing.
1590 (Propagate_Exception): Simplified.
1591 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
1592 re-raise is not expanded anymore.
1593 * s-except.ads (Foreign_Exception): New exception - placeholder for
1594 non Ada exceptions.
1595 * raise-gcc.c (__gnat_setup_current_excep): Declare
1596 (CXX_EXCEPTION_CLASS): Define (not yet used)
1597 (GNAT_EXCEPTION_CLASS): Define.
1598 (is_handled_by): Handle foreign exceptions.
1599 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
1600
16012011-08-29 Jose Ruiz <ruiz@adacore.com>
1602
1603 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
1604
2ef48385
AC
16052011-08-29 Thomas Quinot <quinot@adacore.com>
1606
1607 * a-synbar-posix.adb: Minor reformatting.
1608
16092011-08-29 Jose Ruiz <ruiz@adacore.com>
1610
1611 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
1612 a-exetim-default.ads (Interrupt_Clocks_Supported,
1613 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1614 definitions to be compliant with AI-0171. The target systems do not
1615 support separate account for the execution time of interrupt handlers.
1616
16172011-08-29 Jose Ruiz <ruiz@adacore.com>
1618
1619 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
1620 in the barrier to put first the easiest to evaluate (and the one which
1621 will be True more often). More efficient.
1622
16232011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1624
1625 * s-atocou-x86.adb: Fix constraint in machine code insertion.
1626
16272011-08-29 Bob Duff <duff@adacore.com>
1628
1629 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
1630 attributes that are now aspects, as specified by AI05-0229-1.
1631 * sem_ch13.adb (Analyze_Aspect_Specifications,
1632 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
1633 pragmas or attribute references, as appropriate.
1634
0db16b1e
AC
16352011-08-29 Robert Dewar <dewar@adacore.com>
1636
1637 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
1638 a-synbar-posix.ads: Minor reformatting.
1639
16402011-08-29 Yannick Moy <moy@adacore.com>
1641
1642 * snames.ads-tmpl: Add name Force.
1643
978ffe02
AC
16442011-08-29 Pascal Obry <obry@adacore.com>
1645
1646 * prj-nmsc.adb: Minor reformatting.
1647
16482011-08-29 Jose Ruiz <ruiz@adacore.com>
1649
1650 * a-exetim.ads (Interrupt_Clocks_Supported,
1651 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1652 definitions to be compliant with AI-0171.
1653
16542011-08-29 Robert Dewar <dewar@adacore.com>
1655
1656 * a-ngelfu.adb: Add comments.
1657
718f39dc
AC
16582011-08-29 Geert Bosch <bosch@adacore.com>
1659
1660 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
1661 the closest machine number to Pi / 2.0.
1662
16632011-08-29 Jose Ruiz <ruiz@adacore.com>
1664
1665 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
1666 package Ada.Synchronous_Barriers.
1667 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
1668 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
1669 default implementation using protected objects and another one
1670 a-synbar-posix using POSIX barriers as the underlying support.
1671 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
1672 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
1673 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
1674 Clean up dependencies.
1675 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
1676
ee2e3f6b
AC
16772011-08-29 Robert Dewar <dewar@adacore.com>
1678
1679 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1680 exp_dist.adb: Minor code reorganization.
1681 Minor reformatting.
1682
16832011-08-29 Thomas Quinot <quinot@adacore.com>
1684
1685 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1686 primitive operation must support external streaming if it is not a
1687 controlling access result.
1688
646e2823
AC
16892011-08-29 Thomas Quinot <quinot@adacore.com>
1690
1691 * sinfo.ads, sem_ch7.adb: Minor reformatting.
1692
16932011-08-29 Bob Duff <duff@adacore.com>
1694
1695 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1696 restriction on allocators, as required by AI05-0013-1.
1697 * restrict.ads: Minor comment fix.
1698
5d59eef2
AC
16992011-08-29 Tristan Gingold <gingold@adacore.com>
1700
1701 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1702 (To_Jmpbuf_Address): Ditto
1703 (builtin_longjmp): Ditto
1704
17052011-08-29 Thomas Quinot <quinot@adacore.com>
1706
1707 * sem_res.adb: Minor reformatting.
1708
17092011-08-29 Vincent Celier <celier@adacore.com>
1710
1711 * make.adb (Gnatmake): Move special processing for VM targets after the
1712 call to Get_Target_Parameters.
1713
17142011-08-29 Thomas Quinot <quinot@adacore.com>
1715
1716 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1717
949a18cc
AC
17182011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1719
1720 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1721 where an anonymous access discriminant of a limited designated type
1722 appears in a non-immutably limited discriminated type and issue an
1723 error message. Add local variable Desig_T and replace all occurrences
1724 of Designated_Type.
1725
17262011-08-29 Jose Ruiz <ruiz@adacore.com>
1727
1728 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1729 implementation is compliant to RM D.15(15/2) after the modification
1730 imposed by AI05-0094-1 (binding interpretation).
1731
cb25faf8
AC
17322011-08-29 Robert Dewar <dewar@adacore.com>
1733
1734 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1735 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1736
17372011-08-29 Thomas Quinot <quinot@adacore.com>
1738
1739 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1740 the scope name, do not report a missing label as a style violation (it
1741 will be diagnosed as an illegality).
1742 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1743 variant records: Get_Enum_Lit_From_Pos already returns a usage
1744 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1745 on Expr in Integer_Literal case so that it can be used by
1746 Build_To_Any_Call.
1747
1d10f669
AC
17482011-08-29 Tristan Gingold <gingold@adacore.com>
1749
1750 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1751 Adjust comment.
1752 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1753 (Build_Abort_Block_Handler): New function to build an Abort_Signal
1754 exception handler.
1755 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1756 Build_Abort_Block_Handler to build the exception handler. Do not
1757 undefer aborts for the Abort_Signal exception handler if back-end
1758 exception mechanism.
1759 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1760 back_end exceptions for all others and abort_signal.
1761 * s-except.ads (ZCX_By_Default): New constant.
1762 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1763 (Raise_Exception_Always): Ditto.
1764 (Raise_From_Signal_Handler): Ditto.
1765 (Raise_With_Location_And_Msg): Ditto.
1766 (Raise_With_Msg): Ditto.
1767 (Reraise): Ditto.
1768 (Reraise_Occurence): Ditto.
1769 (Reraise_Occurrence_Always): Ditto.
1770 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1771 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1d10f669
AC
1772
17732011-08-29 Thomas Quinot <quinot@adacore.com>
1774
1775 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1776
d986066d
AC
17772011-08-29 Robert Dewar <dewar@adacore.com>
1778
1779 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1780 Minor code reorganization.
1781
17822011-08-29 Bob Duff <duff@adacore.com>
1783
1784 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1785 2012, not just Ada 2005.
1786
17872011-08-29 Vincent Celier <celier@adacore.com>
1788
1789 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1790 with a project file or with gprbuid, if -gnatep= is specified, the
1791 builder may need to be invoked with -x.
1792
17932011-08-29 Tristan Gingold <gingold@adacore.com>
1794
1795 * a-exexpr-gcc.adb: Minor comment fix.
1796
ff4f0ed0
AC
17972011-08-29 Robert Dewar <dewar@adacore.com>
1798
1799 * sem_ch8.adb: Minor reformatting.
1800
18012011-08-29 Bob Duff <duff@adacore.com>
1802
1803 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1804 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1805 treating "some" as unreserved in earlier Ada versions. This is now
1806 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1807 rather than Name_Some, since Tok_Some is now recognized as reserved.
1808 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1809 reserved word.
1810 * scans.ads: Minor comment fixes.
1811 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1812 for other language versions.
1813 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1814 treating "some" as unreserved in earlier Ada versions. This is now
1815 handled in Snames.Is_Keyword_Name.
1816 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1817 Ada 2012.
1818 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1819 unreserved in earlier Ada versions. This is now handled in
1820 Snames.Is_Keyword_Name.
1821 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1822 words as for other language versions.
1823 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1824 Ada 2012, not just Ada 2005.
1825
d941cee6
AC
18262011-08-29 Ed Schonberg <schonberg@adacore.com>
1827
1828 * sem_ch13.adb: Additional semantic checks for aspects involved in
1829 iterators.
1830
18312011-08-29 Matthew Heaney <heaney@adacore.com>
1832
1833 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1834 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1835 Container parameter.
1836 (Ancestor_Find): ditto.
1837
b970af39
TQ
18382011-08-29 Thomas Quinot <quinot@adacore.com>
1839
1840 * par-endh.adb: Minor reformatting.
d941cee6 1841
92db5dee
AC
18422011-08-29 Tristan Gingold <gingold@adacore.com>
1843
1844 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1845 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1846 (Adjust_N_CLeanups_For): Remove.
1847 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1848 stack is reached.
1849 (Propgate_Exception): Adjust.
1850 * raise-gcc.c: Add a few static/const.
1851 (Adjust_N_Cleanups_For): Remove declaration.
1852 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1853
18542011-08-29 Ed Schonberg <schonberg@adacore.com>
1855
1856 * sem_ch8.adb: Use type of function return when rewriting as object
1857 declaration.
1858
1378bf10
AC
18592011-08-29 Gary Dismukes <dismukes@adacore.com>
1860
1861 * sem_type.adb: Minor reformatting.
1862
18632011-08-29 Robert Dewar <dewar@adacore.com>
1864
1865 * makeutl.adb: Minor reformatting.
1866
18672011-08-29 Ed Schonberg <schonberg@adacore.com>
1868
1869 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1870 function call of a limited type, the expansion of the renaming is
1871 complicated by the presence of various temporaries and subtypes that
1872 capture constraints of the renamed object.
1873 Rewrite node as an object declaration, whose expansion is simpler.
1874 Given that the object is limited there is no copy involved and no
1875 performance hit.
1876
164e06c6
AC
18772011-08-29 Robert Dewar <dewar@adacore.com>
1878
1879 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1880 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1881
18822011-08-29 Tristan Gingold <gingold@adacore.com>
1883
1884 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1885 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1886 system-linux-hppa.ads, system-linux-s390.ads,
1887 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1888 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1889 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1890 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1891 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1892 system-solaris-sparc.ads, system-lynxos-x86.ads,
1893 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1894 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1895 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1896 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7d266442 1897 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
164e06c6
AC
1898 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1899 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1900 * opt.ads: Adjust comment.
1901 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1902 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1903 * system.ads: Move GCC_ZCX_Support to obsolete entries.
1904
19052011-08-29 Emmanuel Briot <briot@adacore.com>
1906
1907 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1908 file name is specified on the gnatmake or gprbuild command line, and
1909 before we search for that file in the project.
1910
19112011-08-29 Ed Schonberg <schonberg@adacore.com>
1912
1913 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1914 used to determine whether a possible interpretation for an overloadable
1915 entity is declared within the current instantiation and should be
1916 included in the candidate set.
1917
19182011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1919
1920 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1921
97216ca8
ES
19222011-08-29 Ed Schonberg <schonberg@adacore.com>
1923
1924 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1925 access subtype is access_to_subprogram, when applying checks for
1926 RM 3.10.2 (27).
1927
d3cb4cc0
AC
19282011-08-29 Matthew Heaney <heaney@adacore.com>
1929
1930 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1931 for sibling when common parent.
1932
19332011-08-29 Thomas Quinot <quinot@adacore.com>
1934
1935 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1936 "pragma_".
1937
19382011-08-29 Ed Schonberg <schonberg@adacore.com>
1939
1940 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1941 for the return type when in ASIS mode.
1942
19432011-08-29 Vincent Celier <celier@adacore.com>
1944
1945 * make.adb (Gnatmake): Get the default search dirs, then the target
1946 parameters after getting the Builder switches, as the Builder switches
1947 may include --RTS= and that could change the default search dirs.
1948
19492011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1950
1951 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1952 Make_Final_Call. Move the processing for class-wide types before the
1953 processing for derivations from [Limited_]Controlled.
1954 (Make_Final_Call): Move the processing for class-wide types before the
1955 processing for derivations from [Limited_]Controlled.
1956 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1957 Add code to account for alignments larger than the list header. Add a
1958 comment illustrating the structure of the allocated object + padding +
1959 header.
1960 (Deallocate_Any_Controlled): Add code to account for alignments larger
1961 than the list header.
1962
19632011-08-29 Ed Schonberg <schonberg@adacore.com>
1964
1965 * sinfo.ads, sinfo.adb: New node kind
1966 N_Formal_Incomplete_Type_Definition, related flags.
1967 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1968 Parse formal incomplete types.
1969 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1970 sem_ch12.
1971 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1972 Formal incomplete types do not need completion.
1973 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1974 Validate_Incomplete_Type_Instance): New procedures to handle formal
1975 incomplete types.
1976 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1977 that corresponds to a formal incomplete type.
1978 * sprint.adb: Handle formal incomplete type declarations.
1979 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1980 an insertion point.
1981
d3f70b35
AC
19822011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1983
1984 * a-fihema.ads, a-fihema.adb: Unit removed.
1985 * a-undesu.ads, a-undesu.adb: New unit implementing
1986 Ada.Unchecked_Deallocate_Subpool.
1987 * einfo.adb: Remove Associated_Collection from the node usage.
1988 Add Finalization_Master to the node usage.
1989 (Associated_Collection): Removed.
1990 (Finalization_Master): New routine.
1991 (Set_Associated_Collection): Removed.
1992 (Set_Finalization_Master): New routine.
1993 (Write_Field23_Name): Remove Associated_Collection from the output. Add
1994 Finalization_Master to the output.
1995 * einfo.ads: Remove attribute Associated_Collection and its uses in
1996 entities.
1997 Add new attribute Finalization_Master along with its uses in entitites.
1998 (Associated_Collection): Removed along with its pragma import.
1999 (Finalization_Master): New routine along with a pragma import.
2000 (Set_Associated_Collection): Removed along with its pragma import.
2001 (Set_Finalization_Master): New routine along with a pragma import.
2002 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2003 Build_Finalization_Collection with Build_Finalization_Master.
2004 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2005 before the bodies of the predefined routines. Add comment explaining
2006 this. Replace call to Build_Finalization_Collection with
2007 Build_Finalization_Master.
2008 (Freeze_Type): Replace call to Build_Finalization_Collection with
2009 Build_Finalization_Master.
2010 (Make_Finalize_Address_Body): Comment reformatting.
2011 (Make_Predefined_Primitive_Specs): Code reformatting.
2012 (Stream_Operation_OK): Update comment mentioning finalization
2013 collections. Replace RE_Finalization_Collection with
2014 RE_Finalization_Master.
2015 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2016 Associated_Collection with Finalization_Master. Replace call to
2017 Build_Finalization_Collection with Build_Finalization_Master.
2018 (Expand_Allocator_Expression): Replace call to Associated_Collection
2019 with Finalization_Master. Replace call to Set_Associated_Collection with
2020 Set_Finalization_Master. Remove the generation of
2021 Set_Finalize_Address_Ptr.
2022 (Expand_N_Allocator): Replace call to Associated_Collection with
2023 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2024 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2025 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2026 comment on usage. Replace call to Needs_BIP_Collection with
2027 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2028 BIP_Finalization_Master. Update all comments which mention finalization
2029 collections. Replace Associated_Collection with
2030 Finalization_Master. Replace Build_Finalization_Collection with
2031 Build_Finalization_Master.
2032 (BIP_Formal_Suffix): Update BIP_Collection's case.
2033 (Build_Heap_Allocator): Update the related comment. Rename local
2034 variable Collect to Fin_Mas_Id and update its occurrences. Update
2035 comments which mention finalization collections. Replace
2036 Set_Associated_Collection with Set_Finalization_Master.
2037 (Expand_Call): Update the code which detects a special piece of library
2038 code for .NET/JVM.
2039 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2040 Add_Collection_Actual_To_Build_In_Place_Call with
2041 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2042 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2043 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2044 Add_Collection_Actual_To_Build_In_Place_Call with
2045 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2046 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2047 Add_Collection_Actual_To_Build_In_Place_Call with
2048 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2049 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2050 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2051 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2052 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2053 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2054 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2055 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2056 Replace the call to Associated_Collection with Finalization_Master.
2057 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2058 Update the way finalization master names are generated. Update the
2059 retrieval of the correct access type which will carry the pool and
2060 master attributes.
2061 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2062 (Make_Finalize_Address_Body): Abstract types do not need
2063 Finalize_Address. Code reformatting.
2064 (Make_Finalize_Address_Stmts): Update comment on usage.
2065 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2066 (Process_Declarations): Update comments.
2067 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2068 Build_Finalization_Master. Update associated comment.
2069 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2070 * exp_ch13.adb: Update comments which mention finalization collections.
2071 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2072 with Finalization_Master.
2073 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2074 create calls to routines Allocate_Any_Controlled and
2075 Deallocate_Any_Controlled.
2076 (Find_Finalize_Address): New routine.
2077 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2078 comparison.
2079 (Requires_Cleanup_Actions): Update the comment on freeze node
2080 inspection.
2081 * exp_util.ads: Remove comment on generated code for
2082 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2083 is better to simply look in the body.
2084 * freeze.adb (Freeze_All): Update the comment of finalization
2085 collections. Replace the call to Associated_Collection with
2086 Finalization_Master. Replace the call to Build_Finalization_Collection
2087 with Build_Finalization_Master.
2088 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2089 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2090 a-fihema.
2091 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2092 Ada.Finalization. Add processing for children of System.Storage_Pools.
2093 * rtsfind.ads: Remove the naming of second level children of
2094 Ada.Finalization.
2095 Remove Ada_Finalization_Heap_Management from the list of units.
2096 Remove subtype Ada_Finalization_Child.
2097 Remove the following subprogram entities:
2098
2099 RE_Allocate
2100 RE_Deallocate
2101 RE_Finalization_Collection
2102 RE_Finalization_Collection_Ptr
2103 RE_Set_Finalize_Address_Ptr
2104
2105 Add the naming of second level children of System.Storage_Pools.
2106 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2107 the list of units.
2108 Add subtype System_Storage_Pools_Child.
2109 Add the following subprogram entities to System.Finalization_Masters:
2110
2111 RE_Finalization_Master
2112 RE_Finalization_Master_Ptr
2113
2114 Add the following subprogram entities to System.Storage_Pools.Subpools:
2115
2116 RE_Allocate_Any_Controlled
2117 RE_Deallocate_Any_Controlled
2118 RE_Root_Storage_Pool_With_Subpools
2119 RE_Root_Subpool
2120 RE_Subpool_Handle
2121
2122 Move the following subprogram entities from
2123 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2124
2125 RE_Add_Offset_To_Address
2126 RE_Attach
2127 RE_Base_Pool
2128 RE_Detach
2129
2130 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2131 Set_Associated_Collection with Set_Finalization_Master.
2132 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2133 BIP_Finalization_Master is created.
2134 * s-finmas.adb: New unit System.Finalization_Masters.
2135 * s-finmas.ads: New unit System.Finalization_Masters.
2136 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2137 * s-stposu.ads, s-stposu.adb: New unit implementing
2138 System.Storage_Pools.Subpools.
2139
21402011-08-29 Bob Duff <duff@adacore.com>
2141
2142 * tbuild.adb: Add assertion.
2143
8c889ae4
AC
21442011-08-29 Thomas Quinot <quinot@adacore.com>
2145
2146 * s-pooglo.adb: Minor reformatting.
2147
21482011-08-29 Ed Schonberg <schonberg@adacore.com>
2149
2150 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2151 an indexed component of a packed array whose element type is a record
2152 with a representation clause different from that of the right-hand
2153 side, generate a temporary to minimuze the number of bit-field
2154 operations generated.
2155
21562011-08-29 Ed Schonberg <schonberg@adacore.com>
2157
2158 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2159 declarations, and thus are likely insertion points for actions.
2160
21612011-08-29 Bob Duff <duff@adacore.com>
2162
2163 * einfo.ads: Minor comment fix.
2164
1a07a71a
AC
21652011-08-29 Robert Dewar <dewar@adacore.com>
2166
2167 * frontend.adb, gnat1drv.adb: Minor reformatting.
2168
21692011-08-29 Tristan Gingold <gingold@adacore.com>
2170
2171 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2172 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2173 space in front of the header.
2174
4bcd6411
JK
21752011-08-29 Johannes Kanig <kanig@adacore.com>
2176
2177 * frontend.adb (Frontend): Exit after creating Standard package when
2178 -gnatd.H is present.
2179 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2180 present.
2181
f0f88eb6
RD
21822011-08-29 Robert Dewar <dewar@adacore.com>
2183
2184 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2185 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2186 snames.ads-tmpl: Minor reformatting.
2187
3e37be71
PG
21882011-08-29 Philippe Gil <gil@adacore.com>
2189
2190 * prj.adb (Reset_Units_In_Table): New procedure.
2191 Reset units to avoid access to freed memory.
2192
94fb7608
AC
21932011-08-29 Thomas Quinot <quinot@adacore.com>
2194
2195 * get_scos.adb: When reading a P statement SCO without a pragma name
2196 (from an older ALI file), ensure that the Pragma_Name component is set
2197 to Unknown_Pragma (not left uninitialized).
2198
21992011-08-29 Vincent Celier <celier@adacore.com>
2200
2201 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2202 modified to compute correctly the object path of a SAL project that is
2203 extending another library project.
2204 (Write_Path_File): New procedure.
2205 * makeutl.ads (Directories): New table moved from Buildgpr
2206 (Get_Directories): New procedure moved from Buildgpr
2207 (Write_Path_File): New procedure
2208 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2209 paths before binding SALs, instead of Set_Ada_Paths.
2210 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2211 Prj.
2212 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2213 (Current_Source_Path_File_Of): New function
2214 (Set_Current_Object_Path_File_Of): New procedure
2215 (Current_Source_Object_File_Of): New function
2216 (Set_Current_Object_Path_File_Of): New procedure
2217 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2218 (Current_Source_Path_File_Of): New function
2219 (Set_Current_Object_Path_File_Of): New procedure
2220 (Current_Source_Object_File_Of): New function
2221 (Set_Current_Object_Path_File_Of): New procedure
2222
22232011-08-29 Ed Schonberg <schonberg@adacore.com>
2224
2225 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2226 packed entity, use a bit-field assignment only if there is no change of
2227 representation.
2228
c5ecd6b7
AC
22292011-08-29 Thomas Quinot <quinot@adacore.com>
2230
2231 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2232 Is_RTU instead of using Chars comparisons.
2233
22342011-08-29 Thomas Quinot <quinot@adacore.com>
2235
2236 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2237 temporary object if the actual is constrained, and the discriminants
2238 read from the stream don't match.
2239
22402011-08-29 Tristan Gingold <gingold@adacore.com>
2241
2242 * sem_attr.adb, exp_attr.adb: Add handling of
2243 Attribute_System_Allocator_Alignment
2244 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2245 Attribute_System_Allocator_Alignment.
2246 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2247 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2248 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2249 get_target_system_allocator_alignment.
2250
22512011-08-29 Arnaud Charlet <charlet@adacore.com>
2252
2253 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2254 dependencies.
2255
8abdac29
AC
22562011-08-29 Arnaud Charlet <charlet@adacore.com>
2257
2258 * exp_ch3.adb (In_Runtime): Fix typo.
2259
df170605
AC
22602011-08-29 Bob Duff <duff@adacore.com>
2261
2262 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2263
22642011-08-29 Ed Schonberg <schonberg@adacore.com>
2265
2266 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2267 and a separate tag assignment is generated, ensure that the tag
2268 assignment is analyzed.
2269
864a4236
ES
22702011-08-29 Ed Schonberg <schonberg@adacore.com>
2271
2272 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2273 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2274 of statement lists that may contain local declarations.
df170605
AC
2275 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2276 duplicate the triggering statements needed for the expansion of this
2277 construct, when the trigger is a dispatching call to a synchronized
2278 primitive.
864a4236 2279
7f394c1d
AC
22802011-08-29 Arnaud Charlet <charlet@adacore.com>
2281
2282 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2283 * bindgen.adb: Add comments.
2284 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2285 in CodePeer mode.
2286
2c1a2cf3
RD
22872011-08-29 Robert Dewar <dewar@adacore.com>
2288
2289 * exp_attr.adb: Minor reformatting.
2290 Minor code reorganization and commenting.
2291 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2292 reformatting.
2293
0bfc9a64
AC
22942011-08-29 Thomas Quinot <quinot@adacore.com>
2295
2296 * get_scos.adb: Ignore chaining indicators not currently supported
2297 by Ada.
2298
22992011-08-29 Arnaud Charlet <charlet@adacore.com>
2300
2301 * system.ads: Minor editing.
2302
23032011-08-29 Arnaud Charlet <charlet@adacore.com>
2304
2305 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2306 CodePeer mode.
2307 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2308 Attribute_Elab_Subp_Body.
2309 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2310 * sem_util.adb: Update comments.
2311
828d4cf0
TQ
23122011-08-29 Thomas Quinot <quinot@adacore.com>
2313
2314 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2315 pragma name for each SCO statement corresponding to a pragma.
2316
5cd7bb15
AC
23172011-08-29 Arnaud Charlet <charlet@adacore.com>
2318
2319 * opt.ads: Minor editing.
2320
23212011-08-29 Yannick Moy <moy@adacore.com>
2322
2323 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2324 that only made sense for CodePeer mode.
2325
23262011-08-29 Jose Ruiz <ruiz@adacore.com>
2327
2328 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2329 which is no longer used.
2330 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2331 handling of the 64-bit division check.
2332 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2333 division available.
2334 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2335 longer used.
2336
23372011-08-29 Thomas Quinot <quinot@adacore.com>
2338
2339 * get_scos.adb: Minor reformatting.
2340
25b589cb
AC
23412011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2342
2343 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2344 statement list is wrapped in a block, the block is explicitly analyzed
2345 in order to properly redecorate the entities and create a servicing
2346 finalizer.
2347
23482011-08-29 Tristan Gingold <gingold@adacore.com>
2349
2350 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2351 (Set_Zero_Cost_Handling): Remove.
2352
23532011-08-29 Thomas Quinot <quinot@adacore.com>
2354
2355 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2356
1197ddb1
AC
23572011-08-29 Geert Bosch <bosch@adacore.com>
2358
2359 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2360 instruction, as the latter may produce -0.0, which is not a valid VAX
2361 F float number.
2362 (Neg_G): Likewise for VAX F float.
2363
23642011-08-29 Robert Dewar <dewar@adacore.com>
2365
2366 * exp_util.adb: Minor reformatting.
2367
23682011-08-29 Yannick Moy <moy@adacore.com>
2369
2370 * sem_ch3.adb: Minor comment update.
2371
23722011-08-29 Thomas Quinot <quinot@adacore.com>
2373
2374 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2375 the operand type.
2376
23772011-08-29 Thomas Quinot <quinot@adacore.com>
2378
2379 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2380 current statement sequence on a generic instantiation or a subprogram
2381 declaration.
2382
8f66cda7
AC
23832011-08-29 Robert Dewar <dewar@adacore.com>
2384
2385 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2386 Minor reformatting.
2387
23882011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2389
2390 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2391 Correct the check which involves the freeze node of a controlled or
2392 access-to-controlled type.
2393
23942011-08-29 Geert Bosch <bosch@adacore.com>
2395
2396 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2397 statements.
2398 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2399 Asm statements.
2400
cf161d66
AC
24012011-08-29 Yannick Moy <moy@adacore.com>
2402
2403 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2404 for every index type and component type that is not a subtype_mark.
2405 (Process_Subtype): Set Etype of subtype.
2406
24072011-08-29 Robert Dewar <dewar@adacore.com>
2408
2409 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2410 reorganization. Minor reformatting.
2411
7cc83cd8
AC
24122011-08-29 Steve Baird <baird@adacore.com>
2413
2414 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2415 for CodePeer and ALFA modes.
2416
24172011-08-29 Ed Schonberg <schonberg@adacore.com>
2418
2419 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2420 that comes from an enclosing scope if it is not the renaming of an
2421 actual, to handle properly a spurious ambiguity in an instance.
2422
76af4137
AC
24232011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2424
2425 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2426 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2427 use it instead of the Esize of the first parameter.
2428 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2429 above change.
2430 <Size>: Likewise. Call it for composite types on the RM size.
2431
24322011-08-29 Yannick Moy <moy@adacore.com>
2433
2434 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2435 * sem_util.adb (Unique_Name): Correct behaviour for names of
2436 compilation units.
2437
9b20e59b
AC
24382011-08-29 Yannick Moy <moy@adacore.com>
2439
2440 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2441 verification mode, analyze pragma expression for correctness, for
2442 pre/post on library-level subprogram, as it is not expanded later.
2443
24442011-08-29 Yannick Moy <moy@adacore.com>
2445
2446 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2447 in formal verification.
2448
24492011-08-29 Thomas Quinot <quinot@adacore.com>
2450
2451 * sem_util.adb: Minor reformatting.
2452 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2453 there's no pragma.
2454 * par_sco.ads, par_sco.adb: Update comments.
2455
24562011-08-29 Yannick Moy <moy@adacore.com>
2457
2458 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2459 associated getter/setter.
2460 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2461
24622011-08-29 Vincent Celier <celier@adacore.com>
2463
2464 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2465 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2466 with declarations for Language_Kind and Dependency_Kind for Ada.
2467 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2468 (Process_Compiler): Take into account the new attributes Dependency_Kind
2469 and Language_Kind.
2470 (Check_Configuration): Check if language kind is unit based, not if the
2471 language name is Ada.
2472 (Process_Exceptions_Unit_Based): Ditto
2473 (Add_Language): Remove default additions of language and dependency kind
2474 * prj.ads: Minor comment change
2475 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2476
24772011-08-29 Johannes Kanig <kanig@adacore.com>
2478
2479 * debug.adb: Update comments.
2480
c5bc3df6
JM
24812011-08-24 Joseph Myers <joseph@codesourcery.com>
2482
2483 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2484 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2485 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2486 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2487 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2488
e3aa9eba
RO
24892011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2490
2491 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2492 (GNATLIBCFLAGS_FOR_C): Replace
2493 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2494 (gnatlib-shared-default, gnatlib-shared-dual-win32)
2495 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2496 (gnatlib-sjlj, gnatlib-zcx): Likewise.
2497
f446d60e
EB
24982011-08-07 Eric Botcazou <ebotcazou@adacore.com>
2499
2500 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2501
588c8f48
EB
2502 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2503
2504 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2505
28d711bf
NR
25062011-08-05 Nicolas Roche <roche@adacore.com>
2507
2508 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2509 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2510 canadian cross.
2511 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2512
993f8920
AC
25132011-08-05 Matthew Heaney <heaney@adacore.com>
2514
2515 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2516 subprogram bodies declared out-of-order.
2517
25182011-08-05 Yannick Moy <moy@adacore.com>
2519
2520 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2521 entities directly in package Standard, otherwise skip the standard
2522 prefix.
2523
9b3956dd
RD
25242011-08-05 Robert Dewar <dewar@adacore.com>
2525
2526 * a-cbmutr.adb: Minor reformatting
2527 (Allocate_Node): refactor node allocation algorithm
2528
25292011-08-05 Robert Dewar <dewar@adacore.com>
2530
2531 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2532 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2533 mode.
2534 (Analyze_Pragma, case Check_Policy): Ditto.
2535 * sem_prag.ads (Check_Disabled): New function
2536 * snames.ads-tmpl: Add Name_Disable.
2537
25382011-08-05 Robert Dewar <dewar@adacore.com>
2539
2540 * gnat_rm.texi: Document implementation-defined policy DISABLE for
2541 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2542
79e705d6
AC
25432011-08-05 Ed Schonberg <schonberg@adacore.com>
2544
2545 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2546 that appears in a generic formal part and applies to a formal
2547 subprogram.
2548
25492011-08-05 Robert Dewar <dewar@adacore.com>
2550
2551 * a-cbmutr.ads: Minor reformatting.
2552
23b6deca
AC
25532011-08-05 Matthew Heaney <heaney@adacore.com>
2554
2555 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2556 to check count, check sign of value instead.
2557 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2558 (Copy_Subtree): allocate copy of source element
2559 (Equal_Subtree): compare elements, not access objects
2560
25612011-08-05 Vincent Celier <celier@adacore.com>
2562
2563 * gnat_ugn.texi: Fix VMS alternative.
2564
a2773bd3
AC
25652011-08-05 Thomas Quinot <quinot@adacore.com>
2566
2567 * sem_ch11.adb: Add comment.
2568
25692011-08-05 Robert Dewar <dewar@adacore.com>
2570
2571 * exp_util.adb: Minor comment fix.
2572
25732011-08-05 Robert Dewar <dewar@adacore.com>
2574
2575 * scng.adb (Error_Unterminated_String): Improve flag position when
2576 comma present.
2577
25782011-08-05 Matthew Heaney <heaney@adacore.com>
2579
2580 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
2581 tree containers).
2582 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
2583 multiway tree containers.
2584
25852011-08-05 Robert Dewar <dewar@adacore.com>
2586
2587 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
2588 * stylesw.adb: Implement -gnatyC to control comment spacing
2589 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
2590 -gnatyc/C).
2591 * usage.adb: Add line for -gnatyC.
2592
25932011-08-05 Robert Dewar <dewar@adacore.com>
2594
f446d60e 2595 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
2596 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
2597 synonym for COMMENTS2).
2598
dedac3eb
RD
25992011-08-05 Robert Dewar <dewar@adacore.com>
2600
2601 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
2602 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
2603 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
2604 a-comutr.ads, lib-xref.adb: Minor reformatting.
2605
26062011-08-05 Robert Dewar <dewar@adacore.com>
2607
2608 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
2609 warning if there is an exception handler present.
2610
7c62a85a
AC
26112011-08-05 Pascal Obry <obry@adacore.com>
2612
2613 * a-iteint.ads: Fix copyright year.
2614
26152011-08-05 Thomas Quinot <quinot@adacore.com>
2616
2617 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
2618 statement SCO for a USE clause or a representation clause.
2619
26202011-08-05 Yannick Moy <moy@adacore.com>
2621
2622 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
2623 between body and spec for stub.
2624 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
2625 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
2626 pragma precondition or postcondition, for which the enclosing
2627 subprogram or package in the AST is not the desired one, return empty.
2628
e49208a9
AC
26292011-08-05 Thomas Quinot <quinot@adacore.com>
2630
2631 * g-expect.adb: Minor reformatting.
2632
26332011-08-05 Bob Duff <duff@adacore.com>
2634
2635 * a-fihema.adb: Comment out OS_Lib.
2636
26372011-08-05 Matthew Heaney <heaney@adacore.com>
2638
2639 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
2640 (unbounded multiway tree containers) and a-iteint.ads.
2641 * a-comutr.ads, a-comutr.adb:
2642 This is the new Ada 2012 unit for unbounded multiway tree containers
2643 * a-cimutr.ads, a-cimutr.adb
2644 This is the new Ada 2012 unit for indefinite multiway tree containers
2645 * a-iteint.ads: New file.
2646
201cdb74
RO
26472011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2648
f446d60e 2649 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 2650
d50f4827
AC
26512011-08-05 Bob Duff <duff@adacore.com>
2652
2653 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
2654 subpools.
2655 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
2656
26572011-08-05 Ed Schonberg <schonberg@adacore.com>
2658
2659 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
2660 general indexing aspects of Ada2012. Called when analyzing indexed
2661 components when other interpretations fail.
2662 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
2663 in an expression context where overloading is meaningful. This excludes
2664 the occurrence in an aspect specification (efficiency only).
2665 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
2666 related to iterators can be set by an attribute specification, but
2667 cannot be queried.
2668 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
2669 Constant_Indexing and Variable_Indexing.
2670 (Check_Indexing_Functions): New procedure to perform legality checks.
2671 Additional semantic checks at end of declarations.
2672
efe05dfc
AC
26732011-08-05 Sergey Rybin <rybin@adacore.com>
2674
2675 * tree_io.ads: Update ASIS_Version_Number because of the change of the
2676 order of calling Tree_Write/Tree_Read routines made for aspects.
2677
26782011-08-05 Bob Duff <duff@adacore.com>
2679
2680 * a-fihema.adb (Finalize): Fix race condition.
2681
5f9cdefe
AC
26822011-08-05 Yannick Moy <moy@adacore.com>
2683
2684 * sem_ch12.adb (Analyze_Package_Instantiation,
2685 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2686 mode.
2687
26882011-08-05 Ed Schonberg <schonberg@adacore.com>
2689
2690 * sem_type.adb (Specific_Type): in an instance, the type-specific
2691 operand of an equality check that involves null may have a private
2692 type. Use full view to determine legality of construct.
2693
822868aa
AC
26942011-08-05 Vincent Celier <celier@adacore.com>
2695
2696 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2697 delete or close the file when the call to gnatmake was successful.
2698
26992011-08-05 Yannick Moy <moy@adacore.com>
2700
2701 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2702 Global_Discard_Names.
2703
27042011-08-05 Ed Schonberg <schonberg@adacore.com>
2705
2706 * sinfo.ads: comments on use of entity field for aspect specifications.
2707
27082011-08-05 Ed Schonberg <schonberg@adacore.com>
2709
2710 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2711 node is not itself an entity but a selected component, it is a
2712 rewritten parameterless call to an en enclosing synchronized operation,
2713 and this expansion will be performed again in the instance, so there is
2714 no global information to preserve.
2715
44a10091
AC
27162011-08-05 Javier Miranda <miranda@adacore.com>
2717
2718 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2719 for renamings of predefined primitives.
2720 (In_Predef_Prims_DT): New subprogram.
2721
27222011-08-05 Ed Schonberg <schonberg@adacore.com>
2723
2724 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2725 possible interpretation of name is a reference type, add an
2726 interpretation that is the designated type of the reference
2727 discriminant of that type.
2728 * sem_res.adb (resolve): If the interpretation imposed by context is an
2729 implicit dereference, rewrite the node as the deference of the
2730 reference discriminant.
2731 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2732 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2733 parent type or base type.
2734 * sem_ch4.adb (Process_Indexed_Component,
2735 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2736 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2737 Check for implicit dereference.
2738 (List_Operand_Interps): Indicate when an implicit dereference is
2739 ambiguous.
2740 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2741
27422011-08-05 Thomas Quinot <quinot@adacore.com>
2743
2744 * scos.ads: Update documentation of SCO table. Pragma statements can now
2745 be marked as disabled (using 'p' instead of 'P' as the statement kind).
2746 * par_sco.ads, par_sco.adb: Implement the above change.
2747 (Process_Decisions_Defer): Generate a P decision for the first parameter
2748 of a dyadic pragma Debug.
2749 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2750 necessary.
2751 * put_scos.adb: Code simplification based on above change.
2752
bb3c784c
AC
27532011-08-05 Robert Dewar <dewar@adacore.com>
2754
2755 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2756 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2757 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2758 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2759
27602011-08-05 Bob Duff <duff@adacore.com>
2761
2762 * a-stunau.ads, g-spipat.adb: Update comments.
2763
36f686f9
BD
27642011-08-05 Bob Duff <duff@adacore.com>
2765
2766 * a-fihema.ads: Minor comment fix.
2767 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2768 correct.
2769 (Attach, Detach): Remove some unnecessary code.
2770 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2771
7882673f
BD
27722011-08-05 Bob Duff <duff@adacore.com>
2773
2774 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2775 allocation for Objects component. This simplifies the code somewhat. It
2776 is also a little more efficient in the not-so-unusual case where there
2777 are no controlled objects allocated.
2778 Make Finalization_Started flag atomic.
2779 (Finalize): Avoid unnecessary detachment of items from the list.
2780 (pcol): Minor cleanup.
2781
d34cd274
AC
27822011-08-05 Ed Schonberg <schonberg@adacore.com>
2783
2784 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2785 package whose name is the same as that of the generic unit, or its
2786 ultimate prefix.
2787
27882011-08-05 Bob Duff <duff@adacore.com>
2789
2790 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2791 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2792 Minor comment fixes.
2793
00332244
AC
27942011-08-05 Arnaud Charlet <charlet@adacore.com>
2795
2796 * make.adb (Linking_Phase): No longer need to set source search path
2797 before calling gnatlink in CodePeer mode.
2798 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2799 gcc in CodePeer mode, since the binder generated file no longer has a
2800 'with Main'.
2801 * switch.ads, switch.adb (Is_Language_Switch): Removed.
2802 * switch-c.adb: Update comment.
2803
28042011-08-05 Thomas Quinot <quinot@adacore.com>
2805
2806 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2807
28082011-08-05 Nicolas Roche <roche@adacore.com>
2809
2810 * gnat_ugn.texi: Fix minor syntax error issue.
2811
28122011-08-05 Vincent Celier <celier@adacore.com>
2813
2814 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2815 delete or close the file when the call to gnatmake returns a non
2816 successful return code.
2817
28182011-08-05 Ed Schonberg <schonberg@adacore.com>
2819
2820 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2821 check, indicate that the copy of the original node does not come from
2822 source, to prevent an infinite recursion of the expansion.
2823
28242011-08-05 Johannes Kanig <kanig@adacore.com>
2825
2826 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2827 VC generation for subprogram bodies.
2828
28292011-08-05 Yannick Moy <moy@adacore.com>
2830
2831 * einfo.ads: Typo.
2832 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2833 the base type with the smallest allowed base type.
2834
28352011-08-05 Sergey Rybin <rybin@adacore.com>
2836
2837 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2838 aspects.
2839
28402011-08-05 Ed Schonberg <schonberg@adacore.com>
2841
2842 * sem_ch12.ads: minor comment updates.
2843
28442011-08-05 Ed Schonberg <schonberg@adacore.com>
2845
2846 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2847 instantiation and a formal package the compiler generates a package
2848 renaming declaration so that the generic name within the declaration
2849 is interpreted as a renaming of the instance. At the end of a formal
2850 package declaration, this renaming must become invisible.
2851
0da80d7d
AC
28522011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2853
2854 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2855 comparison and rely on concrete entities instead.
2856
28572011-08-05 Ed Schonberg <schonberg@adacore.com>
2858
2859 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2860 and discriminants, to indicate that the type has an access discriminant
2861 that supports implicit dereference.
2862 * snames.ads-tmpl: Add names of aspects and attributes related to
2863 Ada2012 iterators: constant_indexing, default_iterator,
2864 iterator_element, implicit_dereference, variable_indexing.
2865 * aspects.ads, aspects.adb: entries for iterator-related aspects.
2866 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2867 iterator-related aspects.
2868 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2869
28702011-08-05 Sergey Rybin <rybin@adacore.com>
2871
2872 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2873 metrics in gnatmetric to cover new kinds of coupling mentrics.
2874
28752011-08-05 Steve Baird <baird@adacore.com>
2876
2877 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 2878 of calling the user-defined main subprogram.
0da80d7d
AC
2879 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
2880 is set) Call_Main_Subprogram ahead of, as opposed to
2881 inside of, Main.
2882 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2883 generation of a "with" of the user-defined main subprogram.
2884 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2885 (which is now called from Gen_Main instead).
2886
73242473
AC
28872011-08-05 Emmanuel Briot <briot@adacore.com>
2888
2889 * projects.texi: Added reference to the Makefile package.
2890
28912011-08-05 Thomas Quinot <quinot@adacore.com>
2892
2893 * exp_ch7.adb: Minor comment rewording.
2894
28952011-08-05 Ed Falis <falis@adacore.com>
2896
2897 * env.c: Fix comment.
2898
28992011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2900
2901 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2902 character comparison and rely on concrete entities instead.
2903
97ed5872
AC
29042011-08-05 Ed Schonberg <schonberg@adacore.com>
2905
2906 * sem_ch3.adb: (Check_Private_Overriding): better error message,
2907 suggested by AI95-0068.
2908
29092011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2910
2911 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2912 the two potential initialization calls. This accounts for any
2913 access-before-elaboration checks which may precede the initialization
2914 calls.
2915 (Next_Suitable_Statement): New routine. Returns the next real statement
2916 after the input node while skipping generated checks.
2917 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2918 with comment on usage.
2919 Do not generate Elaborate_All when the trigger is a finalization call
2920 coming from a type init proc.
2921 (Check_Elab_Call): Propagate the initialization procedure context to
2922 subsequent calls to Check_A_Call.
2923 (Check_Internal_Call_Continue): Propagate the initialization procedure
2924 context to subsequent calls to Check_Elab_Call.
2925 (Is_Finalization_Procedure): New routine. Returns True if the input
2926 entity denotes a [Deep_]Finalize routine.
2927 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2928 along with comment on usage.
2929
29302011-08-05 Vadim Godunko <godunko@adacore.com>
2931
2932 * s-atocou.ads: Add list of supported platforms.
2933
29342011-08-05 Yannick Moy <moy@adacore.com>
2935
2936 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2937
2938 * opt.ads (Disable_ALI_File): new Boolean flag
2939 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2940
29412011-08-05 Ed Falis <falis@adacore.com>
2942
2943 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2944 environ is properly defined.
2945
29462011-08-05 Vincent Celier <celier@adacore.com>
2947
2948 * make.adb (Compilation_Phase): Exit immediately when all objects have
2949 been found up to date, to avoid multiple exit messages.
2950 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2951 same project for languages with no compiler.
2952 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2953 -eI.
9aff36e9
RD
29542011-08-05 Robert Dewar <dewar@adacore.com>
2955
2956 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2957 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2958 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2959 s-atocou-builtin.adb: Minor reformatting.
2960
406935b6
AC
29612011-08-05 Yannick Moy <moy@adacore.com>
2962
2963 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2964 if the node to wrap is a pragma check, this node and enclosed
2965 expression are not expanded, so do not apply any transformations here.
2966 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2967 introducing transient scopes.
2968
29692011-08-05 Jose Ruiz <ruiz@adacore.com>
2970
2971 * adaint.c (__gnat_set_writable, __gnat_set_readable,
2972 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2973 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2974 routine is available, so we use the default implementation of these
2975 functions.
2976 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2977 support for copying attributes on VxWorks 6.
2978
29792011-08-05 Yannick Moy <moy@adacore.com>
2980
2981 * debug.adb: Remove use of -gnatd.D.
2982 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2983 * opt.ads: Simplify variables for ALFA mode, to keep one only
2984 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2985 to ALFA mode.
2986
29872011-08-05 Vincent Celier <celier@adacore.com>
2988
2989 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2990 Builder'Default_Switches.
2991
29922011-08-05 Vincent Celier <celier@adacore.com>
2993
2994 * makeusg.adb: Add lines for --create-map-file switches.
2995
29962011-08-05 Ed Schonberg <schonberg@adacore.com>
2997
2998 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2999 profile is incomplete and the full view is available, replace it with
3000 the full view.
3001 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3002 incomplete, freezing the subprogram is delayed until the full view is
3003 frozen.
3004 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3005 fixed-point multiplication operator and the predefined operator is
3006 resolved in favor of the user-defined one.
3007
96c891b3
RO
30082011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3009
3010 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3011 CONST_CAST.
3012
276e7ed0
AC
30132011-08-04 Ed Schonberg <schonberg@adacore.com>
3014
3015 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3016 whether a type lacks user-defined Read or Write operations, or has a
3017 component that lacks them.
3018 * sem_attr.adb (Check_Stream_Attribute): if restriction
3019 No_Default_Stream_Attributes is active, verify that all subcomponent
3020 types of the target have user-defined stream operations, and report
3021 error otherwise.
3022 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3023 * exp_strm.adb: Build_Elementary_Input_Call,
3024 Build_Elementary_Write_Call): remove checks for restriction
3025 No_Default_Stream_Attributes, now checked in semantics.
3026
30272011-08-04 Vincent Celier <celier@adacore.com>
3028
3029 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3030 switches on the command line, look for all valid --RTS switches in the
3031 Builder switches and for each language use the first runtime name found
3032 to invoke gprconfig.
3033 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3034 command line and there is no auto-configuration.
3035 (Runtime_Name_Set_For): New function.
3036
30372011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3038
3039 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3040 elaborate initialization expression for variable Abort when processing
3041 a package body or a declaration.
3042 (Create_Finalizer): Propagate the package context when creating the
3043 exception-related variables.
3044 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3045 For_Package along with usage comment.
3046
19172ae9
AC
30472011-08-04 Arnaud Charlet <charlet@adacore.com>
3048
3049 * gcc-interface/Makefile.in: Clean up targets.
3050 Enable new package for atomic counters and copy-on-write implementation
3051 of unbounded strings on x86 platforms.
3052 * gcc-interface/Make-lang.in: Update dependencies.
3053
0319cacc
AC
30542011-08-04 Robert Dewar <dewar@adacore.com>
3055
3056 * exp_ch7.adb: Minor reformatting.
3057
30582011-08-04 Robert Dewar <dewar@adacore.com>
3059
3060 * exp_strm.adb: Minor reformatting.
3061
30622011-08-04 Vadim Godunko <godunko@adacore.com>
3063
3064 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3065 operations are not supported.
3066 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3067 * s-atocou-x86.adb: New file.
3068 * Makefile.rtl: Add s-atocou.o file
3069
30702011-08-04 Arnaud Charlet <charlet@adacore.com>
3071
3072 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3073 (Compilation_Phase): ... here.
3074 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3075
30762011-08-04 Thomas Quinot <quinot@adacore.com>
3077
3078 * Make-generated.in: Fix minor typo in comment.
3079
26e7e1a0
AC
30802011-08-04 Thomas Quinot <quinot@adacore.com>
3081
3082 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3083 the project path.
3084
30852011-08-04 Robert Dewar <dewar@adacore.com>
3086
3087 * a-coinho.adb: Minor reformatting.
3088
30892011-08-04 Robert Dewar <dewar@adacore.com>
3090
3091 * a-coinho.ads: Minor reformatting.
3092
30932011-08-04 Vadim Godunko <godunko@adacore.com>
3094
3095 * s-atocou.ads, s-atocou.adb: New files.
3096 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3097 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3098 direct use of GCC's atomic builtins and replace them by use of new
3099 atomic counter package.
3100
31012011-08-04 Ed Schonberg <schonberg@adacore.com>
3102
3103 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3104
31052011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3106
3107 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3108 with a call to Get_External_Tag.
3109 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3110 subprogram usage. Remove the guard against package declarations and
3111 bodies since Build_Cleanup_Statements is no longer invoked in that
3112 context.
3113 (Build_Components): Initialize Tagged_Type_Stmts when the context
3114 contains at least one library-level tagged type.
3115 (Build_Finalizer): New local variables Has_Tagged_Types and
3116 Tagged_Type_Stmts along with associated comments on usage. Update the
3117 logic to include tagged type processing.
3118 (Create_Finalizer): Insert all library-level tagged type unregistration
3119 code before the jump block circuitry.
3120 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3121 (Expand_N_Package_Declaration): Remove the call to
3122 Build_Cleanup_Statements.
3123 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3124 unregister the external tag of a tagged type.
3125 (Processing_Actions): Reimplemented to handle tagged types.
3126 (Process_Declarations): Detect the declaration of a library-level
3127 tagged type and carry out the appropriate actions.
3128 (Unregister_Tagged_Types): Removed. The machinery has been directly
3129 merged with Build_Finalizer.
3130
7483c888
AC
31312011-08-04 Robert Dewar <dewar@adacore.com>
3132
3133 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3134 gnatls.adb, exp_ch3.adb: Minor reformatting.
3135
31362011-08-04 Marc Sango <sango@adacore.com>
3137
3138 * sem_attr.adb (Analyze_Attribute): Replace the message
3139 "invisible attribute of}" of the spark restriction violation in
3140 attribute reference by the simple message "invisible attribute of type".
3141 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3142 two insertion characters: '&' and '}'.
3143
31442011-08-04 Vadim Godunko <godunko@adacore.com>
3145
3146 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3147 * a-coinho.ads, a-coinho.adb: New file.
3148 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3149
5207696c
AC
31502011-08-04 Nicolas Roche <roche@adacore.com>
3151
3152 * alfa_test.adb: Not all ali files are containing alfa information even
3153 if compiled with -gnatd.F. So suppress warning about missing ALFA
3154 information.
3155
31562011-08-04 Yannick Moy <moy@adacore.com>
3157
3158 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3159 scope.
3160 * put_alfa.adb: Check that scope name is not empty.
3161
31622011-08-04 Ed Schonberg <schonberg@adacore.com>
3163
3164 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3165 Needs_Elementary_Stream_Operation, to determine whether user-defined
3166 Read and Write attributes are available for the elementary components
3167 of the given type. If only the predefined attributes are available,
3168 then when restriction No_Default_Stream_Attributes is active the
3169 predefined stream attributes for the composite type cannot be created.
3170
31712011-08-04 Robert Dewar <dewar@adacore.com>
3172
3173 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3174 Put routines in alpha order
3175
2bd2d858
JR
31762011-08-04 Jose Ruiz <ruiz@adacore.com>
3177
3178 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3179 * gcc-interface/Make-lang.in: Update dependencies.
3180
8fae6016
AC
31812011-08-04 Arnaud Charlet <charlet@adacore.com>
3182
3183 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3184 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3185 gnat1why).
3186
a54d0eb4
AC
31872011-08-04 Robert Dewar <dewar@adacore.com>
3188
3189 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3190 lib-xref-alfa.adb: Minor reformatting.
3191
31922011-08-04 Marc Sango <sango@adacore.com>
3193
3194 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3195 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3196 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3197 mode.
3198
31992011-08-04 Tristan Gingold <gingold@adacore.com>
3200
3201 * bindgen.adb (Gen_Adainit_C): Remove.
3202 (Gen_Adafinal_C): Ditto.
3203 (Gen_Elab_Externals_C): Ditto.
3204 (Gen_Elab_Calls_C): Ditto.
3205 (Gen_Elab_Order_C): Ditto.
3206 (Gen_Elab_Defs_C): Ditto.
3207 (Gen_Finalize_Library_C): Ditto.
3208 (Gen_Finalize_Library_Defs_C): Ditto.
3209 (Gen_Main_C): Ditto.
3210 (Gen_Output_File_C): Ditto.
3211 (Gen_Restrictions_C): Ditto.
3212 (Gen_Versions_C): Ditto.
3213 (Write_Info_Ada_C): Ditto.
3214 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3215 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3216 Always call Gen_Output_File_Ada.
3217 * gnatlink.adb (Begin_Info): Now a constant.
3218 (End_Info): Ditto.
3219 (Ada_Bind_File): Remove
3220 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3221 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3222 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3223 * opt.ads (Ada_Bind_File): Remove.
3224
32252011-08-04 Thomas Quinot <quinot@adacore.com>
3226
3227 * projects.texi: Document target-specific directory in default project
3228 path for gnatmake.
3229
32302011-08-04 Thomas Quinot <quinot@adacore.com>
3231
3232 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3233 path in all cases .
3234
24558db8
AC
32352011-08-04 Yannick Moy <moy@adacore.com>
3236
3237 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3238 opt.ads, lib-xref.ads: Code clean up.
3239
32402011-08-04 Yannick Moy <moy@adacore.com>
3241
3242 * gnat_rm.texi: Update description of Test_Case
3243 * gnat_ugn.texi: Typo.
3244
32452011-08-04 Ed Falis <falis@adacore.com>
3246
3247 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3248
32492011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3250
3251 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3252 it is of type Root_Controlled. This action eliminates fields Prev and
3253 Next from type equality.
3254
32552011-08-04 Yannick Moy <moy@adacore.com>
3256
3257 * lib-xref-alfa.adb: Correct typo.
3258
32592011-08-04 Matthew Heaney <heaney@adacore.com>
3260
3261 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3262 component.
3263
1f9939b5
AC
32642011-08-04 Yannick Moy <moy@adacore.com>
3265
3266 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3267 (Analyze_Pragma): allow static string expression for name of Test_Case,
3268 instead of simply string literals.
3269 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3270 expressions.
3271
32722011-08-04 Vincent Celier <celier@adacore.com>
3273
3274 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3275 case suffixes to find truncated main sources.
3276
32772011-08-04 Tristan Gingold <gingold@adacore.com>
3278
3279 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3280 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3281 (Compute_Current_Task): Ditto.
3282
32832011-08-04 Tristan Gingold <gingold@adacore.com>
3284
3285 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3286
32872011-08-04 Yannick Moy <moy@adacore.com>
3288
3289 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3290 library-level constant.
3291 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3292 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3293 used as selector of parameter association, in ALFA mode.
3294
15d8a51d
AC
32952011-08-04 Robert Dewar <dewar@adacore.com>
3296
3297 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3298 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3299 reformatting.
3300
33012011-08-04 Arnaud Charlet <charlet@adacore.com>
3302
3303 * make.adb (Linking_Phase): Set source search path before calling
3304 gnatlink in CodePeer mode.
3305
f46faa08
AC
33062011-08-04 Javier Miranda <miranda@adacore.com>
3307
3308 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3309 Remove code which takes care of building TSDs.
3310 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3311 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3312 the accessibility check in VM targets.
3313 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3314 (Building_Static_DT): Now returns false for VM targets.
3315 (Build_VM_TSDs): Removed.
3316 (Expand_Interface_Conversion): Generate missing runtime check for
3317 conversions to interface types whose target type is unknown at compile
3318 time.
3319 (Make_VM_TSD): Add missing code to disable the generation of calls to
3320 Check_TSD if the tagged type is not defined at library level, or not
3321 has a representation clause specifying its external tag, or -gnatdQ is
3322 active.
3323 * exp_disp.ads (Build_VM_TSDs): Removed.
3324 (Make_VM_TSDs): Spec relocated from exp_disp.adb
3325 * sem_disp.adb (Check_Dispatching_Operation): No code required to
3326 register primitives in the dispatch tables in VM targets.
3327 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3328 initialization of class-wide interface objects in VM targets.
3329 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3330 of Make_DT).
3331
33322011-08-04 Jerome Lambourg <lambourg@adacore.com>
3333
3334 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3335 when dotnet-ld cannot be found.
3336
33372011-08-04 Arnaud Charlet <charlet@adacore.com>
3338
3339 * bindgen.adb: Simplify significantly generation of binder body file in
3340 CodePeer mode.
3341 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3342 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3343 not expanded).
3344
2ba7e31e
AC
33452011-08-04 Yannick Moy <moy@adacore.com>
3346
3347 * sem_prag.adb, sem.ads: Code cleanup.
3348
33492011-08-04 Tristan Gingold <gingold@adacore.com>
3350
3351 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3352 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3353 results if possible.
3354 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3355 * gnat_ugn.texi: Update dynamic stack usage section.
3356
33572011-08-04 Steve Baird <baird@adacore.com>
3358
3359 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3360 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3361 contains only a call to the user-defined main subprogram.
3362 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3363 call the "wrapper" subprogram instead of directly
3364 calling the user-defined main subprogram.
3365
33662011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3367
3368 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3369 alternatives of a case statement for controlled objects. Rename local
3370 variable A to Dead_Alt.
3371 (Expand_N_If_Statement): Check the then and else statements of an if
3372 statement for controlled objects. Check the then statements of all
3373 elsif parts of an if statement for controlled objects.
3374 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3375 objects.
3376 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3377 detects a loop associated with the expansion of an array object.
3378 Augment the processing of the loop statements to account for a possible
3379 wrap done by Process_Statements_For_Controlled_Objects.
3380 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3381 statements and abortable part of an asynchronous select for controlled
3382 objects.
3383 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3384 conditional entry call for controlled objects.
3385 (Expand_N_Selective_Accept): Check the alternatives of a selective
3386 accept for controlled objects.
3387 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3388 alternatives of a timed entry call for controlled objects.
3389 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3390 exception handler for controlled objects.
3391 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3392 Add formal parameter Nested_Constructs along with its associated
3393 comment.
3394 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3395 Requires_Cleanup_Actions.
3396 (Process_Statements_For_Controlled_Objects): New routine.
3397 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3398 routine. Inspect a node which contains a non-handled sequence of
3399 statements for controlled objects. If such an object is found, the
3400 statements are wrapped in a block.
3401
1bf773bb
AC
34022011-08-04 Bob Duff <duff@adacore.com>
3403
3404 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3405 need to compare with Class_Wide_Type (T2), in order to get at the
3406 original class-wide type node.
3407 * sem_type.ads (Covers): Improve the comment.
3408 * einfo.ads (Class_Wide_Type): Improve the comment.
3409 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3410 the type of the Deref.
3411
34122011-08-04 Yannick Moy <moy@adacore.com>
3413
3414 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3415 separate declarations.
3416 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3417 check identifier of pragma argument.
3418 (Chain_TC): check that no other test case associated to the same entity
3419 share the same name.
3420 (Check_Test_Case): disallow test case inside subprogram body
3421 (Analyze_Pragma): correct call to check identifier and not argument
3422 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3423 function gets name from test case pragma.
3424
dac3bede
YM
34252011-08-04 Yannick Moy <moy@adacore.com>
3426
3427 * gnat_rm.texi: Document new pragma and aspect.
3428 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3429 (No_Duplicates_Allowed): new constant array defining whether duplicates
3430 aspects of each kind can appear on the same declaration.
3431 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3432 field, which points to a node holding the previous Spec_PPC_List.
3433 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3434 through the indirection with Contract.
3435 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3436 * par-prag.adb (Prag): do nothing on Test_Case pragma
3437 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3438 be called directly.
3439 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3440 component Ensures of Test_Case.
3441 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3442 (Analyze_Generic_Subprogram_Declaration,
3443 Analyze_Subprogram_Instantiation,
3444 Analyze_Abstract_Subprogram_Declaration,
3445 Analyze_Subprogram_Body_Helper,
3446 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3447 insert contract in subprogram node at point of definition
3448 * sem_ch13.adb
3449 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3450 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3451 corresponding pragma
3452 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3453 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3454 similar to the analysis of pre/post
3455 (Derive_Subprogram): insert contract in subprogram node at point of
3456 derivation.
3457 * sem_prag.adb, sem_prag.ads
3458 (Check_Arg_Is_String_Literal, Check_Identifier):
3459 new checking procedures to be called in treatment of pragmas
3460 (Check_Test_Case): new procedure to check that a Test_Case aspect or
3461 pragma is well-formed. This does not check currently that 'Result is
3462 used only in the Ensures component of a Test_Case.
3463 (Analyze_Pragma): add case for Test_Case
3464 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3465 components of a Test_Case.
3466 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3467 expressions in the 3rd (and 4th if present) arguments of a Test_Case
3468 pragma, treated as spec expressions.
3469 (Sig_Flags): add value -1 for Test_Case.
3470 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3471 Get_Requires_From_Test_Case_Pragma): getters for both expression
3472 components of a Test_Case.
3473 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3474 indirection between an entry or [generic] subprogram entity and its
3475 pre/post + test-cases.
3476 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3477 get/set for fields of an N_Contract node.
3478 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3479 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3480 names and pragma for Test_Case.
3481 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3482
6a2e5d0f
AC
34832011-08-04 Vincent Celier <celier@adacore.com>
3484
3485 * gnat_ugn.texi: Improve documentation of gnatmake switch
3486 --source-info-file=.
3487
34882011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3489
3490 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3491 type). Initialize Atyp to the appropriate type which is later checked
3492 for completion. Rewrite the assertion associated with private type
3493 completion.
3494
34952011-08-04 Ed Falis <falis@adacore.com>
3496
3497 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3498 initialize the number of CPUs.
3499
35002011-08-04 Ed Schonberg <schonberg@adacore.com>
3501
3502 * sem_type.adb (Disambiguate): New subsidiary routine
3503 In_Same_Declaration_List, to implement AI05-0020: a user-defined
3504 equality on an anonymous access type whose designated type is private
3505 does not lead to an ambiguity with the universal access equality
3506 operator in the body or child units of the defining package. The same
3507 is true for a multiplication operator on a private type completed with
3508 a fixed-point-type.
3509
35102011-08-04 Javier Miranda <miranda@adacore.com>
3511
3512 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3513 (Normalize_Scalars_Config): Removed.
3514 * opt.adb
3515 (Register_Opt_Config_Switches): Remove registering config values of
3516 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3517 (Restore_Opt_Config_Switches): Remove code which restores the values of
3518 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3519 Init_Or_Norm_Scalars.
3520 (Save_Opt_Config_Switches): Remove code which saves values of
3521 Init_Or_Norm_Scalars and Normalize_Scalars.
3522 (Set_Opt_Config_Switches): Remove code which restores config values of
3523 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3524 Init_Or_Norm_Scalars.
3525
35262011-08-04 Yannick Moy <moy@adacore.com>
3527
3528 * frontend.adb (Frontend): remove previous patch to avoid full
3529 qualification in ALFA mode.
3530 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3531 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3532 unique name for an entity, which could be used to identify the entity
3533 across compilation units.
3534
35352011-08-04 Thomas Quinot <quinot@adacore.com>
3536
3537 * prj-env.adb
3538 (Initialize_Default_Project_Path): Add target specific directory
3539 ($prefix/$target/lib/gnat) in front of project path in all cases
3540 (making gnatmake's behaviour consistent with gprbuild).
3541 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3542 Pass target name from Sdefault to project subsystem.
3543 * gnatls.adb: Show new target specific default project directory.
3544
35452011-08-04 Johannes Kanig <kanig@adacore.com>
3546
3547 * cstand.adb: Add Information to Identifier in Standard
3548 (Identifer_For): Set Entity to the corresponding entity
3549
483361a6
AC
35502011-08-04 Sergey Rybin <rybin@adacore.com>
3551
3552 * gnat_ugn.texi: Update doc on gnatcheck.
3553
35542011-08-04 Yannick Moy <moy@adacore.com>
3555
3556 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3557 xrefs in a scope.
3558
35592011-08-04 Yannick Moy <moy@adacore.com>
3560
3561 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3562 performing expansion.
3563 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3564 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3565 it is not called in ALFA mode.
3566
ef5569c6
AC
35672011-08-04 Emmanuel Briot <briot@adacore.com>
3568
3569 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
3570 after all, so removed.
3571
35722011-08-04 Sergey Rybin <rybin@adacore.com>
3573
3574 * vms_data.ads: Add missing VMS qualifiers.
3575
1ab4a286
EB
35762011-08-04 Emmanuel Briot <briot@adacore.com>
3577
3578 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
3579 the list of files on the command line after processing it through
3580 Complete_Mains.
3581
7ae0d98c
AC
35822011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3583
3584 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
3585 processing for .NET/JVM. These targets can now benefit from
3586 Raise_From_Controlled_Operation and they share the same processing with
3587 standard targets.
3588 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
3589 These targets need transient scopes in order to properly finalize short
3590 lived controlled objects.
3591 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
3592 NET/JVM. These targets can now benefit from
3593 Raise_From_Controlled_Operation and they share the same processing with
3594 standard targets.
3595
35962011-08-04 Geert Bosch <bosch@adacore.com>
3597
3598 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
3599
36002011-08-04 Ed Schonberg <schonberg@adacore.com>
3601
3602 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
3603 Expand_Record_Aggregate, to determine whether aggregate must be
3604 expanded into assignments. This is the case if the ancestor part is
3605 private, regarless of the setting of the flag Has_Private_Ancestor.
3606
36072011-08-04 Ed Falis <falis@adacore.com>
3608
3609 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
3610
36112011-08-04 Bob Duff <duff@adacore.com>
3612
3613 * sinfo.ads: Fix comment.
3614
36152011-08-04 Steve Baird <baird@adacore.com>
3616
3617 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
3618 choose a package name in much the same way as is
3619 done for JGNAT when VM_Target /= No_VM, except that
3620 a slightly more distinctive prefix string is used.
3621
36222011-08-04 Emmanuel Briot <briot@adacore.com>
3623
3624 * makeutl.adb (Complete_Mains): no longer accept unit names on the
3625 gnatmake command line.
3626 This behavior was never documented (and was supported only because of
3627 an early bug in the code). This case might lead to ambiguous cases
3628 (between unit names and truncated base names without suffixes).
3629
87729e5a
AC
36302011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3631
3632 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
3633 Remove the external tag of a tagged type from the internal hash table.
3634 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
3635 expanded usage of the routine. Strenghten the check for Is_Master. Add
3636 processing for tagged types.
3637 (Build_Finalizer): Create all the necessary lists used in finalizer
3638 creation when the processed context is a package that may contain
3639 tagged types.
3640 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
3641 Requires_Cleanup_Actions.
3642 (Expand_N_Package_Body): Package bodies may need clean up code
3643 depending on whether they contain tagged types.
3644 (Expand_N_Package_Declaration): Package declarations may need clean up
3645 code depending on whether they contain tagged types.
3646 (Unregister_Tagged_Types): New routine. Search through a list of
3647 declarations or statements, looking for non-abstract Ada tagged types.
3648 For each such type, generate code to unregister the external tag.
3649 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
3650 Requires_Cleanup_Actions.
3651 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
3652 through a list of declarations or statements looking for non-abstract
3653 Ada tagged types or controlled objects.
3654 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
3655 Requires_Cleanup_Actions.
3656 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
3657 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
3658 RE_Unit_Table.
3659
36602011-08-04 Vincent Celier <celier@adacore.com>
3661
3662 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
3663 has Ada sources, not project Project, because if the root project
3664 Project has no sources of its own, all projects will be deemed without
3665 sources.
3666
36672011-08-04 Gary Dismukes <dismukes@adacore.com>
3668
3669 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
3670 of the No_Param_Proc acc-to-subp type used for initialization of
3671 __gnat_finalize_library_objects so that it's declared at library level
3672 rather than nested inside of the adainit routine.
3673
36742011-08-04 Javier Miranda <miranda@adacore.com>
3675
3676 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
3677 if the tagged type has a representation clause which specifies its
3678 external tag.
3679
36802011-08-04 Ed Schonberg <schonberg@adacore.com>
3681
3682 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3683 Remove previous procedure with that name.
3684 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3685 when appropriate.
3686 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3687 subtype mark, the ancestor cannot have unknown discriminants.
3688 (Resolve_Record_Aggregate): if the type has invisible components
3689 because of a private ancestor, the aggregate is illegal.
3690
36912011-08-04 Vincent Celier <celier@adacore.com>
3692
3693 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3694 account switches -gnat2005, -gnat12 and -gnat2012.
3695
36962011-08-04 Bob Duff <duff@adacore.com>
3697
3698 * s-tasdeb.ads: Minor comment fix.
3699
37002011-08-04 Arnaud Charlet <charlet@adacore.com>
3701
3702 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3703 CodePeer mode.
3704 * switch.ads, switch.adb (Is_Language_Switch): New function.
3705
37062011-08-04 Vincent Celier <celier@adacore.com>
3707
3708 * switch-c.adb: Minor comment addition.
3709
37102011-08-04 Vincent Celier <celier@adacore.com>
3711
3712 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3713 ending with '=' is followed by a space (missing file name).
3714
37152011-08-04 Pascal Obry <obry@adacore.com>
3716
3717 * g-regist.ads: Fix size of HKEY on x86_64-windows.
3718
37192011-08-04 Ed Schonberg <schonberg@adacore.com>
3720
3721 * sem_ch12.adb (Analyze_Associations): New routine
3722 Check_Overloaded_Formal_Subprogram to reject a formal package when
3723 there is a named association or a box initialisation for an overloaded
3724 formal subprogram of the corresponding generic.
3725
37262011-08-04 Yannick Moy <moy@adacore.com>
3727
3728 * alfa.ads (ALFA_Xref_Record): add component for type of entity
3729 * get_alfa.adb, put_alfa.adb: Read and write new component of
3730 cross-reference.
3731 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3732
88f47280
AC
37332011-08-04 Pascal Obry <obry@adacore.com>
3734
3735 * urealp.adb: Minor reformatting.
3736
37372011-08-04 Tristan Gingold <gingold@adacore.com>
3738
3739 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3740 Handle the case when Cleanup_Protected_Object returns Empty.
3741
37422011-08-04 Yannick Moy <moy@adacore.com>
3743
3744 * frontend.adb (Frontend): only qualify names in non-ALFA mode
3745
37462011-08-04 Ed Schonberg <schonberg@adacore.com>
3747
3748 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3749 call, ignore functions.
3750
05c53a69
GB
37512011-08-04 Geert Bosch <bosch@adacore.com>
3752
3753 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3754 point.
3755
23cc1ace
EB
37562011-08-04 Emmanuel Briot <briot@adacore.com>
3757
3758 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3759 as an index for Builder'Switches. This conforms to the documentation.
3760 * make.adb (Insert_Project_Sources): avoid duplicate code
3761
cef14201
AC
37622011-08-04 Emmanuel Briot <briot@adacore.com>
3763
3764 * makeutl.adb (Complete_Mains): if the user has passed a relative file
3765 name on the command line (for instance "../dummy"), never assume it can
3766 be a unit name.
3767
37682011-08-04 Tristan Gingold <gingold@adacore.com>
3769
3770 * bindgen.adb: Remove code the reference or create the
3771 Break_Start/__gnat_break_start procedure.
3772 * s-stalib.adb (Break_Start): Removed.
3773
e2fee30d
EB
37742011-08-04 Emmanuel Briot <briot@adacore.com>
3775
3776 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3777 shared with gprbuild.
3778
2d395256
AC
37792011-08-04 Yannick Moy <moy@adacore.com>
3780
3781 * par-ch4.adb (P_Primary): preferentially issue an error message about
3782 a missing parenthesis arount a conditional or case expression in Ada
3783 2012 mode, if we detect that the alignment is not correct for a
3784 statement.
3785
37862011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3787
3788 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3789 tag-to-class-wide conversion as needing finalization actions.
3790 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3791 a tag-to-class-wide conversion as needing finalization actions.
3792 (Is_Finalizable_Transient): The result of a tag-to-class-wide
3793 conversion does not need finalization actions.
3794 (Is_Tag_To_CW_Conversion): New routine.
3795 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3796 whether an object is the result of a tag-to-class-wide conversion.
3797
37982011-08-04 Yannick Moy <moy@adacore.com>
3799
3800 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3801 the left-hand-side and right-hand-side of a conjunct are inserted when
3802 translating a pre- or postcondition
3803 * sem_ch6.adb: Correct typo in comment
3804
38052011-08-04 Ed Schonberg <schonberg@adacore.com>
3806
3807 * gnat_rm.texi: Ravenscar does not prohibit dependence on
3808 Unchecked_Conversion and Unchecked_Deallocation.
3809
38102011-08-04 Thomas Quinot <quinot@adacore.com>
3811
3812 * make.adb: Minor reformatting.
3813
767ab2fd
EB
38142011-08-04 Emmanuel Briot <briot@adacore.com>
3815
3816 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3817 sources in the project and its imported projects, but not in the whole
3818 tree.
3819
8fb3f5df
AC
38202011-08-04 Emmanuel Briot <briot@adacore.com>
3821
3822 * make.adb: Remove debug trace.
3823
38242011-08-04 Vincent Celier <celier@adacore.com>
3825
3826 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3827 path in canonical form, to be able to compare path names on platforms
3828 such as Windows or Darwin.
3829
38302011-08-04 Thomas Quinot <quinot@adacore.com>
3831
3832 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3833 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3834 * scos.ads: Update documentation accordingly.
3835 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3836 pragmas.
3837
9515740f
AC
38382011-08-04 Ed Schonberg <schonberg@adacore.com>
3839
3840 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3841 attribute only if prefix type is scalar.
3842
38432011-08-04 Emmanuel Briot <briot@adacore.com>
3844
3845 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3846 in gnatmake for specifying mains on the command line that do not belong
3847 to the main project. These mains must currently all belong to the same
3848 project, though.
3849 (Ultimate_Extension_Of): removed, since duplicated
3850 Ultimate_Extending_Project.
3851
92966893
AC
38522011-08-04 Arnaud Charlet <charlet@adacore.com>
3853
3854 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3855 instead.
3856 (CodePeer_Mode_String): New.
3857 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3858 CodePeer mode.
3859 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3860 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3861 mode, since no useful elaboration subprogram is needed by CodePeer.
3862 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3863 In this mode, compile binder file with -gnatC and do stop after this
3864 step.
3865
38662011-08-04 Vincent Celier <celier@adacore.com>
3867
3868 * exp_ch7.adb: Minor comment fix.
3869
5969611f
RD
38702011-08-04 Robert Dewar <dewar@adacore.com>
3871
3872 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3873 exp_ch4.adb, makeutl.adb: Minor reformatting.
3874
6367dd30
AC
38752011-08-04 Emmanuel Briot <briot@adacore.com>
3876
3877 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3878 Create several new subprograms to move code out of Make. This makes the
3879 code more readable, removes code duplication, and is a preparation work
3880 for adding support for aggregate projects.
3881
38822011-08-04 Tristan Gingold <gingold@adacore.com>
3883
3884 * s-po32gl.ads, s-po32gl.adb: New files.
3885 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3886 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3887 (Build_Finalization_Collection): Use it.
3888 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3889 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3890 literals.
3891 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3892 * gcc-interface/Make-lang.in: Update dependencies.
3893
cd8bfe35
EB
38942011-08-04 Emmanuel Briot <briot@adacore.com>
3895
3896 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3897 the command line.
3898
7db29ea7
EB
38992011-08-04 Emmanuel Briot <briot@adacore.com>
3900
3901 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3902 command line is not a file name, also check whether it could be a unit
3903 name.
3904
d9b056ea
AC
39052011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3906
3907 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3908 the header of the finalization routine.
3909 If the unit has no finalizer but is a body whose spec has one, then
3910 generate the decrement of the elaboration entity only.
3911 If the unit has a finalizer and is a spec, then do not generate the
3912 decrement of the elaboration entity.
3913 (Gen_Finalize_Library_C): Likewise.
3914
39152011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3916
3917 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3918 (Bounds_Size_Expression): Removed.
3919 (Double_Alignment_Of): New subsidiary routine.
3920 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3921 for a hole in the dope vector of unconstrained arrays due to different
3922 index and element alignments.
3923
39242011-08-04 Ed Schonberg <schonberg@adacore.com>
3925
3926 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3927 raise program_error because body has not been seen yet.
3928
39292011-08-04 Ed Schonberg <schonberg@adacore.com>
3930
3931 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3932 an unresolved name.
3933
39342011-08-04 Vincent Celier <celier@adacore.com>
3935
3936 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3937
39382011-08-04 Yannick Moy <moy@adacore.com>
3939
3940 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3941 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3942
39432011-08-04 Thomas Quinot <quinot@adacore.com>
3944
3945 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3946 instantiation in RCI.
3947
39482011-08-04 Emmanuel Briot <briot@adacore.com>
3949
3950 * make.adb: Share more code with gprbuild
3951
f5fc5b9d
AC
39522011-08-04 Emmanuel Briot <briot@adacore.com>
3953
3954 * projects.texi: Added documentation for the IDE'Gnat project file
3955 attribute.
3956
39572011-08-04 Nicolas Roche <roche@adacore.com>
3958
3959 * gnat_rm.texi: Minor editing.
3960
39612011-08-04 Javier Miranda <miranda@adacore.com>
3962
3963 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3964 and the library case for VM targets.
3965 (Gen_Adainit_Ada): Likewise.
3966
39672011-08-04 Robert Dewar <dewar@adacore.com>
3968
3969 * g-altive.ads: Minor comment updates.
3970 * prj-nmsc.adb: Minor reformatting.
3971
39722011-08-04 Javier Miranda <miranda@adacore.com>
3973
3974 * opt.ads
3975 (Normalize_Scalars_Config): Value of the configuration switch set by
3976 pragma Normalize_Scalars when it appears in the gnat.adc file.
3977 (Normalize_Scalars): New field for record Config_Switches_Type. Used
3978 to save and restore settings of this pragma.
3979 * opt.adb
3980 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3981 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3982
39832011-08-04 Vincent Celier <celier@adacore.com>
3984
3985 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3986
0c4683cf
AC
39872011-08-04 Arnaud Charlet <charlet@adacore.com>
3988
3989 * makeutl.adb: Minor reformatting.
3990
39912011-08-04 Olivier Hainque <hainque@adacore.com>
3992
3993 * g-altive.ads: Update comments to reflect that only the soft
3994 binding is available today.
3995
2598ee6d
RD
39962011-08-04 Robert Dewar <dewar@adacore.com>
3997
3998 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3999 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4000 * gcc-interface/Make-lang.in: Update dependencies.
4001
c2db4b32
AC
40022011-08-04 Arnaud Charlet <charlet@adacore.com>
4003
4004 * prj-env.adb: Remove local debug traces.
4005
40062011-08-04 Yannick Moy <moy@adacore.com>
4007
4008 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4009 was used instead of Hi_OK, which could cause a read of an uninitialized
4010 value later on. Detected while working on the new warning.
4011 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4012 to local variable.
4013 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4014 in more cases, in order to detect more unreferenced values.
4015 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4016 object for expression, if any.
4017
40182011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4019
4020 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4021 the operand types instead of the Esize.
4022
40232011-08-04 Steve Baird <baird@adacore.com>
4024
4025 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4026 enable CodePeer_Mode.
4027 * bindusg.adb (Display): Add help message describing -P binder switch.
4028 * gnat_ugn.texi: Document -P binder switch.
4029 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4030 user-defined main program directly.
4031 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4032 user-defined main program in the context clause of the package body.
4033
ad05f2e9
AC
40342011-08-04 Yannick Moy <moy@adacore.com>
4035
4036 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4037 duplicate of Defining_Entity
4038 (Get_Unique_Entity_For_Decl): rename function into
4039 Unique_Defining_Entity
4040 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4041 (Formal_Proof_On): remove synthesized flag
4042 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4043 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4044 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4045 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4046 Annotate (Formal_Proof)
4047
40482011-08-04 Emmanuel Briot <briot@adacore.com>
4049
4050 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4051 source files with non-standard naming schemes, in imported projects
4052
756ef2a0
AC
40532011-08-04 Emmanuel Briot <briot@adacore.com>
4054
4055 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4056 specified on the gprbuild command line, we need to compile all units
4057 within that file, not just the first one we find
4058 Fix error message for mains that are not found.
4059
40602011-08-04 Thomas Quinot <quinot@adacore.com>
4061
4062 * sem_ch6.adb: Update comment.
4063 * sem_ch12.adb: Minor reformatting.
4064
40652011-08-04 Bob Duff <duff@adacore.com>
4066
4067 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4068 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4069 race condition whose symptom is to fail to lock Parent. That, in turn,
4070 causes Parent.Awake_Count to be accessed without locking Parent, which
4071 causes another race condition whose symptom is that Parent.Awake_Count
4072 can be off by 1 (either too high or too low). The solution is to lock
4073 Parent unconditionally, and then lock Acceptor, before reading
4074 Acceptor.Terminate_Alternative.
4075
4fdebd93
AC
40762011-08-04 Arnaud Charlet <charlet@adacore.com>
4077
4078 * debug.adb: Update comment.
4079
40802011-08-04 Robert Dewar <dewar@adacore.com>
4081
4082 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4083 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4084 exp_ch6.adb: Minor reformatting.
4085
40862011-08-04 Gary Dismukes <dismukes@adacore.com>
4087
4088 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4089 checks for -gnateE.
4090
40912011-08-04 Ed Schonberg <schonberg@adacore.com>
4092
4093 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4094
40952011-08-04 Thomas Quinot <quinot@adacore.com>
4096
4097 * sinfo.ads: Minor reformatting.
4098
40992011-08-04 Emmanuel Briot <briot@adacore.com>
4100
4101 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4102 even if there is no location.
4103
6aaa0587
ES
41042011-08-04 Ed Schonberg <schonberg@adacore.com>
4105
4106 * sem_res.adb, sem_ch4.adb: move check for restriction
4107 No_Task_Hierarchy to resolve_allocator.
4108
35a1c212
AC
41092011-08-04 Thomas Quinot <quinot@adacore.com>
4110
4111 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4112 This flag of N_Pragma nodes is not used, remove it as well as all of
4113 the associated circuitry.
4114
41152011-08-04 Javier Miranda <miranda@adacore.com>
4116
4117 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4118 runtime check on duplicated externa tags
4119 * debug.adb Document switch -gnatdQ.
4120
41212011-08-04 Gary Dismukes <dismukes@adacore.com>
4122
4123 * a-fihema.ads: Minor typo fix.
4124
41252011-08-04 Yannick Moy <moy@adacore.com>
4126
4127 * sem_ch10.adb: Minor comment update.
4128
41292011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4130
4131 * einfo.adb: Update the node field usage to reflect the renaming of
4132 Return_Flag to Return_ Flag_Or_Transient_Decl.
4133 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4134 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4135 (Write_Field15_Name): Change Return_Flag to
4136 Return_Flag_Or_Transient_Decl.
4137 * einfo.ads: Rename node field Return_Flag to
4138 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4139 occurrences in entities.
4140 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4141 associated Inline pragma.
4142 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4143 associated Inline pragma.
4144 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4145 routine.
4146 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4147 Return_Flag and Set_Return_Flag.
4148 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4149 objects generated for controlled transients declared inside an
4150 Exception_With_Actions. Update the calls to Return_Flag.
4151 (Process_Object_Declaration): Add code to add a null guard for hook
4152 objects generated for controlled transients declared inside an
4153 Exception_With_Actions. Update related comment.
4154 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4155 objects generated for controlled transients declared inside an
4156 Exception_With_Actions. Update the calls to Return_Flag.
4157 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4158
41592011-08-04 Ed Schonberg <schonberg@adacore.com>
4160
4161 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4162 positional aggregate.
4163
41642011-08-04 Vincent Celier <celier@adacore.com>
4165
4166 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4167 SLOC only for pragmas.
4168
41692011-08-04 Emmanuel Briot <briot@adacore.com>
4170
4171 * projects.texi: Minor typo fix.
4172
41732011-08-04 Emmanuel Briot <briot@adacore.com>
4174
4175 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4176 on case-sensitive file systems.
4177
c2873f74
TQ
41782011-08-04 Thomas Quinot <quinot@adacore.com>
4179
4180 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4181 nested in a disabled pragma.
4182 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4183 enclosing pragma, if any, for X decisions.
4184
41852011-08-04 Thomas Quinot <quinot@adacore.com>
4186
4187 * sem_prag.adb: Minor reformatting.
4188
46414266
VC
41892011-08-04 Vincent Celier <celier@adacore.com>
4190
4191 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4192 allowed in no run time mode.
4193
41942011-08-04 Vincent Celier <celier@adacore.com>
4195
4196 * make.adb (Check): When -gnatc is used, check for the source file
4197 inside the ALI file with a canonical case file name.
4198
afab164f
EB
41992011-08-04 Emmanuel Briot <briot@adacore.com>
4200
4201 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4202 overriding the separator.
4203
fe0ec02f
AC
42042011-08-04 Robert Dewar <dewar@adacore.com>
4205
4206 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4207 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4208
42092011-08-04 Robert Dewar <dewar@adacore.com>
4210
4211 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4212
42132011-08-04 Yannick Moy <moy@adacore.com>
4214
4215 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4216 'Result only appears in postcondition of function.
4217
42182011-08-04 Thomas Quinot <quinot@adacore.com>
4219
4220 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4221 external tag, include the value of the external tag in the exception
4222 message.
4223
0180fd26
AC
42242011-08-04 Yannick Moy <moy@adacore.com>
4225
4226 * sem_attr.adb (Result): modify error message for misplaced 'Result
4227
42282011-08-04 Sergey Rybin <rybin@adacore.com>
4229
4230 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4231 clear that the second argument must be an identifier.
4232
42332011-08-04 Thomas Quinot <quinot@adacore.com>
4234
4235 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4236 -fpreserve-control-flow, insert an IF statement on the barrier
4237 condition to ensure that a conditional branch instruction is generated.
4238
42392011-08-04 Emmanuel Briot <briot@adacore.com>
4240
4241 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4242 (Processing_Flags.Ignore_Missing_With): new flag.
4243
42442011-08-04 Emmanuel Briot <briot@adacore.com>
4245
4246 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4247 Source_List_File on case-insensitive systems where the file is actually
4248 on a case-sensitive file system (NFS,...).
4249
42502011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4251
4252 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4253 function return contains a controlled [extension] aggregate and the
4254 return statement is not part of a handled sequence of statements, wrap
4255 the return in a block. This ensures that all controlled temporaries
4256 generated during aggregate resolution will be picked up by the
4257 finalization machinery.
4258
42592011-08-04 Ed Schonberg <schonberg@adacore.com>
4260
4261 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4262 components, freeze type before resolution, to ensure that default
4263 initializations are present for all components.
4264 * sem_res.adb (Resolve_Actuals): the designated object of an
4265 accces-to-constant type is a legal actual in a call to an
4266 initialization procedure.
4267
42682011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4269
4270 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4271 N_Unchecked_Type_Conversion to the possible containers of a renamed
4272 transient variable.
4273
78efd712
AC
42742011-08-04 Yannick Moy <moy@adacore.com>
4275
4276 * par-ch13.adb (Aspect_Specifications_Present): recognize
4277 "with Identifier'Class =>" as an aspect, so that a meaningful warning
4278 is issued in Strict mode.
4279 * par.adb: Fix typos in comments.
4280
42812011-08-04 Yannick Moy <moy@adacore.com>
4282
4283 * sem_attr.adb (Result): modify error message to take into account Post
4284 aspect when compiling Ada 2012 (or newer) code.
4285
42862011-08-04 Nicolas Roche <roche@adacore.com>
4287
4288 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 4289 remove need for GCC exceptions.
78efd712
AC
4290
42912011-08-04 Vincent Celier <celier@adacore.com>
4292
4293 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4294 project, not the source file name.
4295 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4296 excluded, continue looking. This excluded source will only be returned
4297 if there is no other source with the same base name that is not locally
4298 removed.
4299
43002011-08-04 Ed Schonberg <schonberg@adacore.com>
4301
4302 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4303 private and one of the operands is a real literal, use a qualified
4304 expression rather than a conversion which is not meaningful to the
4305 back-end.
4306
0170a691
AC
43072011-08-04 Yannick Moy <moy@adacore.com>
4308
4309 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4310 corresponding aspect X'Class are allowed, proceed with analysis of the
4311 aspect instead of skipping it.
4312
43132011-08-04 Tristan Gingold <gingold@adacore.com>
4314
4315 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4316 This will allow to have an Ada implementation for the subprogram.
4317
deb4f5ba
ES
43182011-08-04 Ed Schonberg <schonberg@adacore.com>
4319
4320 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4321 completion and aspects are present, apply them to the entity for the
4322 type which is currently the partial view, but which is the one that
4323 will be frozen.
4324 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4325 applies to a partial view, indicate that the full view has predicates
4326 and delayed aspects.
4327 (Replace_Type_Reference): Handle properly predicates that apply to the
4328 full view of a private completion.
4329
fc893455
AC
43302011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4331
4332 * layout.adb (Layout_Type): For composite types, do not set Esize.
4333 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4334 set Esize.
4335 (Size_Known): Look at the RM size of components instead of the Esize.
4336 (Freeze_Record_Type): Look at the RM size instead of the Esize to
4337 issue warning and activate Implicit_Packing.
4338 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
4339 if the Esize is not known.
4340 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4341 for elementary types only.
4342 (Analyze_Record_Representation_Clause): Look at the RM size instead
4343 of the Esize to issue errors.
4344 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4345 is not known.
4346 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 4347 obsolete block.
fc893455
AC
4348 Look at the RM size instead of the Esize for types if the latter is
4349 not known.
4350 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4351
43522011-08-04 Ed Schonberg <schonberg@adacore.com>
4353
4354 * sem_type.adb: proper handling of equality not involving anonymous
4355 access types.
4356
b37d5bc6
AC
43572011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4358
4359 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4360 Vis_Decls. When creating a library-level finalizer for a package spec,
4361 both the declaration and body of the finalizer are inserted either in
4362 the visible or private declarations of the package spec.
4363
43642011-08-04 Javier Miranda <miranda@adacore.com>
4365
4366 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4367 use of the full-view of a type when invoking Is_Ancestor.
4368 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4369 the full-view of private parents is requested, then use also the
4370 full-view of the parent of the first derivation.
4371
7ab4d95a
AC
43722011-08-04 Tristan Gingold <gingold@adacore.com>
4373
4374 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4375 instead of the locally imported procedure.
4376 * s-taprop-mingw.adb (Enter_Task): Ditto.
4377 * s-valrea.adb (Scan_Real): Ditto.
4378 * s-imgrea.adb (Set_Image_Real): Ditto.
4379 * s-flocon.ads: Make the package pure.
4380
43812011-08-04 Thomas Quinot <quinot@adacore.com>
4382
4383 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4384 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4385 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4386 New subprogram, moved here from...
4387 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4388 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4389 rewriting of the last argument into a procedure call statement here...
4390 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4391 instead.
4392
43932011-08-04 Thomas Quinot <quinot@adacore.com>
4394
4395 * par_sco.adb: Minor reformatting.
4396
51c400f5
AC
43972011-08-04 Robert Dewar <dewar@adacore.com>
4398
4399 * erroutc.adb: Minor reformatting.
4400
44012011-08-04 Thomas Quinot <quinot@adacore.com>
4402
4403 * par_sco.adb: Comment update.
4404
44052011-08-04 Tristan Gingold <gingold@adacore.com>
4406
4407 * s-flocon.ads: New file.
4408 * g-flocon.ads: Now a renaming of s-flocon.
4409 * Makefile.rtl: Add s-flocon.o
4410
6a49f110
AC
44112011-08-04 Javier Miranda <miranda@adacore.com>
4412
4413 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4414 constrained, do not attempt to build a subtype of it.
4415
44162011-08-04 Yannick Moy <moy@adacore.com>
4417
4418 * errout.ads Change comments: remove 'R'M as an example where quotes
4419 are needed; add ALFA as another case where quotes are not needed
4420 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4421 case where quotes are not needed.
4422 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4423 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4424 Remove all occurrences of 'A'L'F'A
4425
44262011-08-04 Ed Schonberg <schonberg@adacore.com>
4427
4428 * sem_ch13.adb: check legality of invariant pragma.
4429
a4640a39
AC
44302011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4431
4432 * bindgen.adb: Add comments.
4433
44342011-08-04 Yannick Moy <moy@adacore.com>
4435
4436 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4437 synthesized flag.
4438 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4439 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4440
44412011-08-04 Robert Dewar <dewar@adacore.com>
4442
4443 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4444 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4445 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4446
39ade2f9
AC
44472011-08-04 Thomas Quinot <quinot@adacore.com>
4448
4449 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4450
44512011-08-04 Thomas Quinot <quinot@adacore.com>
4452
4453 PR ada/47880
4454 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4455 allocated object.
4456
44572011-08-04 Robert Dewar <dewar@adacore.com>
4458
4459 * einfo.ads, exp_ch4.adb: Minor reformatting.
4460
44612011-08-04 Jerome Lambourg <lambourg@adacore.com>
4462
4463 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4464
7efc3f2d
AC
44652011-08-04 Ed Schonberg <schonberg@adacore.com>
4466
4467 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4468 type in all cases to compute list of primitive operations, because full
4469 view may be an itype that is not attached to the list of declarations.
4470
44712011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4472
4473 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4474 library has already been finalized.
4475 (Gen_Adafinal_C): Likewise.
4476 (Gen_Adainit_Ada): Generate an early return if the library has
4477 already been elaborated.
4478 (Gen_Adainit_C): Likewise.
4479 (Gen_Output_File_Ada): Generate an elaboration flag.
4480 (Gen_Output_File_C): Likewise.
4481
f65df609
HK
44822011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4483
4484 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4485 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4486 built in the first place.
4487 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4488 for CodePeer because Finalize_Address was not built to begin with.
4489 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4490
a0fb8fe8
AC
44912011-08-04 Pascal Obry <obry@adacore.com>
4492
4493 * adaint.c (__gnat_tmp_name): Use current process id to create temp
4494 filenames, this ensures unicity of filenames across processes.
4495
44962011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4497
4498 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4499 Raise_Controlled to Raise_From_Controlled_Operation. Update the
4500 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4501 Add False as the actual to From_Abort in the generated call to
4502 Raise_From_Controlled_Operation.
4503
45042011-08-04 Jerome Lambourg <lambourg@adacore.com>
4505
4506 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4507 so that the ali file name can be retrieved from outside of this package.
4508 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4509 doing nothing in the general case, but used to update the object file
4510 timestamp if directly generated by the backend.
4511 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4512 to a later time than the ali file one.
4513
9534ab17
AC
45142011-08-04 Yannick Moy <moy@adacore.com>
4515
4516 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4517 entities whose body contains an Annotate pragma which forces formal
4518 proof on this body.
4519 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4520 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4521 Mark_Non_ALFA_Subprogram to pass in a message and node.
4522 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4523 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4524 surrounding subprogram.
4525 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4526 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4527 as not in ALFA is annotated with Formal_Proof being On, then an error
4528 is issued based on the additional parameters for message and node.
4529 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4530 * gcc-interface/Make-lang.in: Update dependencies.
4531
45322011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4533
4534 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4535 Finalize_Address when CodePeer is enabled.
4536
45372011-08-04 Pascal Obry <obry@adacore.com>
4538
4539 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4540 the latter returns a pointer to a static buffer which is deallocated
4541 at the end of the routine.
4542
5c0e97dd
AC
45432011-08-04 Yannick Moy <moy@adacore.com>
4544
4545 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4546 after index creation; mark unconstrained base array type generated as
4547 being in/not in ALFA as well
4548 (Make_Index): mark subtype created as in/not in ALFA
4549 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4550 over a loop as in/not in ALFA, depending on its type and form of loop
4551 iteration.
4552
45532011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4554
4555 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4556 directly to False on .NET and JVM.
4557
7a93c64b
YM
45582011-08-04 Yannick Moy <moy@adacore.com>
4559
4560 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4561 constraint that subtype must come from source code to be in ALFA, so
4562 that anonymous subtypes can be in ALFA too.
4563
e9a1ed9b
YM
45642011-08-04 Yannick Moy <moy@adacore.com>
4565
4566 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
4567 reference for ALFA mode.
4568 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
4569 procedure public so as to use it from formal verification back-end.
4570
8e293fbd
AC
45712011-08-04 Jerome Lambourg <lambourg@adacore.com>
4572
4573 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
4574 invalid checks of the Parameter, making Remove_Switch not working
4575 correctly.
4576
45772011-08-04 Arnaud Charlet <charlet@adacore.com>
4578
4579 * targparm.ads: Update header: no run-time exception is needed on this
4580 file.
4581
45822011-08-04 Vincent Celier <celier@adacore.com>
4583
4584 * a-fihema.adb: Use System.IO instead of GNAT.IO
4585
45862011-08-04 Thomas Quinot <quinot@adacore.com>
4587
4588 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
4589 are forbidden in Compiler_Unit mode.
4590
cfae2bed
AC
45912011-08-04 Robert Dewar <dewar@adacore.com>
4592
4593 * sem_util.adb: Minor reformatting.
4594
45952011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4596
4597 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
4598 library-level finalizers.
4599 (Gen_Finalize_Library_C): Update the import string for library-level
4600 finalizers.
4601 (Gen_Finalize_Library_Defs_C): Update the definition name of a
4602 library-level finalizer.
4603 * exp_ch7.adb: Remove with and use clauses for Stringt.
4604 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
4605 Spec_Decl. Add local variable Body_Id. The names of library-level
4606 finalizers are now manually fully qualified and are no longer external.
4607 A single name is now capable of servicing .NET, JVM and non-VM targets.
4608 Pragma Export is no longer required to provide visibility for the name.
4609 (Create_Finalizer_String): Removed.
4610 (New_Finalizer_Name): New routine which mimics New_..._Name.
4611
01f0729a
AC
46122011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4613
4614 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
4615 elaboration counter to Standard_Short_Integer.
4616 * sem_util.adb (Build_Elaboration_Entity): Likewise.
4617 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
4618 (Gen_Elab_Externals_C): Likewise.
4619
46202011-08-04 Ed Falis <falis@adacore.com>
4621
4622 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4623 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4624 system-vxworks-mips.ads, system-vxworks-x86.ads
4625 (Always_Compatible_Rep): set to False for all VxWorks targets.
4626
2c1b72d7
AC
46272011-08-04 Robert Dewar <dewar@adacore.com>
4628
4629 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
4630 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
4631 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
4632 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
4633 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
4634 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
4635 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
4636 Minor reformatting and code reorganization.
4637
46382011-08-04 Emmanuel Briot <briot@adacore.com>
4639
4640 * projects.texi: Added doc for aggregate projects.
4641
824e9320
AC
46422011-08-04 Emmanuel Briot <briot@adacore.com>
4643
4644 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4645 Add support for overriding the Project_Path in aggregate projects.
4646
46472011-08-04 Robert Dewar <dewar@adacore.com>
4648
4649 * a-cofove.ads: Minor reformatting.
4650
46512011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4652
4653 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
4654 on the generated code.
4655 (Build_Finalize_Statements): Update the comment on the generated code.
4656 (Build_Initialize_Statements): Update the comment on the generated code.
4657 (Build_Object_Declarations): Add local variable Result. The object
4658 declarations are now built in sequence.
4659 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
4660 RE_Unit_Table.
4661
46622011-08-04 Robert Dewar <dewar@adacore.com>
4663
4664 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
4665
46662011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4667
4668 * einfo.ads (Elaboration_Entity): Document new definition and use.
4669 (Elaboration_Entity_Required): Adjust to above change.
4670 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
4671 * exp_ch12.adb: And with and use for Snames.
4672 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
4673 * exp_util.adb (Set_Elaboration_Flag): Likewise.
4674 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
4675 <Check_Unit_Name>: Deal with N_Expanded_Name.
4676 <Attribute_Elaborated>: Extend to all unit names.
4677 * sem_elab.adb: And with and use for Uintp.
4678 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4679 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4680 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4681 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4682 from Gen_Adainit_Ada.
4683 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4684 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
4685 case, do not call System.Standard_Library.Adafinal; instead call
4686 finalize_library if needed.
4687 (Gen_Adafinal_C): Likewise.
4688 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4689 non-main program case.
4690 (Gen_Adainit_C): Generate a couple of external declarations here.
4691 In the main program case, set SSL.Finalize_Library_Objects.
4692 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4693 (Gen_Elab_Calls_C): Likewise.
4694 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
4695 (Gen_Finalize_Library_C): Likewise. Generate a full function.
4696 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4697 objects here.
4698 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4699 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
4700 Gen_Adafinal_Ada.
4701 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4702 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 4703 of external declarations. Call Gen_Finalize_Library_C.
824e9320 4704
316d9d4f
EB
47052011-08-04 Emmanuel Briot <briot@adacore.com>
4706
4707 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4708 Compute_Compilation_Phases): new subprogram.
4709 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4710 The number of mains as well as the various compilation phases that
4711 need to be run are now project tree specific, since various
4712 aggregated trees might have different requirements. In particular,
4713 they do not all require bind or link phases.
4714
9434c32e
EB
47152011-08-04 Emmanuel Briot <briot@adacore.com>
4716
4717 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4718 (Project_Tree_Appdata): New type.
4719 It is now possible to associate application-specific data to a project
4720 tree. In particular, this is used in the gprbuild builder to avoid a
4721 number of global tables and htables, especially now that there can be
4722 several project trees loaded at once because of aggregate projects.
4723 (Debug_Name): new procedure.
4724 * projects.texi: Clarify syntax of "**" for Source_Dirs
4725
41ba34db
EB
47262011-08-03 Emmanuel Briot <briot@adacore.com>
4727
4728 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4729 the "roots" for a main.
4730 (Fill_From_Project): add support for aggregate projects. Main units
4731 in aggregated projects are now automatically added in the list of
4732 files to build (although this fails later on in gprbuild, because
4733 these files are not using the root proejct tree, so this needs
4734 further cleanup)
4735 * gcc-interface/Make-lang.in: Update dependencies.
4736
fccd42a9
AC
47372011-08-03 Yannick Moy <moy@adacore.com>
4738
4739 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4740 conditional expression in ALFA.
4741 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4742 expressions as not in ALFA.
4743
47442011-08-03 Robert Dewar <dewar@adacore.com>
4745
4746 * a-cofove.adb: Minor reformatting.
4747
47482011-08-03 Emmanuel Briot <briot@adacore.com>
4749
4750 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4751 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4752 gprbuild sources.
4753 These packages are more logically placed in the Queue package, since
4754 they manipulate the queue. It is also likely that they can be adapted
4755 for gnatmake, thus sharing more code.
4756 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4757 that we could move the above.
4758
47592011-08-03 Emmanuel Briot <briot@adacore.com>
4760
4761 * errutil.adb (Finalize): clean up the list of error messages on exit.
4762 Calling this subprogram multiple times will no longer show duplicate
4763 error messages on stderr.
4764
47652011-08-03 Emmanuel Briot <briot@adacore.com>
4766
4767 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4768 Getopt_Switches when we have already define a command line
4769 configuration.
4770
5e8c8e44
YM
47712011-08-03 Yannick Moy <moy@adacore.com>
4772
4773 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4774 in ALFA. Instead, they are considered as assertions to prove.
4775 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4776 nodes as not in ALFA. Instead, include conditional expressions in ALFA
4777 if they have no ELSE part, or if they occur in pre- and postconditions,
4778 where the Condition cannot have side-effects in ALFA
4779 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4780 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4781 Instead, include type conversion between scalar types in ALFA.
4782 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4783 if-and-only-if its type is in ALFA.
4784
5ffe0bab
AC
47852011-08-03 Thomas Quinot <quinot@adacore.com>
4786
4787 * scos.adb, get_scos.adb, put_scos.adb
4788 New code letter for decisions: G (entry guard)
4789 * par_sco.adb
4790 (Traverse_Subprogram_Body): Rename to...
4791 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4792 (Traverse_Protected_Body): New subprogram
4793 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4794 protected bodies and entry bodies.
4795
47962011-08-03 Yannick Moy <moy@adacore.com>
4797
4798 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4799 entities with get/set subprograms, which is set on procedure entities
4800 generated by the compiler for a postcondition.
4801 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4802 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4803 entity for a declaration
4804 (Get_Unique_Entity_For_Decl): new function returning an entity which
4805 represents a declaration, so that matching spec and body have the same
4806 entity.
4807
48082011-08-03 Robert Dewar <dewar@adacore.com>
4809
4810 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4811 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4812
48132011-08-03 Yannick Moy <moy@adacore.com>
4814
4815 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4816 library-level because retriction No_Implicit_Dynamic_Code in the
4817 front-end prevents its definition as a local subprogram
4818 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4819 for reuse in other contexts
4820 (Traverse_Declarations_Or_Statements,
4821 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4822 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4823 procedures take a callback parameter to be called on all declarations
4824 * lib-xref.ads
4825 (Traverse_All_Compilation_Units): new generic function to traverse a
4826 compilation unit and call a callback parameter on all declarations
4827
f9ad6b62
AC
48282011-08-03 Javier Miranda <miranda@adacore.com>
4829
4830 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4831 in Java since they are always enclosed in a namespace that
4832 differentiates them, and overloaded entities are supported by the VM.
4833
48342011-08-03 Ed Schonberg <schonberg@adacore.com>
4835
4836 * checks.adb (Determine_Range): If a computed bound of an operation is
4837 outside the range of the base type of the expression, and overflow
4838 checks are enabled, the result is unknown and cannot be used for any
4839 subsequent constant folding.
4840 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4841 unknown, so is the result of the comparison.
4842
48432011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4844
4845 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4846 From_Abort. When finalization was triggered by an abort, propagate
4847 Standard'Abort_Signal rather than Program_Error.
4848 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4849 From_Abort.
4850 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4851 From_Abort. When finalization was triggered by an abort, propagate
4852 Standard'Abort_Signal rather than Program_Error.
4853 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4854 From_Abort.
4855 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4856 Abort_Id. Update the calls to Build_Object_Declarations and
4857 Build_Raise_Statement to include Abort_Id.
4858 (Build_Adjust_Statements): New local variable Abort_Id. Update the
4859 calls to Build_Object_Declarations and Build_Raise_Statement to include
4860 Abort_Id.
4861 (Build_Finalize_Statements): New local variable Abort_Id. Update the
4862 calls to Build_Object_Declarations and Build_Raise_Statement to include
4863 Abort_Id.
4864 (Build_Components): Create an entity for Abort_Id when exceptions are
4865 allowed on the target.
4866 (Build_Finalizer): New local variable Abort_Id.
4867 (Build_Initialize_Statements): New local variable Abort_Id. Update the
4868 calls to Build_Object_Declarations and Build_Raise_Statement to include
4869 Abort_Id.
4870 (Build_Object_Declarations): Add new formal Abort_Id. Create the
4871 declaration of flag Abort_Id to preserve the original abort status
4872 before finalization code is executed.
4873 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4874 runtime routine Raise_From_Controlled_Operation.
4875 (Create_Finalizer): Update the call to Build_Raise_Statement to include
4876 Abort_Id. Update the call to Build_Object_Declarations to include
4877 Abort_Id. Update the layout of the finalizer body.
4878 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4879 (Process_Transient_Objects): New local variable Abort_Id. Remove the
4880 clunky code to create all flags and objects related to
4881 exception propagation and replace it with a call to
4882 Build_Object_Declarations. Update the call to Build_Raise_Statement to
4883 include Abort_Id.
4884 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4885 Add new formal Abort_Id and associated comment on its use.
4886 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4887 on its use.
4888 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4889 Remove the clunky code to create all flags and objects related to
4890 exception propagation and replace it with a call to
4891 Build_Object_Declarations. Update the call to Build_Raise_Statement.
4892
48932011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4894
4895 * s-tassta.adb: Fix minor typos.
4896
48972011-08-03 Robert Dewar <dewar@adacore.com>
4898
4899 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4900 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4901
1cdfa9be
AC
49022011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4903
4904 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4905 to packages. This ensures that the finalizer body will not end up
4906 inside the freeze node.
4907 (Process_Declarations): Add code to detect whether a freeze node has a
4908 nested finalization collection.
4909
49102011-08-03 Pascal Obry <obry@adacore.com>
4911
4912 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4913 (Current_Session): Return a not null access to Session_Type.
4914 (Default_Session): Likewise.
4915
243cae0a
AC
49162011-08-03 Robert Dewar <dewar@adacore.com>
4917
4918 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4919 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4920
49212011-08-03 Pascal Obry <obry@adacore.com>
4922
4923 * g-awk.ads: Minor comment fix.
4924
49252011-08-03 Sergey Rybin <rybin@adacore.com>
4926
4927 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4928 the tree structure related to discriminant constraints.
4929 Original_Discriminant cannot be used any more for computing the
4930 defining name for the reference to a discriminant.
4931
49322011-08-03 Ed Schonberg <schonberg@adacore.com>
4933
4934 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4935 function is not visibly tagged, this is not a dispatching call and
4936 therfore is not Tag_Indeterminate, even if the function is marked as
4937 dispatching on result.
4938
f553e7bc
AC
49392011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4940
4941 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4942 (Expand_N_Free_Statement): Add a guard to protect against run-times
4943 which do not support controlled types.
4944 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4945 against run-times which do not support controlled types.
4946 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4947 against run-times which do not support controlled types.
4948 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4949 against run-times which do not support controlled types.
4950 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4951 protect against run-times which do not support controlled types.
4952
49532011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4954
4955 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4956 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4957
e4982b64
AC
49582011-08-03 Ed Schonberg <schonberg@adacore.com>
4959
4960 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4961 modified in the source, to prevent spurious warnings when compiling
4962 with -gnatg.
4963
49642011-08-03 Thomas Quinot <quinot@adacore.com>
4965
4966 * a-except-2005.adb: Minor reformatting.
4967
49682011-08-03 Ed Schonberg <schonberg@adacore.com>
4969
4970 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4971 is a renaming declaration in the private part of a package, do not emit
4972 a warning that the with_clause could be moved because the renaming may
4973 be used in the body or in a child unit.
4974
49752011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4976
4977 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4978 Propagate the Comes_From_Source attribute from the original return
4979 object to the renaming.
4980
49812011-08-03 Jose Ruiz <ruiz@adacore.com>
4982
4983 * exp_ch7.adb (Build_Raise_Statement): Do not call
4984 Raise_From_Controlled_Operation when this routine is not present in
4985 the run-time library.
4986 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4987 libraries (Ravenscar), tasks are non-terminating, and protected objects
4988 and tasks can only appear at library level, so we do not want
4989 finalization of protected objects nor tasks.
4990 * exp_intr.adb: Minor clarification in comment.
4991 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4992 Gen_Output_File_C): Remove references to finalization of library-level
4993 objects when using restricted run-time libraries.
4994
49952011-08-03 Ed Schonberg <schonberg@adacore.com>
4996
4997 * sem_ch3.adb (Build_Discriminant_Constraints): Set
4998 Original_Discriminant only if the parent type is a generic formal.
4999
deb8dacc
HK
50002011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5001
5002 * exp_ch13.adb: Add with and use clause for Targparm;
5003 (Expand_N_Free_Statement): Prevent the generation of a custom
5004 Deallocate on .NET/JVM targets since this requires pools and address
5005 arithmetic.
5006 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5007 .NET/JVM targets, attach the newly allocated object to the access
5008 type's finalization collection. Do not generate a call to
5009 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5010 exist in the runtime.
5011 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5012 create a custom Allocate for object that do not require initialization.
5013 Attach a newly allocated object to the access type's finalization
5014 collection on .NET/JVM.
5015 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5016 assignment of controlled types on .NET/JVM. The two hidden pointers
5017 Prev and Next and stored and later restored after the assignment takes
5018 place.
5019 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5020 kludge for .NET/JVM to recognize a particular piece of code coming from
5021 Heap_Management and change the call to Finalize into Deep_Finalize.
5022 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5023 finalization collections on .NET/JVM only for types derived from
5024 Controlled. Separate the association of storage pools with a collection
5025 and only allow it on non-.NET/JVM targets.
5026 (Make_Attach_Call): New routine.
5027 (Make_Detach_Call): New routine.
5028 (Process_Object_Declarations): Suppress the generation of
5029 build-in-place return object clean up code on .NET/JVM since it uses
5030 pools.
5031 * exp_ch7.ads (Make_Attach_Call): New routine.
5032 (Make_Detach_Call): New routine.
5033 * exp_intr.adb Add with and use clause for Targparm.
5034 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5035 on .NET/JVM targets.
5036 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5037 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5038 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5039 names used in finalization.
5040
50412011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5042
5043 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5044 (Attach, Detach): Lock the current task when chaining an object onto a
5045 collection.
5046
df3e68b1
HK
50472011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5048
5049 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5050 Rewritten to create the message strings when the exception is not
5051 raised by an abort during finalization.
5052 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5053 Raise_From_Controlled_Operation and update its associated comment.
5054 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5055 Ada.Finalization.Heap_Management provides key functionality
5056 associated with controlled objects on the heap, their creation,
5057 finalization and reclamation. Type Finalization_Collection is
5058 effectively a wrapper which sits ontop of a storage pool and performs
5059 all necessary bookkeeping for all the objects it contains. Each
5060 access-to-controlled or access-to-class-wide type receives a collection
5061 as part of its expansion. The compiler generates buffer code and
5062 invokes Allocate / Deallocate to create and destroy allocated
5063 controlled objects.
5064 * a-finali.adb ("="): Removed.
5065 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5066 fields Prev and Next.
5067 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5068 A library unit with at least one controlled object on the library level
5069 has a special finalizer which is invoked by the binder. To signal this,
5070 ali files carry field PF.
5071 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5072 associated comment on field usage.
5073 * a-tags.adb (Get_RC_Offset): Removed.
5074 (Needs_Finalization): New routine.
5075 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5076 Dispatch tables now carry field Needs_Finalization which provides
5077 runtime indication whether a type is controlled or has controlled
5078 components or both. Remove field RC_Offset.
5079 (Get_RC_Offset): Removed along with its associated pragma Export.
5080 Since tagged types with controlled components no longer carry hidden
5081 field _controller, the special mechanism to retrieve its location is no
5082 longer needed.
5083 (Needs_Finalization): New routine.
5084 * atree.ads, atree.adb (Elist24): New routine.
5085 (Set_Elist24): New routine.
5086 * atree.h: Add a define clause for Elist24.
5087 * bindgen.adb New library-level variable Lib_Final_Built.
5088 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5089 presence of a VM target, the routine generates calls to the proper
5090 library finalization routine.
5091 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5092 targets. Set the correct library finalization routine depending on
5093 whether the library has controlled objects or this is a VM compilation.
5094 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5095 to library-level finalizers of compiled units in reverse order of
5096 elaboration. It also produces exception management code and reraises a
5097 potential exception after all units have been finalized.
5098 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5099 library-level finalizers of compiled units in reverse order of
5100 elaboration.
5101 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5102 definitions of all library-level finalizers available to the compilation
5103 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5104 dependent code.
5105 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5106 System.Standard_Library.Adafinal directly. If the library needs
5107 finalization actions, create the sequence of finalization calls.
5108 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5109 Generate a with clause for System.Soft_Links when compiling for a VM.
5110 Remove the code which imports System.Standard_Library.Adafinal as
5111 Do_Finalize. Generate the library finalization routine.
5112 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5113 If the library needs finalization actions, create all the definitions
5114 of library- level finalizers.
5115 (Has_Finalizer): New routine. Determines whether at least one compiled
5116 unit has a library-level finalizer.
5117 Add type Qualification_Mode.
5118 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5119 * einfo.adb: New usage of field 15 as Return_Flag.
5120 Remove Finalization_Chain_Entity from the usages of field 19.
5121 Remove Associated_Final_Chain from the usages of field 23.
5122 New usage of field 23 as Associated_Collection.
5123 New usage of field 24 as Finalizer.
5124 New usage of flag 252 as Is_Processed_Transient.
5125 (Associated_Final_Chain): Removed.
5126 (Associated_Collection): New routine.
5127 (Finalization_Chain_Entity): Removed.
5128 (Finalizer): New routine.
5129 (Is_Finalizer): New routine.
5130 (Is_Processed_Transient): New routine.
5131 (Return_Flag): New routine.
5132 (Set_Associated_Final_Chain): Removed.
5133 (Set_Associated_Collection): New routine.
5134 (Set_Finalization_Chain_Entity): Removed.
5135 (Set_Finalizer): New routine.
5136 (Set_Is_Processed_Transient): New routine.
5137 (Set_Return_Flag): New routine.
5138 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5139 displayed flags.
5140 (Write_Field8_Name): Alphabetize the output.
5141 (Write_Field11_Name): Alphabetize the output.
5142 (Write_Field12_Name): Alphabetize the output.
5143 (Write_Field13_Name): Alphabetize the output.
5144 (Write_Field14_Name): Alphabetize the output.
5145 (Write_Field15_Name): Alphabetize the output.
5146 (Write_Field16_Name): Alphabetize the output.
5147 (Write_Field17_Name): Alphabetize the output.
5148 (Write_Field18_Name): Alphabetize the output.
5149 (Write_Field19_Name): Alphabetize the output. Remove the output of
5150 Finalization_Chain_Entity.
5151 (Write_Field20_Name): Alphabetize the output.
5152 (Write_Field21_Name): Alphabetize the output.
5153 (Write_Field22_Name): Alphabetize the output.
5154 (Write_Field23_Name): Alphabetize the output. Remove the output of
5155 Associated_Final_Chain. Add output for Associated_Collection.
5156 (Write_Field24_Name): Alphabetize the output.
5157 (Write_Field25_Name): Add output for Finalizer.
5158 (Write_Field26_Name): Alphabetize the output.
5159 (Write_Field27_Name): Alphabetize the output.
5160 (Write_Field28_Name): Alphabetize the output.
5161 * einfo.ads: Add new field description for Associated_Collection and
5162 its uses in nodes.
5163 Remove Associated_Final_Chain and its uses in nodes.
5164 Remove Finalization_Chain_Entity and its uses in nodes.
5165 Add new field description for Finalizer and its uses in nodes.
5166 Add new synthesized attribute Is_Finalizer.
5167 Add new flag description for Is_Processed_Transient and its uses in
5168 nodes.
5169 Add new field description for Return_Flag and its uses in nodes.
5170 (Associated_Final_Chain): Removed along with its pragma Inline.
5171 (Associated_Collection): New routine and pragma Inline.
5172 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5173 (Finalizer): New routine and pragma Inline.
5174 (Is_Finalizer): New routine and pragma Inline.
5175 (Is_Processed_Transient): New routine and pragma Inline.
5176 (Return_Flag): New routine and pragma Inline.
5177 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5178 (Set_Associated_Collection): New routine and pragma Inline.
5179 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5180 (Set_Finalizer): New routine and pragma Inline.
5181 (Set_Is_Processed_Transient): New routine and pragma Inline.
5182 (Set_Return_Flag): New routine and pragma Inline.
5183 * exp_aggr.adb: Alphabetize subprograms.
5184 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5185 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5186 associated comments. Remove local variables External_Final_List and
5187 Attach.
5188 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5189 Ancestor. Remove the retrieval of finalization lists. Update the call to
5190 Make_Adjust_Call.
5191 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5192 lists. Update the call to Late_Expansion.
5193 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5194 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5195 (Gen_Assign): Remove the retrieval of the finalization list used to
5196 build the assignment. Update the calls to Make_Init_Call and
5197 Make_Adjust_Call.
5198 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5199 Remove the mechanism to determine attachment levels and finalization
5200 list retrieval. Remove the processing for coextensions.
5201 (Init_Controller): Removed. Controllers no longer exist.
5202 (Late_Expansion): Remove formals Flist and Obj along with their
5203 associated comments. Update the calls to Build_Record_Aggr_Code and
5204 Build_Array_Aggr_Code.
5205 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5206 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5207 appear in entry bodies, protected subprograms and task bodies.
5208 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5209 * exp_ch3.adb (Add_Final_Chain): Removed.
5210 (Build_Array_Init_Proc): Alphabetize local variables.
5211 (Build_Assignment): Alphabetize local variables. Update the call to
5212 Maked_Adjust_Call.
5213 (Build_Class_Wide_Master): Rename local variables to better reflect
5214 their role.
5215 (Build_Discriminant_Assignments): Code reformatting.
5216 (Build_Init_Call_Thru): Code reformatting.
5217 (Build_Init_Procedure): Code reformatting. Generate a special version
5218 of Deep_Finalize which is capable of finalizing all initialized
5219 components and ignore the rest.
5220 (Build_Init_Statements): Rename local variables to better reflect their
5221 role.
5222 Reimplement the mechanism to include the creation and update of an index
5223 variable called a "counter". It is used as a bookmark for tracing
5224 initialized and non-initialized components.
5225 (Build_Initialization_Call): Remove local variable Controller_Typ.
5226 Alphabetize all local variables. Remove the initialization of the
5227 record controller and update the call to Make_Init_Call.
5228 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5229 New local variable Counter.
5230 (Constrain_Array): Alphabetize.
5231 (Expand_Freeze_Array_Type): Create a collection instead of a
5232 finalization list.
5233 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5234 Finalize_Address which is used in conjunction with allocated controlled
5235 objects.
5236 (Expand_N_Object_Declaration): Remove the creation of a finalization
5237 list for anonymous access types. Update the calls to Make_Init_Call and
5238 Make_Adjust_Call.
5239 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5240 retrieval of finalization lists. Remove the expansion of the record
5241 controller. Create TSS primitive Finalize_Address used in conjunction
5242 with controlled objects on the heap. Create finalization collections
5243 for access-to-controlled record components.
5244 (Expand_Record_Controller): Removed.
5245 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5246 class-wide types now requires additional processing. Create
5247 finalization collections for access-to-controlled types.
5248 (Increment_Counter): New routine.
5249 (Make_Counter): New routine.
5250 (Make_Eq_If): Remove the mention of Name_uController.
5251 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5252 types coming from System.Finalization_Root.
5253 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5254 (Predefined_Primitive_Bodies): There is no longer need to skip types
5255 coming from System.Finalization_Root.
5256 (Stream_Operation_OK): Do not generate stream routines for
5257 type Ada.Finalization.Heap_Management.Finalization_Collection.
5258 * exp_ch3.ads: Alphabetize subprograms.
5259 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5260 Add with and use clause for Lib.
5261 (Complete_Coextension_Finalization): Removed.
5262 (Complete_Controlled_Allocation): New routine. Create a finalization
5263 collection for anonymous access-to-controlled types. Create a custom
5264 Allocate which interfaces with the back end and the machinery in
5265 Heap_Management.
5266 (Expand_Allocator_Expression): Add necessary calls to
5267 Complete_Controlled_Allocation. Remove the retrieval of finalization
5268 lists. Update the calls to Make_Adjust_Call. Generate a call to
5269 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5270 the associated collection.
5271 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5272 Code clean up. Remove the retrieval of finalization lists and
5273 attachment levels.
5274 Update the call to Make_Init_Call. Generate a call to
5275 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5276 the associated collection.
5277 (Get_Allocator_Final_List): Removed. Finalization lists are not
5278 available.
5279 (Suitable_Element): Remove the mention of Name_uController.
5280 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5281 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5282 the left hand side, carry out the assignment and adjust the left hand
5283 side.
5284 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5285 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5286 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5287 BIP_Collection and BIPcollection.
5288 (Build_Heap_Allocator): New routine used to allocate the return object
5289 of a build-in-place function onto a collection.
5290 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5291 (Expand_Call): Do not replace direct calls to Deep routines with their
5292 aliases.
5293 (Expand_N_Extended_Return_Statement): Give all variables shorter names
5294 and update their occurrences. Add a special return flag to monitor the
5295 [ab]normal execution of the function. The flag is set right before the
5296 return statement.
5297 Rewrite the mechanism used to allocate a build-in-place return object
5298 on the heap or on a storage pool.
5299 (Is_Direct_Deep_Call): New routine.
5300 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5301 build-in-place function call instead of a final list. Build a call to
5302 Set_Finalize_Address_Ptr to decorate the associated collection.
5303 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5304 order to name the build-in-place function call's result for later
5305 finalization. Add a collection to a build-in-place function call
5306 instead of a final list.
5307 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5308 build-in-place function call instead of a final list. Remove the code
5309 which moves one final list and transforms it into the actual in a
5310 nested build-in-place call.
5311 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5312 build-in-place function call instead of a final list.
5313 (Move_Final_List): Removed.
5314 (Needs_BIP_Collection): New routine.
5315 (Needs_BIP_Final_List): Removed.
5316 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5317 enumeration type BIP_Formal_Kind.
5318 Update the related comment.
5319 (Needs_BIP_Collection): New routine.
5320 (Needs_BIP_Final_List): Removed.
5321 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5322 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5323 majority of subprograms in this unit. Add Name_Finalize_Address to
5324 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5325 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5326 statements for an array type.
5327 (Build_Adjust_Statements): Create the adjust statements for a record
5328 type.
5329 (Build_Cleanup_Statements): New routine. A procedure which given any
5330 construct containing asynchronous calls, references to _master, or is a
5331 task body, a task allocation or a protected body produces the necessary
5332 runtime calls to clean up these constructs.
5333 (Build_Exception_Handler): New routine.
5334 (Build_Final_List): Removed.
5335 (Build_Finalization_Collection): New routine. A core procedure which
5336 creates a collection to service heap allocated controlled objects
5337 associated with an access-to-controlled type.
5338 (Build_Finalize_Statements): Create the finalization statements for a
5339 record types.
5340 (Build_Finalizer): New routine. A core procedure which given any
5341 construct with declarations and/or statements detects all objects which
5342 need any type of clean up (controlled objects, protected objects) and
5343 generates all necessary code to clean up the said objects in the proper
5344 order.
5345 (Build_Finalizer_Call): New routine.
5346 (Build_Initialize_Statements): Create the initialization statements for
5347 an array type. The generated routine contains code to finalize partially
5348 initialized arrays.
5349 (Build_Object_Declarations): New routine.
5350 (Build_Raise_Statement): New routine.
5351 (Clean_Simple_Protected_Objects): Removed.
5352 (Controller_Component): Removed.
5353 (Enclosing_Function): New routine.
5354 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5355 either declarations or statements or both.
5356 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5357 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5358 package.
5359 (Find_Final_List): Removed.
5360 (Global_Flist_Ref): Removed.
5361 (In_Finalization_Root): Removed.
5362 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5363 scope in terms of tree nodes. Process all transient variables within
5364 that range.
5365 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5366 generated after the adjust.
5367 (Make_Attach_Call): Removed.
5368 (Make_Call): New routine.
5369 (Make_Clean): Removed.
5370 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5371 build routines.
5372 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5373 in Deep routines.
5374 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5375 build routines.
5376 (Make_Final_Call): Modified to simply create a call to either
5377 Deep_Finalize or Finalize.
5378 (Make_Finalize_Address_Body): New routine.
5379 (Make_Finalize_Address_Stmts): New routine. A function which produces
5380 TSS primitive Finalize_Address used in conjunction with heap allocated
5381 controlled objects.
5382 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5383 (Make_Init_Call): Rewritten. There is no longer an attach call
5384 generated after initialization.
5385 (Make_Local_Deep_Finalize): New routine.
5386 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5387 (Make_Transient_Block): Remove the finalization list retrieval and
5388 manipulation.
5389 (Needs_Finalization): Moved to Exp_Util.
5390 (Parent_Field_Type): New routine.
5391 (Preprocess_Components): New routine.
5392 (Process_Transient_Objects): New routine.
5393 (Wrap_HSS_In_Block): New routine.
5394 (Wrap_Transient_Declaration): Remove finalization list management and
5395 controller insertion.
5396 (Wrap_Transient_Expression): Code reformatting.
5397 (Wrap_Transient_Statement): Code reformatting.
5398 * exp_ch7.ads (Build_Final_List): Removed.
5399 (Build_Finalization_Collection): New routine.
5400 (Build_Raise_Statement): New routine.
5401 (Controller_Component): Removed.
5402 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5403 (Find_Final_List): Removed.
5404 (In_Finalization_Root): Removed.
5405 (Is_Simple_Protected_Type): Update related comment.
5406 (Make_Adjust_Call): New parameter profile and associated comments.
5407 (Make_Attach_Call): Removed.
5408 (Make_Final_Call): New parameter profile and associated comments.
5409 (Make_Finalize_Address_Body): New routine.
5410 (Make_Init_Call): New parameter profile and associated comments.
5411 (Make_Local_Deep_Finalize): New routine.
5412 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5413 (Needs_Finalization): Moved to Exp_Util.
5414 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5415 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5416 (Find_Protection_Type): Moved to Exp_Util.
5417 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5418 (Make_DT): Update sequence of dispatch table initialization. Remove the
5419 initialization of field RC_Offset. Add initialization of field Needs_
5420 Finalization.
5421 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5422 Reimplement how an object is first finalized, then deallocated.
5423 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5424 Code reformatting.
5425 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5426 Register TSS_Finalize_Address with type TSS_Names.
5427 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5428 procedure provides the interface between an allocation / deallocation
5429 and the support machinery in Ada.Finalization.Heap_Management.
5430 (Find_Init_Call): Code reformatting.
5431 (Find_Init_Call_In_List): Code reformatting.
5432 (Find_Protection_Type): Moved from Exp_Ch9.
5433 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5434 (Has_Controlled_Coextensions): Removed.
5435 (Has_Controlled_Objects): New routine.
5436 (In_Library_Level_Package_Body): New routine.
5437 (Insert_Action_After): New routine.
5438 (Is_Finalizable_Transient): New routine. This predicate determines
5439 whether an object declaration is one of the many variants of controlled
5440 transients.
5441 (Is_Null_Access_BIP_Func_Call): New routine.
5442 (Is_Non_BIP_Func_Call): New routine.
5443 (Is_Related_To_Func_Return): New routine.
5444 (Needs_Finalization): Moved from Exp_Ch7.
5445 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5446 (Find_Protection_Type): Moved from Exp_Ch9.
5447 (Has_Controlled_Coextensions): Removed.
5448 (Has_Controlled_Objects): New routine.
5449 (In_Library_Level_Package_Body): New routine.
5450 (Insert_Action_After): New routine.
5451 (Is_Finalizable_Transient): New routine.
5452 (Is_Null_Access_BIP_Func_Call): New routine.
5453 (Is_Non_BIP_Func_Call): New routine.
5454 (Is_Related_To_Func_Return): New routine.
5455 (Needs_Finalization): Moved from Exp_ch7.
5456 * expander.adb (Expand): Add a case for N_Free_Statement.
5457 * freeze.adb (Freeze_All): Replace the generation of a finalization
5458 list with a collection for access-to-controlled types.
5459 (Freeze_Entity): Code reformatting.
5460 (Freeze_Record_Type): Remove the freezing of a record controller
5461 component.
5462 (Freeze_Subprogram): Code reformatting.
5463 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5464 finalization list.
5465 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5466 has a library-level finalizer.
5467 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5468 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5469 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5470 files. Add a-fihema to the list of object files.
5471 * par-ch4.adb:
5472 Alphabetize the associations in type Is_Parameterless_Attribute.
5473 * rtsfind.ads: Ada.Finalization_List.Controller and
5474 System.Finalization_Implementation are no longer a GNAT unit.
5475 Update the range of type Ada_Finalization_Child. Remove the following
5476 recoverable entities:
2c7f9cc0 5477
df3e68b1
HK
5478 RE_Attach_To_Final_List
5479 RE_Deep_Tag_Attach
5480 RE_Finalize_List
5481 RE_Finalize_One
5482 RE_Finalizable_Ptr_Ptr
5483 RE_Global_Final_List
5484 RE_Limited_Record_Controller
5485 RE_List_Controller
5486 RE_Move_Final_List
5487 RE_Record_Controller
5488 RE_Simple_List_Controller
2c7f9cc0 5489
df3e68b1 5490 Add the following recoverable entities:
2c7f9cc0 5491
df3e68b1
HK
5492 RE_Add_Offset_To_Address
5493 RE_Allocate
5494 RE_Base_Pool
5495 RE_Deallocate
5496 RE_Exception_Identity
5497 RE_Finalization_Collection
5498 RE_Finalization_Collection_Ptr
5499 RE_Needs_Finalization
5500 RE_Save_Library_Occurrence
5501 RE_Set_Finalize_Address_Ptr
5502 RE_Set_Storage_Pool_Ptr
5503 RE_Storage_Count
5504 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5505 Name_uController.
5506 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5507 (First_Stored_Discriminant): Remove the mention of Name_uController.
5508 * sem_aux.ads: Comment reformatting.
5509 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5510 to redecorate an already existing class-wide type.
5511 (Decorate_Tagged_Type): New parameter profile and associated comment.
5512 Create a "shadow class-wide type" for a shadow entity.
5513 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5514 of the final chain along with the associated comment.
5515 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5516 Full_Desig and set it to the full view of the designated type.
5517 Initialize the finalization collection to empty.
5518 (Build_Derived_Record_Type): Alphabetize local variables. Code
5519 reformatting.
5520 (Collect_Fixed_Components): Remove the mention of Name_uController.
5521 (Create_Constrained_Components): Remove the mention of Name_uController.
5522 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5523 class-wide type of a shadow entity.
5524 (Process_Full_View): Update the machinery which marks type
5525 Limited_Controlled's entity as limited.
5526 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5527 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5528 list, instead make a collection build-in-place formal.
5529 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5530 a designated type in order to establish a match between the renaming
5531 and the renamed entity.
5532 (Find_Selected_Component): Add guard to prevent spurious exceptions
5533 from being raised on .NET/JVM.
5534 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5535 to the list of primitive that need special processing. Update arrays
5536 C_Names and D_Names.
5537 (Replace_Types): Handle class-wide types.
5538 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5539 different parameter profile, look at the first formal.
5540 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5541 use clauses for Exp_Util.
5542 * sem_res.adb: Remove with and use clauses for Elists.
5543 (Propagate_Coextensions): Removed.
5544 (Resolve_Allocator): Do not propagate the list of coextensions from one
5545 allocator to another.
5546 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5547 Deaccessed_T to Desig_Typ.
5548 (Enter_Name): Remove the mention of Name_uController.
5549 (Gather_Components): Remove the mention of Name_uController.
5550 (Incomplete_Or_Private_View): New routine.
5551 (Is_Coextension_Root): Removed.
5552 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5553 * sem_util.ads (Incomplete_Or_Private_View): New routine.
5554 (Is_Coextension_Root): Removed.
5555 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5556 Controlled types are now derived from a null tagged record. Remove
5557 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5558 * sinfo.adb (Coextensions): Removed.
5559 (Set_Coextensions): Removed.
5560 * sinfo.ads: Remove Coextensions from the explanation of node fields
5561 and its uses in nodes.
5562 Update the field usage of N_Allocator.
5563 (Coextensions): Removed along with its pragma Inline.
5564 (Set_Coextensions): Removed along with its pragma Inline.
5565 * snames.ads-tmpl: Remove names
2c7f9cc0 5566
df3e68b1
HK
5567 Name_uClean
5568 Name_uController
5569 Name_uFinal_List
5570 Name_uLocal_Final_List
5571 Name_Finalization_Root
5572 Name_Next
5573 Name_Prev
2c7f9cc0 5574
df3e68b1 5575 Add names
2c7f9cc0 5576
df3e68b1
HK
5577 Name_uFinalizer
5578 Name_Finalize_Address
5579 * s-pooglo.adb (Allocate): Add overriding indicator.
5580 (Deallocate): Add overriding indicator.
5581 (Storage_Size): Add overriding indicator.
5582 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
5583 than Finalize_Global_List.
5584 (Null_Finalize_Global_List): Removed.
5585 (Save_Library_Occurrence): New routine.
5586 * s-soflin.ads: Remove variable Finalize_Global_List along with its
5587 initialization. Add variable Finalize_Library_Objects along with its
5588 pragma Export. Add variables Library_Exception and
5589 Library_Exception_Set along with their pragma Export.
5590 (Null_Finalize_Global_List): Removed.
5591 (Save_Library_Occurrence): New routine.
5592 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
5593 rather than Finalize_Global_List.
5594 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
5595 of the constructed node.
5596
2ee06322
RO
55972011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5598
5599 * link.c: Include "auto-host.h" before system headers.
5600
f77b022b
VC
56012011-08-03 Vincent Celier <celier@adacore.com>
5602
5603 * make.adb (Gnatmake): Add to table Library_Projs only library projects
5604 that are not extended. Do not check if a library project that is
5605 extended should be regenerated. Do not add to table Library_Paths the
5606 libraries that are in extended projects. Link only with libraries that
5607 are in libray projects that are not extended.
5608 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
5609 for a library project that is extended.
5610
0187b60e
AC
56112011-08-03 Gary Dismukes <dismukes@adacore.com>
5612
5613 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
5614 conforming subprogram renamings that appear to be completions if they
5615 are not fully conformant.
5616 Such renamings are homographs but not completions.
5617 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
5618 names in a subprogram renaming that appears in an instance.
5619
56202011-08-03 Ed Schonberg <schonberg@adacore.com>
5621
5622 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
5623 not immutably limited, build actual subtype from expression to provide
5624 proper bounds to caller.
5625
56262011-08-03 Gary Dismukes <dismukes@adacore.com>
5627
5628 * sem_ch8.adb: Minor comment correction.
5629
56302011-08-03 Thomas Quinot <quinot@adacore.com>
5631
5632 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
5633 returning a limited array, use an extended return statement.
5634
56352011-08-03 Vincent Celier <celier@adacore.com>
5636
5637 * make.adb (Initialize): If --subdirs= is used, but no project file is
5638 specified, attempt to create the specify subdir if it does not already
5639 exist and use it as the object directory as if -D had been specified.
5640
56412011-08-03 Arnaud Charlet <charlet@adacore.com>
5642
5643 * s-tpopsp-vms.adb: New file.
5644 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
5645 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
5646
e280f981
AC
56472011-08-03 Emmanuel Briot <briot@adacore.com>
5648
5649 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
5650 package.
5651
56522011-08-03 Yannick Moy <moy@adacore.com>
5653
5654 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
5655 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
5656 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
5657 detect that an array has static bounds.
5658
98c99a5a
AC
56592011-08-03 Thomas Quinot <quinot@adacore.com>
5660
5661 * exp_dist.adb: Minor reformatting.
5662
56632011-08-03 Arnaud Charlet <charlet@adacore.com>
5664
5665 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
5666 (ATCB_Key): Removed, not always used.
5667
56682011-08-03 Emmanuel Briot <briot@adacore.com>
5669
5670 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
5671 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
5672 most remaining global variables.
5673
686d0984
AC
56742011-08-03 Robert Dewar <dewar@adacore.com>
5675
5676 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
5677 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5678 reformatting.
5679
56802011-08-03 Javier Miranda <miranda@adacore.com>
5681
5682 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5683 that must be passed by copy in VM targets.
5684
56852011-08-03 Emmanuel Briot <briot@adacore.com>
5686
5687 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5688 duplicates a similar htable now in the project tree.
5689
56902011-08-03 Claire Dross <dross@adacore.com>
5691
5692 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5693 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5694 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5695 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5696 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5697 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5698 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5699 update.
5700
57012011-08-03 Arnaud Charlet <charlet@adacore.com>
5702
5703 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5704 (ATCB_Key): Removed, not always used.
5705 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5706 s-taprop-posix.adb.
5707 * s-tpopsp-tls.adb: New file.
5708 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5709 x86/x64/ia64/powerpc/sparc Linux.
5710
57112011-08-03 Arnaud Charlet <charlet@adacore.com>
5712
5713 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5714 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5715
57162011-08-03 Thomas Quinot <quinot@adacore.com>
5717
5718 * rtsfind.ads, exp_dist.adb, exp_dist.ads
5719 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5720 Fix type selection for mapping integer types to PolyORB types.
5721
57222011-08-03 Bob Duff <duff@adacore.com>
5723
5724 * sem_ch7.adb: Minor comment clarification.
5725
57262011-08-03 Bob Duff <duff@adacore.com>
5727
5728 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5729 an error analyzing a choice, skip further processing. Further
5730 processing could cause a crash or cascade errors.
5731
40ecf2f5
EB
57322011-08-03 Emmanuel Briot <briot@adacore.com>
5733
5734 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5735 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5736 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5737 prj-env.ads (Shared_Project_Tree_Data): new type
5738 An aggregate project and its aggregated trees need to share the common
5739 data structures used for lists of strings, packages,... This makes the
5740 code simpler since otherwise we have to pass the root tree (also used
5741 for the configuration file data) in addition to the current project
5742 tree. This also avoids ambiguities as to which tree should be used.
5743 And finally this saves a bit of memory.
5744 (For_Every_Project_Imported): new parameter Tree.
5745 Since aggregated projects are using a different tree, we need to let
5746 the caller know which tree to use to manipulate the returned project.
5747
9fde638d
RD
57482011-08-03 Robert Dewar <dewar@adacore.com>
5749
5750 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5751 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5752 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5753 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5754
95eb8b69
AC
57552011-08-03 Javier Miranda <miranda@adacore.com>
5756
5757 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5758 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5759
57602011-08-03 Bob Duff <duff@adacore.com>
5761
5762 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5763 the Base_Type.
5764
57652011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
5766
5767 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5768 g-sehash.ads: Fix typo. Update header.
5769
57702011-08-03 Thomas Quinot <quinot@adacore.com>
5771
5772 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5773 expansion.
5774
57752011-08-03 Gary Dismukes <dismukes@adacore.com>
5776
5777 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5778 prefixes of private types along with records, since the selector may be
5779 a discriminant.
5780 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5781 private types along with records, since the selector may be a
5782 discriminant.
5783
92e77027
AC
57842011-08-03 Emmanuel Briot <briot@adacore.com>
5785
b2f7ebc1 5786 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
5787
57882011-08-03 Javier Miranda <miranda@adacore.com>
5789
5790 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5791 Tagged_Type_Expansion.
5792
57932011-08-03 Yannick Moy <moy@adacore.com>
5794
b2f7ebc1
GP
5795 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5796 violation when the argument of concatenation is the name of a
5797 constant.
92e77027 5798
ab29a348
EB
57992011-08-03 Emmanuel Briot <briot@adacore.com>
5800
5801 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5802 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5803 (Process_Declarative_Items): new parameter Child_Env.
5804
9466892f
AC
58052011-08-03 Yannick Moy <moy@adacore.com>
5806
589ef536
GP
5807 * alfa.ads: Update format of ALFA section in ALI file in order to
5808 add a mapping from bodies to specs when both are present.
5809 (ALFA_Scope_Record): Add components for spec file/scope.
5810 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5811 present.
5812 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5813 collected, fill in the spec information when relevant.
5814 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
5815 present.
5816
58172011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5818
5819 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5820 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 5821
9466892f
AC
58222011-08-03 Javier Miranda <miranda@adacore.com>
5823
5824 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
5825 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5826 be handled by copy in VM targets.
9466892f
AC
5827
58282011-08-03 Emmanuel Briot <briot@adacore.com>
5829
589ef536 5830 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
5831 code with Makeutl.Get_Switches.
5832 * prj-tree.adb: Update comment.
5833
b5ea9143
AC
58342011-08-03 Thomas Quinot <quinot@adacore.com>
5835
5836 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5837 subprogram with a limited formal that does not support external
5838 streaming.
5839
58402011-08-03 Yannick Moy <moy@adacore.com>
5841
5842 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5843 continuation line
5844 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5845 not from current unit in two phases, because it is not possible to
5846 change the table while iterating over its content.
5847 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5848
58492011-08-03 Sergey Rybin <rybin@adacore.com>
5850
5851 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5852 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5853
668a19bc
ES
58542011-08-03 Ed Schonberg <schonberg@adacore.com>
5855
5856 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5857 and the component type is composite, this is ambiguous for predefined
5858 concatenation, but if the node is not overloaded and the entity is a use
5859 -defined function its profile can be used to resolve that aggregate.
5860
170b2989
AC
58612011-08-03 Robert Dewar <dewar@adacore.com>
5862
5863 * exp_ch4.adb: Minor code cleanup.
5864
58652011-08-03 Thomas Quinot <quinot@adacore.com>
5866
5867 * exp_dist.adb: Do not generate distribution stubs if serious errors
5868 have been diagnosed.
5869
58702011-08-03 Ed Schonberg <schonberg@adacore.com>
5871
5872 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5873 the first formal of a primitive operation, go to the base type to
5874 handle properly an access to a derived type with constrained
5875 discriminants.
5876 * sem_type.adb (Disambiguate): an immediately visible operator hides a
5877 user-defined function that is only use-visible.
170b2989 5878
e917aec2
RD
58792011-08-03 Robert Dewar <dewar@adacore.com>
5880
5881 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5882 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5883 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5884 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5885 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5886 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5887 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5888 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5889
58902011-08-03 Robert Dewar <dewar@adacore.com>
5891
5892 * repinfo.adb (List_Mechanism): Add handling of
5893 Convention_Ada_Pass_By_XXX.
5894 * sem_mech.adb (Set_Mechanism): Ditto.
5895 * sem_prag.adb (Process_Convention): Add entries for
5896 Convention_Ada_Pass_By_XXX.
5897 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5898
49bfcf43
AC
58992011-08-03 Pascal Obry <obry@adacore.com>
5900
5901 * makeutl.adb: Minor reformatting.
5902
59032011-08-03 Vincent Celier <celier@adacore.com>
5904
5905 * fname-uf.adb
5906 (Get_File_Name) If the file cannot be found when there are no config
5907 pragmas file and May_Fail is True, return No_File instead of the file
5908 name, to be consistent.
5909
59102011-08-03 Pascal Obry <obry@adacore.com>
5911
5912 * adaint.c (__gnat_is_executable_file_attr): Avoid access
5913 to null pointer.
5914
59152011-08-03 Javier Miranda <miranda@adacore.com>
5916
5917 * sem_ch13.adb
5918 (Same_Representation): In VM targets the representation of arrays with
5919 aliased components differs from arrays with non-aliased components.
5920
34798441
EB
59212011-08-03 Emmanuel Briot <briot@adacore.com>
5922
5923 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5924 not systematically lower case attribute indexes that contain no "."
5925 Fix definition of several Naming attributes, which take
5926 a unit name as index and therefore should be case insensitive.
5927 Minor refactoring (reduce length of variable names).
5928
59292011-08-03 Emmanuel Briot <briot@adacore.com>
5930
5931 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5932
4437a530
EB
59332011-08-03 Emmanuel Briot <briot@adacore.com>
5934
5935 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5936 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5937 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5938 prj-tree.ads (Prj.Tree.Environment): new type.
5939
804fe3c4
EB
59402011-08-03 Emmanuel Briot <briot@adacore.com>
5941
5942 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5943 prj-tree.adb, prj-tree.ads (Environment): new type.
5944
c565bc66
AC
59452011-08-03 Emmanuel Briot <briot@adacore.com>
5946
5947 * prj-tree.ads: Remove unused variable.
5948
59492011-08-03 Yannick Moy <moy@adacore.com>
5950
5951 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5952 issuing messages related to SPARK restriction violation.
5953
4ee646da
AC
59542011-08-03 Ed Schonberg <schonberg@adacore.com>
5955
5956 * sem_ch6.adb: guard against error nodes in return statements.
5957
59582011-08-03 Arnaud Charlet <charlet@adacore.com>
5959
5960 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5961 a warning can only appear on a configuration file, so emit warning
5962 without further checks.
5963
59642011-08-03 Arnaud Charlet <charlet@adacore.com>
5965
5966 * s-interr.ads: add overriding keyword.
5967
59682011-08-03 Geert Bosch <bosch@adacore.com>
5969
5970 * exp_attr.adb: Fix minor typo.
5971
59722011-08-03 Ed Schonberg <schonberg@adacore.com>
5973
5974 * par-ch4.adb: improve error recovery.
5975
c0e538ad
AC
59762011-08-03 Emmanuel Briot <briot@adacore.com>
5977
5978 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5979 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5980 to Errout_Handling.
5981
59822011-08-03 Emmanuel Briot <briot@adacore.com>
5983
5984 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5985 "external" as an attribute name in aggregate projects.
5986
59872011-08-03 Jose Ruiz <ruiz@adacore.com>
5988
5989 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5990 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5991 from 0, so we need to adjust.
5992
59932011-08-03 Emmanuel Briot <briot@adacore.com>
5994
5995 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5996 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5997
c4d67e2d
AC
59982011-08-03 Yannick Moy <moy@adacore.com>
5999
6000 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6001 restriction on overloaded entity if the entity is not an operator.
6002
60032011-08-03 Yannick Moy <moy@adacore.com>
6004
6005 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6006 restrict.ads: Rename remaining Check_Formal_Restriction* into
6007 Check_SPARK_Restriction*.
6008
60092011-08-03 Emmanuel Briot <briot@adacore.com>
6010
6011 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6012 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6013 qualifier.
6014 (Project_Empty): removed
6015 (Empty_Project): new parameter Qualifier
6016 This is used to have fields specific to aggregate projects, cleaner
6017 New field to store the list of aggregated projects.
6018 (Check_Aggregate_Project): removed
6019 (Process_Aggregated_Projects, Free): new subprograms.
6020
3f5a8fee
AC
60212011-08-03 Olivier Hainque <hainque@adacore.com>
6022
6023 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6024
60252011-08-03 Ed Schonberg <schonberg@adacore.com>
6026
6027 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6028 explicit dereference of an unconstrained type, create a constrained
6029 subtype for it, as is done for function calls that return an
6030 unconstrained type.
6031
60322011-08-03 Thomas Quinot <quinot@adacore.com>
6033
6034 * g-pehage.adb (Finalize): Avoid possible double-free.
6035
60362011-08-03 Steve Baird <baird@adacore.com>
6037
6038 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6039 Elab_Spec/Body attrs in CodePeer_Mode.
6040
60412011-08-03 Javier Miranda <miranda@adacore.com>
6042
6043 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6044 low bound is not known at compile time but they have no others choice.
6045 Done because in this case the bounds can be obtained directly from the
6046 aggregate.
6047
60482011-08-03 Ed Falis <falis@adacore.com>
6049
6050 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6051 on VxWorks SMP. Remove unusable constant ANY_CPU.
6052
a96ca600
EB
60532011-08-03 Emmanuel Briot <briot@adacore.com>
6054
6055 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6056 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6057 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6058 Prj.Env.Initialize_Empty): new subprograms
6059 (Get_Env, Find_Project): remove parameter Target_Name.
6060
3e582869
AC
60612011-08-03 Gary Dismukes <dismukes@adacore.com>
6062
6063 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6064 as a condition for the delayed call to Derived_Subprograms done for the
6065 case of the rewriting of a derived type that constrains the
6066 discriminants of its parent type.
6067 Avoids redundant subprogram derivations for private subtype derivations.
6068
60692011-08-03 Javier Miranda <miranda@adacore.com>
6070
6071 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6072 Build_Record_Aggr_Code.
6073 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6074 discriminants in extension aggregates.
6075
60762011-08-03 Emmanuel Briot <briot@adacore.com>
6077
6078 * prj-pp.adb (Print): also output project qualifiers, since in
6079 particular "aggregate" is mandatory in an aggregate project.
6080
60812011-08-03 Emmanuel Briot <briot@adacore.com>
6082
6083 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6084 (Debug_Output): new function.
6085
56e94186
AC
60862011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6087
6088 * gnat_ugn.texi: Document -Wstack-usage.
6089 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6090
60912011-08-03 Thomas Quinot <quinot@adacore.com>
6092
6093 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6094 have keyword LIMITED.
6095
60962011-08-03 Yannick Moy <moy@adacore.com>
6097
6098 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6099 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6100 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6101 section (does not happen in compiler, only if code directly calls
6102 Scan_ALI).
6103 * get_alfa.adb, get_alfa.ads: New files.
6104 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6105 needed.
6106 * lib-xref-alfa.adb: New file.
6107 * lib-xref.adb, lib-xref.ads
6108 (Xref_Entry): redefine information needed in cross-references for ALFA.
6109 Push ALFA treatments in separated local package.
6110 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6111 identifiers. Return entity of package body instead of spec. Return
6112 Empty for a scope with no location.
6113 (Generate_Reference): adapt to new components for ALFA information.
6114 Remove the need for D references on definitions.
6115 (Is_Local_Reference): moved to ALFA local package
6116 (Output_References): extract subfunction as Extract_Source_Name
6117 (Output_Local_References): remove procedure, replaced by filtering of
6118 cross-references in package ALFA and printing in Put_ALFA.
6119 (Write_Entity_Name): remove procedure
6120 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6121 print exact name of entity as it appears in source file
6122 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6123 * put_alfa.adb, put_alfa.ads: New files.
6124 * xref_lib.adb (Search_Xref): protect read of cross-references against
6125 reading other sections of the ALI file, in gnatxref
6126 (Search): protect read of cross-references against reading other
6127 sections of the ALI file, in gnatfind.
6128 * gcc-interface/Make-lang.in: Update dependencies.
6129
61302011-08-03 Thomas Quinot <quinot@adacore.com>
6131
6132 * sem_ch3.adb: Minor reformatting.
6133
61342011-08-03 Jose Ruiz <ruiz@adacore.com>
6135
6136 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6137 raising an exception.
6138
61392011-08-03 Ed Schonberg <schonberg@adacore.com>
6140
6141 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6142 type, always use 1 as the lower bound or string, even if lower bound of
6143 context is not static, to handle properly null strings in a non-static
6144 context.
6145
61462011-08-03 Bob Duff <duff@adacore.com>
6147
6148 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6149 always legal on the right-hand side of an assignment statement; there
6150 is always an applicable index constraint in this case. Therefore, the
6151 check for Pkind = N_Assignment_Statement is now unconditional -- it
6152 doesn't depend on whether Is_Constrained (Typ).
6153
4317e442
AC
61542011-08-03 Robert Dewar <dewar@adacore.com>
6155
6156 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6157
61582011-08-03 Ed Schonberg <schonberg@adacore.com>
6159
6160 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6161 for an itype created within a generic unit.
6162
61632011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6164
6165 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6166 suppresses all inlining.
6167
53f29d4f
AC
61682011-08-03 Robert Dewar <dewar@adacore.com>
6169
6170 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6171 exp_aggr.adb: Minor reformatting.
6172
61732011-08-03 Thomas Quinot <quinot@adacore.com>
6174
6175 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6176 tagged assignment when discriminant checks are suppressed. This is
6177 useless and extremely costly in terms of static stack usage.
6178
61792011-08-03 Bob Duff <duff@adacore.com>
6180
6181 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6182 of generics, because this leads to the wrong entity in the wrong scope,
6183 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6184 an instance.
6185 (Process_Interface_Name): Follow Alias for instances of generics, to
6186 correct for the above change.
6187
61882011-08-03 Ed Schonberg <schonberg@adacore.com>
6189
6190 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6191 is an integer literal it is always safe to replace the reference. In
6192 addition, if the reference appears in the generated code for an object
6193 declaration it is necessary to copy because otherwise the reference
6194 might be to the uninitilized value of the discriminant of the object
6195 itself.
6196
61972011-08-03 Pascal Obry <obry@adacore.com>
6198
6199 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6200 ACL used, in this case we want to check for ending .exe, not .exe
6201 anywhere in the path.
6202
62032011-08-03 Sergey Rybin <rybin@adacore.com>
6204
6205 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6206 the tree structure (semantic decoration of references to record
6207 discriminants).
6208
c0b11850
AC
62092011-08-03 Gary Dismukes <dismukes@adacore.com>
6210
6211 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6212 choices of a named array aggregate, bail out when any choices are
6213 marked as Errors_Posted.
6214
62152011-08-03 Ed Schonberg <schonberg@adacore.com>
6216
6217 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6218 in which entity is frozen, to handle properly loop variables in
6219 iterators.
6220
62212011-08-03 Ed Schonberg <schonberg@adacore.com>
6222
6223 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6224 subtype is not static, compute the upper bound using attributes, to
6225 handle properly index types that are not integer types.
6226
62272011-08-03 Bob Duff <duff@adacore.com>
6228
6229 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6230 Update copyright notice.
6231
62322011-08-03 Ed Schonberg <schonberg@adacore.com>
6233
6234 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6235 Original_Discriminant if within an instance.
6236 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6237
62382011-08-03 Thomas Quinot <quinot@adacore.com>
6239
6240 * einfo.ads: Minor reformatting.
6241
62422011-08-03 Ed Schonberg <schonberg@adacore.com>
6243
6244 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6245 composite type with an unfrozen subcomponent, in the profile of a
6246 primitive operation.
6247
5c34e9cd
AC
62482011-08-03 Robert Dewar <dewar@adacore.com>
6249
6250 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6251
62522011-08-03 Ed Schonberg <schonberg@adacore.com>
6253
6254 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6255 unconstrained type with discriminants is initialized with an aggregate,
6256 use the constrained subtype of the aggregate as the type of the object,
6257 because it is immutable, and this allows the back-end to generate no
6258 code for the object declaration.
6259
abcd9db2
AC
62602011-08-03 Robert Dewar <dewar@adacore.com>
6261
6262 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6263 comparison operand is variable, and turns out to be zero or negative.
6264
62652011-08-03 Javier Miranda <miranda@adacore.com>
6266
6267 * exp_intr.adb
6268 (Expand_Dispatching_Constructor_Call): Disable expansion of
6269 code required for native targets. Done to avoid generating
6270 references to unavailable runtime entities in VM targets.
6271 * exp_ch3.adb
6272 (Expand_N_Object_Declaration): Add missing support to handle
6273 the explicit initialization of class-wide interface objects.
6274 Fix documentation.
6275
62762011-08-03 Matthew Heaney <heaney@adacore.com>
6277
6278 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6279
62802011-08-03 Matthew Heaney <heaney@adacore.com>
6281
6282 * a-cbdlli.adb (Splice): move source items from first to last
6283
62842011-08-03 Yannick Moy <moy@adacore.com>
6285
6286 * sem_util.ads: comment added.
6287
62882011-08-03 Javier Miranda <miranda@adacore.com>
6289
6290 * exp_aggr.adb
6291 (Expand_Record_Aggregate): In VM targets disable the expansion into
6292 assignments of aggregates whose type is not known at compile time.
6293
b474d6c3
ES
62942011-08-03 Ed Schonberg <schonberg@adacore.com>
6295
6296 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6297 protected entries and task entries, to build the proper renaming
6298 declaration for entry formals, used in debugging.
6299 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6300 parameters in the same way.
6301
0580d807
AC
63022011-08-02 Robert Dewar <dewar@adacore.com>
6303
6304 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6305 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6306 code reorganization.
6307
63082011-08-02 Robert Dewar <dewar@adacore.com>
6309
6310 * debug.adb: Debug flag d.P to suppress length comparison optimization
6311 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6312 comparison of Length by comparing First/Last instead.
6313
63142011-08-02 Matthew Heaney <heaney@adacore.com>
6315
6316 * a-cobove.ads: Code clean up.
6317
b191a125
AC
63182011-08-02 Vincent Celier <celier@adacore.com>
6319
6320 * adaint.c (file_names_case_sensitive_cache): New static int.
6321 (__gnat_get_file_names_case_sensitive): Cache the return value in
6322 file_names_case_sensitive_cache at the first invocation, to avoid
6323 multiple calls to getenv.
6324
63252011-08-02 Bob Duff <duff@adacore.com>
6326
6327 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6328
316a0661
AC
63292011-08-02 Yannick Moy <moy@adacore.com>
6330
6331 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6332 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6333 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6334 indicate that we are in a precondition or postcondition. This is used in
6335 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6336 decide whether to flag the spec or body of the current subprogram as
6337 not in ALFA.
6338
63392011-08-02 Fabien Chouteau <chouteau@adacore.com>
6340
6341 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6342 list.
6343 * a-extiin.ads: New file.
6344
63452011-08-02 Bob Duff <duff@adacore.com>
6346
6347 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6348 now raises Name_Error instead of Use_Error in certain cases. The other
6349 parts of this AI were already implemented properly.
6350
f9adb9d4
AC
63512011-08-02 Vincent Celier <celier@adacore.com>
6352
6353 * link.c: Only import "auto-host.h" when building the gnattools.
6354
63552011-08-02 Yannick Moy <moy@adacore.com>
6356
6357 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6358 which calls a local subprogram, so extract subprogram
6359 from Mark_Non_ALFA_Subprogram_Body.
6360
63612011-08-02 Javier Miranda <miranda@adacore.com>
6362
6363 * exp_ch9.adb
6364 (Extract_Dispatching_Call): If the type of the dispatching object is an
6365 access type then return an explicit dereference in the Object out-mode
6366 parameter.
6367
63682011-08-02 Gary Dismukes <dismukes@adacore.com>
6369
6370 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6371 compatibility checks for all indexes of an array subtype, not just the
6372 first. Reset Has_Dynamic_Range_Check on the subtype before each
6373 potential check to ensure that Insert_Range_Checks will not elide any
6374 of the dynamic checks.
6375
63762011-08-02 Yannick Moy <moy@adacore.com>
6377
6378 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6379 SPARK restriction at parsing time.
6380 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6381 directive only if the SPARK restriction is set for this unit.
6382
83f33150
YM
63832011-08-02 Yannick Moy <moy@adacore.com>
6384
6385 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6386 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6387 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6388 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6389 Mark_Non_ALFA_Subprogram_Body.
6390 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6391 inlined.
6392
7b98672f
YM
63932011-08-02 Yannick Moy <moy@adacore.com>
6394
6395 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6396 might be costly.
6397
052e0603
AC
63982011-08-02 Robert Dewar <dewar@adacore.com>
6399
6400 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6401 exp_ch3.adb: Minor reformatting.
6402
64032011-08-02 Emmanuel Briot <briot@adacore.com>
6404
6405 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6406 files, not any regular file.
6407 (__gnat_locate_file_with_predicate): new subprogram.
6408
64092011-08-02 Yannick Moy <moy@adacore.com>
6410
6411 * sinfo.adb, sinfo.ads: Restrict the use of flags
6412 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6413 nodes, plus N_Subtype_Declaration for the 2nd one.
6414
4fbad0ba
AC
64152011-08-02 Sergey Rybin <rybin@adacore.com>
6416
6417 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6418 - fix bugs in the description of Source_Trace;
6419 - get rid of UNIT_NAME;
6420
052e0603
AC
64212011-08-02 Javier Miranda <miranda@adacore.com>
6422
6423 * exp_ch9.adb
6424 (Build_Dispatching_Requeue): Adding support for VM targets
6425 since we cannot directly reference the Tag entity.
6426 * exp_sel.adb (Build_K): Adding support for VM targets.
6427 (Build_S_Assignment): Adding support for VM targets.
6428 * exp_disp.adb
6429 (Default_Prim_Op_Position): In VM targets do not restrict availability
6430 of predefined interface primitives to compiling in Ada 2005 mode.
6431 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6432 restricted to compiling in Ada 2005 mode.
6433 (Make_VM_TSD): Generate code that declares and initializes the OSD
6434 record. Needed to support dispatching calls through synchronized
6435 interfaces.
6436 * exp_ch3.adb
6437 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6438 primitives associated with synchronized interfaces.
6439 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6440 primitives associated with synchronized interfaces.
6441
64422011-08-02 Yannick Moy <moy@adacore.com>
6443
6444 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6445 statements hidden in SPARK if preceded by the HIDE directive
6446 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6447 exception handlers as hidden in SPARK if preceded by the HIDE directive
6448 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6449 if starting with the HIDE directive
6450 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6451 starting with the HIDE directive; mark the declarations in a private
6452 part as hidden in SPARK if the private part starts with the HIDE
6453 directive
6454 * restrict.adb, restrict.ads
6455 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6456 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6457 argument node belongs to a part which is hidden in SPARK
6458 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6459 parts in SPARK; protect the possibly costly call to
6460 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6461 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6462 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6463 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6464 Tok_SPARK_Hide.
6465 (Scan): recognize special comment starting with '#' and followed by
6466 SPARK keyword "hide" as a HIDE directive.
6467
64682011-08-02 Yannick Moy <moy@adacore.com>
6469
6470 * types.ads, erroutc.ads: Minor reformatting.
6471
64722011-08-02 Vincent Celier <celier@adacore.com>
6473
6474 * link.c: Add response file support for cross platforms.
6475
64762011-08-02 Ed Schonberg <schonberg@adacore.com>
6477
6478 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6479 in an association, set parent field of copy before partial analysis.
6480 * sem_res.adb (Resolve_Slice): create reference to itype only when
6481 expansion is enabled.
6482
64832011-08-02 Yannick Moy <moy@adacore.com>
6484
6485 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6486 for new flag denoting which subprogram bodies are in ALFA
6487 * restrict.adb, sem_ch7.adb: Update comment
6488 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6489 sem_ch9.adb, sem_res.adb: Add calls to
6490 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6491 * sem_ch6.adb (Analyze_Function_Return): add calls to
6492 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6493 middle of the body, and extended return.
6494 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6495 False when missing return.
6496 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6497 to True for subprograms whose spec is in ALFA. Remove later on the flag
6498 on the entity used for a subprogram body when there exists a separate
6499 declaration.
6500 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6501 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6502 False, otherwise do nothing.
6503
65042011-08-02 Robert Dewar <dewar@adacore.com>
6505
6506 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6507
65082011-08-02 Yannick Moy <moy@adacore.com>
6509
6510 * sem_ch4.ads: minor formatting.
6511
65122011-08-02 Yannick Moy <moy@adacore.com>
6513
6514 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6515 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6516 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6517 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6518 opt.ads: cleanup of SPARK mode
6519
65202011-08-02 Yannick Moy <moy@adacore.com>
6521
6522 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6523 types.
6524 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6525 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6526 * sem_ch3.adb
6527 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6528 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6529 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6530 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6531 types.
6532 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6533 non-static range.
6534 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6535 functions whose return type is not in ALFA.
6536 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6537 specifications.
6538 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6539 parameter's type is not in ALFA.
6540 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6541 types are in ALFA.
6542
65432011-08-02 Ed Schonberg <schonberg@adacore.com>
6544
6545 * sem_ch6 (Analyze_Expression_Function): treat the function as
6546 Inline_Always, and introduce a subprogram declaration for it when it is
6547 not a completion.
6548 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6549 expression functions, so that the back-end can determine whether they
6550 can in fact be inlined.
6551 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6552 a function body comes from an expression function.
6553
65542011-08-02 Gary Dismukes <dismukes@adacore.com>
6555
6556 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6557 null exclusions to test Can_Never_Be_Null on the anonymous access types
6558 of the formals rather than testing the formals themselves. Exclude this
6559 check in cases where the Old_Formal is marked as a controlling formal,
6560 to avoid issuing spurious errors for bodies completing dispatching
6561 operations (due to the flag not getting set on controlling access
6562 formals in body specs).
6563 (Find_Corresponding_Spec): When checking full and subtype conformance of
6564 subprogram bodies in instances, pass Designated and E in that order, for
6565 consistency with the expected order of the formals (New_Id followed by
6566 Old_Id).
6567
65682011-08-02 Robert Dewar <dewar@adacore.com>
6569
6570 * sem_ch8.adb: Minor reformatting.
6571
65722011-08-02 Ed Schonberg <schonberg@adacore.com>
6573
6574 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6575 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6576 primitive operations of class-wide actuals.
6577
65782011-08-02 Javier Miranda <miranda@adacore.com>
6579
6580 * exp_atag.ads, exp_atag.adb
6581 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6582 since its value is implicitly passed in argument Typ.
6583 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6584 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6585 Build_Common_Dispatching_Select_Statements.
6586
65872011-08-02 Robert Dewar <dewar@adacore.com>
6588
6589 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
6590 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
6591 Minor reformatting.
6592
65932011-08-02 Robert Dewar <dewar@adacore.com>
6594
6595 * sem_res.adb: Minor reformatting.
6596 * sem_prag.adb: Minor reformatting.
6597
65982011-08-02 Javier Miranda <miranda@adacore.com>
6599
6600 * exp_atag.adb, exp_atags.ads
6601 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
6602 by the tagged type Entity. Required to use this routine in the VM
6603 targets since we do not have available the Tag entity in the VM
6604 platforms.
6605 * exp_ch6.adb
6606 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
6607 Ada.Tags has not been previously loaded.
6608 * exp_ch7.adb
6609 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
6610 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
6611 * sem_aux.adb
6612 (Enclosing_Dynamic_Scope): Add missing support to handle the full
6613 view of enclosing scopes. Required to handle enclosing scopes that
6614 are synchronized types whose full view is a task type.
6615 * exp_disp.adb
6616 (Build_VM_TSDs): Minor code improvement to avoid generating and
6617 analyzing lists with empty nodes.
6618 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
6619 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
6620 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
6621 (Make_Disp_Timed_Select_Body): Add support for VM targets.
6622 (Make_Select_Specific_Data_Table): Add support for VM targets.
6623 (Make_VM_TSD): Generate code to initialize the SSD structure of
6624 the TSD.
6625
66262011-08-02 Yannick Moy <moy@adacore.com>
6627
6628 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
6629 cross-references section in ALI.
6630 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
6631 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
6632 Sub).
6633 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
6634 subprogram or package entity of a node
6635 (Is_Local_Reference_Type): new function returns True for references
6636 selected in local cross-references.
6637 (Lt): function extracted from Lt in Output_References
6638 (Write_Entity_Name): function extracted from Output_References
6639 (Generate_Definition): generate reference with type 'D' for definition
6640 of objects (object declaration and parameter specification), with
6641 appropriate locations and units, for use in local cross-references.
6642 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
6643 references of type 'I' for initialization in object definition.
6644 (Output_References): move part of function Lt and procedure
6645 Write_Entity_Name outside of the body. Ignore references of types 'D'
6646 and 'I' introduced for local cross-references.
6647 (Output_Local_References): new procedure to output the local
6648 cross-references sections.
6649 (Lref_Entity_Status): new array defining whether an entity is a local
6650 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
6651 with 'I' type when initialization expression is present.
6652 * get_scos.adb, get_scos.ads: Correct comments and typos
6653
66542011-08-02 Javier Miranda <miranda@adacore.com>
6655
6656 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
6657 the JVM target.
6658 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
6659 the JVM target.
6660 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
6661 TSD support.
6662
66632011-08-02 Vincent Celier <celier@adacore.com>
6664
6665 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
6666 (No_Space_Img): New function
6667 (Find_Excluded_Sources): When reading from a file, record the file name
6668 and the line number for each excluded source.
6669 (Mark_Excluded_Sources): When reporting an error, if the excluded
6670 sources were read from a file, include file name and line number in
6671 the error message.
6672
66732011-08-02 Ed Schonberg <schonberg@adacore.com>
6674
6675 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
6676
66772011-08-02 Robert Dewar <dewar@adacore.com>
6678
6679 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6680
66812011-08-02 Javier Miranda <miranda@adacore.com>
6682
6683 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6684 generation of TSDs to the DOTNET compiler.
6685 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6686 generation of TSDs to the DOTNET compiler.
6687
66882011-08-02 Javier Miranda <miranda@adacore.com>
6689
6690 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6691 record of all the tagged types declared inside library level package
6692 declarations, library level package bodies or library level subprograms.
6693 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6694 associated with a given tagged type.
6695 (Build_VM_TSDs): New subprogram.
6696 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6697 compilation units that are subprograms.
6698 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6699 compilation units that are package bodies.
6700 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6701 units that are a package declaration or a package instantiation.
6702 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6703 reorganization to improve the error generated by the frontend when the
6704 function Ada.Tags.Secondary_Tag is not available.
6705 * rtsfind.ads (RE_Register_TSD): New runtime entity.
6706 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6707
67082011-08-02 Javier Miranda <miranda@adacore.com>
6709
6710 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6711
67122011-08-02 Robert Dewar <dewar@adacore.com>
6713
6714 * s-imenne.ads: Minor reformatting.
6715
67162011-08-02 Robert Dewar <dewar@adacore.com>
6717
6718 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6719 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6720 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6721
67222011-08-02 Robert Dewar <dewar@adacore.com>
6723
6724 * einfo.ads (Materialize_Entity): Document this is only for renamings
6725 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6726 required debug information in the case where we transform the object
6727 declaration into a renaming declaration.
6728 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6729 object
6730 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6731 Materialize_Entity.
6732
67332011-08-02 Robert Dewar <dewar@adacore.com>
6734
6735 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6736 Suppress_Init_Procs.
6737 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6738 Suppress_Initialization/Initialization_Suppressed.
6739 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6740 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6741 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6742 * sem_prag.adb: New processing for pragma Suppress_Initialization.
6743
67442011-08-02 Robert Dewar <dewar@adacore.com>
6745
6746 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6747 Minor reformatting.
6748
67492011-08-02 Ed Schonberg <schonberg@adacore.com>
6750
6751 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6752 only have inheritable classwide pre/postconditions.
6753
67542011-08-02 Javier Miranda <miranda@adacore.com>
6755
6756 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6757 * rtsfind.ads (RE_Check_TSD): New runtime entity.
6758 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6759 checks if the external tag of a type is the same as the external tag
6760 of some other declaration.
6761
67622011-08-02 Thomas Quinot <quinot@adacore.com>
6763
6764 * s-taskin.ads: Minor reformatting.
6765
67662011-08-02 Emmanuel Briot <briot@adacore.com>
6767
6768 * g-comlin.adb (Display_Help): swap the order in which it prints the
6769 short help and the general usage.
6770
67712011-08-02 Ed Schonberg <schonberg@adacore.com>
6772
6773 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6774 the aspect declarations and attach them to the generic copy for
6775 subsequent analysis.
6776 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6777 declarations of the generic tree to the new subprogram declarations.
6778 * sem_attr.adb (Check_Precondition_Postcondition): recognize
6779 conditions that apply to a subprogram instance.
6780
67812011-08-02 Robert Dewar <dewar@adacore.com>
6782
6783 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6784
67852011-08-02 Ed Schonberg <schonberg@adacore.com>
6786
6787 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6788 private type with a tagged full view is not derived in the immediate
6789 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6790
67912011-08-02 Robert Dewar <dewar@adacore.com>
6792
6793 * exp_ch4.adb: Minor reformatting.
6794
67952011-08-02 Ed Schonberg <schonberg@adacore.com>
6796
6797 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
6798 Ada2012 iterator, the loop will be rewritten during expansion into a
6799 while loop with a cursor and an element declaration. Do not analyze the
6800 body in this case, because if the container is for indefinite types the
6801 actual subtype of the elements will only be determined when the cursor
6802 declaration is analyzed.
6803
68042011-08-02 Arnaud Charlet <charlet@adacore.com>
6805
6806 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6807 size/alignment related attributes in CodePeer_Mode.
6808
68092011-08-02 Gary Dismukes <dismukes@adacore.com>
6810
6811 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6812 Prepend_Element, since this can result in the operation getting the
6813 wrong slot in the full type's dispatch table if the full type has
6814 inherited operations. The incomplete type's operation will get added
6815 to the proper position in the full type's primitives
6816 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6817 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6818 dispatching operations, since there are cases where nonprimitive
6819 subprograms can get added to the list of incomplete dependents (such
6820 as subprograms in nested packages).
6821 * sem_ch6.adb (Process_Formals): First, remove test for being in a
6822 private part when determining whether to add a primitive with a
6823 parameter of a tagged incomplete type to the Private_Dependents list.
6824 Such primitives can also occur in the visible part, and should not have
6825 been excluded from being private dependents.
6826 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6827 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6828 list of a Taft-amendment incomplete type is a primitive before issuing
6829 an error that the full type must appear in the same unit. There are
6830 cases where nonprimitives can be in the list (such as subprograms in
6831 nested packages).
6832 * sem_disp.adb (Derives_From): Use correct condition for checking that
6833 a formal's type is derived from the type of the corresponding formal in
6834 the parent subprogram (the condition was completely wrong). Add
6835 checking that was missing for controlling result types being derived
6836 from the result type of the parent operation.
6837
68382011-08-02 Yannick Moy <moy@adacore.com>
6839
6840 * errout.adb (First_Node): minor renaming
6841 * restrict.adb (Check_Formal_Restriction): put restriction warning on
6842 first node.
6843
68442011-08-02 Yannick Moy <moy@adacore.com>
6845
6846 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6847 before accessing operands.
6848 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6849 decide whether an initialization expression respects SPARK rules, as
6850 the plain node is the expanded one. This allows for more valid warnings
6851 to be issued.
6852 * gnat_rm.texi: Minor update.
6853
68542011-08-02 Arnaud Charlet <charlet@adacore.com>
6855
6856 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6857 previous change.
6858
68592011-08-02 Robert Dewar <dewar@adacore.com>
6860
6861 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6862
68632011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6864
6865 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6866 loop statements and the element renaming declaration with a block when
6867 the element type is controlled.
6868
68692011-08-02 Yannick Moy <moy@adacore.com>
6870
6871 * sinfo.ads: Minor formatting.
6872
68732011-08-02 Ed Schonberg <schonberg@adacore.com>
6874
6875 * sem_aggr.adb (Add_Association): if the association has a box and no
6876 expression, use the Sloc of the aggregate itself for the new
6877 association.
6878 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6879 the Original_Node.
6880
68812011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6882
6883 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6884 When a container is provided via a function call, generate a renaming
6885 of the function result. This avoids the creation of a transient scope
6886 and the premature finalization of the container.
6887 * exp_ch7.adb (Is_Container_Cursor): Removed.
6888 (Wrap_Transient_Declaration): Remove the supression of the finalization
6889 of the list controller when the declaration denotes a container cursor,
6890 it is not needed.
6891
68922011-08-02 Yannick Moy <moy@adacore.com>
6893
6894 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6895 node is from source, instead of the original node being from source.
6896 * sem_aggr.adb
6897 (Resolve_Array_Aggregate): refine the check for a static expression, to
6898 recognize also static ranges
6899 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6900 Array_Type_Declaration): postpone the test for the type being a subtype
6901 mark after the type has been resolved, so that component-selection and
6902 expanded-name are discriminated.
6903 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6904 to distinguish the case of an iteration scheme, so that an error is
6905 issed on a non-static range in SPARK except in an iteration scheme.
6906 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6907 In_Iter_Schm = True.
6908 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6909 user-defined operators so that they are allowed in renaming
6910 * sem_ch8.adb
6911 (Find_Selected_Component): refine the check for prefixing of operators
6912 so that they are allowed in renaming. Move the checks for restrictions
6913 on selector name after analysis discriminated between
6914 component-selection and expanded-name.
6915 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6916 concatenation argument of string type if it is static.
6917 * sem_util.adb, sem_util.ads
6918 (Check_Later_Vs_Basic_Declarations): add a new function
6919 Is_Later_Declarative_Item to decice which declarations are allowed as
6920 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6921 mode, add that renamings are considered as later items.
6922 (Enclosing_Package): new function to return the enclosing package
6923 (Enter_Name): correct the rule for homonyms in SPARK
6924 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6925 from source (result of expansion) to avoid issuing wrong warnings.
6926
69272011-08-02 Ed Schonberg <schonberg@adacore.com>
6928
6929 * errout.adb: On anything but an expression First_Node returns its
6930 argument.
6931
69322011-08-02 Pascal Obry <obry@adacore.com>
6933
6934 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6935
69362011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6937
6938 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6939 Set the associated loop as the related expression of internally
6940 generated cursors.
6941 * exp_ch7.adb (Is_Container_Cursor): New routine.
6942 (Wrap_Transient_Declaration): Supress the finalization of the list
6943 controller when the declaration denotes a container cursor.
6944
69452011-08-02 Yannick Moy <moy@adacore.com>
6946
6947 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6948 command line now.
6949 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6950 expression is a simple expression. This check cannot be performed in
6951 the semantics, so just drop it.
6952 (P_Index_Or_Discriminant_Constraint): move check that the index or
6953 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6954 semantics. Other cases were previously checked in the semantics.
6955 * par-ch4.adb (P_Name): move checks that a selector name is not
6956 character literal or an operator symbol to Find_Selected_Component in
6957 the semantics
6958 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6959 declarations are not placed after later declarations in a separate
6960 procedure in Sem_Util (possibly not the best choice?), to be used both
6961 during parsing, for Ada 83 mode, and during semantic analysis, for
6962 SPARK mode.
6963 * par-endh.adb (Check_End): move check that end label is not missing
6964 to Process_End_Label in the semantics
6965 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6966 the special case for SPARK restriction
6967 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6968 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6969 parameter Force to issue the error message even on internal node (used
6970 for generated end label). Call Check_Restriction to check when an error
6971 must be issued. In SPARK mode, issue an error message even if the
6972 restriction is not set.
6973 (Check_Restriction): new procedure with an additional out parameter to
6974 inform the caller that a message has been issued
6975 * sem_aggr.adb: Minor modification of message
6976 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6977 instead of issuing an error message directly
6978 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6979 declarations are not placed after later declarations, by calling
6980 Check_Later_Vs_Basic_Declarations
6981 (Analyze_Subtype_Declaration): move here the check that an index or
6982 discriminant constraint must be a subtype mark. Change the check that
6983 a subtype of String must start at one so that it works on subtype marks.
6984 * sem_ch4.adb (Analyze_Call): move here the check that a named
6985 association cannot follow a positional one in a call
6986 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6987 instead of issuing an error message directly
6988 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6989 selector name is not a character literal or an operator symbol. Move
6990 here the check that the prefix of an expanded name cannot be a
6991 subprogram or a loop statement.
6992 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6993 procedure called from parsing and semantics to check that basic
6994 declarations are not placed after later declarations
6995 (Process_End_Label): move here the check that end label is not missing
6996
69972011-08-02 Arnaud Charlet <charlet@adacore.com>
6998
6999 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7000 representation clause in codepeer mode, since it confuses CodePeer and
7001 does not bring useful info.
7002
70032011-08-02 Ed Falis <falis@adacore.com>
7004
7005 * init.c: initialize fp hw on MILS.
7006
70072011-08-02 Ed Schonberg <schonberg@adacore.com>
7008
7009 * errout.adb (First_Node): for bodies, return the node itself (small
7010 optimization). For other nodes, do not check source_unit if the node
7011 comes from Standard.
7012
70132011-08-02 Robert Dewar <dewar@adacore.com>
7014
7015 * exp_ch3.adb: Minor comment additions.
7016 * sem_ch13.adb: Minor reformatting.
7017
70182011-08-02 Pascal Obry <obry@adacore.com>
7019
7020 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7021
70222011-08-02 Robert Dewar <dewar@adacore.com>
7023
7024 * sem_attr.adb: Minor reformatting.
7025
70262011-08-02 Robert Dewar <dewar@adacore.com>
7027
7028 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7029 (Has_Default_Component_Value): Removed
7030 * einfo.ads Comment updates
7031 (Has_Default_Aspect): Replaces Has_Default_Value
7032 (Has_Default_Component_Value): Removed
7033 * exp_ch13.adb
7034 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7035 * exp_ch3.adb
7036 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7037 (Get_Simple_Init_Val): Handle Default_Value aspect
7038 (Needs_Simple_Initialization): Handle Default_Value aspect
7039 * exp_ch3.ads: Needs_Simple_Initialization
7040 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7041 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7042 * sem_ch13.adb
7043 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7044 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7045 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7046
70472011-08-02 Ed Schonberg <schonberg@adacore.com>
7048
7049 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7050 package containing iteration primitives.
7051 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7052
70532011-08-02 Ed Schonberg <schonberg@adacore.com>
7054
7055 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7056 "of", pre-analyze expression in case it is a function call with
7057 finalization actions that must be placed ahead of the loop.
7058 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7059 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7060
70612011-08-02 Geert Bosch <bosch@adacore.com>
7062
7063 * cstand.adb (Create_Float_Types): Only consider C's long double for
7064 Long_Long_Float, in addition to double.
7065
70662011-08-02 Robert Dewar <dewar@adacore.com>
7067
7068 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7069 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7070 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7071 Minor reformatting.
7072
70732011-08-02 Ed Schonberg <schonberg@adacore.com>
7074
7075 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7076 indexed component.
7077
70782011-08-02 Javier Miranda <miranda@adacore.com>
7079
7080 * einfo.ads, einfo.adb
7081 (Original_Access_Type): Move this attribute to Node26 since there was
7082 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7083 which causes conflicts and breaks the generation of the .NET compiler.
7084 (Interface_Name): Add missing documentation on JGNAT only uses of
7085 this attribute.
7086
70872011-08-02 Geert Bosch <bosch@adacore.com>
7088
7089 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7090 (Find_Back_End_Float_Type): Likewise
7091 (Create_Back_End_Float_Types): Likewise
7092 (Create_Float_Types): Likewise
7093 (Register_Float_Type): Likewise
7094 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7095 Nlist and split out type selection in new local Find_Base_Type function.
7096 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7097 Nlist
7098 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7099
71002011-08-02 Robert Dewar <dewar@adacore.com>
7101
7102 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7103 alpha order).
7104 * opt.ads: Minor comment change.
7105 * sem_ch12.adb: Minor code reorganization.
7106
71072011-08-02 Gary Dismukes <dismukes@adacore.com>
7108
7109 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7110 subtype's list of rep items to the list on the full subtype in the case
7111 where the lists are the same.
7112
71132011-08-02 Geert Bosch <bosch@adacore.com>
7114
7115 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7116 using the one from System.Strings, which also deallocates all strings.
7117
71182011-08-02 Geert Bosch <bosch@adacore.com>
7119
7120 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7121 function.
7122 * gcc-interface/Make-lang.in: Update dependencies.
7123
71242011-08-02 Olivier Hainque <hainque@adacore.com>
7125
7126 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7127 end_locus.
7128
71292011-08-02 Javier Miranda <miranda@adacore.com>
7130
7131 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7132 associated with anonymous access to subprograms.
7133
71342011-08-02 Geert Bosch <bosch@adacore.com>
7135
7136 * opt.ads
7137 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7138 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7139 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7140 (Add_Symbol_Definition): Move to switch-c.adb
7141 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7142 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7143 (Add_Symbol_Definition): Move to switch-c.adb.
7144 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7145 * sem_warn.adb
7146 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7147 Move to warnsw.adb.
7148 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7149 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7150 Move to warnsw.adb.
7151 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7152 (Add_Symbol_Definition): Moved from Prepcomp.
7153 * switch-c.ads: Update copyright notice. Use String_List instead of
7154 Argument_List, removing dependency on System.OS_Lib.
7155
71562011-08-02 Yannick Moy <moy@adacore.com>
7157
7158 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7159 mode on initialization expression which does not respect SPARK
7160 restrictions.
7161 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7162 if the tree referenced by its argument represents an initialization
7163 expression in SPARK, suitable for initializing an object in an object
7164 declaration.
7165
71662011-08-02 Javier Miranda <miranda@adacore.com>
7167
7168 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7169 internally generated access to subprogram with its associated protected
7170 subprogram type.
7171 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7172
71732011-08-02 Geert Bosch <bosch@adacore.com>
7174
7175 * cstand.adb (Register_Float_Type): Print information about type to
7176 register, if the Debug_Flag_Dot_B is set.
7177 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7178 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7179 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7180 with a requested precision of more than Max_Digits digits and no more
7181 than Max_Base_Digits digits, if a range specification is present and the
7182 Predefined_Float_Types list has a suitable type to derive from.
7183 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7184 case of type completion with pragma Import
7185 * sem_prag.adb
7186 (Process_Import_Predefined_Type): Processing to complete a type
7187 with pragma Import. Currently supports floating point types only.
7188 (Set_Convention_From_Pragma): Do nothing without underlying type.
7189 (Process_Convention): Guard against absence of underlying type,
7190 which may happen when importing incomplete types.
7191 (Process_Import_Or_Interface): Handle case of importing predefined
7192 types. Tweak error message.
7193
71942011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7195
7196 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7197 functions to previous change. Reorganize code slightly.
7198
71992011-08-02 Geert Bosch <bosch@adacore.com>
7200
7201 * back_end.ads (Register_Type_Proc): New call back procedure type for
7202 allowing the back end to provide information about available types.
7203 (Register_Back_End_Types): New procedure to register back end types.
7204 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7205 available types.
7206 * cstand.adb (Back_End_Float_Types): New list for floating point types
7207 supported by the back end.
7208 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7209 (Copy_Float_Type): New procedure to make new copies of predefined types.
7210 (Register_Float_Type): New call back procedure to populate the BEFT list
7211 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7212 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7213 (Create_Float_Types): New procedure to create entities for floating
7214 point types predefined in Standard, and put these and any remaining
7215 BEFTs on the Predefined_Float_Types list.
7216 * stand.ads (Predefined_Float_Types): New list for predefined floating
7217 point types that do not have declarations in package Standard.
7218
72192011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7220
7221 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7222 entity node for the unit containing the parameter.
7223 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7224 (Add_Inlined_Subprogram): Likewise.
7225 * gcc-interface/Make-lang.in: Update dependencies.
7226
72272011-08-02 Thomas Quinot <quinot@adacore.com>
7228
7229 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7230 suitable value.
7231
72322011-08-02 Geert Bosch <bosch@adacore.com>
7233
7234 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7235
72362011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7237
7238 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7239 computed value of Base_Type.
7240
72412011-08-02 Yannick Moy <moy@adacore.com>
7242
7243 * restrict.adb (Check_Restriction): issue an error for any use of
7244 class-wide, even if the No_Dispatch restriction is not set.
7245 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7246 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7247 when completing a private extension, the type named in the private part
7248 is not the same as that named in the visible part.
7249 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7250 of an inherited primitive operations of a tagged type or type extension
7251 that returns the tagged type.
7252 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7253 function which returns True for an implicit operation inherited by the
7254 derived type declaration for the argument type.
7255 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7256 order.
7257
72582011-08-02 Ed Schonberg <schonberg@adacore.com>
7259
7260 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7261 Process_Bounds, to perform analysis with expansion of a range or an
7262 expression that is the iteration scheme for a loop.
7263 (Analyze_Iterator_Specification): If domain of iteration is given by a
7264 function call with a controlled result, as is the case if call returns
7265 a predefined container, ensure that finalization actions are properly
7266 generated.
7267 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7268
72692011-08-02 Javier Miranda <miranda@adacore.com>
7270
7271 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7272 * gcc-interface/Make-lang.in: Update dependencies.
7273
72742011-08-02 Javier Miranda <miranda@adacore.com>
7275
7276 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7277 determine if the analysis is performed using N or Original_Node (N).
7278 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7279 functionality of routine Is_Variable avoids code duplication.
7280 * checks.adb (Determine_Range): Handle temporaries generated by
7281 Remove_Side_Effects.
7282
72832011-08-02 Javier Miranda <miranda@adacore.com>
7284
7285 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7286 expansion of the condition. Required since the previous analysis was
7287 done with expansion disabled (see Resolve_Quantified_Expression) and
7288 hence checks were not inserted and record comparisons have not been
7289 expanded.
7290
72912011-08-02 Ed Falis <falis@adacore.com>
7292
7293 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7294 Update header.
7295
72962011-08-02 Bob Duff <duff@adacore.com>
7297
7298 * opt.ads: Minor comment fix.
7299
73002011-08-02 Bob Duff <duff@adacore.com>
7301
7302 * sem_ch12.adb (Analyze_Package_Instantiation,
7303 Analyze_Subprogram_Instantiation): Turn off style checking while
7304 analyzing an instance. Whatever style checks that apply to the generic
7305 unit should apply, so it makes no sense to apply them in an instance.
7306 This was causing trouble when compiling an instance of a runtime
7307 unit that violates the -gnatyO switch.
7308 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7309 one of the two case statements, causing spurious errors.
7310
73112011-08-02 Robert Dewar <dewar@adacore.com>
7312
7313 * uname.adb: Minor reformatting.
7314 * gnatcmd.adb: Minor reformatting.
7315 * exp_attr.adb: Minor reformatting.
7316
73172011-08-02 Ed Schonberg <schonberg@adacore.com>
7318
7319 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7320 No_Dispatching_Calls, do not look for the Assign primitive, because
7321 predefined primitives are not created in this case.
7322
73232011-08-02 Bob Duff <duff@adacore.com>
7324
7325 * stylesw.ads: Minor comment fixes.
7326
73272011-08-02 Robert Dewar <dewar@adacore.com>
7328
7329 * freeze.adb (Add_To_Result): New procedure.
7330
73312011-08-02 Jose Ruiz <ruiz@adacore.com>
7332
7333 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7334 time, if the specific run-time routines for handling streams of strings
7335 are not available, use the default mechanism.
7336
73372011-08-02 Arnaud Charlet <charlet@adacore.com>
7338
7339 * s-regpat.ads: Fix typo.
7340
73412011-08-02 Vincent Celier <celier@adacore.com>
7342
7343 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7344 not null, call it to create the in memory config project file without
7345 parsing an existing default config project file.
7346
73472011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7348
7349 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7350
73512011-08-02 Ed Schonberg <schonberg@adacore.com>
7352
7353 * sem_elim.adb: an abstract subprogram does not need an eliminate
7354 pragma for its descendant to be eliminable.
7355
73562011-08-02 Ed Falis <falis@adacore.com>
7357
7358 * init.c: revert to handling before previous checkin for VxWorks
7359 * s-intman-vxworks.adb: delete unnecessary declarations related to
7360 using Ada interrupt facilities for handling signals.
7361 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7362 * s-intman-vxworks.ads: Import __gnat_install_handler as
7363 Initialize_Interrupts.
7364 * s-taprop-vxworks.adb: Delete Signal_Mask.
7365 (Abort_Handler): change construction of mask to unblock exception
7366 signals.
7367
73682011-08-02 Jerome Guitton <guitton@adacore.com>
7369
7370 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7371 Debug_Raise_Exception before propagation starts.
7372
73732011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7374
7375 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7376 to Restriction_Check_Required.
7377 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7378 * sem_res.adb (Resolve_Call): Likewise.
7379 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7380
73812011-08-02 Bob Duff <duff@adacore.com>
7382
7383 * stylesw.ads: Update comment.
7384 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7385 * errout.ads: Remove obsolete comment.
7386
73872011-08-02 Javier Miranda <miranda@adacore.com>
7388
7389 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7390 (Set_Is_Safe_To_Reevaluate): new procedure.
7391 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7392 assignment is allowed on safe-to-reevaluate variables.
7393 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7394 temporary created to remove side effects in expressions that use
7395 the secondary stack as safe-to-reevaluate.
7396 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7397 variables that are not true constants.
7398
73992011-08-02 Robert Dewar <dewar@adacore.com>
7400
7401 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7402 sem_res.adb, sem_ch6.adb: Minor reformatting.
7403
74042011-08-02 Jerome Guitton <guitton@adacore.com>
7405
7406 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7407
74082011-08-02 Ed Schonberg <schonberg@adacore.com>
7409
7410 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7411 not set Overridden_Operation if subprogram is an initialization
7412 procedure.
7413
74142011-08-02 Yannick Moy <moy@adacore.com>
7415
7416 * par-ch6.adb: Correct obsolete name in comments
7417 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7418 which takes two message arguments (existing function takes one), with
7419 second message used for continuation.
7420 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7421 block statements that originate from a source block statement, not
7422 generated block statements
7423 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7424 symmetry with procedure case
7425 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7426 function to issue an error in formal mode if a package specification
7427 contains more than one tagged type or type extension.
7428 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7429 parameters matching formals of tagged types are objects (or ancestor
7430 type conversions of objects), not general expressions. Issue an error
7431 on view conversions that are not involving ancestor conversion of an
7432 extended type.
7433 (Resolve_Type_Conversion): in formal mode, issue an error on the
7434 operand of an ancestor type conversion which is not an object
7435 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7436 procedure so that it works also for actuals of function calls
7437 (Is_Actual_Tagged_Parameter): new function which determines if its
7438 argument is an actual parameter of a formal of tagged type in a
7439 subprogram call
7440 (Is_SPARK_Object_Reference): new function which determines if the tree
7441 referenced by its argument represents an object in SPARK
7442
74432011-08-02 Robert Dewar <dewar@adacore.com>
7444
7445 * sem_ch3.adb: Minor reformatting
7446 Minor comment addition
7447 Minor error msg text change
7448
74492011-08-02 Javier Miranda <miranda@adacore.com>
7450
7451 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7452 function. Used to be more precise when we generate a variable plus one
7453 assignment to remove side effects in the evaluation of the Bound
7454 expressions.
7455 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7456 of the bound expression to force its re-analysis and thus expand the
7457 associated transient scope (if required). Code cleanup replacing the
7458 previous code that declared the constant entity by an invocation to
7459 routine Force_Evaluation which centralizes this work in the frontend.
7460
74612011-08-02 Robert Dewar <dewar@adacore.com>
7462
7463 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7464 (Base_Type): Now uses improved Is_Base_Type function
7465 * einfo.ads (Base_Type): Inline this function
7466
74672011-08-02 Robert Dewar <dewar@adacore.com>
7468
7469 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7470 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7471
74722011-08-02 Arnaud Charlet <charlet@adacore.com>
7473
7474 * gcc-interface/Make-lang.in: Update dependencies.
7475 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7476 targets.
7477
74782011-08-02 Yannick Moy <moy@adacore.com>
7479
7480 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7481 non-simple expression used in delta constraint
7482 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7483 index constraint which is not a subtype mark
7484 * par.adb: With and use Restrict
7485 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7486 mode on component type which is not a subtype mark and default
7487 expression on component
7488 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7489 of string which does not have a lower index bound equal to 1
7490 (Array_Type_Declaration): issue an error in formal mode on index or
7491 component type which is not a subtype mark, and on aliased keyword on
7492 component
7493 (Derived_Type_Declaration): issue an error in formal mode on interface,
7494 limited or abstract type
7495 (Record_Type_Declaration): issue an error in formal mode on interface
7496 (Record_Type_Definition): issue an error in formal mode on tagged types
7497 and type extensions not declared in the specification of a library unit
7498 package; on null non-tagged record; on variant part
7499
75002011-08-02 Vincent Celier <celier@adacore.com>
7501
7502 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7503 not declared for qualified library project when Library_Name is not
7504 declared, but Library_Dir is.
7505
75062011-08-02 Robert Dewar <dewar@adacore.com>
7507
7508 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7509 pragmas (affects aspects [Component_]Default_Value
7510 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7511 component type for the resolution
7512
75132011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7514
7515 * einfo.adb (Base_Type): Tune implementation for speed.
7516
75172011-08-02 Robert Dewar <dewar@adacore.com>
7518
7519 * freeze.adb: Minor reformatting.
7520
75212011-08-02 Thomas Quinot <quinot@adacore.com>
7522
7523 * scos.ads: Update comments.
7524
75252011-08-02 Ed Schonberg <schonberg@adacore.com>
7526
7527 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7528 base type, because the parent may be a subtype of a private type whose
7529 convention is established in a private part.
7530
75312011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7532
7533 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7534 statement in a block when the expansion of the return expression has
7535 created a finalization chain.
7536 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7537 with the parent node.
7538 Add N_Extended_Return_Statement to handle the case where a transient
7539 object declaration appears in the Return_Object_Declarations list of
7540 an extended return statement.
7541
75422011-08-02 Matthew Gingell <gingell@adacore.com>
7543
7544 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7545 unused parameter 'name'.
7546
75472011-08-02 Ed Schonberg <schonberg@adacore.com>
7548
7549 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7550 inherited operation, check whether its alias, which is the source
7551 operastion that it renames, has been marked eliminated.
7552
75532011-08-02 Javier Miranda <miranda@adacore.com>
7554
7555 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7556 in-mode parameter whose type is an access type since it can be used to
7557 modify its designated object. Enforce code that handles as safe an
7558 access type that is not access-to-constant but it is the result of a
7559 previous removal of side-effects.
7560 (Remove_Side_Effects): Minor code reorganization of cases which require
7561 no action. Done to incorporate documentation on new cases uncovered
7562 working in this ticket: no action needed if this routine was invoked
7563 too early and the nodes are not yet decorated.
7564 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7565 to routine Remove_Side_Effects by calls to Force_Evaluation since they
7566 were issued with actuals that are implicitly provided by
7567 Force_Evaluation.
7568
75692011-08-02 Robert Dewar <dewar@adacore.com>
7570
7571 * sem_ch3.adb, sem_res.adb: Minor reformatting.
7572
75732011-08-02 Yannick Moy <moy@adacore.com>
7574
7575 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7576 to issue an error in formal mode on attribute not supported in this mode
7577 (Analyze_Attribute): issue errors on standard attributes not supported
7578 in formal mode.
7579 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7580 comment, and issue error in formal mode on modulus which is not a power
7581 of 2.
7582 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7583 range.
7584 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7585 subtype mark.
7586 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7587 operator on modular type (except 'not').
7588
75892011-08-02 Robert Dewar <dewar@adacore.com>
7590
7591 * gnat_rm.texi: Minor reformatting.
7592
75932011-08-02 Arnaud Charlet <charlet@adacore.com>
7594
7595 * s-osinte-linux.ads: Minor comment update and reformatting.
7596 * i-cexten.ads: Make this unit pure, as for its parent.
7597 Will allow its usage in more contexts if needed.
7598
75992011-08-02 Robert Dewar <dewar@adacore.com>
7600
7601 * s-utf_32.ads: Minor comment fix.
7602
76032011-08-02 Ed Schonberg <schonberg@adacore.com>
7604
7605 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
7606 operation of a tagged synchronized type, handle the case where the
7607 controlling argument is overloaded.
7608
76092011-08-02 Yannick Moy <moy@adacore.com>
7610
7611 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
7612 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
7613 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
7614 SPARK mode and formal verification mode on processing SPARK restriction
7615 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
7616 requiring consistency checking.
7617
76182011-08-02 Robert Dewar <dewar@adacore.com>
7619
7620 * sem_res.adb: Minor reformatting.
7621
76222011-08-02 Robert Dewar <dewar@adacore.com>
7623
7624 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7625 a-cforse.ads: Remove unneeded with of Ada.Containers
7626 Remove commented out pragma Inline's
7627 Move specifications of new subprograms to the actual specs
7628
76292011-08-02 Yannick Moy <moy@adacore.com>
7630
7631 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7632 a-cforse.ads: Update comments.
7633
76342011-08-02 Ed Schonberg <schonberg@adacore.com>
7635
7636 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
7637
76382011-08-02 Robert Dewar <dewar@adacore.com>
7639
7640 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7641 a-cforse.ads, a-cofove.ads: Minor reformatting.
7642
76432011-08-02 Claire Dross <dross@adacore.com>
7644
7645 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
7646 a-cofove.ads: Add comments.
7647
76482011-08-02 Yannick Moy <moy@adacore.com>
7649
7650 * gnat_rm.texi: Document formal containers.
7651
76522011-08-02 Emmanuel Briot <briot@adacore.com>
7653
7654 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
7655 are empty sections.
7656
76572011-08-02 Robert Dewar <dewar@adacore.com>
7658
7659 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
7660 reformatting.
7661
76622011-08-02 Robert Dewar <dewar@adacore.com>
7663
7664 * aspects.adb: New aspects Default_Value and Default_Component_Value
7665 New format of Aspect_Names table checks for omitted entries
7666 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
7667 handling of boolean aspects for derived types.
7668 New aspects Default_Value and Default_Component_Value
7669 New format of Aspect_Names table checks for omitted entries
7670 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
7671 (Has_Default_Value): New flag
7672 (Has_Default_Component_Value): New flag
7673 (Has_Default_Value): New flag
7674 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
7675 table.
7676 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
7677 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
7678 Default_Value and Default_Component_Value
7679 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7680 New aspects Default_Value and Default_Component_Value
7681 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7682 * sprint.adb: Print N_Aspect_Specification node when called from gdb
7683
76842011-08-02 Vincent Celier <celier@adacore.com>
7685
7686 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7687 inherit library kind.
7688
76892011-08-02 Ed Schonberg <schonberg@adacore.com>
7690
7691 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7692 Minor reformatting.
7693
76942011-08-02 Robert Dewar <dewar@adacore.com>
7695
7696 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7697
76982011-08-02 Yannick Moy <moy@adacore.com>
7699
7700 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7701
77022011-08-02 Robert Dewar <dewar@adacore.com>
7703
7704 * impunit.adb: Add comment.
7705
77062011-08-02 Yannick Moy <moy@adacore.com>
7707
7708 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7709 qualification of aggregates in formal mode
7710 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7711 another aggregate
7712 (Resolve_Aggregate): complete the test that an aggregate is adequately
7713 qualified in formal mode
7714
77152011-08-02 Pascal Obry <obry@adacore.com>
7716
7717 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7718 * mlib-prj.adb: Supress warning when compiling binder generated file.
7719 (Build_Library): Supress all warnings when compiling the binder
7720 generated file.
7721
77222011-08-02 Yannick Moy <moy@adacore.com>
7723
7724 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7725 from here...
7726 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7727 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7728 Add with/use clauses to make Check_Formal_Restriction visible
7729
77302011-08-02 Ed Schonberg <schonberg@adacore.com>
7731
7732 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7733 in-parameters when type of the generic formal is private in the generic
7734 spec and non-private in the body.
7735
77362011-08-02 Claire Dross <dross@adacore.com>
7737
7738 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7739 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7740 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7741 * impunit.adb, Makefile.rtl: Take new files into account.
7742
77432011-08-02 Robert Dewar <dewar@adacore.com>
7744
7745 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7746 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7747
77482011-08-02 Yannick Moy <moy@adacore.com>
7749
7750 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7751 formal mode
7752 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7753 matching static array bounds, taking into account the special case of
7754 string literals
7755 * sem_ch3.adb: Typo in comment.
7756
77572011-08-02 Yannick Moy <moy@adacore.com>
7758
7759 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7760 which issues an error in formal mode if its argument node is originally
7761 from source
7762 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7763 has a discriminant specification so that it does not include the case
7764 of derived types
7765 (Derived_Type_Declaration): move here the test that a derived type has a
7766 discriminant specification
7767 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7768 first element of a component association before accessing its choices
7769 (presence of component association is not enough)
7770 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7771 declaration is a library item before accessing the next element in a
7772 list, as library items are not member of lists
7773 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7774 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7775 Check_Formal_Restriction whenever possible.
7776
77772011-08-02 Ed Schonberg <schonberg@adacore.com>
7778
7779 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7780 reference when needed.
7781
77822011-08-02 Bob Duff <duff@adacore.com>
7783
7784 * gnat_ugn.texi: Fix typo.
7785
77862011-08-02 Vincent Celier <celier@adacore.com>
7787
7788 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7789 archive file name. Do not use the full path name of archives for Open
7790 VMS.
7791
77922011-08-02 Robert Dewar <dewar@adacore.com>
7793
7794 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7795 Analyze_Aspect_Specifications
7796 * sem_ch13.adb
7797 (Analyze_Aspect_Specifications): New handling for boolean aspects
7798 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7799 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7800 sequence for Analyze_Aspect_Specifications
7801 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7802 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7803
78042011-08-02 Robert Dewar <dewar@adacore.com>
7805
7806 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7807 aspects, since these no longer exist.
7808
78092011-08-02 Robert Dewar <dewar@adacore.com>
7810
7811 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7812 semicolon, do not try to see if there are aspects following it.
7813 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7814 aspect spec.
7815
78162011-08-02 Robert Dewar <dewar@adacore.com>
7817
7818 * sem_ch8.adb, aspects.ads: Minor reformatting.
7819
78202011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7821
7822 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7823 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7824 extracted from...
7825 (Analyze_Aspect_Specifications): ...here. Call above procedure.
7826
78272011-08-02 Yannick Moy <moy@adacore.com>
7828
7829 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7830 mode on subprogram declaration outside of package specification, unless
7831 it is followed by a pragma Import
7832 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7833 Access_Type_Declaration): issue error in formal mode on access type
7834 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7835 incomplete type
7836 (Analyze_Object_Declaration): issue error in formal mode on object
7837 declaration which does not respect SPARK restrictions
7838 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7839 declaration which does not respect SPARK restrictions
7840 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7841 error in formal mode on digits or delta constraint
7842 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7843 decimal fixed point type
7844 (Derived_Type_Declaration): issue error in formal mode on derived type
7845 other than type extensions of tagged record types
7846 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7847 with check on access definition
7848 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7849 mode on protected definition.
7850 (Analyze_Task_Definition): issue error in formal mode on task definition
7851
78522011-08-02 Robert Dewar <dewar@adacore.com>
7853
7854 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7855
78562011-08-02 Javier Miranda <miranda@adacore.com>
7857
7858 * sem_ch6.adb (Can_Override_Operator): New function.
7859 (Verify_Overriding_Indicator): Add missing code to check overriding
7860 indicator in operators. Fixes regression.
7861 (Check_Overriding_Indicator): Minor reformating after replacing the
7862 code that evaluates if the subprogram can override an operator by
7863 invocations to the above new function.
7864 * einfo.adb
7865 (Write_Field26_Name): Add missing code to ensure that, following
7866 the documentation in einfo.ads, this field is not shown as attribute
7867 "Static_Initialization" on non-dispatching functions.
7868
78692011-08-02 Jose Ruiz <ruiz@adacore.com>
7870
7871 * sem_res.adb (Resolve_Call): A call to
7872 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7873 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7874 i.e., when the second parameter is of type Time_Span.
7875
78762011-08-02 Vincent Celier <celier@adacore.com>
7877
7878 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7879 with an archive instead of -L<library dir> -l<library name>.
7880
78812011-08-02 Ed Schonberg <schonberg@adacore.com>
7882
7883 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7884 mark the base types In_Use in addition to making the operations
7885 use_visible.
7886
78872011-08-02 Ed Falis <falis@adacore.com>
7888
7889 * init.c: add and setup __gnat_signal_mask for the exception signals
7890 * s-inmaop-vxworks.adb: new file.
7891 * s-intman-vxworks.adb: remove unnecessary initializations and
7892 simplify remaining
7893 * s-intman-vxworks.ads: remove unnecessary variable
7894 * s-taprop-vxworks.adb: simplify signal initialization
7895
78962011-08-02 Robert Dewar <dewar@adacore.com>
7897
7898 * sem_ch8.adb: Minor code reorganization, comment updates.
7899
79002011-08-02 Robert Dewar <dewar@adacore.com>
7901
7902 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7903 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7904 here from Sem_Res.
7905 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7906 (Matching_Static_Array_Bounds): Moved here from Sem_Res
7907
79082011-08-02 Ed Schonberg <schonberg@adacore.com>
7909
7910 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7911 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7912 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7913 use_type_clauses, to handle more efficiently use_type and use_all_type
7914 constructs.
7915 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7916 Ada2012 Use_All_Type clause.
7917 (Use_Class_Wide_Operations): new procedure.
7918
79192011-08-02 Robert Dewar <dewar@adacore.com>
7920
7921 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7922 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7923 expression to expression function.
7924
79252011-08-02 Ed Schonberg <schonberg@adacore.com>
7926
7927 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7928 if types are compatible.
7929
79302011-08-02 Yannick Moy <moy@adacore.com>
7931
7932 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7933 returns True if its argument array types have same dimension and same
7934 static bounds at each index.
7935 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7936 OUT or IN OUT paramaters which are not view conversions in SPARK.
7937 (Resolve_Arithmetic_Op): issue an error in formal mode on
7938 multiplication or division with operands of fixed point types which are
7939 not qualified or explicitly converted.
7940 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7941 Boolean or array type (except String) operands.
7942 (Resolve_Equality_Op): issue an error in formal mode on equality
7943 operators for array types other than String with non-matching static
7944 bounds.
7945 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7946 for array types with non-matching static bounds. Factorize the code in
7947 Matching_Static_Array_Bounds.
7948 (Resolve_Qualified_Expression): issue an error in formal mode on
7949 qualified expressions for array types with non-matching static bounds.
7950 (Resolve_Type_Conversion): issue an error in formal mode on type
7951 conversion for array types with non-matching static bounds
7952
79532011-08-02 Robert Dewar <dewar@adacore.com>
7954
7955 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7956
79572011-08-02 Ed Schonberg <schonberg@adacore.com>
7958
7959 * par-ch9.adb: save location of entry for proper error message.
7960
79612011-08-02 Javier Miranda <miranda@adacore.com>
7962
7963 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7964 (Use_Full_View) which permits this routine to climb through the
7965 ancestors using the full-view of private parents.
7966 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7967 Use_Full_View to true in calls to Is_Ancestor.
7968 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7969 true in call to Is_Ancestor.
7970 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7971 Use_Full_View to true in call to Is_Ancestor.
7972 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7973 call to Is_Ancestor.
7974 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7975 Use_Full_View to true in calls to Is_Ancestor.
7976 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7977 Make_Select_Specific_Data_Table, Register_Primitive,
7978 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7979 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7980 to true in call to Is_Ancestor.
7981 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7982 Use_Full_View to true in calls to Is_Ancestor.
7983 * exp_cg.adb
7984 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7985 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7986
79872011-08-02 Robert Dewar <dewar@adacore.com>
7988
7989 * gnat_rm.texi: Minor reformatting.
7990 * sem_prag.adb: Minor reformatting.
7991
79922011-08-02 Tristan Gingold <gingold@adacore.com>
7993
7994 * vms_data.ads: Add VMS qualifier for -gnateP.
7995
79962011-08-02 Robert Dewar <dewar@adacore.com>
7997
7998 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7999 * par-ch7.adb (P_Package): Proper placement of aspects for package
8000 decl/instantiation.
8001 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8002 (End_Statements): Add Is_Sloc parameterr
8003 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8004 (Check_End): Ad Is_Sloc parameter
8005 (End_Statements): Add Is_Sloc parameterr
8006
80072011-08-02 Vincent Celier <celier@adacore.com>
8008
8009 * ug_words: Add VMS qualifier equivalent to -gnateP:
8010 /SYMBOL_PREPROCESSING.
8011
80122011-08-02 Jose Ruiz <ruiz@adacore.com>
8013
8014 * gnat-style.texi: For hexadecimal numeric literals the typical
8015 grouping of digits is 4 to represent 2 bytes.
8016 A procedure spec which is split into several lines is indented two
8017 characters.
8018
80192011-08-02 Yannick Moy <moy@adacore.com>
8020
8021 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8022 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8023 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8024 properly qualified
8025 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8026 choice in array aggregate
8027 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8028 mark as ancestor
8029 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8030 positional and named aggregate for record, or others in record
8031 aggregate, or multiple choice in record aggregate
8032 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8033 array operands to logical operations AND, OR and XOR do not have the
8034 same static lower and higher bounds
8035 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8036
80372011-08-01 Robert Dewar <dewar@adacore.com>
8038
8039 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8040 Replaces Last_Source_Node_In_Sequence.
8041 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8042 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8043 parens and blank in string (this was inconsistently implemented).
8044 * errout.ads
8045 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8046 blank in string (this was inconsistently implemented).
8047 * gnat1drv.adb
8048 (Set_Global_Switches): Set formal mode switches appropriately
8049 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8050 * par-prag.adb
8051 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8052 call Set_Error_Msg_Lang to set "spark" as language name.
8053 * par.adb: Remove unnecessary call to set formal language for errout
8054 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8055 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8056 name.
8057 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8058 calls to it, moved after resolution so that types are known
8059 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8060 result of concatenation is not of type String
8061 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8062 concatenation is not properly restricted
8063 * gnat_rm.texi: Add doc on pragma Spark_95.
8064 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8065 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8066 * gcc-interface/Make-lang.in: Update dependencies.
8067
80682011-08-01 Javier Miranda <miranda@adacore.com>
8069
8070 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8071 condition that detects if the overridden operation must replace an
8072 existing entity.
8073
80742011-08-01 Javier Miranda <miranda@adacore.com>
8075
8076 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8077 code declarations inserted by Insert_Actions in each alternative of the
8078 N_Case_Expression node.
8079
80802011-08-01 Robert Dewar <dewar@adacore.com>
8081
8082 * sem_ch6.adb: Minor code reorganization.
8083 * sem_util.adb: Minor reformatting.
8084
80852011-08-01 Pascal Obry <obry@adacore.com>
8086
8087 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8088 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8089
80902011-08-01 Yannick Moy <moy@adacore.com>
8091
8092 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8093 literal or operator symbol which is prefixed
8094 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8095 mode on access attributes.
8096 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8097 that concatenation operands are properly restricted in formal mode
8098 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8099 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8100 result of the concatenation has a type different from String.
8101 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8102 Analyze_Quantified_Expression, Analyze_Slice,
8103 Analyze_Null): issue an error in formal mode on unsupported constructs
8104 * sem_ch5.adb
8105 (Analyze_Block_Statement): only issue error on source block statement
8106 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8107 function which returns the last node in a list of nodes for which
8108 Comes_From_Source returns True, if any
8109 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8110 Last_Source_Node_In_Sequence
8111 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8112 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8113 mode on unsupported constructs
8114 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8115 rest of the actions may be needed later on since the error is marked as
8116 not serious.
8117 * sinfo.ads: Typos in comments.
8118
81192011-08-01 Pascal Obry <obry@adacore.com>
8120
8121 * projects.texi: Minor editing.
8122
81232011-08-01 Yannick Moy <moy@adacore.com>
8124
8125 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8126 insertion character ~~
8127 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8128 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8129 with insertion character ~~
8130 (Set_Msg_Text): treat insertion character ~~
8131 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8132 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8133 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8134 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8135 errors related to the formal language restriction not serious
8136 (insertion character |).
8137 * par.adb (Par): set formal language for error messages if needed
8138 * sem_ch6.adb (Check_Missing_Return): take into account possible
8139 generated statements at the end of the function
8140 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8141 enumeration value to define a new pragma SPARK_95
8142 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8143 SPARK_Version): new type and variables to store the SPARK version
8144 (none by default).
8145 (SPARK_Mode): return True when SPARK_Version is set
8146 * par-prag.adb: Correct indentation
8147 (Prag): take Pragma_SPARK_95 into account
8148 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8149 into account.
8150
81512011-08-01 Robert Dewar <dewar@adacore.com>
8152
8153 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8154 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8155 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8156
81572011-08-01 Pascal Obry <obry@adacore.com>
8158
8159 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8160 Target_Name to Get_Path call.
8161 (Parse_Single_Project): Likewise.
8162 (Post_Parse_Context_Clause): Likewise.
8163 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8164 Call Initialise_Project_Path with the proper Target_Name.
8165 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8166 search path.
8167 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8168 with the proper Target_Name.
8169 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8170 Part.Parse routine.
8171 (Parse_Project_And_Apply_Config): Likewise.
8172 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8173 This is fine as this part of the code is supporting only native
8174 compilation.
8175 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8176 is fine as this part of the code is supporting only native compilation.
8177
81782011-08-01 Yannick Moy <moy@adacore.com>
8179
8180 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8181 of homonym, unless the homonym is one of the cases allowed in SPARK
8182 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8183 package declaration occurring after a body.
8184
81852011-08-01 Robert Dewar <dewar@adacore.com>
8186
8187 * checks.adb, exp_ch4.adb: Minor reformatting.
8188
81892011-08-01 Javier Miranda <miranda@adacore.com>
8190
8191 * einfo.ads (Access_Disp_Table): Fix documentation.
8192 (Dispatch_Table_Wrappers): Fix documentation.
8193
81942011-08-01 Pascal Obry <obry@adacore.com>
8195
8196 * prj-env.adb, prj-env.ads: Minor reformatting.
8197
81982011-08-01 Yannick Moy <moy@adacore.com>
8199
8200 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8201 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8202 procedures out of these packages.
2c7f9cc0 8203 * errout.ads, errout.adb
052e0603
AC
8204 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8205 procedures in of this package
8206 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8207 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8208 on misplaced later vs initial declarations, like in Ada 83
8209 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8210 formal mode on attribute of private type whose full type declaration
8211 is not visible
8212 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8213 package declaration inside a package specification
8214 (Analyze_Full_Type_Declaration): issue error in formal mode on
8215 controlled type or discriminant type
8216 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8217 user-defined operator means that it should come from the source
8218 (New_Overloaded_Entity): issue error in formal mode on overloaded
8219 entity.
8220 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8221
82222011-08-01 Thomas Quinot <quinot@adacore.com>
8223
8224 * atree.adb: Minor reformatting.
8225 * checks.adb: Minor reformatting.
8226
82272011-08-01 Vincent Celier <celier@adacore.com>
8228
8229 * s-parame-vms-ia64.ads: Fix typo in comment
8230 Minor reformatting
8231 * s-parame-vms-restrict.ads: Removed, unused.
8232
82332011-08-01 Javier Miranda <miranda@adacore.com>
8234
8235 * exp_ch3.adb
8236 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8237 * sem_ch3.adb
8238 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8239 * sem_ch3.ads, sem_ch3.adb
8240 (Is_Constant_Bound): New extended version of the subprogram that was
8241 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8242 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8243 * sem_aux.ads (Constant_Value): Fix typo in comment.
8244 * checks.adb (Generate_Index_Checks): New implementation which, for
8245 array objects with constant bounds, generates the runtime check
8246 referencing the bounds of the array type. For other cases this routine
8247 provides its previous behavior obtaining such values from the array
8248 object.
8249 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8250 parent type.
8251 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8252 we cannot have semantic interpretations of the new node.
8253
82542011-08-01 Ed Schonberg <schonberg@adacore.com>
8255
8256 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8257 expressions.
8258
82592011-08-01 Arnaud Charlet <charlet@adacore.com>
8260
8261 * sem_ch8.adb: Minor code editing.
8262 * s-vxwext.adb: Remove trailing space.
8263 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8264 consistency with other files.
8265
82662011-08-01 Thomas Quinot <quinot@adacore.com>
8267
8268 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8269
82702011-08-01 Ed Schonberg <schonberg@adacore.com>
8271
8272 * par-ch10.adb: reject parameterized expressions as compilation unit.
8273 * sem_ch4.adb: handle properly conditional expression with overloaded
8274 then_clause and no else_clause.
8275
82762011-08-01 Tristan Gingold <gingold@adacore.com>
8277
8278 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8279 like done by System.Aux_DEC.
8280 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8281
82822011-08-01 Yannick Moy <moy@adacore.com>
8283
8284 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8285 missing label at end of declaration (subprogram or package)
8286 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8287 of positional and named parameter association
8288 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8289 Error_Msg_SP which adds a prefix to the error message giving the name
8290 of the formal language analyzed
8291 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8292 access result type in subprogram, unconstrained array as result type,.
8293 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8294 procedure
8295 * sem_ch8.adb: Code clean up.
8296
82972011-08-01 Javier Miranda <miranda@adacore.com>
8298
8299 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8300 * einfo.ads (Access_Disp_Table): Fix documentation.
8301 (Dispatch_Table_Wrappers): Fix documentation.
8302 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8303 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8304 to enforce the documentation of this attribute.
8305 (Set_Is_Interface): Cleanup the assertion.
8306 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8307 the Underlying_Type entity before reading attribute Access_Disp_Table.
8308 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8309 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8310 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8311 the Underlying_Type entity before reading attribute Access_Disp_Table.
8312 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8313 Locate the Underlying_Type entity before reading attribute
8314 Access_Disp_Table.
8315
83162011-08-01 Ed Schonberg <schonberg@adacore.com>
8317
8318 * s-poosiz.ads: Additional overriding indicators.
8319
83202011-08-01 Yannick Moy <moy@adacore.com>
8321
8322 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8323 formal mode.
8324 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8325 parameter specification does not include a subtype mark.
8326 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8327 formal mode on abstract subprogram.
8328 (Analyze_Subprogram_Specification): issue error in formal mode on
8329 user-defined operator.
8330 (Process_Formals): issue error in formal mode on access parameter and
8331 default expression.
8332 * sem_ch9.adb (Analyze_Abort_Statement,
8333 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8334 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8335 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8336 Analyze_Requeue, Analyze_Selective_Accept,
8337 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8338 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8339 issue error in formal mode on user-defined raise statement.
8340
83412011-08-01 Thomas Quinot <quinot@adacore.com>
8342
8343 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8344 declaration being hidden when overriding an implicit inherited
8345 subprogram.
8346 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8347 (-gnats), do not complain about a source file that contains only a
8348 pragma No_Body.
8349
83502011-08-01 Ed Schonberg <schonberg@adacore.com>
8351
8352 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8353 variable if already set.
8354
83552011-08-01 Arnaud Charlet <charlet@adacore.com>
8356
8357 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8358 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8359 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8360 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8361 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8362 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8363 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8364 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8365 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8366 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8367 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8368 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8369 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8370 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8371 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8372 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8373 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8374 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8375 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8376 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8377 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8378 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8379 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8380 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8381 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8382 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8383 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8384 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8385 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8386 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8387 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8388 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8389 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8390 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8391 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8392 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8393 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8394 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8395 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8396 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8397 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8398 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8399 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8400 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8401 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8402 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8403 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8404 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8405 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8406 Use GNAT instead of GNARL.
8407
84082011-08-01 Bob Duff <duff@adacore.com>
8409
8410 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8411 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8412 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8413 reformatting.
8414
84152011-08-01 Yannick Moy <moy@adacore.com>
8416
8417 * debug.adb (d.D) reverve flag for the SPARK mode
8418 (d.E) reverve flag for SPARK generation mode
8419 (d.F) reverve flag for Why generation mode
2c7f9cc0 8420 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
8421 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8422 functions which return True when the corresponding modes are set
8423 (Formal_Language): return "spark" or "alfa" when in formal verification
8424 mode.
8425 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8426 Error_Msg to prefix the error message with a tag giving the formal
8427 language
8428 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8429 message with a tag giving the formal language
8430 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8431 block statement
8432 (Analyze_Case_Statement): issue error in formal mode on case statement
8433 with a single "others" case alternative
8434 (Analyze_Exit_Statement): issue errors in formal mode on exit
8435 statements which do not respect SPARK restrictions
8436 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8437 (Check_Unreachable_Code): always issue an error (not a warning) in
8438 formal mode on unreachable code (concerns both code after an infinite
8439 loop and after an unconditional jump, both not allowed in SPARK)
8440 * sem_ch6.adb (Analyze_Return_Statement): add call to
8441 Set_Return_Present for a procedure containing a return statement
8442 (already done for functions in Analyze_Function_Return)
8443 (Analyze_Function_Return): issue error in formal mode on extended
8444 return or if return is not last statement in function
8445 (Check_Missing_Return): issue error in formal mode if function does
8446 not end with return or if procedure contains a return
8447 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8448 function to detect if there is an inner scope of its parameter S which
8449 is a loop.
8450
84512011-08-01 Thomas Quinot <quinot@adacore.com>
8452
8453 * sem_ch6.ads: Minor reformatting.
8454
84552011-08-01 Javier Miranda <miranda@adacore.com>
8456
8457 * sem_util.adb (Abstract_Interface_List): Complete condition when
8458 processing private type declarations to avoid reading unavailable
8459 attribute.
8460 (Is_Synchronized_Tagged_Type): Complete condition when processing
8461 private extension declaration nodes to avoid reading unavailable
8462 attribute.
8463
84642011-08-01 Thomas Quinot <quinot@adacore.com>
8465
8466 * sem_ch3.adb: Minor reformatting.
8467
84682011-08-01 Thomas Quinot <quinot@adacore.com>
8469
8470 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8471 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8472 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8473 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8474 for VMS, instead parametrize the common implementation with
8475 System.Parameters declarations.
8476
84772011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8478
8479 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8480
84812011-08-01 Tristan Gingold <gingold@adacore.com>
8482
8483 * seh_init.c: Fix SEH handler installation on win64.
8484
84852011-08-01 Ed Schonberg <schonberg@adacore.com>
8486
8487 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8488 double analysis of an anonymous access to subprogram, because it can
8489 lead to improper sharing of profiles and a back-end crash.
8490
84912011-08-01 Robert Dewar <dewar@adacore.com>
8492
8493 * make.adb, sem_ch4.adb: Minor reformatting.
8494 * gcc-interface/Make-lang.in: Update dependencies.
8495 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8496
84972011-08-01 Arnaud Charlet <charlet@adacore.com>
8498
8499 * gnat_rm.texi: Fix definition of Long_Integer.
8500
85012011-08-01 Ed Schonberg <schonberg@adacore.com>
8502
8503 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8504 to prevent storage exhaustion.
8505 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8506 finalized is a function body, insert the cleanup code before the final
8507 return statement, to prevent spurious warnings.
8508 * s-pooglo.ads: add overriding indicator.
8509
85102011-08-01 Ed Schonberg <schonberg@adacore.com>
8511
8512 * sem_ch4.adb (Operator_Check): improve error message when both a
8513 with_clause and a use_clause are needed to make operator usage legal.
8514 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8515 determine whether a compilation unit is visible within an other,
8516 either through a with_clause in the current unit, or a with_clause in
8517 its library unit or one one of its parents.
8518
85192011-08-01 Ed Schonberg <schonberg@adacore.com>
8520
8521 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8522 over an arbitrary expression of an array or container type.
8523 * lib-xref.adb: clarify comment.
8524
85252011-08-01 Bob Duff <duff@adacore.com>
8526
8527 * einfo.ads: Minor reformatting.
8528 * debug.adb: Minor comment improvement.
8529
85302011-08-01 Javier Miranda <miranda@adacore.com>
8531
8532 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8533 consider hidden subprograms as valid candidates.
8534
85352011-08-01 Arnaud Charlet <charlet@adacore.com>
8536
8537 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8538
85392011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8540
8541 * gnat_ugn.texi: Fix typo.
8542
85432011-08-01 Robert Dewar <dewar@adacore.com>
8544
8545 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8546 lib-xref.adb: Minor reformatting
8547
85482011-08-01 Gary Dismukes <dismukes@adacore.com>
8549
8550 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8551 when to generate a call to Move_Final_List.
8552 (Has_Controlled_Parts): Remove this function.
8553
85542011-08-01 Geert Bosch <bosch@adacore.com>
8555
8556 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8557 "," in choice list.
8558
85592011-08-01 Thomas Quinot <quinot@adacore.com>
8560
8561 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8562 explicit raise of a predefined exception as Comes_From_Source if the
8563 original N_Raise_Statement comes from source.
8564
85652011-08-01 Robert Dewar <dewar@adacore.com>
8566
8567 * sinfo.ads: Add comment.
8568 * sem_ch6.adb: Minor reformatting.
8569
85702011-08-01 Robert Dewar <dewar@adacore.com>
8571
8572 * freeze.adb (Freeze_Entity): Refine check for bad component size
8573 clause to avoid rejecting confirming clause when atomic/aliased present.
8574
85752011-08-01 Ed Schonberg <schonberg@adacore.com>
8576
8577 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8578 better determine whether an entity reference is a write.
8579 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8580 subcomponent.
8581 * lib-xref.adb (Output_References): Do no suppress a read reference at
8582 the same location as an immediately preceeding modify-reference, to
8583 handle properly in-out actuals.
8584
85852011-08-01 Tristan Gingold <gingold@adacore.com>
8586
8587 * env.c (__gnat_setenv) [VMS]: Refine previous change.
8588
85892011-08-01 Quentin Ochem <ochem@adacore.com>
8590
8591 * i-cstrin.adb (New_String): Changed implementation, now uses only the
8592 heap to compute the result.
8593
85942011-08-01 Robert Dewar <dewar@adacore.com>
8595
8596 * atree.ads: Minor reformatting.
8597
85982011-08-01 Emmanuel Briot <briot@adacore.com>
8599
8600 * g-expect.adb (Get_Command_Output): Fix memory leak.
8601
86022011-08-01 Geert Bosch <bosch@adacore.com>
8603
8604 * cstand.adb (P_Float_Type): New procedure to print the definition of
8605 predefined fpt types.
8606 (P_Mixed_Name): New procedure to print a name using mixed case
8607 (Print_Standard): Use P_Float_Type for printing floating point types
8608 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
8609 precision IEEE float.
8610
86112011-08-01 Thomas Quinot <quinot@adacore.com>
8612
8613 * sem_ch3.adb: Minor reformatting.
8614
86152011-08-01 Ed Schonberg <schonberg@adacore.com>
8616
8617 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
8618 the completion of a generic function, insert the new body rather than
8619 rewriting the original.
8620
86212011-08-01 Yannick Moy <moy@adacore.com>
8622
8623 * sinfo.ads, errout.ads: Typos in comments.
8624
86252011-08-01 Robert Dewar <dewar@adacore.com>
8626
8627 * par-endh.adb: Minor reformatting.
8628
86292011-08-01 Robert Dewar <dewar@adacore.com>
8630
8631 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
8632 (Pre_Post_Aspects): New subtype.
8633 * par-ch12.adb (P_Generic): New syntax for aspects in packages
8634 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
8635 * par-ch7.adb (P_Package): Remove Decl parameter
8636 (P_Package): Handle new syntax for aspects (before IS)
8637 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
8638 new aspect syntax
8639 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
8640 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
8641 (P_Package): Remove Decl parameter
8642 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
8643 aspects
8644 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
8645 specs
8646 * sem_util.ads, sem_util.adb (Static_Boolean): New function
8647 * sinfo.ads: Document new syntax for aspects in packages etc.
8648 * sprint.adb: Handle new syntax of aspects before IS in package
8649
86502011-08-01 Thomas Quinot <quinot@adacore.com>
8651
8652 * atree.ads: Minor reformatting.
8653 * sem_prag.adb: Minor reformatting.
8654
86552011-08-01 Robert Dewar <dewar@adacore.com>
8656
8657 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
8658 case expr alternative.
8659
86602011-08-01 Ed Schonberg <schonberg@adacore.com>
8661
8662 * sem_ch12.adb: Fix typo.
8663
86642011-08-01 Geert Bosch <bosch@adacore.com>
8665
8666 * sem_prag.adb (Check_No_Link_Name): New procedure.
8667 (Process_Import_Or_Interface): Use Check_No_Link_Name.
8668 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
8669 instead of Standard_Long_Long_Float_Size global. Preparation for
8670 eventual removal of per type constants.
8671 * exp_util.ads (Get_Stream_Size): New function returning the stream
8672 size value of subtype E.
8673 * exp_util.adb (Get_Stream_Size): Implement new function.
8674 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
8675 function.
8676 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
8677 * einfo.adb:
8678 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8679
86802011-08-01 Geert Bosch <bosch@adacore.com>
8681
8682 * cstand.adb: Fix comments.
8683 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8684 count of arguments.
8685
86862011-08-01 Robert Dewar <dewar@adacore.com>
8687
8688 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8689
86902011-08-01 Geert Bosch <bosch@adacore.com>
8691
8692 * atree.ads: Fix comment.
8693
86942011-08-01 Robert Dewar <dewar@adacore.com>
8695
8696 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8697 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8698 * par.adb: Add with for Namet.Sp.
8699 * par-tchk.adb: Minor reformatting.
8700
87012011-08-01 Vincent Celier <celier@adacore.com>
8702
8703 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8704 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8705 of the init procedure of a SAL.
8706 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8707 New procedure.
8708
87092011-08-01 Thomas Quinot <quinot@adacore.com>
8710
8711 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8712 reformatting.
8713
87142011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8715
8716 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8717
87182011-08-01 Thomas Quinot <quinot@adacore.com>
8719
8720 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8721 conformant with its spec (return True only for types that have
8722 an overriding Initialize primitive operation that prevents them from
8723 having preelaborable initialization).
8724 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8725 initialization for controlled types in Ada 2005 or later mode.
8726
87272011-08-01 Robert Dewar <dewar@adacore.com>
8728
8729 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8730 Postcondition.
8731 (Same_Aspect): New function.
8732 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8733 Type_Invariant, Precondition, Postcondition.
8734 * snames.ads-tmpl: Add Name_Type_Invariant.
8735
87362011-08-01 Robert Dewar <dewar@adacore.com>
8737
8738 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8739 here.
8740 (Freeze_All_Ent): Fix error in handling inherited aspects.
8741 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8742 already analyzed, but don't skip entire processing of a declaration,
8743 that's wrong in some cases of declarations being rewritten.
8744 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8745 Don't delay for integer, string literals
8746 Treat predicates in usual manner for delay, remove special case code,
8747 not needed.
8748 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8749 (Build_Predicate_Function): Update saved expression in aspect
8750 (Build_Invariant_Procedure): Update saved expression in aspect
8751 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8752 of replacement of discriminant references if the reference is simple.
8753
87542011-08-01 Robert Dewar <dewar@adacore.com>
8755
8756 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8757 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8758 Static_Predicate and Dynamic_Predicate.
8759 (Build_Predicate_Function): Add processing for Static_Predicate
8760 and Dynamic_Predicate.
8761 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8762 (From_Static_Predicate): New flag
8763 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8764
87652011-08-01 Robert Dewar <dewar@adacore.com>
8766
8767 * usage.adb: Documentation cleanup for Ada version modes in usage.
8768 * expander.adb: Minor reformatting.
8769
87702011-08-01 Robert Dewar <dewar@adacore.com>
8771
8772 * atree.ads: Minor comment fix.
8773 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8774 a-witeio.ads, sem_prag.adb: Minor reformatting.
8775
87762011-08-01 Doug Rupp <rupp@adacore.com>
8777
8778 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8779 pointers. Use descrip.h header file for convenience. Add some
8780 comments.
8781
87822011-08-01 Robert Dewar <dewar@adacore.com>
8783
8784 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8785 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8786 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8787 New procedure.
8788 (Check_Aspect_At_End_Of_Declarations): New procedure
8789 (Analye_Aspect_Specification): Minor changes for above procedures
8790 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8791 specification node as well.
8792
87932011-08-01 Pascal Obry <obry@adacore.com>
8794
8795 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8796 Windows files. Use GetFilesAttributes() in this case to check for file
8797 existence instead of returning with an error code.
8798
87992011-08-01 Vincent Celier <celier@adacore.com>
8800
8801 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8802 High is above Source length.
8803
88042011-08-01 Robert Dewar <dewar@adacore.com>
8805
8806 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8807
88082011-08-01 Robert Dewar <dewar@adacore.com>
8809
8810 * aspects.ads (Boolean_Aspects): New subtype.
8811 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8812 for derived types in cases where the parent type and derived type have
8813 aspects.
8814 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8815 with aspects when parent type also has aspects.
8816 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8817 boolean expression at this point).
8818 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8819 accordance with final decision on the Ada 2012 feature.
8820 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8821
88222011-08-01 Matthew Heaney <heaney@adacore.com>
8823
8824 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8825
88262011-08-01 Pascal Obry <obry@adacore.com>
8827
8828 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8829 Fix Replace_Slice when High is above current string size.
8830 (Replace_Slice): Fix DL computation when High is above current
8831 string length.
8832
88332011-08-01 Gary Dismukes <dismukes@adacore.com>
8834
8835 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8836
88372011-08-01 Matthew Heaney <heaney@adacore.com>
8838
8839 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8840 of node.
8841
88422011-08-01 Pascal Obry <obry@adacore.com>
8843
8844 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8845 reformatting.
8846
88472011-08-01 Ed Schonberg <schonberg@adacore.com>
8848
8849 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8850 access to protected subprograms in generic bodies.
8851 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8852 protected type, indicate that the convention of the subprogram is
8853 Convention_Protected, because it may be used in subsequent declarations
8854 within the protected declaration.
8855
88562011-08-01 Vincent Celier <celier@adacore.com>
8857
8858 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8859 and "final" procedures when the name of the library is "ada", to avoid
8860 duplicate symbols "adainit" and "adafinal" in executables.
8861
88622011-08-01 Ed Schonberg <schonberg@adacore.com>
8863
8864 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8865 quantified expression that appears within a postcondition and uses the
8866 Ada2012 'Result attribute.
8867
88682011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8869
8870 * init.c (__gnat_error_handler): Cast reason to int.
8871 (__gnat_install_handler): Explain sa_sigaction use.
8872
88732011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8874
8875 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8876 subprogram has copy-in copy-out parameters, try to promote the mode of
8877 the return type if it is passed in registers.
8878
88792011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8880
8881 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8882 left operand as addressable.
8883
88842011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8885
8886 * gcc-interface/gigi.h (build_function_stub): Remove.
8887 (build_return_expr): Likewise.
8888 (convert_vms_descriptor): Declare.
8889 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8890 (build_function_stub): Move to...
8891 * gcc-interface/utils2.c (build_return_expr): Move to...
8892 * gcc-interface/trans.c (build_function_stub): ...here.
8893 (build_return_expr): ...here.
8894 (Subprogram_Body_to_gnu): Add local variable for language_function.
8895 Disconnect the parameter attributes cache, if any, once done with it.
8896 Call end_subprog_body only after setting the end_locus.
8897 Build the stub associated with the function, if any, at the very end.
8898 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8899 variables and streamline control flow.
8900
89012011-07-23 Arnaud Charlet <charlet@adacore.com>
8902
8903 PR ada/49819
8904 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8905 g-trasym-dwarf.adb.
8906
89072011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8908
8909 PR bootstrap/49794
8910 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8911 Assign to act.sa_sigaction.
8912 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8913 current->return_address to char * before arithmetic.
8914
89152011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8916
8917 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8918 Correct argument types.
8919 Extract code from reason.
8920 (__gnat_install_handler): Assign to act.sa_sigaction.
8921
89222011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8923
8924 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8925 (GNAT1_OBJS): ...here.
8926
89272011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8928
8929 PR ada/48711
8930 * g-socthi-mingw.adb (Fill): Fix formatting.
8931
8932 * gcc-interface/gigi.h: Move around comment.
8933
89342011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8935
8936 PR ada/46350
8937 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8938
89392011-07-14 Florian Weimer <fw@deneb.enyo.de>
8940
8941 PR ada/48711
8942 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8943
89442011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8945
8946 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8947 range comparison if Pmode is SImode.
8948
89492011-07-12 Laurent GUERBY <laurent@guerby.net>
8950 Eric Botcazou <ebotcazou@adacore.com>
8951
8952 * adadecode.c: Wrap up in extern "C" block.
8953 * adadecode.h: Likewise.
8954 * adaint.c: Likewise. Remove 'const' keyword.
8955 * adaint.h: Likewise.
8956 * argv.c: Likewise.
8957 * atree.h: Likewise.
8958 * cio.c: Likewise.
8959 * cstreams.c: Likewise.
8960 * env.c: Likewise.
8961 * exit.c: Likewise.
8962 * fe.h: Likewise.
8963 * final.c: Likewise.
8964 * init.c: Likewise.
8965 * initialize.c: Likewise.
8966 * link.c: Likewise.
8967 * namet.h: Likewise.
8968 * nlists.h: Likewise.
8969 * raise.c: Likewise.
8970 * raise.h: Likewise.
8971 * repinfo.h: Likewise.
8972 * seh_init.c: Likewise.
8973 * targext.c: Likewise.
8974 * tracebak.c: Likewise.
8975 * uintp.h: Likewise.
8976 * urealp.h: Likewise.
8977 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8978 * xsinfo.adb: Likewise.
8979 * xsnamest.adb: Likewise.
8980 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8981 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8982 * gcc-interface/misc.c: Likewise.
8983 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8984 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8985 ada/targext.o here...
8986 (GNAT_ADA_OBJS): ...and not here.
8987 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8988 (GNATBIND_OBJS): Reorder.
8989
89902011-07-07 Richard Henderson <rth@redhat.com>
8991
8992 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8993 dwarf2out_frame_init.
8994
89952011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8996
8997 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8998
89992011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9000
9001 PR target/39150
9002 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9003
90042011-07-06 Richard Guenther <rguenther@suse.de>
9005
9006 * gcc-interface/misc.c (gnat_init): Merge calls to
9007 build_common_tree_nodes and build_common_tree_nodes_2.
9008 Re-initialize boolean_false_node.
9009
90102011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9011 Olivier Hainque <hainque@adacore.com>
9012 Nicolas Setton <setton@adacore.com>
9013
9014 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9015 the type according to the ARTIFICIAL_P parameter.
9016 (create_type_decl): Likewise.
9017 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9018
90192011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9020
9021 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9022 (gnatbind): Likewise.
9023
90242011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9025
9026 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9027
90282011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9029
9030 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9031 local variable throughout. Remove useless call to Base_Type.
9032 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9033 Take it also into account for the volatileness of the field. Set the
9034 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9035
90362011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9037
9038 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9039 on a dereference built for a by-ref object if it has an address clause.
9040
90412011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9042
9043 * einfo.ads (Address_Taken): Document use for the second argument of
9044 Asm_Input and Asm_Output attributes.
9045 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9046 argument is an entity name, then set Address_Taken on it.
9047 <Attribute_Asm_Output>: Likewise.
9048 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9049 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9050 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9051 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9052
90532011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9054
9055 PR middle-end/46500
9056 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9057
90582011-06-14 Joseph Myers <joseph@codesourcery.com>
9059
9060 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9061 (ada/utils.o): Update dependencies.
9062 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9063 ../../../libcpp/libcpp.a.
9064 * gcc-interface/utils.c: Include common/common-target.h.
9065 (process_attributes): Use targetm_common.have_named_sections.
9066
90672011-06-07 Richard Guenther <rguenther@suse.de>
9068
9069 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9070 set_sizetype.
9071
90722011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9073
9074 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9075 TREE_THIS_NOTRAP flag.
9076
90772011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9078
9079 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9080 Fix thinko.
9081
90822011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9083
9084 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9085 constants whose full view has discriminants specially.
9086
90872011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9088
9089 * gcc-interface/utils.c: Include diagnostic.h.
9090 (gnat_write_global_declarations): Output debug information for all
9091 global type declarations before finalizing the compilation unit.
9092 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9093
90942011-05-25 Jakub Jelinek <jakub@redhat.com>
9095
9096 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9097
90982011-05-25 Kai Tietz <ktietz@redhat.com>
9099
9100 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9101 initialization instead of const/none-const pointer assignment.
9102
91032011-05-24 Joseph Myers <joseph@codesourcery.com>
9104
9105 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9106 $(EXTRA_GNAT1_OBJS).
9107 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9108 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9109 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9110 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9111 libcommon-target.a instead of prefix.o.
9112
91132011-05-21 Joseph Myers <joseph@codesourcery.com>
9114
9115 PR ada/49097
9116 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9117
91182011-05-20 Joseph Myers <joseph@codesourcery.com>
9119
9120 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9121 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9122 instead of version.o.
9123
91242011-05-18 Kai Tietz <ktietz@redhat.com>
9125
9126 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9127 boolean_false_node instead of integer_zero_node.
9128 (convert_with_check): Likewise.
9129 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9130
91312011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9132
9133 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9134 type of the parameter is an unconstrained array, convert the actual to
9135 the type of the formal in the In Out and Out cases as well.
9136
91372011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9138
9139 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9140 call build_function_type_array or build_varargs_function_type_array
9141 instead.
9142 (create_subprog_type): Don't call build_function_type; call
9143 build_function_type_vec instead.
9144
91452011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9146
9147 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9148 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9149 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9150
91512011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9152
9153 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9154
9155 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9156 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9157
91582011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9159
9160 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9161
91622011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9163
9164 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9165 instead of accessing TYPE_ARG_TYPES directly.
9166 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9167
91682011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9169
9170 PR ada/48844
9171 * gcc-interface/gigi.h (get_variant_part): Declare.
9172 * gcc-interface/decl.c (get_variant_part): Make global.
9173 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9174 types have the same constant size, are record types and T1 has a
9175 variant part while T2 doesn't.
9176
91772011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9178
9179 * gcc-interface/utils.c (begin_subprog_body): Do not call
9180 get_pending_sizes.
9181 (end_subprog_body): Likewise.
9182
91832011-05-04 Richard Guenther <rguenther@suse.de>
9184
9185 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9186 int_const_binop.
9187 (pos_to_constructor): Likewise.
9188
91892011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 9190 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9191
9192 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9193 of build_function_type. Adjust calls to...
9194 (build_raise_check): ...this. Do not take a void_tree parameter.
9195 Call build_function_type_list instead of build_function_type.
9196 Fix head comment and swap couple of conditional blocks.
9197
91982011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9199
9200 * gnatvsn.ads (Library_Version): Bump to 4.7.
9201 (Current_Year): Bump to 2011.
9202
92032011-04-29 Michael Matz <matz@suse.de>
9204
9205 * gcc-interface/misc.c (gnat_handle_option): Set
9206 warn_maybe_uninitialized.
9207
92082011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9209
9210 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9211 the Watson/McCabe paper.
9212
92132011-04-23 Jim Meyering <meyering@redhat.com>
9214
9215 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9216
92172011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9218
9219 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9220 onto the new type.
9221
92222011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9223
9224 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9225 parameter.
9226 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9227 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9228 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9229 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9230 <all>: Do not set flags on the reused DECL node coming from an alias.
9231 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9232 don't need debug info here...
9233 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9234 (gigi): Adjust calls to create_subprog_decl.
9235 (build_raise_check): Likewise.
9236 (establish_gnat_vms_condition_handler): Likewise.
9237 (Compilation_Unit_to_gnu): Likewise.
9238 (gnat_to_gnu): Likewise.
9239
92402011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9241
9242 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9243 (NO_REORDER_ADAFLAGS): New variable.
9244 (EXTRA_GNATTOOLS): Always define.
9245 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9246 Clean up and adjust list of files compiled with special options.
9247 * gcc-interface/Make-lang.in: Likewise.
9248 (ada/decl.o): Cosmetical change.
9249 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9250
92512011-04-20 Jim Meyering <meyering@redhat.com>
9252
9253 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9254
92552011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9256
9257 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9258 $(CFLAGS) on the link line.
9259
92602011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9261
9262 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9263 padded type built for the return type if it is unconstrained.
9264
92652011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9266
9267 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9268
92692011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9270
9271 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9272 before calling TREE_CHAIN.
9273 * gcc-interface/misc.c (gnat_init_ts): New function.
9274 (LANG_HOOKS_INIT_TS): Define.
9275
92762011-04-12 Martin Jambor <mjambor@suse.cz>
9277
9278 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9279 instead of cgraph_node.
9280
92812011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9282
9283 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9284 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9285 mechanism.
9286
92872011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9288
9289 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9290 of aggregate types that contain a placeholder.
9291
92922011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9293
9294 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9295 TYPE_ARG_TYPES.
9296 (handle_type_generic_attribute): Likewise.
9297
92982011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9299
9300 PR ada/47163
9301 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9302
93032011-04-04 Kai Tietz <ktietz@redhat.com>
9304
9305 PR ada/47163
9306 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9307 to flag value.
9308
93092011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9310
9311 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9312 type case, do not strip a padding type around the array type.
9313
93142011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9315
9316 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9317 types.
9318
93192011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9320
9321 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9322 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9323 code for -feliminate-unused-debug-types.
9324 (gnat_post_options): Likewise.
9325
93262011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9327
9328 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9329 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9330 distinct copy.
9331
93322011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9333
9334 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9335 DECL_ARTIFICIAL flag on enumeration types.
9336
93372011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9338
9339 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9340 fat pointer types artificial unconditionally.
9341 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9342 isn't artificial.
9343
93442011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9345
9346 * gcc-interface/gigi.h (get_dummy_type): Declare.
9347 (build_dummy_unc_pointer_types): Likewise.
9348 (finish_fat_pointer_type): Likewise.
9349 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9350 fat pointer type has been built, complete it in place.
9351 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9352 and thin pointers. Remove useless variable.
9353 (finish_fat_pointer_type): Make global and move to...
9354 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9355 (get_dummy_type): New function.
9356 (build_dummy_unc_pointer_types): Likewise.
9357 (gnat_pushdecl): Propage the name to the anonymous variants only.
9358 (update_pointer_to): Only adjust the pointer types in the unconstrained
9359 array case.
9360
93612011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9362
9363 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9364 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9365 if this is a Taft amendment type and the full declaration is available.
9366 * gcc-interface/trans.c (process_type): Likewise.
9367 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9368 (process_freeze_entity): Likewise.
9369 * gcc-interface/utils.c (dummy_global): New static variable.
9370 (gnat_write_global_declarations): If there are types declared as used
9371 at the global level, insert them in the global hash table.
9372
93732011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9374
9375 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9376 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9377 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9378 copy.
9379 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9380 flag of the type accordingly.
9381 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9382
93832011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9384
9385 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9386 finalizing types when updating the pointers to the designated type.
9387 <all>: Finalize the deferred types even if we didn't defer processing
9388 of incomplete types in this invocation.
9389
93902011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
9391 Nicolas Setton <setton@adacore.com>
9392 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9393
9394 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9395 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9396
93972011-03-28 Kai Tietz <ktietz@redhat.com>
9398
9399 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9400 Windows targets.
9401 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9402 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9403
9404 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9405
94062011-03-28 Tristan Gingold <gingold@adacore.com>
9407
9408 PR ada/44431
9409 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9410 Use ada output of gnatbind.
9411 (ada/b_gnatb.adb): Ditto.
9412 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9413 (ada.mostlyclean, ada.stage1)
9414 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9415 (ada.stagefeedback): Adjust.
9416 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9417 Use ada output of gnatbind.
9418 (b_gnatm.adb): Ditto.
9419 (b_gnatl.o, b_gnatm.o): New rules.
9420
94212011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9422
9423 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9424 for the padded type built to support a specified size or alignment.
9425
94262011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9427
9428 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9429 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9430 unconditionally to the end of the unit when the designated type is
9431 limited_with'ed.
9432 <all>: Rename local variable. Attempt to un-defer types only and do it
9433 for limited_with'ed types as well.
9434 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9435 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9436 consistently and remove redundant call to finalize_from_with_types.
9437
94382011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9439
9440 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9441 subprograms without a previous spec declared in the same unit.
9442 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9443 subprograms at the end of the unit instead of at the beginning.
9444 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9445 isn't public for the special handling of non-inline functions nested
9446 inside inline external functions.
9447
94482011-03-25 Jeff Law <law@redhat.com>
9449
9450 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9451
94522011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9453
9454 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9455 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9456 to compute Set_Size_Depends_On_Discriminant.
9457 (Layout_Type): Call it on array types in back-end layout mode.
9458 * sem_util.adb (Requires_Transient_Scope): Return true for array
9459 types only if the size depends on the value of discriminants.
9460 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9461 type if the RHS is a call to a function that returns an unconstrained
9462 type with default discriminant.
9463
94642011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9465
9466 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9467 non-conversion to the nominal result type at the end.
9468
94692011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9470
9471 * gcc-interface/trans.c (create_temporary): New function taken from...
9472 (create_init_temporary): ...here. Call it.
9473 (call_to_gnu): Create the temporary for the return value early, if any.
9474 Create it for a function with copy-in/copy-out parameters if there is
9475 no target; in other cases of copy-in/copy-out, use another temporary.
9476 Push the new binding level lazily. Add and rename local variables.
9477
94782011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9479
9480 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9481 error message.
9482 (set_rm_size): Likewise.
9483
94842011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9485
9486 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9487 for the padded type built in order to support a specified alignment.
9488 Fix incorrect formatting.
9489
94902011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9491
9492 PR bootstrap/48216
9493 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9494
94952011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9496
9497 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9498 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9499 to the end of the list. Adjust recursive call. Rename local variable.
9500 If REORDER is true, reorder components of the record type.
9501 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9502 components_to_record and adjust the parameter list.
9503
95042011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9505
9506 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9507 disabled, use the variable for bounds of loop iteration scheme.
9508
95092011-03-21 Kai Tietz <ktietz@redhat.com>
9510
9511 PR target/12171
9512 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9513
95142011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9515
9516 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9517 out whether the expression is read-only. Short-circuit placeholder
9518 case and rename a couple of local variables.
9519
95202011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9521
9522 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9523 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9524 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9525 (convert): Deal with conversions from a smaller form type specially.
9526
95272011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9528
9529 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9530 its argument, except for the special -I- switch.
9531
95322011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9533
9534 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9535 "Ada Issues".
9536
95372011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9538
9539 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9540
95412011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9542
9543 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9544 GNAT_FORMAL.
9545 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9546 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9547 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9548 Do not generate the check directly, instead instantiate the template
9549 check present in the descriptor.
9550 (make_descriptor_field): Move around.
9551 (build_vms_descriptor32): Build a template check in the POINTER field.
9552 (build_vms_descriptor): Remove useless suffixes.
9553 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9554
95552011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9556
9557 PR bootstrap/47467
9558 * targext.c: Include target files if IN_RTS is defined.
9559
95602011-01-26 Richard Guenther <rguenther@suse.de>
9561
9562 PR bootstrap/47467
9563 * targext.c: Include config.h.
9564 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9565 dependency.
9566
95672011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 9568 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9569
9570 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9571
95722011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9573
9574 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9575 end-of-case on the end label and its associated gotos, if any.
9576
95772011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9578
9579 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9580 expressions of the parameter cache within the statement group of
9581 the CICO mechanism.
9582
95832011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 9584 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9585
9586 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9587 (set_end_locus_from_node): New function.
9588 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
9589 make and the function end_locus.
9590 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
9591 for the elaboration subprogram.
9592 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
9593 set the end_locus of the expression as well.
9594
95952011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9596
9597 PR ada/47131
9598 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
9599 variables that are referenced in exception handlers volatile.
9600
9601
9602\f
9603Copyright (C) 2011 Free Software Foundation, Inc.
9604
9605Copying and distribution of this file, with or without modification,
9606are permitted in any medium without royalty provided the copyright
9607notice and this notice are preserved.
9608
9609 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9610 - fix bugs in the description of Source_Trace;
9611 - get rid of UNIT_NAME;
9612
4fbad0ba
AC
96132011-08-02 Javier Miranda <miranda@adacore.com>
9614
9615 * exp_ch9.adb
9616 (Build_Dispatching_Requeue): Adding support for VM targets
9617 since we cannot directly reference the Tag entity.
9618 * exp_sel.adb (Build_K): Adding support for VM targets.
9619 (Build_S_Assignment): Adding support for VM targets.
9620 * exp_disp.adb
9621 (Default_Prim_Op_Position): In VM targets do not restrict availability
9622 of predefined interface primitives to compiling in Ada 2005 mode.
9623 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9624 restricted to compiling in Ada 2005 mode.
9625 (Make_VM_TSD): Generate code that declares and initializes the OSD
9626 record. Needed to support dispatching calls through synchronized
9627 interfaces.
9628 * exp_ch3.adb
9629 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9630 primitives associated with synchronized interfaces.
9631 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9632 primitives associated with synchronized interfaces.
9633
96342011-08-02 Yannick Moy <moy@adacore.com>
9635
9636 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9637 statements hidden in SPARK if preceded by the HIDE directive
9638 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9639 exception handlers as hidden in SPARK if preceded by the HIDE directive
9640 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9641 if starting with the HIDE directive
9642 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9643 starting with the HIDE directive; mark the declarations in a private
9644 part as hidden in SPARK if the private part starts with the HIDE
9645 directive
9646 * restrict.adb, restrict.ads
9647 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9648 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9649 argument node belongs to a part which is hidden in SPARK
9650 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9651 parts in SPARK; protect the possibly costly call to
9652 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9653 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9654 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9655 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9656 Tok_SPARK_Hide.
9657 (Scan): recognize special comment starting with '#' and followed by
9658 SPARK keyword "hide" as a HIDE directive.
9659
96602011-08-02 Yannick Moy <moy@adacore.com>
9661
9662 * types.ads, erroutc.ads: Minor reformatting.
9663
96642011-08-02 Vincent Celier <celier@adacore.com>
9665
9666 * link.c: Add response file support for cross platforms.
9667
6ff6152d
ES
96682011-08-02 Ed Schonberg <schonberg@adacore.com>
9669
9670 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9671 in an association, set parent field of copy before partial analysis.
9672 * sem_res.adb (Resolve_Slice): create reference to itype only when
9673 expansion is enabled.
9674
975c6896
YM
96752011-08-02 Yannick Moy <moy@adacore.com>
9676
9677 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9678 for new flag denoting which subprogram bodies are in ALFA
9679 * restrict.adb, sem_ch7.adb: Update comment
9680 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9681 sem_ch9.adb, sem_res.adb: Add calls to
9682 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9683 * sem_ch6.adb (Analyze_Function_Return): add calls to
9684 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9685 middle of the body, and extended return.
9686 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9687 False when missing return.
9688 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9689 to True for subprograms whose spec is in ALFA. Remove later on the flag
9690 on the entity used for a subprogram body when there exists a separate
9691 declaration.
9692 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9693 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9694 False, otherwise do nothing.
9695
afc8324d
AC
96962011-08-02 Robert Dewar <dewar@adacore.com>
9697
9698 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9699
97002011-08-02 Yannick Moy <moy@adacore.com>
9701
9702 * sem_ch4.ads: minor formatting.
9703
2ba431e5
YM
97042011-08-02 Yannick Moy <moy@adacore.com>
9705
9706 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9707 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9708 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9709 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9710 opt.ads: cleanup of SPARK mode
9711
0f853035
YM
97122011-08-02 Yannick Moy <moy@adacore.com>
9713
9714 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9715 types.
9716 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9717 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9718 * sem_ch3.adb
9719 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9720 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9721 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9722 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9723 types.
9724 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9725 non-static range.
9726 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9727 functions whose return type is not in ALFA.
9728 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9729 specifications.
9730 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9731 parameter's type is not in ALFA.
9732 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9733 types are in ALFA.
9734
d2b10647
ES
97352011-08-02 Ed Schonberg <schonberg@adacore.com>
9736
9737 * sem_ch6 (Analyze_Expression_Function): treat the function as
9738 Inline_Always, and introduce a subprogram declaration for it when it is
9739 not a completion.
9740 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9741 expression functions, so that the back-end can determine whether they
9742 can in fact be inlined.
9743 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9744 a function body comes from an expression function.
9745
c7b9d548
AC
97462011-08-02 Gary Dismukes <dismukes@adacore.com>
9747
9748 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9749 null exclusions to test Can_Never_Be_Null on the anonymous access types
9750 of the formals rather than testing the formals themselves. Exclude this
9751 check in cases where the Old_Formal is marked as a controlling formal,
9752 to avoid issuing spurious errors for bodies completing dispatching
9753 operations (due to the flag not getting set on controlling access
9754 formals in body specs).
9755 (Find_Corresponding_Spec): When checking full and subtype conformance of
9756 subprogram bodies in instances, pass Designated and E in that order, for
9757 consistency with the expected order of the formals (New_Id followed by
9758 Old_Id).
9759
97602011-08-02 Robert Dewar <dewar@adacore.com>
9761
9762 * sem_ch8.adb: Minor reformatting.
9763
1138cf59
AC
97642011-08-02 Ed Schonberg <schonberg@adacore.com>
9765
9766 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9767 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9768 primitive operations of class-wide actuals.
9769
97702011-08-02 Javier Miranda <miranda@adacore.com>
9771
9772 * exp_atag.ads, exp_atag.adb
9773 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9774 since its value is implicitly passed in argument Typ.
9775 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9776 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9777 Build_Common_Dispatching_Select_Statements.
9778
7b9db926
RD
97792011-08-02 Robert Dewar <dewar@adacore.com>
9780
9781 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9782 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9783 Minor reformatting.
9784
e8374e7a
AC
97852011-08-02 Robert Dewar <dewar@adacore.com>
9786
9787 * sem_res.adb: Minor reformatting.
9788 * sem_prag.adb: Minor reformatting.
9789
97902011-08-02 Javier Miranda <miranda@adacore.com>
9791
9792 * exp_atag.adb, exp_atags.ads
9793 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9794 by the tagged type Entity. Required to use this routine in the VM
9795 targets since we do not have available the Tag entity in the VM
9796 platforms.
9797 * exp_ch6.adb
9798 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9799 Ada.Tags has not been previously loaded.
9800 * exp_ch7.adb
9801 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9802 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9803 * sem_aux.adb
9804 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9805 view of enclosing scopes. Required to handle enclosing scopes that
9806 are synchronized types whose full view is a task type.
9807 * exp_disp.adb
9808 (Build_VM_TSDs): Minor code improvement to avoid generating and
9809 analyzing lists with empty nodes.
9810 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9811 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9812 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9813 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9814 (Make_Select_Specific_Data_Table): Add support for VM targets.
9815 (Make_VM_TSD): Generate code to initialize the SSD structure of
9816 the TSD.
9817
98182011-08-02 Yannick Moy <moy@adacore.com>
9819
9820 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9821 cross-references section in ALI.
9822 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9823 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9824 Sub).
9825 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9826 subprogram or package entity of a node
9827 (Is_Local_Reference_Type): new function returns True for references
9828 selected in local cross-references.
9829 (Lt): function extracted from Lt in Output_References
9830 (Write_Entity_Name): function extracted from Output_References
9831 (Generate_Definition): generate reference with type 'D' for definition
9832 of objects (object declaration and parameter specification), with
9833 appropriate locations and units, for use in local cross-references.
9834 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9835 references of type 'I' for initialization in object definition.
9836 (Output_References): move part of function Lt and procedure
9837 Write_Entity_Name outside of the body. Ignore references of types 'D'
9838 and 'I' introduced for local cross-references.
9839 (Output_Local_References): new procedure to output the local
9840 cross-references sections.
9841 (Lref_Entity_Status): new array defining whether an entity is a local
9842 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9843 with 'I' type when initialization expression is present.
9844 * get_scos.adb, get_scos.ads: Correct comments and typos
9845
1f6439e3
AC
98462011-08-02 Javier Miranda <miranda@adacore.com>
9847
9848 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9849 the JVM target.
9850 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9851 the JVM target.
9852 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9853 TSD support.
9854
98552011-08-02 Vincent Celier <celier@adacore.com>
9856
9857 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9858 (No_Space_Img): New function
9859 (Find_Excluded_Sources): When reading from a file, record the file name
9860 and the line number for each excluded source.
9861 (Mark_Excluded_Sources): When reporting an error, if the excluded
9862 sources were read from a file, include file name and line number in
9863 the error message.
9864
98652011-08-02 Ed Schonberg <schonberg@adacore.com>
9866
9867 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9868
ab027d28
RD
98692011-08-02 Robert Dewar <dewar@adacore.com>
9870
9871 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9872
b3b28b0c
JM
98732011-08-02 Javier Miranda <miranda@adacore.com>
9874
9875 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9876 generation of TSDs to the DOTNET compiler.
9877 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9878 generation of TSDs to the DOTNET compiler.
9879
9732e886
JM
98802011-08-02 Javier Miranda <miranda@adacore.com>
9881
9882 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9883 record of all the tagged types declared inside library level package
9884 declarations, library level package bodies or library level subprograms.
9885 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9886 associated with a given tagged type.
9887 (Build_VM_TSDs): New subprogram.
9888 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9889 compilation units that are subprograms.
9890 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9891 compilation units that are package bodies.
9892 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9893 units that are a package declaration or a package instantiation.
9894 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9895 reorganization to improve the error generated by the frontend when the
9896 function Ada.Tags.Secondary_Tag is not available.
9897 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9898 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9899
e526d0c7
AC
99002011-08-02 Javier Miranda <miranda@adacore.com>
9901
9902 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9903
99042011-08-02 Robert Dewar <dewar@adacore.com>
9905
9906 * s-imenne.ads: Minor reformatting.
9907
99082011-08-02 Robert Dewar <dewar@adacore.com>
9909
9910 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9911 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9912 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9913
99142011-08-02 Robert Dewar <dewar@adacore.com>
9915
9916 * einfo.ads (Materialize_Entity): Document this is only for renamings
9917 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9918 required debug information in the case where we transform the object
9919 declaration into a renaming declaration.
9920 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9921 object
9922 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9923 Materialize_Entity.
9924
5b1e6aca
RD
99252011-08-02 Robert Dewar <dewar@adacore.com>
9926
9927 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9928 Suppress_Init_Procs.
9929 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9930 Suppress_Initialization/Initialization_Suppressed.
9931 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9932 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9933 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9934 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9935
5ad4969d
RD
99362011-08-02 Robert Dewar <dewar@adacore.com>
9937
9938 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9939 Minor reformatting.
9940
8c4ee6f5
AC
99412011-08-02 Ed Schonberg <schonberg@adacore.com>
9942
9943 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9944 only have inheritable classwide pre/postconditions.
9945
99462011-08-02 Javier Miranda <miranda@adacore.com>
9947
9948 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9949 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9950 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9951 checks if the external tag of a type is the same as the external tag
9952 of some other declaration.
9953
0b3d16c0
AC
99542011-08-02 Thomas Quinot <quinot@adacore.com>
9955
9956 * s-taskin.ads: Minor reformatting.
9957
99582011-08-02 Emmanuel Briot <briot@adacore.com>
9959
9960 * g-comlin.adb (Display_Help): swap the order in which it prints the
9961 short help and the general usage.
9962
99632011-08-02 Ed Schonberg <schonberg@adacore.com>
9964
9965 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9966 the aspect declarations and attach them to the generic copy for
9967 subsequent analysis.
9968 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9969 declarations of the generic tree to the new subprogram declarations.
9970 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9971 conditions that apply to a subprogram instance.
9972
99732011-08-02 Robert Dewar <dewar@adacore.com>
9974
9975 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9976
99772011-08-02 Ed Schonberg <schonberg@adacore.com>
9978
9979 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9980 private type with a tagged full view is not derived in the immediate
9981 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9982
4637729f
AC
99832011-08-02 Robert Dewar <dewar@adacore.com>
9984
9985 * exp_ch4.adb: Minor reformatting.
9986
99872011-08-02 Ed Schonberg <schonberg@adacore.com>
9988
9989 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9990 Ada2012 iterator, the loop will be rewritten during expansion into a
9991 while loop with a cursor and an element declaration. Do not analyze the
9992 body in this case, because if the container is for indefinite types the
9993 actual subtype of the elements will only be determined when the cursor
9994 declaration is analyzed.
9995
99962011-08-02 Arnaud Charlet <charlet@adacore.com>
9997
9998 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9999 size/alignment related attributes in CodePeer_Mode.
10000
100012011-08-02 Gary Dismukes <dismukes@adacore.com>
10002
10003 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10004 Prepend_Element, since this can result in the operation getting the
10005 wrong slot in the full type's dispatch table if the full type has
10006 inherited operations. The incomplete type's operation will get added
10007 to the proper position in the full type's primitives
10008 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10009 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10010 dispatching operations, since there are cases where nonprimitive
10011 subprograms can get added to the list of incomplete dependents (such
10012 as subprograms in nested packages).
10013 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10014 private part when determining whether to add a primitive with a
10015 parameter of a tagged incomplete type to the Private_Dependents list.
10016 Such primitives can also occur in the visible part, and should not have
10017 been excluded from being private dependents.
10018 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10019 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10020 list of a Taft-amendment incomplete type is a primitive before issuing
10021 an error that the full type must appear in the same unit. There are
10022 cases where nonprimitives can be in the list (such as subprograms in
10023 nested packages).
10024 * sem_disp.adb (Derives_From): Use correct condition for checking that
10025 a formal's type is derived from the type of the corresponding formal in
10026 the parent subprogram (the condition was completely wrong). Add
10027 checking that was missing for controlling result types being derived
10028 from the result type of the parent operation.
10029
4c60de0c
YM
100302011-08-02 Yannick Moy <moy@adacore.com>
10031
10032 * errout.adb (First_Node): minor renaming
10033 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10034 first node.
10035
f5afb270
AC
100362011-08-02 Yannick Moy <moy@adacore.com>
10037
10038 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10039 before accessing operands.
10040 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10041 decide whether an initialization expression respects SPARK rules, as
10042 the plain node is the expanded one. This allows for more valid warnings
10043 to be issued.
10044 * gnat_rm.texi: Minor update.
10045
100462011-08-02 Arnaud Charlet <charlet@adacore.com>
10047
10048 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10049 previous change.
10050
100512011-08-02 Robert Dewar <dewar@adacore.com>
10052
10053 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10054
100552011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10056
10057 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10058 loop statements and the element renaming declaration with a block when
10059 the element type is controlled.
10060
100612011-08-02 Yannick Moy <moy@adacore.com>
10062
10063 * sinfo.ads: Minor formatting.
10064
100652011-08-02 Ed Schonberg <schonberg@adacore.com>
10066
10067 * sem_aggr.adb (Add_Association): if the association has a box and no
10068 expression, use the Sloc of the aggregate itself for the new
10069 association.
10070 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10071 the Original_Node.
10072
db72f10a
AC
100732011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10074
10075 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10076 When a container is provided via a function call, generate a renaming
10077 of the function result. This avoids the creation of a transient scope
10078 and the premature finalization of the container.
10079 * exp_ch7.adb (Is_Container_Cursor): Removed.
10080 (Wrap_Transient_Declaration): Remove the supression of the finalization
10081 of the list controller when the declaration denotes a container cursor,
10082 it is not needed.
10083
100842011-08-02 Yannick Moy <moy@adacore.com>
10085
10086 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10087 node is from source, instead of the original node being from source.
10088 * sem_aggr.adb
10089 (Resolve_Array_Aggregate): refine the check for a static expression, to
10090 recognize also static ranges
10091 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10092 Array_Type_Declaration): postpone the test for the type being a subtype
10093 mark after the type has been resolved, so that component-selection and
10094 expanded-name are discriminated.
10095 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10096 to distinguish the case of an iteration scheme, so that an error is
10097 issed on a non-static range in SPARK except in an iteration scheme.
10098 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10099 In_Iter_Schm = True.
10100 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10101 user-defined operators so that they are allowed in renaming
10102 * sem_ch8.adb
10103 (Find_Selected_Component): refine the check for prefixing of operators
10104 so that they are allowed in renaming. Move the checks for restrictions
10105 on selector name after analysis discriminated between
10106 component-selection and expanded-name.
10107 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10108 concatenation argument of string type if it is static.
10109 * sem_util.adb, sem_util.ads
10110 (Check_Later_Vs_Basic_Declarations): add a new function
10111 Is_Later_Declarative_Item to decice which declarations are allowed as
10112 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10113 mode, add that renamings are considered as later items.
10114 (Enclosing_Package): new function to return the enclosing package
10115 (Enter_Name): correct the rule for homonyms in SPARK
10116 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10117 from source (result of expansion) to avoid issuing wrong warnings.
10118
101192011-08-02 Ed Schonberg <schonberg@adacore.com>
10120
10121 * errout.adb: On anything but an expression First_Node returns its
10122 argument.
10123
23685ae6
AC
101242011-08-02 Pascal Obry <obry@adacore.com>
10125
10126 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10127
101282011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10129
10130 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10131 Set the associated loop as the related expression of internally
10132 generated cursors.
10133 * exp_ch7.adb (Is_Container_Cursor): New routine.
10134 (Wrap_Transient_Declaration): Supress the finalization of the list
10135 controller when the declaration denotes a container cursor.
10136
101372011-08-02 Yannick Moy <moy@adacore.com>
10138
10139 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10140 command line now.
10141 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10142 expression is a simple expression. This check cannot be performed in
10143 the semantics, so just drop it.
10144 (P_Index_Or_Discriminant_Constraint): move check that the index or
10145 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10146 semantics. Other cases were previously checked in the semantics.
10147 * par-ch4.adb (P_Name): move checks that a selector name is not
10148 character literal or an operator symbol to Find_Selected_Component in
10149 the semantics
10150 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10151 declarations are not placed after later declarations in a separate
10152 procedure in Sem_Util (possibly not the best choice?), to be used both
10153 during parsing, for Ada 83 mode, and during semantic analysis, for
10154 SPARK mode.
10155 * par-endh.adb (Check_End): move check that end label is not missing
10156 to Process_End_Label in the semantics
10157 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10158 the special case for SPARK restriction
10159 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10160 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10161 parameter Force to issue the error message even on internal node (used
10162 for generated end label). Call Check_Restriction to check when an error
10163 must be issued. In SPARK mode, issue an error message even if the
10164 restriction is not set.
10165 (Check_Restriction): new procedure with an additional out parameter to
10166 inform the caller that a message has been issued
10167 * sem_aggr.adb: Minor modification of message
10168 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10169 instead of issuing an error message directly
10170 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10171 declarations are not placed after later declarations, by calling
10172 Check_Later_Vs_Basic_Declarations
10173 (Analyze_Subtype_Declaration): move here the check that an index or
10174 discriminant constraint must be a subtype mark. Change the check that
10175 a subtype of String must start at one so that it works on subtype marks.
10176 * sem_ch4.adb (Analyze_Call): move here the check that a named
10177 association cannot follow a positional one in a call
10178 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10179 instead of issuing an error message directly
10180 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10181 selector name is not a character literal or an operator symbol. Move
10182 here the check that the prefix of an expanded name cannot be a
10183 subprogram or a loop statement.
10184 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10185 procedure called from parsing and semantics to check that basic
10186 declarations are not placed after later declarations
10187 (Process_End_Label): move here the check that end label is not missing
10188
101892011-08-02 Arnaud Charlet <charlet@adacore.com>
10190
10191 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10192 representation clause in codepeer mode, since it confuses CodePeer and
10193 does not bring useful info.
10194
101952011-08-02 Ed Falis <falis@adacore.com>
10196
10197 * init.c: initialize fp hw on MILS.
10198
101992011-08-02 Ed Schonberg <schonberg@adacore.com>
10200
10201 * errout.adb (First_Node): for bodies, return the node itself (small
10202 optimization). For other nodes, do not check source_unit if the node
10203 comes from Standard.
10204
d2d9cc22
AC
102052011-08-02 Robert Dewar <dewar@adacore.com>
10206
10207 * exp_ch3.adb: Minor comment additions.
10208 * sem_ch13.adb: Minor reformatting.
10209
102102011-08-02 Pascal Obry <obry@adacore.com>
10211
10212 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10213
a01b9df6
AC
102142011-08-02 Robert Dewar <dewar@adacore.com>
10215
10216 * sem_attr.adb: Minor reformatting.
10217
102182011-08-02 Robert Dewar <dewar@adacore.com>
10219
10220 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10221 (Has_Default_Component_Value): Removed
10222 * einfo.ads Comment updates
10223 (Has_Default_Aspect): Replaces Has_Default_Value
10224 (Has_Default_Component_Value): Removed
10225 * exp_ch13.adb
10226 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10227 * exp_ch3.adb
10228 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10229 (Get_Simple_Init_Val): Handle Default_Value aspect
10230 (Needs_Simple_Initialization): Handle Default_Value aspect
10231 * exp_ch3.ads: Needs_Simple_Initialization
10232 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10233 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10234 * sem_ch13.adb
10235 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10236 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10237 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10238
102392011-08-02 Ed Schonberg <schonberg@adacore.com>
10240
10241 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10242 package containing iteration primitives.
10243 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10244
75c90775
AC
102452011-08-02 Ed Schonberg <schonberg@adacore.com>
10246
10247 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10248 "of", pre-analyze expression in case it is a function call with
10249 finalization actions that must be placed ahead of the loop.
10250 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10251 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10252
102532011-08-02 Geert Bosch <bosch@adacore.com>
10254
10255 * cstand.adb (Create_Float_Types): Only consider C's long double for
10256 Long_Long_Float, in addition to double.
10257
ded8909b
AC
102582011-08-02 Robert Dewar <dewar@adacore.com>
10259
10260 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10261 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10262 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10263 Minor reformatting.
10264
102652011-08-02 Ed Schonberg <schonberg@adacore.com>
10266
10267 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10268 indexed component.
10269
102702011-08-02 Javier Miranda <miranda@adacore.com>
10271
10272 * einfo.ads, einfo.adb
10273 (Original_Access_Type): Move this attribute to Node26 since there was
10274 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10275 which causes conflicts and breaks the generation of the .NET compiler.
10276 (Interface_Name): Add missing documentation on JGNAT only uses of
10277 this attribute.
10278
70c34e1c
AC
102792011-08-02 Geert Bosch <bosch@adacore.com>
10280
10281 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10282 (Find_Back_End_Float_Type): Likewise
10283 (Create_Back_End_Float_Types): Likewise
10284 (Create_Float_Types): Likewise
10285 (Register_Float_Type): Likewise
10286 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10287 Nlist and split out type selection in new local Find_Base_Type function.
10288 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10289 Nlist
10290 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10291
102922011-08-02 Robert Dewar <dewar@adacore.com>
10293
10294 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10295 alpha order).
10296 * opt.ads: Minor comment change.
10297 * sem_ch12.adb: Minor code reorganization.
10298
b715bc59
AC
102992011-08-02 Gary Dismukes <dismukes@adacore.com>
10300
10301 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10302 subtype's list of rep items to the list on the full subtype in the case
10303 where the lists are the same.
10304
103052011-08-02 Geert Bosch <bosch@adacore.com>
10306
10307 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10308 using the one from System.Strings, which also deallocates all strings.
10309
002bdd68
AC
103102011-08-02 Geert Bosch <bosch@adacore.com>
10311
10312 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10313 function.
10314 * gcc-interface/Make-lang.in: Update dependencies.
10315
103162011-08-02 Olivier Hainque <hainque@adacore.com>
10317
10318 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10319 end_locus.
10320
499769ec
AC
103212011-08-02 Javier Miranda <miranda@adacore.com>
10322
10323 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10324 associated with anonymous access to subprograms.
10325
103262011-08-02 Geert Bosch <bosch@adacore.com>
10327
10328 * opt.ads
10329 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10330 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10331 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10332 (Add_Symbol_Definition): Move to switch-c.adb
10333 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10334 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10335 (Add_Symbol_Definition): Move to switch-c.adb.
10336 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10337 * sem_warn.adb
10338 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10339 Move to warnsw.adb.
10340 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10341 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10342 Move to warnsw.adb.
10343 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10344 (Add_Symbol_Definition): Moved from Prepcomp.
10345 * switch-c.ads: Update copyright notice. Use String_List instead of
10346 Argument_List, removing dependency on System.OS_Lib.
10347
aa1e353a
AC
103482011-08-02 Yannick Moy <moy@adacore.com>
10349
10350 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10351 mode on initialization expression which does not respect SPARK
10352 restrictions.
10353 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10354 if the tree referenced by its argument represents an initialization
10355 expression in SPARK, suitable for initializing an object in an object
10356 declaration.
10357
103582011-08-02 Javier Miranda <miranda@adacore.com>
10359
10360 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10361 internally generated access to subprogram with its associated protected
10362 subprogram type.
10363 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10364
15b682ca
GB
103652011-08-02 Geert Bosch <bosch@adacore.com>
10366
10367 * cstand.adb (Register_Float_Type): Print information about type to
10368 register, if the Debug_Flag_Dot_B is set.
10369 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10370 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10371 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10372 with a requested precision of more than Max_Digits digits and no more
10373 than Max_Base_Digits digits, if a range specification is present and the
10374 Predefined_Float_Types list has a suitable type to derive from.
10375 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10376 case of type completion with pragma Import
10377 * sem_prag.adb
10378 (Process_Import_Predefined_Type): Processing to complete a type
10379 with pragma Import. Currently supports floating point types only.
10380 (Set_Convention_From_Pragma): Do nothing without underlying type.
10381 (Process_Convention): Guard against absence of underlying type,
10382 which may happen when importing incomplete types.
10383 (Process_Import_Or_Interface): Handle case of importing predefined
10384 types. Tweak error message.
10385
f8726f2b
AC
103862011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10387
10388 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10389 functions to previous change. Reorganize code slightly.
10390
103912011-08-02 Geert Bosch <bosch@adacore.com>
10392
10393 * back_end.ads (Register_Type_Proc): New call back procedure type for
10394 allowing the back end to provide information about available types.
10395 (Register_Back_End_Types): New procedure to register back end types.
10396 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10397 available types.
10398 * cstand.adb (Back_End_Float_Types): New list for floating point types
10399 supported by the back end.
10400 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10401 (Copy_Float_Type): New procedure to make new copies of predefined types.
10402 (Register_Float_Type): New call back procedure to populate the BEFT list
10403 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10404 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10405 (Create_Float_Types): New procedure to create entities for floating
10406 point types predefined in Standard, and put these and any remaining
10407 BEFTs on the Predefined_Float_Types list.
10408 * stand.ads (Predefined_Float_Types): New list for predefined floating
10409 point types that do not have declarations in package Standard.
10410
feecad68
AC
104112011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10412
10413 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10414 entity node for the unit containing the parameter.
10415 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10416 (Add_Inlined_Subprogram): Likewise.
10417 * gcc-interface/Make-lang.in: Update dependencies.
10418
104192011-08-02 Thomas Quinot <quinot@adacore.com>
10420
10421 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10422 suitable value.
10423
12f0c50c
AC
104242011-08-02 Geert Bosch <bosch@adacore.com>
10425
10426 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10427
104282011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10429
10430 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10431 computed value of Base_Type.
10432
104332011-08-02 Yannick Moy <moy@adacore.com>
10434
10435 * restrict.adb (Check_Restriction): issue an error for any use of
10436 class-wide, even if the No_Dispatch restriction is not set.
10437 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10438 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10439 when completing a private extension, the type named in the private part
10440 is not the same as that named in the visible part.
10441 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10442 of an inherited primitive operations of a tagged type or type extension
10443 that returns the tagged type.
10444 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10445 function which returns True for an implicit operation inherited by the
10446 derived type declaration for the argument type.
10447 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10448 order.
10449
fb86fe11
ES
104502011-08-02 Ed Schonberg <schonberg@adacore.com>
10451
10452 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10453 Process_Bounds, to perform analysis with expansion of a range or an
10454 expression that is the iteration scheme for a loop.
10455 (Analyze_Iterator_Specification): If domain of iteration is given by a
10456 function call with a controlled result, as is the case if call returns
10457 a predefined container, ensure that finalization actions are properly
10458 generated.
10459 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10460
62be5d0a
JM
104612011-08-02 Javier Miranda <miranda@adacore.com>
10462
10463 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10464 * gcc-interface/Make-lang.in: Update dependencies.
10465
104662011-08-02 Javier Miranda <miranda@adacore.com>
10467
10468 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10469 determine if the analysis is performed using N or Original_Node (N).
10470 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10471 functionality of routine Is_Variable avoids code duplication.
10472 * checks.adb (Determine_Range): Handle temporaries generated by
10473 Remove_Side_Effects.
10474
104752011-08-02 Javier Miranda <miranda@adacore.com>
10476
10477 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10478 expansion of the condition. Required since the previous analysis was
10479 done with expansion disabled (see Resolve_Quantified_Expression) and
10480 hence checks were not inserted and record comparisons have not been
10481 expanded.
10482
a20f4389
AC
104832011-08-02 Ed Falis <falis@adacore.com>
10484
10485 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10486 Update header.
10487
104882011-08-02 Bob Duff <duff@adacore.com>
10489
10490 * opt.ads: Minor comment fix.
10491
104922011-08-02 Bob Duff <duff@adacore.com>
10493
10494 * sem_ch12.adb (Analyze_Package_Instantiation,
10495 Analyze_Subprogram_Instantiation): Turn off style checking while
10496 analyzing an instance. Whatever style checks that apply to the generic
10497 unit should apply, so it makes no sense to apply them in an instance.
10498 This was causing trouble when compiling an instance of a runtime
10499 unit that violates the -gnatyO switch.
10500 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10501 one of the two case statements, causing spurious errors.
10502
105032011-08-02 Robert Dewar <dewar@adacore.com>
10504
10505 * uname.adb: Minor reformatting.
10506 * gnatcmd.adb: Minor reformatting.
10507 * exp_attr.adb: Minor reformatting.
10508
90878b12
AC
105092011-08-02 Ed Schonberg <schonberg@adacore.com>
10510
10511 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10512 No_Dispatching_Calls, do not look for the Assign primitive, because
10513 predefined primitives are not created in this case.
10514
105152011-08-02 Bob Duff <duff@adacore.com>
10516
10517 * stylesw.ads: Minor comment fixes.
10518
105192011-08-02 Robert Dewar <dewar@adacore.com>
10520
10521 * freeze.adb (Add_To_Result): New procedure.
10522
105232011-08-02 Jose Ruiz <ruiz@adacore.com>
10524
10525 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10526 time, if the specific run-time routines for handling streams of strings
10527 are not available, use the default mechanism.
10528
105292011-08-02 Arnaud Charlet <charlet@adacore.com>
10530
10531 * s-regpat.ads: Fix typo.
10532
105332011-08-02 Vincent Celier <celier@adacore.com>
10534
10535 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10536 not null, call it to create the in memory config project file without
10537 parsing an existing default config project file.
10538
105392011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10540
10541 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10542
105432011-08-02 Ed Schonberg <schonberg@adacore.com>
10544
10545 * sem_elim.adb: an abstract subprogram does not need an eliminate
10546 pragma for its descendant to be eliminable.
10547
105482011-08-02 Ed Falis <falis@adacore.com>
10549
10550 * init.c: revert to handling before previous checkin for VxWorks
10551 * s-intman-vxworks.adb: delete unnecessary declarations related to
10552 using Ada interrupt facilities for handling signals.
10553 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10554 * s-intman-vxworks.ads: Import __gnat_install_handler as
10555 Initialize_Interrupts.
10556 * s-taprop-vxworks.adb: Delete Signal_Mask.
10557 (Abort_Handler): change construction of mask to unblock exception
10558 signals.
10559
273adcdf
AC
105602011-08-02 Jerome Guitton <guitton@adacore.com>
10561
10562 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10563 Debug_Raise_Exception before propagation starts.
10564
105652011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10566
10567 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10568 to Restriction_Check_Required.
10569 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10570 * sem_res.adb (Resolve_Call): Likewise.
10571 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10572
105732011-08-02 Bob Duff <duff@adacore.com>
10574
10575 * stylesw.ads: Update comment.
10576 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10577 * errout.ads: Remove obsolete comment.
10578
105792011-08-02 Javier Miranda <miranda@adacore.com>
10580
10581 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10582 (Set_Is_Safe_To_Reevaluate): new procedure.
10583 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10584 assignment is allowed on safe-to-reevaluate variables.
10585 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10586 temporary created to remove side effects in expressions that use
10587 the secondary stack as safe-to-reevaluate.
10588 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10589 variables that are not true constants.
10590
6320f5e1
AC
105912011-08-02 Robert Dewar <dewar@adacore.com>
10592
10593 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10594 sem_res.adb, sem_ch6.adb: Minor reformatting.
10595
105962011-08-02 Jerome Guitton <guitton@adacore.com>
10597
10598 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10599
2fe829ae
ES
106002011-08-02 Ed Schonberg <schonberg@adacore.com>
10601
10602 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10603 not set Overridden_Operation if subprogram is an initialization
10604 procedure.
10605
e24329cd
YM
106062011-08-02 Yannick Moy <moy@adacore.com>
10607
10608 * par-ch6.adb: Correct obsolete name in comments
10609 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10610 which takes two message arguments (existing function takes one), with
10611 second message used for continuation.
10612 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10613 block statements that originate from a source block statement, not
10614 generated block statements
10615 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10616 symmetry with procedure case
10617 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10618 function to issue an error in formal mode if a package specification
10619 contains more than one tagged type or type extension.
10620 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10621 parameters matching formals of tagged types are objects (or ancestor
10622 type conversions of objects), not general expressions. Issue an error
10623 on view conversions that are not involving ancestor conversion of an
10624 extended type.
10625 (Resolve_Type_Conversion): in formal mode, issue an error on the
10626 operand of an ancestor type conversion which is not an object
10627 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10628 procedure so that it works also for actuals of function calls
10629 (Is_Actual_Tagged_Parameter): new function which determines if its
10630 argument is an actual parameter of a formal of tagged type in a
10631 subprogram call
10632 (Is_SPARK_Object_Reference): new function which determines if the tree
10633 referenced by its argument represents an object in SPARK
10634
176dadf6
AC
106352011-08-02 Robert Dewar <dewar@adacore.com>
10636
10637 * sem_ch3.adb: Minor reformatting
10638 Minor comment addition
10639 Minor error msg text change
10640
106412011-08-02 Javier Miranda <miranda@adacore.com>
10642
10643 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10644 function. Used to be more precise when we generate a variable plus one
10645 assignment to remove side effects in the evaluation of the Bound
10646 expressions.
10647 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10648 of the bound expression to force its re-analysis and thus expand the
10649 associated transient scope (if required). Code cleanup replacing the
10650 previous code that declared the constant entity by an invocation to
10651 routine Force_Evaluation which centralizes this work in the frontend.
10652
d8b962d8
AC
106532011-08-02 Robert Dewar <dewar@adacore.com>
10654
10655 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10656 (Base_Type): Now uses improved Is_Base_Type function
10657 * einfo.ads (Base_Type): Inline this function
10658
106592011-08-02 Robert Dewar <dewar@adacore.com>
10660
10661 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10662 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10663
106642011-08-02 Arnaud Charlet <charlet@adacore.com>
10665
10666 * gcc-interface/Make-lang.in: Update dependencies.
10667 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10668 targets.
10669
106702011-08-02 Yannick Moy <moy@adacore.com>
10671
10672 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10673 non-simple expression used in delta constraint
10674 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10675 index constraint which is not a subtype mark
10676 * par.adb: With and use Restrict
10677 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10678 mode on component type which is not a subtype mark and default
10679 expression on component
10680 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10681 of string which does not have a lower index bound equal to 1
10682 (Array_Type_Declaration): issue an error in formal mode on index or
10683 component type which is not a subtype mark, and on aliased keyword on
10684 component
10685 (Derived_Type_Declaration): issue an error in formal mode on interface,
10686 limited or abstract type
10687 (Record_Type_Declaration): issue an error in formal mode on interface
10688 (Record_Type_Definition): issue an error in formal mode on tagged types
10689 and type extensions not declared in the specification of a library unit
10690 package; on null non-tagged record; on variant part
10691
106922011-08-02 Vincent Celier <celier@adacore.com>
10693
10694 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10695 not declared for qualified library project when Library_Name is not
10696 declared, but Library_Dir is.
10697
106982011-08-02 Robert Dewar <dewar@adacore.com>
10699
10700 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10701 pragmas (affects aspects [Component_]Default_Value
10702 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10703 component type for the resolution
10704
f96b2d85
AC
107052011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10706
10707 * einfo.adb (Base_Type): Tune implementation for speed.
10708
107092011-08-02 Robert Dewar <dewar@adacore.com>
10710
10711 * freeze.adb: Minor reformatting.
10712
8b3c6430
AC
107132011-08-02 Thomas Quinot <quinot@adacore.com>
10714
10715 * scos.ads: Update comments.
10716
107172011-08-02 Ed Schonberg <schonberg@adacore.com>
10718
10719 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10720 base type, because the parent may be a subtype of a private type whose
10721 convention is established in a private part.
10722
107232011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10724
10725 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10726 statement in a block when the expansion of the return expression has
10727 created a finalization chain.
10728 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10729 with the parent node.
10730 Add N_Extended_Return_Statement to handle the case where a transient
10731 object declaration appears in the Return_Object_Declarations list of
10732 an extended return statement.
10733
107342011-08-02 Matthew Gingell <gingell@adacore.com>
10735
10736 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10737 unused parameter 'name'.
10738
107392011-08-02 Ed Schonberg <schonberg@adacore.com>
10740
10741 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10742 inherited operation, check whether its alias, which is the source
10743 operastion that it renames, has been marked eliminated.
10744
cae81f17
JM
107452011-08-02 Javier Miranda <miranda@adacore.com>
10746
10747 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10748 in-mode parameter whose type is an access type since it can be used to
10749 modify its designated object. Enforce code that handles as safe an
10750 access type that is not access-to-constant but it is the result of a
10751 previous removal of side-effects.
10752 (Remove_Side_Effects): Minor code reorganization of cases which require
10753 no action. Done to incorporate documentation on new cases uncovered
10754 working in this ticket: no action needed if this routine was invoked
10755 too early and the nodes are not yet decorated.
10756 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10757 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10758 were issued with actuals that are implicitly provided by
10759 Force_Evaluation.
10760
218e6dee
RD
107612011-08-02 Robert Dewar <dewar@adacore.com>
10762
10763 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10764
7a489a2b
AC
107652011-08-02 Yannick Moy <moy@adacore.com>
10766
10767 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10768 to issue an error in formal mode on attribute not supported in this mode
10769 (Analyze_Attribute): issue errors on standard attributes not supported
10770 in formal mode.
10771 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10772 comment, and issue error in formal mode on modulus which is not a power
10773 of 2.
10774 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10775 range.
10776 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10777 subtype mark.
10778 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10779 operator on modular type (except 'not').
10780
107812011-08-02 Robert Dewar <dewar@adacore.com>
10782
10783 * gnat_rm.texi: Minor reformatting.
10784
cb7fa356
AC
107852011-08-02 Arnaud Charlet <charlet@adacore.com>
10786
10787 * s-osinte-linux.ads: Minor comment update and reformatting.
10788 * i-cexten.ads: Make this unit pure, as for its parent.
10789 Will allow its usage in more contexts if needed.
10790
107912011-08-02 Robert Dewar <dewar@adacore.com>
10792
10793 * s-utf_32.ads: Minor comment fix.
10794
107952011-08-02 Ed Schonberg <schonberg@adacore.com>
10796
10797 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10798 operation of a tagged synchronized type, handle the case where the
10799 controlling argument is overloaded.
10800
108012011-08-02 Yannick Moy <moy@adacore.com>
10802
10803 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10804 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10805 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10806 SPARK mode and formal verification mode on processing SPARK restriction
10807 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10808 requiring consistency checking.
10809
5cc9353d
RD
108102011-08-02 Robert Dewar <dewar@adacore.com>
10811
10812 * sem_res.adb: Minor reformatting.
10813
e51537ff
RD
108142011-08-02 Robert Dewar <dewar@adacore.com>
10815
10816 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10817 a-cforse.ads: Remove unneeded with of Ada.Containers
10818 Remove commented out pragma Inline's
10819 Move specifications of new subprograms to the actual specs
10820
83fa09c5
AC
108212011-08-02 Yannick Moy <moy@adacore.com>
10822
10823 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10824 a-cforse.ads: Update comments.
10825
108262011-08-02 Ed Schonberg <schonberg@adacore.com>
10827
10828 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10829
d11cfaf8
RD
108302011-08-02 Robert Dewar <dewar@adacore.com>
10831
10832 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10833 a-cforse.ads, a-cofove.ads: Minor reformatting.
10834
300b98bb
AC
108352011-08-02 Claire Dross <dross@adacore.com>
10836
10837 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10838 a-cofove.ads: Add comments.
10839
108402011-08-02 Yannick Moy <moy@adacore.com>
10841
10842 * gnat_rm.texi: Document formal containers.
10843
108442011-08-02 Emmanuel Briot <briot@adacore.com>
10845
10846 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10847 are empty sections.
10848
19fb051c
AC
108492011-08-02 Robert Dewar <dewar@adacore.com>
10850
10851 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10852 reformatting.
10853
108542011-08-02 Robert Dewar <dewar@adacore.com>
10855
10856 * aspects.adb: New aspects Default_Value and Default_Component_Value
10857 New format of Aspect_Names table checks for omitted entries
10858 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10859 handling of boolean aspects for derived types.
10860 New aspects Default_Value and Default_Component_Value
10861 New format of Aspect_Names table checks for omitted entries
10862 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10863 (Has_Default_Value): New flag
10864 (Has_Default_Component_Value): New flag
10865 (Has_Default_Value): New flag
10866 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10867 table.
10868 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10869 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10870 Default_Value and Default_Component_Value
10871 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10872 New aspects Default_Value and Default_Component_Value
10873 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10874 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10875
108762011-08-02 Vincent Celier <celier@adacore.com>
10877
10878 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10879 inherit library kind.
10880
108812011-08-02 Ed Schonberg <schonberg@adacore.com>
10882
10883 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10884 Minor reformatting.
10885
108862011-08-02 Robert Dewar <dewar@adacore.com>
10887
10888 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10889
5f7747af
AC
108902011-08-02 Yannick Moy <moy@adacore.com>
10891
10892 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10893
108942011-08-02 Robert Dewar <dewar@adacore.com>
10895
10896 * impunit.adb: Add comment.
10897
a5fe697b
AC
108982011-08-02 Yannick Moy <moy@adacore.com>
10899
10900 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10901 qualification of aggregates in formal mode
10902 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10903 another aggregate
10904 (Resolve_Aggregate): complete the test that an aggregate is adequately
10905 qualified in formal mode
10906
109072011-08-02 Pascal Obry <obry@adacore.com>
10908
10909 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10910 * mlib-prj.adb: Supress warning when compiling binder generated file.
10911 (Build_Library): Supress all warnings when compiling the binder
10912 generated file.
10913
bd65a2d7 109142011-08-02 Yannick Moy <moy@adacore.com>
d4487611 10915
bd65a2d7
AC
10916 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10917 from here...
10918 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10919 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10920 Add with/use clauses to make Check_Formal_Restriction visible
10921
109222011-08-02 Ed Schonberg <schonberg@adacore.com>
10923
10924 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10925 in-parameters when type of the generic formal is private in the generic
10926 spec and non-private in the body.
10927
109282011-08-02 Claire Dross <dross@adacore.com>
10929
10930 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10931 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10932 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10933 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
10934
109352011-08-02 Robert Dewar <dewar@adacore.com>
10936
10937 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10938 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10939
bd434b3f
YM
109402011-08-02 Yannick Moy <moy@adacore.com>
10941
10942 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10943 formal mode
10944 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10945 matching static array bounds, taking into account the special case of
10946 string literals
10947 * sem_ch3.adb: Typo in comment.
10948
fe5d3068
YM
109492011-08-02 Yannick Moy <moy@adacore.com>
10950
10951 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10952 which issues an error in formal mode if its argument node is originally
10953 from source
10954 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10955 has a discriminant specification so that it does not include the case
10956 of derived types
10957 (Derived_Type_Declaration): move here the test that a derived type has a
10958 discriminant specification
10959 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10960 first element of a component association before accessing its choices
10961 (presence of component association is not enough)
10962 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10963 declaration is a library item before accessing the next element in a
10964 list, as library items are not member of lists
10965 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10966 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10967 Check_Formal_Restriction whenever possible.
10968
b60a3f26
AC
109692011-08-02 Ed Schonberg <schonberg@adacore.com>
10970
10971 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10972 reference when needed.
10973
109742011-08-02 Bob Duff <duff@adacore.com>
10975
10976 * gnat_ugn.texi: Fix typo.
10977
109782011-08-02 Vincent Celier <celier@adacore.com>
10979
10980 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10981 archive file name. Do not use the full path name of archives for Open
10982 VMS.
10983
eaba57fb
RD
109842011-08-02 Robert Dewar <dewar@adacore.com>
10985
10986 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10987 Analyze_Aspect_Specifications
10988 * sem_ch13.adb
10989 (Analyze_Aspect_Specifications): New handling for boolean aspects
10990 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10991 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10992 sequence for Analyze_Aspect_Specifications
10993 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10994 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10995
109962011-08-02 Robert Dewar <dewar@adacore.com>
10997
10998 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10999 aspects, since these no longer exist.
11000
110012011-08-02 Robert Dewar <dewar@adacore.com>
11002
11003 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11004 semicolon, do not try to see if there are aspects following it.
11005 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11006 aspect spec.
11007
8830d1d2
AC
110082011-08-02 Robert Dewar <dewar@adacore.com>
11009
11010 * sem_ch8.adb, aspects.ads: Minor reformatting.
11011
110122011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11013
11014 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11015 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11016 extracted from...
11017 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11018
7ff2d234
AC
110192011-08-02 Yannick Moy <moy@adacore.com>
11020
11021 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11022 mode on subprogram declaration outside of package specification, unless
11023 it is followed by a pragma Import
11024 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11025 Access_Type_Declaration): issue error in formal mode on access type
11026 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11027 incomplete type
11028 (Analyze_Object_Declaration): issue error in formal mode on object
11029 declaration which does not respect SPARK restrictions
11030 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11031 declaration which does not respect SPARK restrictions
11032 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11033 error in formal mode on digits or delta constraint
11034 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11035 decimal fixed point type
11036 (Derived_Type_Declaration): issue error in formal mode on derived type
11037 other than type extensions of tagged record types
11038 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11039 with check on access definition
11040 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11041 mode on protected definition.
11042 (Analyze_Task_Definition): issue error in formal mode on task definition
11043
110442011-08-02 Robert Dewar <dewar@adacore.com>
11045
11046 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11047
806f6d37
AC
110482011-08-02 Javier Miranda <miranda@adacore.com>
11049
11050 * sem_ch6.adb (Can_Override_Operator): New function.
11051 (Verify_Overriding_Indicator): Add missing code to check overriding
11052 indicator in operators. Fixes regression.
11053 (Check_Overriding_Indicator): Minor reformating after replacing the
11054 code that evaluates if the subprogram can override an operator by
11055 invocations to the above new function.
11056 * einfo.adb
11057 (Write_Field26_Name): Add missing code to ensure that, following
11058 the documentation in einfo.ads, this field is not shown as attribute
11059 "Static_Initialization" on non-dispatching functions.
11060
110612011-08-02 Jose Ruiz <ruiz@adacore.com>
11062
11063 * sem_res.adb (Resolve_Call): A call to
11064 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11065 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11066 i.e., when the second parameter is of type Time_Span.
11067
110682011-08-02 Vincent Celier <celier@adacore.com>
11069
11070 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11071 with an archive instead of -L<library dir> -l<library name>.
11072
110732011-08-02 Ed Schonberg <schonberg@adacore.com>
11074
11075 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11076 mark the base types In_Use in addition to making the operations
11077 use_visible.
11078
110792011-08-02 Ed Falis <falis@adacore.com>
11080
11081 * init.c: add and setup __gnat_signal_mask for the exception signals
11082 * s-inmaop-vxworks.adb: new file.
11083 * s-intman-vxworks.adb: remove unnecessary initializations and
11084 simplify remaining
11085 * s-intman-vxworks.ads: remove unnecessary variable
11086 * s-taprop-vxworks.adb: simplify signal initialization
11087
780d052e
RD
110882011-08-02 Robert Dewar <dewar@adacore.com>
11089
11090 * sem_ch8.adb: Minor code reorganization, comment updates.
11091
110922011-08-02 Robert Dewar <dewar@adacore.com>
11093
11094 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11095 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11096 here from Sem_Res.
11097 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11098 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11099
29efbb8c
ES
111002011-08-02 Ed Schonberg <schonberg@adacore.com>
11101
11102 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11103 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11104 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11105 use_type_clauses, to handle more efficiently use_type and use_all_type
11106 constructs.
11107 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11108 Ada2012 Use_All_Type clause.
11109 (Use_Class_Wide_Operations): new procedure.
11110
b0186f71
AC
111112011-08-02 Robert Dewar <dewar@adacore.com>
11112
11113 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11114 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11115 expression to expression function.
11116
111172011-08-02 Ed Schonberg <schonberg@adacore.com>
11118
11119 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11120 if types are compatible.
11121
111222011-08-02 Yannick Moy <moy@adacore.com>
11123
11124 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11125 returns True if its argument array types have same dimension and same
11126 static bounds at each index.
11127 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11128 OUT or IN OUT paramaters which are not view conversions in SPARK.
11129 (Resolve_Arithmetic_Op): issue an error in formal mode on
11130 multiplication or division with operands of fixed point types which are
11131 not qualified or explicitly converted.
11132 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11133 Boolean or array type (except String) operands.
11134 (Resolve_Equality_Op): issue an error in formal mode on equality
11135 operators for array types other than String with non-matching static
11136 bounds.
11137 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11138 for array types with non-matching static bounds. Factorize the code in
11139 Matching_Static_Array_Bounds.
11140 (Resolve_Qualified_Expression): issue an error in formal mode on
11141 qualified expressions for array types with non-matching static bounds.
11142 (Resolve_Type_Conversion): issue an error in formal mode on type
11143 conversion for array types with non-matching static bounds
11144
767bb4e8
AC
111452011-08-02 Robert Dewar <dewar@adacore.com>
11146
11147 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11148
111492011-08-02 Ed Schonberg <schonberg@adacore.com>
11150
11151 * par-ch9.adb: save location of entry for proper error message.
11152
4ac2477e
JM
111532011-08-02 Javier Miranda <miranda@adacore.com>
11154
11155 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11156 (Use_Full_View) which permits this routine to climb through the
11157 ancestors using the full-view of private parents.
11158 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11159 Use_Full_View to true in calls to Is_Ancestor.
11160 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11161 true in call to Is_Ancestor.
11162 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11163 Use_Full_View to true in call to Is_Ancestor.
11164 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11165 call to Is_Ancestor.
11166 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11167 Use_Full_View to true in calls to Is_Ancestor.
11168 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11169 Make_Select_Specific_Data_Table, Register_Primitive,
11170 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11171 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11172 to true in call to Is_Ancestor.
11173 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11174 Use_Full_View to true in calls to Is_Ancestor.
11175 * exp_cg.adb
11176 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11177 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11178
9f90d123
AC
111792011-08-02 Robert Dewar <dewar@adacore.com>
11180
11181 * gnat_rm.texi: Minor reformatting.
11182 * sem_prag.adb: Minor reformatting.
11183
111842011-08-02 Tristan Gingold <gingold@adacore.com>
11185
11186 * vms_data.ads: Add VMS qualifier for -gnateP.
11187
111882011-08-02 Robert Dewar <dewar@adacore.com>
11189
11190 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11191 * par-ch7.adb (P_Package): Proper placement of aspects for package
11192 decl/instantiation.
11193 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11194 (End_Statements): Add Is_Sloc parameterr
11195 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11196 (Check_End): Ad Is_Sloc parameter
11197 (End_Statements): Add Is_Sloc parameterr
11198
111992011-08-02 Vincent Celier <celier@adacore.com>
11200
11201 * ug_words: Add VMS qualifier equivalent to -gnateP:
11202 /SYMBOL_PREPROCESSING.
11203
112042011-08-02 Jose Ruiz <ruiz@adacore.com>
11205
11206 * gnat-style.texi: For hexadecimal numeric literals the typical
11207 grouping of digits is 4 to represent 2 bytes.
11208 A procedure spec which is split into several lines is indented two
11209 characters.
11210
112112011-08-02 Yannick Moy <moy@adacore.com>
11212
11213 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11214 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11215 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11216 properly qualified
11217 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11218 choice in array aggregate
11219 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11220 mark as ancestor
11221 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11222 positional and named aggregate for record, or others in record
11223 aggregate, or multiple choice in record aggregate
11224 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11225 array operands to logical operations AND, OR and XOR do not have the
11226 same static lower and higher bounds
11227 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11228
2933b16c
RD
112292011-08-01 Robert Dewar <dewar@adacore.com>
11230
11231 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11232 Replaces Last_Source_Node_In_Sequence.
11233 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11234 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11235 parens and blank in string (this was inconsistently implemented).
11236 * errout.ads
11237 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11238 blank in string (this was inconsistently implemented).
11239 * gnat1drv.adb
11240 (Set_Global_Switches): Set formal mode switches appropriately
11241 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11242 * par-prag.adb
11243 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11244 call Set_Error_Msg_Lang to set "spark" as language name.
11245 * par.adb: Remove unnecessary call to set formal language for errout
11246 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11247 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11248 name.
11249 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11250 calls to it, moved after resolution so that types are known
11251 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11252 result of concatenation is not of type String
11253 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11254 concatenation is not properly restricted
11255 * gnat_rm.texi: Add doc on pragma Spark_95.
11256 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11257 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11258 * gcc-interface/Make-lang.in: Update dependencies.
11259
05dbd302
AC
112602011-08-01 Javier Miranda <miranda@adacore.com>
11261
11262 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11263 condition that detects if the overridden operation must replace an
11264 existing entity.
11265
112662011-08-01 Javier Miranda <miranda@adacore.com>
11267
11268 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11269 code declarations inserted by Insert_Actions in each alternative of the
11270 N_Case_Expression node.
11271
112722011-08-01 Robert Dewar <dewar@adacore.com>
11273
11274 * sem_ch6.adb: Minor code reorganization.
11275 * sem_util.adb: Minor reformatting.
11276
af9e051f
PO
112772011-08-01 Pascal Obry <obry@adacore.com>
11278
11279 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11280 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11281
1d801f21
AC
112822011-08-01 Yannick Moy <moy@adacore.com>
11283
11284 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11285 literal or operator symbol which is prefixed
11286 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11287 mode on access attributes.
11288 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11289 that concatenation operands are properly restricted in formal mode
11290 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11291 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11292 result of the concatenation has a type different from String.
11293 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11294 Analyze_Quantified_Expression, Analyze_Slice,
11295 Analyze_Null): issue an error in formal mode on unsupported constructs
11296 * sem_ch5.adb
11297 (Analyze_Block_Statement): only issue error on source block statement
11298 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11299 function which returns the last node in a list of nodes for which
11300 Comes_From_Source returns True, if any
11301 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11302 Last_Source_Node_In_Sequence
11303 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11304 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11305 mode on unsupported constructs
11306 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11307 rest of the actions may be needed later on since the error is marked as
11308 not serious.
11309 * sinfo.ads: Typos in comments.
11310
113112011-08-01 Pascal Obry <obry@adacore.com>
11312
11313 * projects.texi: Minor editing.
11314
53beff22
YM
113152011-08-01 Yannick Moy <moy@adacore.com>
11316
11317 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11318 insertion character ~~
11319 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11320 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11321 with insertion character ~~
11322 (Set_Msg_Text): treat insertion character ~~
11323 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11324 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11325 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11326 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11327 errors related to the formal language restriction not serious
11328 (insertion character |).
11329 * par.adb (Par): set formal language for error messages if needed
11330 * sem_ch6.adb (Check_Missing_Return): take into account possible
11331 generated statements at the end of the function
11332 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11333 enumeration value to define a new pragma SPARK_95
11334 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11335 SPARK_Version): new type and variables to store the SPARK version
11336 (none by default).
11337 (SPARK_Mode): return True when SPARK_Version is set
11338 * par-prag.adb: Correct indentation
11339 (Prag): take Pragma_SPARK_95 into account
11340 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11341 into account.
11342
8d606a78
RD
113432011-08-01 Robert Dewar <dewar@adacore.com>
11344
11345 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11346 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11347 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11348
1982d5a8
PO
113492011-08-01 Pascal Obry <obry@adacore.com>
11350
11351 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11352 Target_Name to Get_Path call.
11353 (Parse_Single_Project): Likewise.
11354 (Post_Parse_Context_Clause): Likewise.
11355 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11356 Call Initialise_Project_Path with the proper Target_Name.
11357 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11358 search path.
11359 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11360 with the proper Target_Name.
11361 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11362 Part.Parse routine.
11363 (Parse_Project_And_Apply_Config): Likewise.
11364 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11365 This is fine as this part of the code is supporting only native
11366 compilation.
11367 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11368 is fine as this part of the code is supporting only native compilation.
11369
0d53d36b
AC
113702011-08-01 Yannick Moy <moy@adacore.com>
11371
11372 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11373 of homonym, unless the homonym is one of the cases allowed in SPARK
11374 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11375 package declaration occurring after a body.
11376
113772011-08-01 Robert Dewar <dewar@adacore.com>
11378
11379 * checks.adb, exp_ch4.adb: Minor reformatting.
11380
113812011-08-01 Javier Miranda <miranda@adacore.com>
11382
11383 * einfo.ads (Access_Disp_Table): Fix documentation.
11384 (Dispatch_Table_Wrappers): Fix documentation.
11385
113862011-08-01 Pascal Obry <obry@adacore.com>
11387
11388 * prj-env.adb, prj-env.ads: Minor reformatting.
11389
8ed68165
AC
113902011-08-01 Yannick Moy <moy@adacore.com>
11391
11392 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11393 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11394 procedures out of these packages.
2c7f9cc0 11395 * errout.ads, errout.adb
8ed68165
AC
11396 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11397 procedures in of this package
11398 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11399 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11400 on misplaced later vs initial declarations, like in Ada 83
11401 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11402 formal mode on attribute of private type whose full type declaration
11403 is not visible
11404 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11405 package declaration inside a package specification
11406 (Analyze_Full_Type_Declaration): issue error in formal mode on
11407 controlled type or discriminant type
11408 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11409 user-defined operator means that it should come from the source
11410 (New_Overloaded_Entity): issue error in formal mode on overloaded
11411 entity.
11412 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11413
114142011-08-01 Thomas Quinot <quinot@adacore.com>
11415
11416 * atree.adb: Minor reformatting.
11417 * checks.adb: Minor reformatting.
11418
4230bdb7
AC
114192011-08-01 Vincent Celier <celier@adacore.com>
11420
11421 * s-parame-vms-ia64.ads: Fix typo in comment
11422 Minor reformatting
11423 * s-parame-vms-restrict.ads: Removed, unused.
11424
114252011-08-01 Javier Miranda <miranda@adacore.com>
11426
11427 * exp_ch3.adb
11428 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11429 * sem_ch3.adb
11430 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11431 * sem_ch3.ads, sem_ch3.adb
11432 (Is_Constant_Bound): New extended version of the subprogram that was
11433 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11434 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11435 * sem_aux.ads (Constant_Value): Fix typo in comment.
11436 * checks.adb (Generate_Index_Checks): New implementation which, for
11437 array objects with constant bounds, generates the runtime check
11438 referencing the bounds of the array type. For other cases this routine
11439 provides its previous behavior obtaining such values from the array
11440 object.
11441 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11442 parent type.
11443 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11444 we cannot have semantic interpretations of the new node.
11445
2010d078
AC
114462011-08-01 Ed Schonberg <schonberg@adacore.com>
11447
11448 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11449 expressions.
11450
114512011-08-01 Arnaud Charlet <charlet@adacore.com>
11452
11453 * sem_ch8.adb: Minor code editing.
11454 * s-vxwext.adb: Remove trailing space.
11455 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11456 consistency with other files.
11457
114582011-08-01 Thomas Quinot <quinot@adacore.com>
11459
11460 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11461
114622011-08-01 Ed Schonberg <schonberg@adacore.com>
11463
11464 * par-ch10.adb: reject parameterized expressions as compilation unit.
11465 * sem_ch4.adb: handle properly conditional expression with overloaded
11466 then_clause and no else_clause.
11467
114682011-08-01 Tristan Gingold <gingold@adacore.com>
11469
11470 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11471 like done by System.Aux_DEC.
11472 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11473
daec8eeb
YM
114742011-08-01 Yannick Moy <moy@adacore.com>
11475
11476 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11477 missing label at end of declaration (subprogram or package)
11478 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11479 of positional and named parameter association
11480 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11481 Error_Msg_SP which adds a prefix to the error message giving the name
11482 of the formal language analyzed
11483 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11484 access result type in subprogram, unconstrained array as result type,.
11485 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11486 procedure
11487 * sem_ch8.adb: Code clean up.
11488
38171f43
AC
114892011-08-01 Javier Miranda <miranda@adacore.com>
11490
11491 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11492 * einfo.ads (Access_Disp_Table): Fix documentation.
11493 (Dispatch_Table_Wrappers): Fix documentation.
11494 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11495 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11496 to enforce the documentation of this attribute.
11497 (Set_Is_Interface): Cleanup the assertion.
11498 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11499 the Underlying_Type entity before reading attribute Access_Disp_Table.
11500 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11501 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11502 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11503 the Underlying_Type entity before reading attribute Access_Disp_Table.
11504 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11505 Locate the Underlying_Type entity before reading attribute
11506 Access_Disp_Table.
11507
115082011-08-01 Ed Schonberg <schonberg@adacore.com>
11509
11510 * s-poosiz.ads: Additional overriding indicators.
11511
115122011-08-01 Yannick Moy <moy@adacore.com>
11513
11514 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11515 formal mode.
11516 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11517 parameter specification does not include a subtype mark.
11518 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11519 formal mode on abstract subprogram.
11520 (Analyze_Subprogram_Specification): issue error in formal mode on
11521 user-defined operator.
11522 (Process_Formals): issue error in formal mode on access parameter and
11523 default expression.
11524 * sem_ch9.adb (Analyze_Abort_Statement,
11525 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11526 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11527 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11528 Analyze_Requeue, Analyze_Selective_Accept,
11529 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11530 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11531 issue error in formal mode on user-defined raise statement.
11532
1f250383
AC
115332011-08-01 Thomas Quinot <quinot@adacore.com>
11534
11535 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11536 declaration being hidden when overriding an implicit inherited
11537 subprogram.
11538 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11539 (-gnats), do not complain about a source file that contains only a
11540 pragma No_Body.
11541
115422011-08-01 Ed Schonberg <schonberg@adacore.com>
11543
11544 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11545 variable if already set.
11546
607d0635
AC
115472011-08-01 Arnaud Charlet <charlet@adacore.com>
11548
11549 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11550 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11551 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11552 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11553 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11554 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11555 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11556 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11557 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11558 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11559 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11560 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11561 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11562 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11563 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11564 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11565 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11566 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11567 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11568 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11569 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11570 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11571 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11572 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11573 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11574 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11575 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11576 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11577 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11578 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11579 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11580 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11581 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11582 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11583 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11584 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11585 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11586 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11587 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11588 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11589 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11590 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11591 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11592 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11593 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11594 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11595 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11596 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11597 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11598 Use GNAT instead of GNARL.
11599
116002011-08-01 Bob Duff <duff@adacore.com>
11601
11602 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11603 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11604 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11605 reformatting.
11606
116072011-08-01 Yannick Moy <moy@adacore.com>
11608
11609 * debug.adb (d.D) reverve flag for the SPARK mode
11610 (d.E) reverve flag for SPARK generation mode
11611 (d.F) reverve flag for Why generation mode
2c7f9cc0 11612 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
11613 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11614 functions which return True when the corresponding modes are set
11615 (Formal_Language): return "spark" or "alfa" when in formal verification
11616 mode.
11617 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11618 Error_Msg to prefix the error message with a tag giving the formal
11619 language
11620 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11621 message with a tag giving the formal language
11622 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11623 block statement
11624 (Analyze_Case_Statement): issue error in formal mode on case statement
11625 with a single "others" case alternative
11626 (Analyze_Exit_Statement): issue errors in formal mode on exit
11627 statements which do not respect SPARK restrictions
11628 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11629 (Check_Unreachable_Code): always issue an error (not a warning) in
11630 formal mode on unreachable code (concerns both code after an infinite
11631 loop and after an unconditional jump, both not allowed in SPARK)
11632 * sem_ch6.adb (Analyze_Return_Statement): add call to
11633 Set_Return_Present for a procedure containing a return statement
11634 (already done for functions in Analyze_Function_Return)
11635 (Analyze_Function_Return): issue error in formal mode on extended
11636 return or if return is not last statement in function
11637 (Check_Missing_Return): issue error in formal mode if function does
11638 not end with return or if procedure contains a return
11639 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11640 function to detect if there is an inner scope of its parameter S which
11641 is a loop.
11642
116432011-08-01 Thomas Quinot <quinot@adacore.com>
11644
11645 * sem_ch6.ads: Minor reformatting.
11646
d8b3ccb9
AC
116472011-08-01 Javier Miranda <miranda@adacore.com>
11648
11649 * sem_util.adb (Abstract_Interface_List): Complete condition when
11650 processing private type declarations to avoid reading unavailable
11651 attribute.
11652 (Is_Synchronized_Tagged_Type): Complete condition when processing
11653 private extension declaration nodes to avoid reading unavailable
11654 attribute.
11655
116562011-08-01 Thomas Quinot <quinot@adacore.com>
11657
11658 * sem_ch3.adb: Minor reformatting.
11659
116602011-08-01 Thomas Quinot <quinot@adacore.com>
11661
11662 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11663 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11664 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11665 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11666 for VMS, instead parametrize the common implementation with
11667 System.Parameters declarations.
11668
0bb9276c
AC
116692011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11670
11671 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11672
116732011-08-01 Tristan Gingold <gingold@adacore.com>
11674
11675 * seh_init.c: Fix SEH handler installation on win64.
11676
116772011-08-01 Ed Schonberg <schonberg@adacore.com>
11678
11679 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11680 double analysis of an anonymous access to subprogram, because it can
11681 lead to improper sharing of profiles and a back-end crash.
11682
6a2e4f0b
AC
116832011-08-01 Robert Dewar <dewar@adacore.com>
11684
11685 * make.adb, sem_ch4.adb: Minor reformatting.
11686 * gcc-interface/Make-lang.in: Update dependencies.
11687 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11688
116892011-08-01 Arnaud Charlet <charlet@adacore.com>
11690
11691 * gnat_rm.texi: Fix definition of Long_Integer.
11692
116932011-08-01 Ed Schonberg <schonberg@adacore.com>
11694
11695 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11696 to prevent storage exhaustion.
11697 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11698 finalized is a function body, insert the cleanup code before the final
11699 return statement, to prevent spurious warnings.
11700 * s-pooglo.ads: add overriding indicator.
11701
4561baf7
ES
117022011-08-01 Ed Schonberg <schonberg@adacore.com>
11703
11704 * sem_ch4.adb (Operator_Check): improve error message when both a
11705 with_clause and a use_clause are needed to make operator usage legal.
11706 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11707 determine whether a compilation unit is visible within an other,
11708 either through a with_clause in the current unit, or a with_clause in
11709 its library unit or one one of its parents.
11710
383e179e
AC
117112011-08-01 Ed Schonberg <schonberg@adacore.com>
11712
11713 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11714 over an arbitrary expression of an array or container type.
11715 * lib-xref.adb: clarify comment.
11716
117172011-08-01 Bob Duff <duff@adacore.com>
11718
11719 * einfo.ads: Minor reformatting.
11720 * debug.adb: Minor comment improvement.
11721
117222011-08-01 Javier Miranda <miranda@adacore.com>
11723
11724 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11725 consider hidden subprograms as valid candidates.
11726
117272011-08-01 Arnaud Charlet <charlet@adacore.com>
11728
11729 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11730
117312011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11732
11733 * gnat_ugn.texi: Fix typo.
11734
61c161b2
AC
117352011-08-01 Robert Dewar <dewar@adacore.com>
11736
11737 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11738 lib-xref.adb: Minor reformatting
11739
117402011-08-01 Gary Dismukes <dismukes@adacore.com>
11741
11742 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11743 when to generate a call to Move_Final_List.
11744 (Has_Controlled_Parts): Remove this function.
11745
84df40f7
AC
117462011-08-01 Geert Bosch <bosch@adacore.com>
11747
11748 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11749 "," in choice list.
11750
117512011-08-01 Thomas Quinot <quinot@adacore.com>
11752
11753 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11754 explicit raise of a predefined exception as Comes_From_Source if the
11755 original N_Raise_Statement comes from source.
11756
117572011-08-01 Robert Dewar <dewar@adacore.com>
11758
11759 * sinfo.ads: Add comment.
11760 * sem_ch6.adb: Minor reformatting.
11761
117622011-08-01 Robert Dewar <dewar@adacore.com>
11763
11764 * freeze.adb (Freeze_Entity): Refine check for bad component size
11765 clause to avoid rejecting confirming clause when atomic/aliased present.
11766
117672011-08-01 Ed Schonberg <schonberg@adacore.com>
11768
11769 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11770 better determine whether an entity reference is a write.
11771 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11772 subcomponent.
11773 * lib-xref.adb (Output_References): Do no suppress a read reference at
11774 the same location as an immediately preceeding modify-reference, to
11775 handle properly in-out actuals.
11776
117772011-08-01 Tristan Gingold <gingold@adacore.com>
11778
11779 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11780
117812011-08-01 Quentin Ochem <ochem@adacore.com>
11782
11783 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11784 heap to compute the result.
11785
c7f0d2c0
AC
117862011-08-01 Robert Dewar <dewar@adacore.com>
11787
11788 * atree.ads: Minor reformatting.
11789
117902011-08-01 Emmanuel Briot <briot@adacore.com>
11791
11792 * g-expect.adb (Get_Command_Output): Fix memory leak.
11793
117942011-08-01 Geert Bosch <bosch@adacore.com>
11795
11796 * cstand.adb (P_Float_Type): New procedure to print the definition of
11797 predefined fpt types.
11798 (P_Mixed_Name): New procedure to print a name using mixed case
11799 (Print_Standard): Use P_Float_Type for printing floating point types
11800 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11801 precision IEEE float.
11802
118032011-08-01 Thomas Quinot <quinot@adacore.com>
11804
11805 * sem_ch3.adb: Minor reformatting.
11806
118072011-08-01 Ed Schonberg <schonberg@adacore.com>
11808
11809 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11810 the completion of a generic function, insert the new body rather than
11811 rewriting the original.
11812
118132011-08-01 Yannick Moy <moy@adacore.com>
11814
11815 * sinfo.ads, errout.ads: Typos in comments.
11816
1c54829e
AC
118172011-08-01 Robert Dewar <dewar@adacore.com>
11818
11819 * par-endh.adb: Minor reformatting.
11820
118212011-08-01 Robert Dewar <dewar@adacore.com>
11822
11823 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11824 (Pre_Post_Aspects): New subtype.
11825 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11826 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11827 * par-ch7.adb (P_Package): Remove Decl parameter
11828 (P_Package): Handle new syntax for aspects (before IS)
11829 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11830 new aspect syntax
11831 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11832 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11833 (P_Package): Remove Decl parameter
11834 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11835 aspects
11836 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11837 specs
11838 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11839 * sinfo.ads: Document new syntax for aspects in packages etc.
11840 * sprint.adb: Handle new syntax of aspects before IS in package
11841
118422011-08-01 Thomas Quinot <quinot@adacore.com>
11843
11844 * atree.ads: Minor reformatting.
11845 * sem_prag.adb: Minor reformatting.
11846
118472011-08-01 Robert Dewar <dewar@adacore.com>
11848
11849 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11850 case expr alternative.
11851
118522011-08-01 Ed Schonberg <schonberg@adacore.com>
11853
11854 * sem_ch12.adb: Fix typo.
11855
9eea4346
GB
118562011-08-01 Geert Bosch <bosch@adacore.com>
11857
11858 * sem_prag.adb (Check_No_Link_Name): New procedure.
11859 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11860 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11861 instead of Standard_Long_Long_Float_Size global. Preparation for
11862 eventual removal of per type constants.
11863 * exp_util.ads (Get_Stream_Size): New function returning the stream
11864 size value of subtype E.
11865 * exp_util.adb (Get_Stream_Size): Implement new function.
11866 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11867 function.
11868 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11869 * einfo.adb:
11870 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11871
3d6c3bd7
GB
118722011-08-01 Geert Bosch <bosch@adacore.com>
11873
11874 * cstand.adb: Fix comments.
11875 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11876 count of arguments.
11877
e7d897b8
AC
118782011-08-01 Robert Dewar <dewar@adacore.com>
11879
11880 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11881
118822011-08-01 Geert Bosch <bosch@adacore.com>
11883
11884 * atree.ads: Fix comment.
11885
c228a069
AC
118862011-08-01 Robert Dewar <dewar@adacore.com>
11887
11888 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11889 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11890 * par.adb: Add with for Namet.Sp.
11891 * par-tchk.adb: Minor reformatting.
11892
118932011-08-01 Vincent Celier <celier@adacore.com>
11894
11895 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11896 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11897 of the init procedure of a SAL.
11898 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11899 New procedure.
11900
119012011-08-01 Thomas Quinot <quinot@adacore.com>
11902
11903 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11904 reformatting.
11905
119062011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11907
11908 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11909
119102011-08-01 Thomas Quinot <quinot@adacore.com>
11911
11912 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11913 conformant with its spec (return True only for types that have
11914 an overriding Initialize primitive operation that prevents them from
11915 having preelaborable initialization).
11916 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11917 initialization for controlled types in Ada 2005 or later mode.
11918
857ade1b
RD
119192011-08-01 Robert Dewar <dewar@adacore.com>
11920
11921 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11922 Postcondition.
11923 (Same_Aspect): New function.
11924 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11925 Type_Invariant, Precondition, Postcondition.
11926 * snames.ads-tmpl: Add Name_Type_Invariant.
11927
bd949ee2
RD
119282011-08-01 Robert Dewar <dewar@adacore.com>
11929
11930 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11931 here.
11932 (Freeze_All_Ent): Fix error in handling inherited aspects.
11933 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11934 already analyzed, but don't skip entire processing of a declaration,
11935 that's wrong in some cases of declarations being rewritten.
11936 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11937 Don't delay for integer, string literals
11938 Treat predicates in usual manner for delay, remove special case code,
11939 not needed.
11940 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11941 (Build_Predicate_Function): Update saved expression in aspect
11942 (Build_Invariant_Procedure): Update saved expression in aspect
11943 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11944 of replacement of discriminant references if the reference is simple.
11945
f1c952af
RD
119462011-08-01 Robert Dewar <dewar@adacore.com>
11947
11948 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11949 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11950 Static_Predicate and Dynamic_Predicate.
11951 (Build_Predicate_Function): Add processing for Static_Predicate
11952 and Dynamic_Predicate.
11953 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11954 (From_Static_Predicate): New flag
11955 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11956
119572011-08-01 Robert Dewar <dewar@adacore.com>
11958
11959 * usage.adb: Documentation cleanup for Ada version modes in usage.
11960 * expander.adb: Minor reformatting.
11961
47e11d08
AC
119622011-08-01 Robert Dewar <dewar@adacore.com>
11963
11964 * atree.ads: Minor comment fix.
11965 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11966 a-witeio.ads, sem_prag.adb: Minor reformatting.
11967
119682011-08-01 Doug Rupp <rupp@adacore.com>
11969
11970 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11971 pointers. Use descrip.h header file for convenience. Add some
11972 comments.
11973
119742011-08-01 Robert Dewar <dewar@adacore.com>
11975
11976 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11977 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11978 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11979 New procedure.
11980 (Check_Aspect_At_End_Of_Declarations): New procedure
11981 (Analye_Aspect_Specification): Minor changes for above procedures
11982 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11983 specification node as well.
11984
119852011-08-01 Pascal Obry <obry@adacore.com>
11986
11987 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11988 Windows files. Use GetFilesAttributes() in this case to check for file
11989 existence instead of returning with an error code.
11990
a3a16b21
VC
119912011-08-01 Vincent Celier <celier@adacore.com>
11992
11993 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11994 High is above Source length.
11995
ff58cc69
RD
119962011-08-01 Robert Dewar <dewar@adacore.com>
11997
11998 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11999
6bb88533
AC
120002011-08-01 Robert Dewar <dewar@adacore.com>
12001
12002 * aspects.ads (Boolean_Aspects): New subtype.
12003 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12004 for derived types in cases where the parent type and derived type have
12005 aspects.
12006 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12007 with aspects when parent type also has aspects.
12008 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12009 boolean expression at this point).
12010 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12011 accordance with final decision on the Ada 2012 feature.
12012 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12013
120142011-08-01 Matthew Heaney <heaney@adacore.com>
12015
12016 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12017
060a3f28
AC
120182011-08-01 Pascal Obry <obry@adacore.com>
12019
12020 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12021 Fix Replace_Slice when High is above current string size.
12022 (Replace_Slice): Fix DL computation when High is above current
12023 string length.
12024
120252011-08-01 Gary Dismukes <dismukes@adacore.com>
12026
12027 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12028
e7f567a3
AC
120292011-08-01 Matthew Heaney <heaney@adacore.com>
12030
12031 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12032 of node.
12033
120342011-08-01 Pascal Obry <obry@adacore.com>
12035
12036 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12037 reformatting.
12038
1a265e78
AC
120392011-08-01 Ed Schonberg <schonberg@adacore.com>
12040
12041 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12042 access to protected subprograms in generic bodies.
12043 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12044 protected type, indicate that the convention of the subprogram is
12045 Convention_Protected, because it may be used in subsequent declarations
12046 within the protected declaration.
12047
120482011-08-01 Vincent Celier <celier@adacore.com>
12049
12050 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12051 and "final" procedures when the name of the library is "ada", to avoid
12052 duplicate symbols "adainit" and "adafinal" in executables.
12053
67e28ef8
ES
120542011-08-01 Ed Schonberg <schonberg@adacore.com>
12055
12056 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12057 quantified expression that appears within a postcondition and uses the
12058 Ada2012 'Result attribute.
12059
6da2ca7d
RO
120602011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12061
12062 * init.c (__gnat_error_handler): Cast reason to int.
12063 (__gnat_install_handler): Explain sa_sigaction use.
12064
7d5997c6
EB
120652011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12066
12067 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12068 subprogram has copy-in copy-out parameters, try to promote the mode of
12069 the return type if it is passed in registers.
12070
4b4cfdd5
EB
120712011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12072
12073 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12074 left operand as addressable.
12075
f3d34576
EB
120762011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12077
12078 * gcc-interface/gigi.h (build_function_stub): Remove.
12079 (build_return_expr): Likewise.
12080 (convert_vms_descriptor): Declare.
12081 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12082 (build_function_stub): Move to...
12083 * gcc-interface/utils2.c (build_return_expr): Move to...
12084 * gcc-interface/trans.c (build_function_stub): ...here.
12085 (build_return_expr): ...here.
12086 (Subprogram_Body_to_gnu): Add local variable for language_function.
12087 Disconnect the parameter attributes cache, if any, once done with it.
12088 Call end_subprog_body only after setting the end_locus.
12089 Build the stub associated with the function, if any, at the very end.
12090 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12091 variables and streamline control flow.
12092
0a6ecc08
AC
120932011-07-23 Arnaud Charlet <charlet@adacore.com>
12094
12095 PR ada/49819
12096 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12097 g-trasym-dwarf.adb.
12098
5b6d595b
RO
120992011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12100
12101 PR bootstrap/49794
12102 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12103 Assign to act.sa_sigaction.
12104 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12105 current->return_address to char * before arithmetic.
12106
94017021
RO
121072011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12108
12109 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12110 Correct argument types.
12111 Extract code from reason.
12112 (__gnat_install_handler): Assign to act.sa_sigaction.
12113
52fd02bb
EB
121142011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12115
12116 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12117 (GNAT1_OBJS): ...here.
12118
f39a9ca2
EB
121192011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12120
12121 PR ada/48711
12122 * g-socthi-mingw.adb (Fill): Fix formatting.
12123
9e36aa23
EB
12124 * gcc-interface/gigi.h: Move around comment.
12125
e3aca522
JDA
121262011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12127
12128 PR ada/46350
12129 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12130
696b1960
FW
121312011-07-14 Florian Weimer <fw@deneb.enyo.de>
12132
12133 PR ada/48711
12134 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12135
f542c405
EB
121362011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12137
12138 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12139 range comparison if Pmode is SImode.
12140
9e9bd455
LG
121412011-07-12 Laurent GUERBY <laurent@guerby.net>
12142 Eric Botcazou <ebotcazou@adacore.com>
12143
12144 * adadecode.c: Wrap up in extern "C" block.
12145 * adadecode.h: Likewise.
12146 * adaint.c: Likewise. Remove 'const' keyword.
12147 * adaint.h: Likewise.
12148 * argv.c: Likewise.
12149 * atree.h: Likewise.
12150 * cio.c: Likewise.
12151 * cstreams.c: Likewise.
12152 * env.c: Likewise.
12153 * exit.c: Likewise.
12154 * fe.h: Likewise.
12155 * final.c: Likewise.
12156 * init.c: Likewise.
12157 * initialize.c: Likewise.
12158 * link.c: Likewise.
12159 * namet.h: Likewise.
12160 * nlists.h: Likewise.
12161 * raise.c: Likewise.
12162 * raise.h: Likewise.
12163 * repinfo.h: Likewise.
12164 * seh_init.c: Likewise.
12165 * targext.c: Likewise.
12166 * tracebak.c: Likewise.
12167 * uintp.h: Likewise.
12168 * urealp.h: Likewise.
12169 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12170 * xsinfo.adb: Likewise.
12171 * xsnamest.adb: Likewise.
12172 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12173 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12174 * gcc-interface/misc.c: Likewise.
12175 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12176 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12177 ada/targext.o here...
12178 (GNAT_ADA_OBJS): ...and not here.
12179 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12180 (GNATBIND_OBJS): Reorder.
12181
7644b3c7
RH
121822011-07-07 Richard Henderson <rth@redhat.com>
12183
12184 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12185 dwarf2out_frame_init.
12186
8384ac41
EB
121872011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12188
12189 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12190
fbdd5d87
RO
121912011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12192
12193 PR target/39150
12194 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12195
1a072294
RG
121962011-07-06 Richard Guenther <rguenther@suse.de>
12197
8384ac41
EB
12198 * gcc-interface/misc.c (gnat_init): Merge calls to
12199 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
12200 Re-initialize boolean_false_node.
12201
bc712852
EB
122022011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12203 Olivier Hainque <hainque@adacore.com>
12204 Nicolas Setton <setton@adacore.com>
12205
12206 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12207 the type according to the ARTIFICIAL_P parameter.
12208 (create_type_decl): Likewise.
12209 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12210
2eb22389
EB
122112011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12212
12213 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12214 (gnatbind): Likewise.
12215
4bdaaf2f
RO
122162011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12217
12218 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12219
c020c92b
EB
122202011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12221
12222 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12223 local variable throughout. Remove useless call to Base_Type.
12224 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12225 Take it also into account for the volatileness of the field. Set the
12226 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12227
96769d32
EB
122282011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12229
12230 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12231 on a dereference built for a by-ref object if it has an address clause.
12232
7e4680c1
EB
122332011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12234
12235 * einfo.ads (Address_Taken): Document use for the second argument of
12236 Asm_Input and Asm_Output attributes.
12237 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12238 argument is an entity name, then set Address_Taken on it.
12239 <Attribute_Asm_Output>: Likewise.
12240 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12241 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12242 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12243 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12244
122452011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
12246
12247 PR middle-end/46500
12248 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12249
677f3fa8
JM
122502011-06-14 Joseph Myers <joseph@codesourcery.com>
12251
12252 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12253 (ada/utils.o): Update dependencies.
12254 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12255 ../../../libcpp/libcpp.a.
12256 * gcc-interface/utils.c: Include common/common-target.h.
12257 (process_attributes): Use targetm_common.have_named_sections.
12258
009db074
RG
122592011-06-07 Richard Guenther <rguenther@suse.de>
12260
0bad0e23
EB
12261 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12262 set_sizetype.
009db074 12263
3bfc61cf
EB
122642011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12265
0bad0e23 12266 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
12267 TREE_THIS_NOTRAP flag.
12268
5c4a1c7b
EB
122692011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12270
12271 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12272 Fix thinko.
12273
e9f57686
EB
122742011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12275
12276 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12277 constants whose full view has discriminants specially.
12278
10e4d056
EB
122792011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12280
12281 * gcc-interface/utils.c: Include diagnostic.h.
12282 (gnat_write_global_declarations): Output debug information for all
12283 global type declarations before finalizing the compilation unit.
12284 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12285
0957c029
JJ
122862011-05-25 Jakub Jelinek <jakub@redhat.com>
12287
12288 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12289
52d0a7ac
KT
122902011-05-25 Kai Tietz <ktietz@redhat.com>
12291
12292 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12293 initialization instead of const/none-const pointer assignment.
12294
1ed1641d
JM
122952011-05-24 Joseph Myers <joseph@codesourcery.com>
12296
12297 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12298 $(EXTRA_GNAT1_OBJS).
12299 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12300 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12301 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12302 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12303 libcommon-target.a instead of prefix.o.
12304
9fe72ebd
JM
123052011-05-21 Joseph Myers <joseph@codesourcery.com>
12306
12307 PR ada/49097
0bad0e23 12308 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 12309
2691e6d7
JM
123102011-05-20 Joseph Myers <joseph@codesourcery.com>
12311
0bad0e23
EB
12312 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12313 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12314 instead of version.o.
2691e6d7 12315
bf6490b5
KT
123162011-05-18 Kai Tietz <ktietz@redhat.com>
12317
12318 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12319 boolean_false_node instead of integer_zero_node.
12320 (convert_with_check): Likewise.
12321 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12322
7bf9a5ac
EB
123232011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12324
12325 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12326 type of the parameter is an unconstrained array, convert the actual to
12327 the type of the formal in the In Out and Out cases as well.
12328
e5b00edf
NF
123292011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12330
12331 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12332 call build_function_type_array or build_varargs_function_type_array
12333 instead.
12334 (create_subprog_type): Don't call build_function_type; call
12335 build_function_type_vec instead.
12336
51545682
NF
123372011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12338
12339 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12340 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12341 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12342
c99c0026
EB
123432011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12344
f620bd21
EB
12345 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12346
c99c0026
EB
12347 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12348 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12349
3d528853
NF
123502011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12351
c99c0026 12352 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 12353
d7d058c5
NF
123542011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12355
12356 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12357 instead of accessing TYPE_ARG_TYPES directly.
12358 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12359
805e60a0
EB
123602011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12361
12362 PR ada/48844
12363 * gcc-interface/gigi.h (get_variant_part): Declare.
12364 * gcc-interface/decl.c (get_variant_part): Make global.
12365 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12366 types have the same constant size, are record types and T1 has a
12367 variant part while T2 doesn't.
12368
907a08d9
EB
123692011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12370
12371 * gcc-interface/utils.c (begin_subprog_body): Do not call
12372 get_pending_sizes.
12373 (end_subprog_body): Likewise.
12374
d35936ab
RG
123752011-05-04 Richard Guenther <rguenther@suse.de>
12376
12377 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12378 int_const_binop.
12379 (pos_to_constructor): Likewise.
12380
c1fd8753 123812011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 12382 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
12383
12384 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12385 of build_function_type. Adjust calls to...
12386 (build_raise_check): ...this. Do not take a void_tree parameter.
12387 Call build_function_type_list instead of build_function_type.
12388 Fix head comment and swap couple of conditional blocks.
12389
4fb87d2b
EB
123902011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12391
12392 * gnatvsn.ads (Library_Version): Bump to 4.7.
12393 (Current_Year): Bump to 2011.
12394
fa5e5a76
MM
123952011-04-29 Michael Matz <matz@suse.de>
12396
12397 * gcc-interface/misc.c (gnat_handle_option): Set
12398 warn_maybe_uninitialized.
12399
8d6a2f69
GP
124002011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12401
12402 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12403 the Watson/McCabe paper.
12404
770937fd
JM
124052011-04-23 Jim Meyering <meyering@redhat.com>
12406
12407 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12408
eb601ae1
EB
124092011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12410
12411 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12412 onto the new type.
12413
7d7fcb08
EB
124142011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12415
12416 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12417 parameter.
12418 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12419 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12420 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12421 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12422 <all>: Do not set flags on the reused DECL node coming from an alias.
12423 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12424 don't need debug info here...
12425 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12426 (gigi): Adjust calls to create_subprog_decl.
12427 (build_raise_check): Likewise.
12428 (establish_gnat_vms_condition_handler): Likewise.
12429 (Compilation_Unit_to_gnu): Likewise.
12430 (gnat_to_gnu): Likewise.
12431
e1876cac
EB
124322011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12433
12434 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12435 (NO_REORDER_ADAFLAGS): New variable.
12436 (EXTRA_GNATTOOLS): Always define.
12437 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12438 Clean up and adjust list of files compiled with special options.
12439 * gcc-interface/Make-lang.in: Likewise.
12440 (ada/decl.o): Cosmetical change.
12441 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12442
04695783
JM
124432011-04-20 Jim Meyering <meyering@redhat.com>
12444
12445 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12446
23399579
EB
124472011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12448
12449 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12450 $(CFLAGS) on the link line.
12451
51c5169c
EB
124522011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12453
12454 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12455 padded type built for the return type if it is unconstrained.
12456
61e46a7d
NF
124572011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12458
12459 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12460
81f653d6
NF
124612011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12462
b4867846
EB
12463 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12464 before calling TREE_CHAIN.
81f653d6
NF
12465 * gcc-interface/misc.c (gnat_init_ts): New function.
12466 (LANG_HOOKS_INIT_TS): Define.
12467
a358e188
MJ
124682011-04-12 Martin Jambor <mjambor@suse.cz>
12469
b4867846
EB
12470 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12471 instead of cgraph_node.
a358e188 12472
29b1c5a4
EB
124732011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12474
12475 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12476 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12477 mechanism.
12478
88872b00
EB
124792011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12480
12481 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12482 of aggregate types that contain a placeholder.
12483
dcf0c47e
NF
124842011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12485
12486 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 12487 TYPE_ARG_TYPES.
dcf0c47e
NF
12488 (handle_type_generic_attribute): Likewise.
12489
53e3000c
EB
124902011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12491
12492 PR ada/47163
12493 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12494
ab380bb4
KT
124952011-04-04 Kai Tietz <ktietz@redhat.com>
12496
12497 PR ada/47163
0bad0e23
EB
12498 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12499 to flag value.
ab380bb4 12500
8ffac116
EB
125012011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12502
12503 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12504 type case, do not strip a padding type around the array type.
12505
de9528f0
EB
125062011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12507
12508 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12509 types.
12510
d9d7a26c
EB
125112011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12512
12513 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12514 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 12515 code for -feliminate-unused-debug-types.
d9d7a26c
EB
12516 (gnat_post_options): Likewise.
12517
4cb12a90
EB
125182011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12519
12520 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12521 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12522 distinct copy.
12523
acccc61c
EB
125242011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12525
12526 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12527 DECL_ARTIFICIAL flag on enumeration types.
12528
583eb0c9
EB
125292011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12530
12531 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12532 fat pointer types artificial unconditionally.
12533 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12534 isn't artificial.
12535
e3edbd56
EB
125362011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12537
12538 * gcc-interface/gigi.h (get_dummy_type): Declare.
12539 (build_dummy_unc_pointer_types): Likewise.
12540 (finish_fat_pointer_type): Likewise.
12541 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12542 fat pointer type has been built, complete it in place.
12543 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12544 and thin pointers. Remove useless variable.
12545 (finish_fat_pointer_type): Make global and move to...
12546 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12547 (get_dummy_type): New function.
12548 (build_dummy_unc_pointer_types): Likewise.
12549 (gnat_pushdecl): Propage the name to the anonymous variants only.
12550 (update_pointer_to): Only adjust the pointer types in the unconstrained
12551 array case.
12552
65444786
EB
125532011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12554
12555 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12556 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12557 if this is a Taft amendment type and the full declaration is available.
12558 * gcc-interface/trans.c (process_type): Likewise.
12559 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12560 (process_freeze_entity): Likewise.
12561 * gcc-interface/utils.c (dummy_global): New static variable.
12562 (gnat_write_global_declarations): If there are types declared as used
12563 at the global level, insert them in the global hash table.
12564
1aeb40dd
EB
125652011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12566
12567 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12568 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12569 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12570 copy.
12571 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12572 flag of the type accordingly.
12573 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12574
80ec8b4c
EB
125752011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12576
12577 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12578 finalizing types when updating the pointers to the designated type.
12579 <all>: Finalize the deferred types even if we didn't defer processing
12580 of incomplete types in this invocation.
12581
2a9d769a 125822011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
12583 Nicolas Setton <setton@adacore.com>
12584 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
12585
12586 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12587 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12588
2438d7a6
KT
125892011-03-28 Kai Tietz <ktietz@redhat.com>
12590
333d8aff 12591 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
12592 Windows targets.
12593 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12594 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 12595
80ec8b4c 12596 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 12597
8ad150f6
TG
125982011-03-28 Tristan Gingold <gingold@adacore.com>
12599
12600 PR ada/44431
80ec8b4c
EB
12601 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12602 Use ada output of gnatbind.
8ad150f6
TG
12603 (ada/b_gnatb.adb): Ditto.
12604 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12605 (ada.mostlyclean, ada.stage1)
12606 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12607 (ada.stagefeedback): Adjust.
80ec8b4c 12608 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
12609 Use ada output of gnatbind.
12610 (b_gnatm.adb): Ditto.
12611 (b_gnatl.o, b_gnatm.o): New rules.
12612
51c7954d
EB
126132011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12614
12615 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12616 for the padded type built to support a specified size or alignment.
12617
6ddf9843
EB
126182011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12619
12620 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12621 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12622 unconditionally to the end of the unit when the designated type is
12623 limited_with'ed.
12624 <all>: Rename local variable. Attempt to un-defer types only and do it
12625 for limited_with'ed types as well.
12626 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12627 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12628 consistently and remove redundant call to finalize_from_with_types.
12629
5daed84a
EB
126302011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12631
12632 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12633 subprograms without a previous spec declared in the same unit.
12634 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12635 subprograms at the end of the unit instead of at the beginning.
12636 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12637 isn't public for the special handling of non-inline functions nested
12638 inside inline external functions.
12639
0edf1bb2
JL
126402011-03-25 Jeff Law <law@redhat.com>
12641
5daed84a 12642 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 12643
e3c4580e
EB
126442011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12645
12646 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12647 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12648 to compute Set_Size_Depends_On_Discriminant.
12649 (Layout_Type): Call it on array types in back-end layout mode.
12650 * sem_util.adb (Requires_Transient_Scope): Return true for array
12651 types only if the size depends on the value of discriminants.
12652 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12653 type if the RHS is a call to a function that returns an unconstrained
12654 type with default discriminant.
12655
abbc8c7b
EB
126562011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12657
12658 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12659 non-conversion to the nominal result type at the end.
12660
ddb5a105
EB
126612011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12662
12663 * gcc-interface/trans.c (create_temporary): New function taken from...
12664 (create_init_temporary): ...here. Call it.
12665 (call_to_gnu): Create the temporary for the return value early, if any.
12666 Create it for a function with copy-in/copy-out parameters if there is
12667 no target; in other cases of copy-in/copy-out, use another temporary.
12668 Push the new binding level lazily. Add and rename local variables.
12669
0d853156
EB
126702011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12671
12672 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12673 error message.
12674 (set_rm_size): Likewise.
12675
4184ef1b
EB
126762011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12677
12678 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12679 for the padded type built in order to support a specified alignment.
12680 Fix incorrect formatting.
12681
bf7eefab
EB
126822011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12683
12684 PR bootstrap/48216
12685 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12686
ef0feeb2
EB
126872011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12688
12689 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12690 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12691 to the end of the list. Adjust recursive call. Rename local variable.
12692 If REORDER is true, reorder components of the record type.
12693 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12694 components_to_record and adjust the parameter list.
12695
646f9414
EB
126962011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12697
12698 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12699 disabled, use the variable for bounds of loop iteration scheme.
12700
62d784f7
KT
127012011-03-21 Kai Tietz <ktietz@redhat.com>
12702
12703 PR target/12171
0bad0e23 12704 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 12705
f230d759
EB
127062011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12707
12708 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12709 out whether the expression is read-only. Short-circuit placeholder
12710 case and rename a couple of local variables.
12711
bb1f7929
EB
127122011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12713
12714 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12715 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12716 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12717 (convert): Deal with conversions from a smaller form type specially.
12718
400a2d24
EB
127192011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12720
12721 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12722 its argument, except for the special -I- switch.
12723
c26bc3ad
GP
127242011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12725
0bad0e23
EB
12726 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12727 "Ada Issues".
c26bc3ad 12728
07b8e910
EB
127292011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12730
12731 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12732
31a5a547
EB
127332011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12734
12735 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12736 GNAT_FORMAL.
12737 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12738 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12739 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12740 Do not generate the check directly, instead instantiate the template
12741 check present in the descriptor.
12742 (make_descriptor_field): Move around.
12743 (build_vms_descriptor32): Build a template check in the POINTER field.
12744 (build_vms_descriptor): Remove useless suffixes.
12745 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12746
dcf25f59
EB
127472011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12748
12749 PR bootstrap/47467
12750 * targext.c: Include target files if IN_RTS is defined.
12751
0418e131
RG
127522011-01-26 Richard Guenther <rguenther@suse.de>
12753
12754 PR bootstrap/47467
12755 * targext.c: Include config.h.
12756 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12757 dependency.
12758
c6eecbd8 127592011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 12760 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
12761
12762 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12763
2d3c7e4f
EB
127642011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12765
12766 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12767 end-of-case on the end label and its associated gotos, if any.
12768
0394741f
EB
127692011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12770
12771 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12772 expressions of the parameter cache within the statement group of
12773 the CICO mechanism.
12774
2a02d090 127752011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 12776 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
12777
12778 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12779 (set_end_locus_from_node): New function.
12780 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12781 make and the function end_locus.
12782 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12783 for the elaboration subprogram.
12784 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12785 set the end_locus of the expression as well.
12786
89f5e978
EB
127872011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12788
12789 PR ada/47131
12790 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12791 variables that are referenced in exception handlers volatile.
12792
12793
ad41bd84 12794\f
797103eb 12795Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
12796
12797Copying and distribution of this file, with or without modification,
12798are permitted in any medium without royalty provided the copyright
12799notice and this notice are preserved.