]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
Fix typo.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
83de674b
AC
12011-09-02 Robert Dewar <dewar@adacore.com>
2
3 * s-rident.ads: Add new restriction No_Implicit_Aliasing
4 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
5 No_Implicit_Aliasing
6 (Analyze_Attribute, case Address): ditto
7 (Analyze_Attribute, case Unrestricted_Access): ditto
8 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
9 No_Implicit_Aliasing restriction.
10 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
11
122011-09-02 Ed Schonberg <schonberg@adacore.com>
13
14 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
15 is an unchecked conversion, apply test to its expression.
16
172011-09-02 Javier Miranda <miranda@adacore.com>
18
19 * sem_ch3.adb (Check_Abstract_Overriding): When
20 traversing the chain of aliased subprograms avoid reporting a
21 redundant error on the current entity.
22
232011-09-02 Sergey Rybin <rybin@adacore.com>
24
25 * gnat_ugn.texi: Minor clean up.
26
272011-09-02 Bob Duff <duff@adacore.com>
28
29 * s-htable.adb (Set_If_Not_Present): Use renaming
30 instead of ":=", because the type Key is limited in the generic (even
31 if not in the instances).
32
2c17ca0a
AC
332011-09-02 Robert Dewar <dewar@adacore.com>
34
35 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
36 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
37 reformatting.
38
392011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
40
41 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
42 inherited component with the enclosing derived type. Code reformatting.
43
442011-09-02 Gary Dismukes <dismukes@adacore.com>
45
46 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
47 return done when overflow checks are enabled, since comparisons against
48 Lor and Hir should not be done when OK1 is False.
49
502011-09-02 Gary Dismukes <dismukes@adacore.com>
51
52 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
53 Add new formal Master_Exp. When present, add that expression to the
54 call as an extra actual.
55 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
56 Fmaster_Actual and in the case of a BIP call initializing a return
57 object of an enclosing BIP function set it to a
58 new reference to the implicit finalization master
59 formal of the enclosing function. Fmaster_Actual is
60 then passed to the new formal Master_Exp on the call to
61 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
62 initializations of Enclosing_Func to its declaration.
63
642011-09-02 Thomas Quinot <quinot@adacore.com>
65
66 * csets.ads: Minor reformatting
67
682011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
69
70 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
71 the full view of a private type coming from an instantiation.
72 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
73 loop to iterate over the declarations rather than use the
74 First_Entity / Next_Entity scheme.
75
ed32b82e
ES
762011-09-02 Ed Schonberg <schonberg@adacore.com>
77
78 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
79 X'range (N) into X'First (N) .. X'Last (N), do not share the
80 dimension indicator N, if present. Even though it is a static
81 constant, its source location may be modified when printing
82 expanded code under -gnatDL, and node sharing will lead to chaos
83 in Sprint on large files, by generating a sloc value that does
84 not correspond to any source file.
85
f7bb41af
AC
862011-09-02 Bob Duff <duff@adacore.com>
87
88 * einfo.adb: (Has_Xref_Entry): Do not call
89 Implementation_Base_Type. Lib.Xref has been
90 rewritten to avoid the need for it, and it was costly.
91 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
92 functions in support of efficient xref.
93 * lib-xref-alfa.adb: Misc changes related to Key component of
94 type Xref_Entry.
95 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
96 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
97 no longer does. This is the one place where it is needed.
98
992011-09-02 Johannes Kanig <kanig@adacore.com>
100
101 * g-comlin.adb (Getopt): New optional argument Concatenate to have
102 similar interface as the other Getopt function.
103
1042011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
105
106 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
107 a call to Set_Finalize_Address if there is no allocator available.
108 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
109 a case of allocator expansion where the allocator is not expanded but
110 needs a custom allocate routine. Code reformatting.
111 (Is_Finalizable_Transient): Remove local variables Has_Rens and
112 Ren_Obj. Code reformatting.
113 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
114 through the use of 'reference.
115 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
116 as part of build-in-place expansion. They are intentionally marked as
117 coming from source, but their parents are not.
118
bd0bc43e
AC
1192011-09-02 Ed Schonberg <schonberg@adacore.com>
120
121 * sem_ch10.adb (Analyze_With_Clause): If the library unit
122 is the generated subprogram declaration for a child unit body
123 that acts as spec, use the original body in the with_clause,
124 to prevent binding errors.
125
1262011-09-02 Vincent Celier <celier@adacore.com>
127
128 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
129 qualifier /MULTI_UNIT_INDEX=
130
1312011-09-02 Johannes Kanig <kanig@adacore.com>
132
133 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
134 instead of calling the callback function
135
9fdb5d21
RD
1362011-09-02 Robert Dewar <dewar@adacore.com>
137
138 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
139 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
140
c6d5d1ac
AC
1412011-09-02 Vincent Celier <celier@adacore.com>
142
143 * prj-nmsc.adb: (Find_Sources): When the list of sources is
144 explicitly declared in an extending project, do not warn if a source
145 for an inherited naming exception is not found.
146
1472011-09-02 Gary Dismukes <dismukes@adacore.com>
148
149 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
150 expansion is inactive.
151
1522011-09-02 Ed Schonberg <schonberg@adacore.com>
153
154 * sem_util.adb (Note_Possible_Modification): If the entity
155 being modified is the renaming generated for an Ada2012 iterator
156 element, the enclosing container or array is modified as well.
157
2ba1a7c7
AC
1582011-09-02 Jose Ruiz <ruiz@adacore.com>
159
160 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
161 Initialize): Define and initialize the
162 mutex attributes and condition variable attributes locally.
163
1642011-09-02 Vincent Celier <celier@adacore.com>
165
166 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
167 exception replaced in an extending project.
168 (Check_Object): No error when the other source is locally removed.
169
1702011-09-02 Yannick Moy <moy@adacore.com>
171
172 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
173 unresolved calls.
174
d51813db
AC
1752011-08-31 Arnaud Charlet <charlet@adacore.com>
176
177 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
178 run-time files.
179 * gcc-interface/Make-lang.in: Update dependencies.
180
9f55bc62
AC
1812011-09-01 Robert Dewar <dewar@adacore.com>
182
183 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
184
1852011-09-01 Jose Ruiz <ruiz@adacore.com>
186
187 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
188 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
189 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
190 specific for systems where their glibc version does not define the
191 routines to handle dynamically allocated CPU sets.
192
1932011-09-01 Vincent Celier <celier@adacore.com>
194
195 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
196 prj-env.adb: Implement inheritance of naming exceptions in extending
197 projects.
198
d7386a7a
AC
1992011-09-01 Romain Berrendonner <berrendo@adacore.com>
200
201 * gnatls.adb: Display simple message instead of content of
202 gnatlic.adl.
203
2042011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
205
206 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
207 access discriminant and anonymous access component scopes.
208 (Inherit_Component): Reuse the itype of an access discriminant
209 or anonymous access component by copying it in order to set the proper
210 scope. This is done only when the parent and the derived type
211 are in different scopes.
212 (Set_Anonymous_Etype): New routine.
213
2142011-09-01 Robert Dewar <dewar@adacore.com>
215
216 * a-convec.adb: Minor reformatting throughout.
217
9d1e0e72
JR
2182011-09-01 Jose Ruiz <ruiz@adacore.com>
219
220 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
221 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
222 CPU_ALLOC_SIZE and CPU_FREE linux macros.
223 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
224 CPU_SET_S respectively because we are now using dynamically allocated
225 CPU sets which are more portable across different glibc versions.
226 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
227 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
228 masks dynamically according to the number of processors in the target
229 platform.
230 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
231 respectively, so we need to pass the size of the masks as
232 parameters.
233 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
234 created cpu_set_t masks
235 with the number of processors available in the target platform,
236 instead of static bit arrays. It enhances portability because
237 it uses the information from the target platform.
238 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
239 are using a restricted run-time library, use the flag
240 Configurable_Run_Time_Mode instead of Restricted_Profile.
241
a95be2d4
AC
2422011-09-01 Vincent Celier <celier@adacore.com>
243
244 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
245 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
246
2472011-09-01 Nicolas Roche <roche@adacore.com>
248
249 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
250 on VxWorks in kernel mode.
251
6b81741c
AC
2522011-09-01 Jose Ruiz <ruiz@adacore.com>
253
254 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
255 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
256 directly the bit array.
257 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
258 the linux macros with the same name.
259 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
260 wrappers around the CPU_ZERO and CPU_SET linux macros.
261
2622011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
263
264 * exp_ch7.adb (Find_Insertion_List): Removed.
265 (Process_Transient_Objects): Insert the declarations of the hook
266 access type and the hook object before the associated transient object.
267
2682011-09-01 Jose Ruiz <ruiz@adacore.com>
269
270 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
271 package System.Aux_Dec when using restricted run-time libraries which
272 do not have this package.
273
2742011-09-01 Tristan Gingold <gingold@adacore.com>
275
276 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
277
2782011-09-01 Bob Duff <duff@adacore.com>
279
280 * sem_attr.adb (Analyze_Access_Attribute): Do not call
281 Kill_Current_Values for P'Unrestricted_Access, where P is library level
282
2832011-09-01 Thomas Quinot <quinot@adacore.com>
284
285 * exp_ch5.adb: Minor reformatting
286 * gnat_ugn.texi: Fix minor typos.
287 * gcc-interface/Make-lang.in: Update dependencies.
288
8256c1bf
AC
2892011-09-01 Robert Dewar <dewar@adacore.com>
290
291 * inline.adb, sem_aggr.adb: Minor reformatting.
292
2932011-09-01 Ed Schonberg <schonberg@adacore.com>
294
295 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
296
d1c5f424
AC
2972011-09-01 Robert Dewar <dewar@adacore.com>
298
299 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
300
3012011-09-01 Bob Duff <duff@adacore.com>
302
303 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
304 body" the same as "in inlined body", because visibility shouldn't
305 apply there.
306
3072011-09-01 Eric Botcazou <ebotcazou@adacore.com>
308
309 * inline.adb (Add_Inlined_Body): Refine previous change.
310
1bb6e262
AC
3112011-09-01 Gary Dismukes <dismukes@adacore.com>
312
313 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
314 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
315 Test for case where call
316 initializes an object of a return statement before testing for
317 a constrained call, to ensure that all such cases get handled
318 by simply passing on the caller's parameters. Also, in that
319 case call Needs_BIP_Alloc_Form to determine whether to pass on
320 the BIP_Alloc_Form parameter of the enclosing function rather
321 than testing Is_Constrained. Add similar tests for the return
322 of a BIP call to later processing to ensure consistent handling.
323 (Needs_BIP_Alloc_Form): New utility function.
324 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
325 a BIP_Alloc_Form formal with call to new utility function
326 Needs_BIP_Alloc_Form.
327
3282011-09-01 Pascal Obry <obry@adacore.com>
329
330 * prj-part.adb: Minor reformatting.
331
3322011-09-01 Vincent Celier <celier@adacore.com>
333
334 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
335 half character in the unit name.
336
db15225a
AC
3372011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
338
339 * exp_ch4.adb: Minor code and comment reformatting.
340
3412011-09-01 Thomas Quinot <quinot@adacore.com>
342
343 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
344 for Is_Limited_Type and Is_Tagged_Type in condition checking
345 for by-reference type.
346 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
347 subprograms may have a completion because of a previous
348 Inline_Always clause, but the enclosing package must be marked
349 inlined for the subprogram body to become visible to the backend.
350
9d641fc0
TQ
3512011-09-01 Thomas Quinot <quinot@adacore.com>
352
353 * sem_aux.adb, exp_ch4.adb: Minor reformatting
354
dbe36d67
AC
3552011-09-01 Pascal Obry <obry@adacore.com>
356
357 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
358
3592011-09-01 Ed Schonberg <schonberg@adacore.com>
360
361 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
362 the formals of a subprogram stub that acts as a spec.
363
3642011-09-01 Ed Schonberg <schonberg@adacore.com>
365
366 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
367 type, declare a renaming for it, not an object declaration.
368
f5037886
AC
3692011-09-01 Yannick Moy <moy@adacore.com>
370
371 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
372 Ignore_Errors to ignore failures to read ALI files when True.
373
3742011-09-01 Javier Miranda <miranda@adacore.com>
375
376 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
377 constructor calls associated with non-tagged record types.
378
3792011-09-01 Robert Dewar <dewar@adacore.com>
380
381 * g-socthi-vms.adb: Minor reformatting.
382
3832011-09-01 Nicolas Roche <roche@adacore.com>
384
385 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
386 in order to avoid impact of imcompatible changes.
387 * cstreams.c: Likewise
388 * cio.c: Likewise
389 * aux-io.c: Likewise
390
3912011-09-01 Yannick Moy <moy@adacore.com>
392
393 * lib-writ.adb (Write_With_Lines): Always output complete information
394 on "with" line in Alfa mode, as this is required by formal verification
395 back-end.
396
549e4558
AC
3972011-09-01 Tristan Gingold <gingold@adacore.com>
398
399 * g-socthi-vms.adb: Add comments.
400
4012011-09-01 Pascal Obry <obry@adacore.com>
402
403 * prj.ads: Minor reformatting.
404
70c0422d
AC
4052011-09-01 Vincent Celier <celier@adacore.com>
406
407 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
408 exceptions in the config pragmas file.
409
4102011-09-01 Tristan Gingold <gingold@adacore.com>
411
412 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
413
8c5b03a0
AC
4142011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
415
416 * exp_ch7.adb (Find_Insertion_List): New routine.
417 (Process_Transient_Objects): Add code to handle the abnormal
418 finalization of a controlled transient associated with a subprogram
419 call. Since transients are cleaned up right after the associated
420 context, an exception raised during a subprogram call may bypass the
421 finalization code.
422
4232011-09-01 Robert Dewar <dewar@adacore.com>
424
425 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
426 aliased.
427
3040dbd4
RD
4282011-09-01 Robert Dewar <dewar@adacore.com>
429
430 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
431
fecbd779
AC
4322011-09-01 Robert Dewar <dewar@adacore.com>
433
434 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
435
4362011-09-01 Thomas Quinot <quinot@adacore.com>
437
438 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
439 GNATRTL_NONTASKING_OBJS.
440
4412011-09-01 Robert Dewar <dewar@adacore.com>
442
443 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
444 possibility of this flag being set for formals in Ada 2012 mode.
445 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
446 2012.
447 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
448 mode.
449 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
450 Ada 2012.
451 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
452 Ada 2012.
453
4542011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
455
456 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
457 insertion node in a tree of nested Expression_With_Actions nodes.
458 (Process_Transient_Object): In the case where a complex if statement
459 has been converted into nested Expression_With_Actions nodes, the
460 "hook" object and the associated access type must be inserted before
461 the top most Expression_With_Actions.
462
516f608f
AC
4632011-09-01 Robert Dewar <dewar@adacore.com>
464
465 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
466 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
467
4682011-09-01 Ed Schonberg <schonberg@adacore.com>
469
470 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
471
4722011-09-01 Jose Ruiz <ruiz@adacore.com>
473
474 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
475 aspect.
476 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
477 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
478 in a similar way as we do for the Priority or Dispatching_Domain aspect.
479 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
480 Dispatching_Domains_Frozen): Move this local data to package
481 System.Tasking because with the CPU aspect we need to have access
482 to this data when creating the task in System.Tasking.Stages.Create_Task
483 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
484 Move these variables from the body of
485 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
486 we need to have access to this data when creating the task in
487 System.Tasking.Stages.Create_Task.
488 * s-taskin.adb (Initialize): Signal the allocation of the environment
489 task to a CPU, if any, so that we know whether the CPU can be
490 transferred to a different dispatching domain.
491 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
492 is being allocated belongs to the dispatching domain where the task
493 lives. Signal the allocation of the task to a CPU, if any, so that we
494 know whether the CPU can be transferred to a different dispatching
495 domain.
496
2d42e881
ES
4972011-09-01 Ed Schonberg <schonberg@adacore.com>
498
499 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
500 attributes Same_Storage and Overlaps_Storage.
501
579fda56
AC
5022011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
503
504 * exp_strm.adb: Remove with and use clause for Opt.
505 (Build_Array_Input_Function): Remove the version-dependent generation
506 of the return statement. The Ada 2005 tree is now the default.
507
5082011-09-01 Yannick Moy <moy@adacore.com>
509
510 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
511 it is never empty when compiling in Alfa mode.
512
5132011-09-01 Robert Dewar <dewar@adacore.com>
514
515 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
516 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
517 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
518 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
519
5202011-09-01 Matthew Heaney <heaney@adacore.com>
521
522 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
523 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
524 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
525 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
526 unbounded queue container.
527 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
528 bounded queue container.
529 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
530 unbounded priority queue container.
531 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
532 bounded priority queue container.
533
24c34107
AC
5342011-08-31 Pascal Obry <obry@adacore.com>
535
536 * a-direct.adb: Do not try to create an UNC path on Windows.
537 (Create_Path): Skip leading computer name in UNC path if any.
538
5392011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
540
541 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
542 version-dependent generation of the return statement. The Ada 2005 tree
543 is now the default.
544
5452011-08-31 Thomas Quinot <quinot@adacore.com>
546
547 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
548 types Stream_Element_Offset and Storage_Offset have a different native
549 type depending on whether the platform is 32 or 64 bits. When
550 exchanging them, always convert to 64 bits.
551
5522011-08-31 Yannick Moy <moy@adacore.com>
553
554 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
555 --force-alfa to gnat2why.
556
5572011-08-31 Ed Schonberg <schonberg@adacore.com>
558
559 * sem_ch12.adb (Save_References): If the node has aspects, save
560 references within the corresponding expressions in a separate step,
561 because the aspects are not directly in the tree for the declaration
562 to which they belong.
563
5642011-08-31 Arnaud Charlet <charlet@adacore.com>
565
566 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
567 in CodePeer mode, since representation clauses are partially ignored.
568 * gcc-interface/Make-lang.in: Update dependencies.
569
702d2020
AC
5702011-08-31 Jose Ruiz <ruiz@adacore.com>
571
572 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
573 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
574 to any dispatching domain.
575
5762011-08-31 Thomas Quinot <quinot@adacore.com>
577
578 * exp_ch4.adb: Minor reformatting.
579
5802011-08-31 Bob Duff <duff@adacore.com>
581
582 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
583 on nodes for which it is not defined.
584 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
585 parent type.
586
5872011-08-31 Bob Duff <duff@adacore.com>
588
589 * sem_ch3.adb (Process_Full_View): Disable legality check if
590 In_Instance, to avoid spurious errors.
591 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
592 if In_Instance, to avoid spurious errors.
593
5942011-08-31 Pascal Obry <obry@adacore.com>
595
596 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
597 directory speparators.
598 (Compose): Use Dir_Seps to handle both forms.
599 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
600 changes.
601 (Extension): Use Dir_Seps to handle both forms.
602
6032011-08-31 Pascal Obry <obry@adacore.com>
604
605 * prj-conf.adb: Minor reformatting.
606
67645bde
AC
6072011-08-31 Jose Ruiz <ruiz@adacore.com>
608
609 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
610 dispatching domain aspect.
611 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
612 aspect.
613 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
614 Dispatching_Domain aspect in a similar way as we do for the Priority
615 aspect.
616 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
617 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
618 is present.
619 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
620 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
621 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
622 Dispatching_Domain and add it to the task definition.
623 (Sig_Flags): Add Pragma_Dispatching_Domain.
624 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
625 support to find the types Dispatching_Domain and
626 Dispatching_Domain_Access.
627 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
628 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
629 query the availability of a pragma Dispatching_Domain.
630 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
631 the expander to pass the Dispatching_Domain when creating a task.
632 (Name_Dispatching_Domain): Add this new name for a pragma.
633 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
634 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
635 task has been allocated at creation time.
636 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
637 Ravenscar is always null.
638 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
639 the task has been allocated at creation time.
640 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
641 a specific dispatching domain.
642 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
643 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
644 and CPU are specified for the task, and the CPU value is not contained
645 within the range of processors for the domain.
646
6472011-08-31 Vincent Celier <celier@adacore.com>
648
649 * make.adb (Original_Gcc) : New constant String_Access.
650 (Gnatmake): For VM targets, do not use VM version of the compiler if
651 --GCC= has been specified.
652
6532011-08-31 Thomas Quinot <quinot@adacore.com>
654
655 * sem_ch5.adb: Minor reformatting.
656
6572011-08-31 Ed Schonberg <schonberg@adacore.com>
658
659 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
660 not reanalyze it.
661
6622011-08-31 Bob Duff <duff@adacore.com>
663
664 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
665 the access type is private; we don't care about privacy in expansion.
666
6672011-08-31 Ed Schonberg <schonberg@adacore.com>
668
669 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
670 subcomponents tnat may be limited, because they originate in view
671 conflicts. If the original aggregate is legal and the actuals are
672 legal, the aggregate itself is legal.
673
b8789727
AC
6742011-08-31 Matthew Heaney <heaney@adacore.com>
675
676 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
677 status.
678
6792011-08-31 Ed Schonberg <schonberg@adacore.com>
680
681 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
682 errors in B tests.
683
6842011-08-31 Jose Ruiz <ruiz@adacore.com>
685
686 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
687 Interrupt_Priority aspects, force the analysis of the aspect expression
688 (when building the equivalent pragma). Otherwise, its analysis is done
689 too late, after the task or protected object has been created.
690 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
691 Analyze_Single_Task_Declaration): Remove the code to move the aspects
692 to the object declaration because they are needed in the type
693 declaration.
694
e0c32166
AC
6952011-08-31 Robert Dewar <dewar@adacore.com>
696
697 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
698 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
699 reformatting.
700
7012011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
702
703 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
704 if the corresponding type is malformed due to restriction violations.
705
7062011-08-31 Robert Dewar <dewar@adacore.com>
707
708 * s-ransee.ads, s-ransee.adb: Minor reformatting.
709
7102011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
711
712 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
713 would cause the generation of Set_Finalize_Address if the target is a
714 VM and the designated type is not derived from [Limited_]Controlled.
715
7162011-08-31 Arnaud Charlet <charlet@adacore.com>
717
718 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
719 subprogram.
720 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
721 case of a compilation error.
722
7232011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
724
725 * init.c (__gnat_error_handler): Standardize the stack overflow or
726 erroneous memory access message.
727 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
728 or erroneous memory access message.
729
11bc76df
AC
7302011-08-31 Robert Dewar <dewar@adacore.com>
731
732 * sem_ch4.adb: Minor reformatting.
733 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
734
7352011-08-31 Thomas Quinot <quinot@adacore.com>
736
737 * scos.ads: Minor documentation clarification.
738 * put_scos.adb: Do not generate SCO unit header line for a unit that
739 has no SCO lines.
740
876d4394
RD
7412011-08-31 Robert Dewar <dewar@adacore.com>
742
743 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
744
36b8f95f
AC
7452011-08-31 Tristan Gingold <gingold@adacore.com>
746
747 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
748 hold variables between these following subprograms.
749 (Build_Exception_Handler, Build_Object_Declarations,
750 Build_Raise_Statement): Use the above type as parameter.
751 Make the above adjustments.
752 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
753
7542011-08-31 Pascal Obry <obry@adacore.com>
755
756 * projects.texi: Minor reformatting.
757
7582011-08-31 Tristan Gingold <gingold@adacore.com>
759
760 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
761 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
762
7632011-08-31 Ed Schonberg <schonberg@adacore.com>
764
765 * exp_ch5.adb: Minor code cleanup.
766 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
767 prevent cascaded errors.
768 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
769 variable of an iterator specification in current scope.
770 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
771 postconditions on the stack, as they contain no return statements.
772
7732011-08-31 Yannick Moy <moy@adacore.com>
774
775 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
776 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
777 call Qualify_Entity_Names.
778 (Expand_Alfa): call Qualify_Entity_Names in more cases
779 * lib-xref-alfa.adb: Take into account system package.
780 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
781 CodePeer mode in which we are interested in finding bugs even if
782 compiler cannot compile source.
783 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
784 deferred constant.
785
7862011-08-31 Gary Dismukes <dismukes@adacore.com>
787
788 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
789 denoted by the subtype mark to ensure getting the concurrent type in
790 the case where the subtype mark denotes a private subtype of a
791 concurrent type (needed when using -gnatc).
792 (Process_Subtype): For the processing specific to type kinds, case on
793 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
794 subtype denotes a private subtype whose base type is nonprivate (needed
795 for subtypes of private fulfilled by task types when compiling with
796 -gnatc).
797
7982011-08-31 Gary Dismukes <dismukes@adacore.com>
799
800 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
801 late primitives that override interface operations when the full
802 expander is not active, to avoid blowups in Register_Primitive when
803 types don't have associated secondary dispatch tables.
804
8052011-08-31 Yannick Moy <moy@adacore.com>
806
807 * alfa_test.adb: Code clean up.
808
8092011-08-31 Marc Sango <sango@adacore.com>
810
811 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
812 by Comes_From_Source (Original_Node (N)) in order to treat also the
813 nodes which have been rewritten.
814 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
815 explicit dereference and slice violation in spark mode on the nodes
816 coming only from the source code.
817
8cf23b91
AC
8182011-08-31 Robert Dewar <dewar@adacore.com>
819
820 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
821 lib-xref-alfa.adb: Minor reformatting.
822
8232011-08-31 Matthew Heaney <heaney@adacore.com>
824
825 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
826
8272011-08-31 Javier Miranda <miranda@adacore.com>
828
829 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
830 only for class-wide subprograms conflicting with entities of concurrent
831 tagged types.
832
8332011-08-31 Matthew Heaney <heaney@adacore.com>
834
835 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
836 node to null value.
837
8382011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
839
840 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
841 general description of the routine.
842
8432011-08-31 Ed Schonberg <schonberg@adacore.com>
844
845 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
846 doubly-linked lists.
847
0bb3bfb8
GD
8482011-08-31 Gary Dismukes <dismukes@adacore.com>
849
850 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
851 check is needed for a left-hand side that is a dereference, and the
852 base type is private without discriminants (whereas the full type does
853 have discriminants), an extra retrieval of the underlying type may be
854 needed in the case where the subtype is a record subtype whose base
855 type is private. Update comments.
856
11fa950b
AC
8572011-08-31 Javier Miranda <miranda@adacore.com>
858
859 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
860 found check if there is a class-wide subprogram covering the primitive.
861
8622011-08-31 Yannick Moy <moy@adacore.com>
863
864 * sem_res.adb: Further cases where full expansion test is needed,
865 rather than expansion test.
866
8672011-08-31 Pascal Obry <obry@adacore.com>
868
869 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
870
8712011-08-31 Ed Schonberg <schonberg@adacore.com>
872
873 * exp_ch5.adb: Handle iterators over derived container types.
874
8752011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
876
877 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
878 (Has_Anonymous_Master): New routine.
879 (Set_Has_Anonymous_Master): New routine.
880 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
881 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
882 (Current_Anonymous_Master): New routine.
883 (Current_Unit_First_Declaration): Removed.
884 (Current_Unit_Scope): Removed.
885 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
886 their objects on a per-unit heterogeneous finalization master.
887
8882011-08-31 Matthew Heaney <heaney@adacore.com>
889
890 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
891 array.
892
8932011-08-31 Jose Ruiz <ruiz@adacore.com>
894
895 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
896 when not needed.
897
8982011-08-31 Gary Dismukes <dismukes@adacore.com>
899
900 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
901 where the actual is an unexpanded call to 'Input.
902
d2b4b3da
AC
9032011-08-31 Yannick Moy <moy@adacore.com>
904
905 * sem_ch4.adb: Code clean up.
906
9072011-08-31 Yannick Moy <moy@adacore.com>
908
909 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
910
9112011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
912
913 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
914 and TSS primitive Finalize_Address if finalization is suppressed.
915 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
916 primitive Finalize_Address if finalization is suppressed.
917
9182011-08-31 Jose Ruiz <ruiz@adacore.com>
919
920 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
921 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
922 sure that the underlying task has already been created before trying
923 to change its affinity.
924 (Set_CPU): Use the term processor instead of CPU, as we do in
925 Assign_Task.
926
9272011-08-31 Vincent Celier <celier@adacore.com>
928
929 * prj-attr.adb: New Compiler attribute Source_File_Switches.
930 * prj-nmsc.adb (Process_Compiler): Process attribute
931 Source_File_Switches.
932 * prj.ads (Language_Config): New name list component
933 Name_Source_File_Switches.
934 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
935
9362011-08-31 Ed Schonberg <schonberg@adacore.com>
937
938 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
939 discriminated component of an actual, expand at once to prevent
940 ouf-of-order references with generated subtypes.
941
9422011-08-31 Yannick Moy <moy@adacore.com>
943
944 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
945 reference to operator in Alfa xrefs.
946
9472011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
948
949 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
950 where the parent instance was frozen before the current instance due to
951 the presence of a source body. Update calls to Insert_After_Last_Decl.
952 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
953 Update the comment which illustrates the purpose of the routine.
954 Package instances are now frozen by source bodies which appear after
955 the instance. This ensures that entities coming from within the
956 instance are available for use in the said bodies.
957 (Install_Body): Add code to handle the case where the parent instance
958 was frozen before the current instance due to the presence of a source
959 body. Update calls to Insert_After_Last_Decl.
960
56812278
AC
9612011-08-31 Jose Ruiz <ruiz@adacore.com>
962
963 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
964 access types.
965 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
966
9672011-08-31 Yannick Moy <moy@adacore.com>
968
969 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
970 full-expander test.
16c3301a
AC
971 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
972 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
973 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
974 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
975 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
976 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
977 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
978 ALFA in Alfa (we dropped acronym).
56812278
AC
979 * einfo.adb (Primitive_Operations): Correctly return list of primitive
980 operations in a case where it returned previously No_Elist.
981
7cda9727
RD
9822011-08-31 Robert Dewar <dewar@adacore.com>
983
984 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
985 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
986 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
987 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
988 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
989 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
990 reformatting.
991
0a190dfd
AC
9922011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
993
994 * sem_ch12 (Check_Private_View): Revert previous change.
995 * sem_res.adb (Conversion_Check): Do not emit the error message if the
996 conversion is in a generic instance.
997
9982011-08-31 Matthew Heaney <heaney@adacore.com>
999
1000 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
1001 * a-chtgbo.adb (Free): Allow 0 as index value.
1002
10032011-08-31 Matthew Heaney <heaney@adacore.com>
1004
1005 * a-cborma.adb (Insert): Add comment to explain why no element
1006 assignment.
1007
10082011-08-31 Gary Dismukes <dismukes@adacore.com>
1009
1010 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
1011 spec discriminant is already a concurrent type, in which case just use
1012 it, otherwise fetch the Corresponding_Concurrent_Type as before.
1013
7d266442
EB
10142011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1015
1016 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
1017 system-linux-mips.ads, system-linux-mipsel.ads,
1018 system-linux-mips64el.ads, system-linux-ppc64.ads,
1019 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
1020
4f1a975c
EB
10212011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1022
1023 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
1024 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
1025 (build_unary_op): Likewise.
1026
f2991b48
EB
10272011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1028
1029 * raise-gcc.c: Do not include coretypes.h and tm.h.
1030 (setup_to_install): Remove test for compiler macro.
1031 * targext.c: Document use for the library.
1032 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
1033
10a22f43
EB
10342011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1035
1036 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
1037 the expression to the nominal type if the latter is a record type with
1038 a variant part and the type of the former is a record type without one.
1039
bfa2e39d
AC
10402011-08-30 Yannick Moy <moy@adacore.com>
1041
1042 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1043 expansion in Alfa mode.
1044 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
1045 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
1046 Alfa mode.
1047 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
1048 * sem_res.adb: Ditto.
bd34109a 1049 * gcc-interface/Make-lang.in: Update dependencies.
bfa2e39d
AC
1050
10512011-08-30 Thomas Quinot <quinot@adacore.com>
1052
1053 * g-socket.ads: Minor documentation adjustment.
1054
a0347839
AC
10552011-08-30 Robert Dewar <dewar@adacore.com>
1056
1057 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
1058
10592011-08-30 Yannick Moy <moy@adacore.com>
1060
1061 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
1062 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
1063 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
1064 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
1065 Revert change which introduced files for "light"
1066 expansion, to be replaced by a single file for Alfa expansion.
1067
3597c0e9
RD
10682011-08-30 Robert Dewar <dewar@adacore.com>
1069
1070 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
1071 Minor code reorg/reformatting.
1072
da94696d
AC
10732011-08-30 Yannick Moy <moy@adacore.com>
1074
1075 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
1076 common shorthand for (Expander_Active and not ALFA_Mode) that can be
1077 used for testing full expansion, that is active expansion not in the
1078 reduced mode for Alfa
1079 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
1080 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
1081 of the verbose (Expander_Active and not ALFA_Mode)
1082
10832011-08-30 Tristan Gingold <gingold@adacore.com>
1084
1085 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
1086 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5b8ca141
TG
1087 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
1088 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
da94696d 1089
c199ccf7
AC
10902011-08-30 Gary Dismukes <dismukes@adacore.com>
1091
1092 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
1093 access conversions to check that the conversion is a rewritten node,
1094 rather than just having Comes_From_Source set to False, which wasn't
1095 sufficient.
1096
10972011-08-30 Robert Dewar <dewar@adacore.com>
1098
1099 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
1100 g-socket.ads: Minor reformatting.
1101
11022011-08-30 Thomas Quinot <quinot@adacore.com>
1103
1104 * sem_util.adb: Minor reformatting.
1105
11062011-08-30 Tristan Gingold <gingold@adacore.com>
1107
1108 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
1109 to be compliant with the ABI.
1110
dff99e1a
AC
11112011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1112
1113 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
1114 of a designated type when the related access type is an actual in an
1115 instance. This ensures that the full view of designated type is
1116 available when inside the body of the instance.
1117
11182011-08-30 Ed Schonberg <schonberg@adacore.com>
1119
1120 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
1121 in a position to be modified, a slice is treated like an indexed
1122 component.
1123
63be2a5a
AC
11242011-08-30 Thomas Quinot <quinot@adacore.com>
1125
1126 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
1127 field tv_sec in struct timeval.
1128
11292011-08-30 Yannick Moy <moy@adacore.com>
1130
1131 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
1132 blocks of code doing full expansion, previously only guarded by
1133 Expander_Active, by anding the test that ALFA_Mode is not set
1134
11352011-08-30 Ed Schonberg <schonberg@adacore.com>
1136
1137 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
1138 add the function to the list of private dependents, for subsequent
1139 legality check on Taft amendment types.
1140 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
1141 Private_Dependents, as for other incomplete types.
1142 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
1143 Taft-amendment type is used as the return type of a function.
1144
dd54644b
JM
11452011-08-30 Javier Miranda <miranda@adacore.com>
1146
1147 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
1148 which emits an error by a call to a new routine which report the error.
1149 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
1150 entity does not cover an existing interface.
1151 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
1152 code.
1153 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
1154 protected procedures or entries whose mode is not conformant.
1155 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
1156 an error by a call to a new routine which report the error.
1157
d3ba478e
AC
11582011-08-30 Robert Dewar <dewar@adacore.com>
1159
1160 * gnat_rm.texi: Minor change.
1161 * exp_attr_light.adb: Minor reformatting.
1162
11632011-08-30 Ed Schonberg <schonberg@adacore.com>
1164
1165 * sem_ch3.adb: Patch inheritance of aspects in
1166 Complete_Private_Subtype, to avoid infinite loop.
1167
c01817d2
AC
11682011-08-30 Javier Miranda <miranda@adacore.com>
1169
1170 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
1171 been reported and a subprogram covering an interface primitive is not
1172 found then skip generating the internal entity. Done to avoid crashing
1173 the frontend.
1174 (Check_Abstract_Overriding): Change text of error of wrong formal of
1175 protected subprogram or entry. Done for consistency to emit exactly the
1176 same error reported by Check_Synchronized_Overriding. In addition, the
1177 error is restricted to protected types (bug found working on AI05-0090)
1178
11792011-08-30 Yannick Moy <moy@adacore.com>
1180
1181 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1182 expansion in Alfa mode.
1183 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
1184 * exp_light.adb, exp_light.ads: New package defining light expansion.
1185 * expander.adb (Expand): Call light expansion in Alfa mode
1186 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
1187 constructs.
1188 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
1189 constructs.
1190 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
1191 * gnat1drv.adb (Adjust_Global_Switches): Comment
1192
11932011-08-30 Yannick Moy <moy@adacore.com>
1194
1195 * lib-xref-alfa.adb: Minor refactoring.
1196
11972011-08-30 Yannick Moy <moy@adacore.com>
1198
1199 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
1200 mode.
1201 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
1202 expansion in Alfa mode.
1203 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
1204 mode.
1205
12062011-08-30 Robert Dewar <dewar@adacore.com>
1207
1208 * debug_a.adb: Update comment.
1209
996c8821
RD
12102011-08-30 Robert Dewar <dewar@adacore.com>
1211
1212 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
1213 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
1214 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
1215 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
1216
12172011-08-30 Robert Dewar <dewar@adacore.com>
1218
1219 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
1220 volatile.
1221
3647ca26
HK
12222011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1223
1224 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
1225 Build_Finalization_Master by supplying an insertion node and enclosing
1226 scope. In its old version, the call did not generate a finalization
1227 master.
1228 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
1229 recognize anonymous access-to-controlled components. Rewrite the
1230 machinery which creates finalization masters to service anonymous
1231 access-to-controlled components of a record type. In its current state,
1232 only one heterogeneous master is necessary to handle multiple anonymous
1233 components.
1234 (Freeze_Type): Comment reformatting.
1235 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
1236 RE_Unit_Table.
1237 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
1238 associates TSS primitive Finalize_Address with either the master itself
1239 or with the internal hash table depending on the mode of operation of
1240 the master.
1241
6d4e4fbc
JM
12422011-08-30 Javier Miranda <miranda@adacore.com>
1243
1244 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1245 interface type then do not generate code to compare this component.
1246 Required since they have no components and their equality operator is
1247 abstract.
1248
d15f9422
AC
12492011-08-30 Steve Baird <baird@adacore.com>
1250
1251 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1252 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1253 returns the (static) accessibility level of the object. Otherwise, the
1254 same as Type_Access_Level.
1255 (Dynamic_Accessibility_Level): New function; given an expression which
1256 could occur as the rhs of an assignment to a saooaaat (i.e., an
1257 expression of an access-to-object type), return the new value for the
1258 saooaaat's associated Extra_Accessibility object.
1259 (Effective_Extra_Accessibility): New function; same as
1260 Einfo.Extra_Accessibility except that object renames are looked through.
1261 * sem_util.adb
1262 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1263 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1264 description.
1265 (Effective_Extra_Accessibility): New function; see sem_util.ads
1266 description.
1267 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1268 (Extra_Accessibility): Update comments.
1269 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1270 except RM_Size field (which is only for types) is unaffected.
1271 * einfo.adb
1272 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1273 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1274 formals.
1275 (Init_Size): Add assertion that we are not trashing the
1276 Extra_Accessibility attribute of an object.
1277 (Init_Size_Align): Add assertion that we are not trashing the
1278 Extra_Accessibility attribute of an object.
1279 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1280 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1281 differently for the type of a (non-library-level) saooaaat depending
1282 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1283 is queried in this set of changes - everything else (in particular,
1284 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1285 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1286 The special treatment of library-level saooaaats is an optimization,
1287 not required for correctnesss. This is based on the observation that the
1288 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1289 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1290 * exp_ch3.adb
1291 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1292 false for the type of a saooaaat, declare and initialize its
1293 accessibility level object and set the Extra_Accessibility attribute
1294 of the saooaaat to refer to this object.
1295 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1296 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1297 calls to Effective_Extra_Accessibility in order to support
1298 renames of saooaaats.
1299 (Expand_N_Type_Conversion): Add new local function,
1300 Has_Extra_Accessibility, and call it when determining whether an
1301 accessibility check is needed.
1302 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1303 evaluate to True (without raising an exception).
1304 * exp_ch5.adb
1305 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1306 saooaaat, update its associated Extra_Accessibility object (if
1307 it has one). This includes an accessibility check.
1308 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1309 a saooaaat, update its Extra_Accessibility object too (if it
1310 has one).
1311 (Expand_Call): Replace a couple of calls to Type_Access_Level
1312 with calls to Dynamic_Access_Level to handle cases where
1313 passing a literal (any literal) is incorrect.
1314 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1315 checks associated with "Saooaat := Some_Object'Access;"; this must
1316 be rejected if Some_Object is declared in a more nested scope
1317 than Saooaat.
1318 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1319 assignment to a saooaaat even if Is_Local_Anonymous_Access
1320 returns False for its type (indicating a 2012-style saooaaat).
1321 * sem_ch8.adb
1322 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1323 (which is only appropriate for objects, not types) with a call
1324 of Init_Object_Size_Align in order to avoid trashing the
1325 Extra_Accessibility attribute of a rename (the two attributes
1326 share storage).
1327 * sem_res.adb
1328 (Valid_Conversion) Replace six calls to Type_Access_Level with
1329 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1330 Ada2012 non-library-level saooaaat, the former returns library level
1331 while the latter returns the (static) accessibility level of the
1332 saooaaat. A type conversion to the anonymous type of a saooaaat
1333 can only occur as part of an assignment to the saooaaat, so we
1334 know that such a conversion must be in a lhs context, so Deepest
1335 yields the result that we need. If such a conversion could occur,
1336 say, as the operand of an equality operator, then this might not
1337 be right. Also add a test so that static accessibilty checks are
1338 performed for converting to a saooaaat's type even if
1339 Is_Local_Anonymous_Access yields False for the type.
1340
13412011-08-30 Javier Miranda <miranda@adacore.com>
1342
1343 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1344 controls generation of a warning associated with late declaration of
1345 dispatching functions. Required to avoid generating spurious
1346 warnings.
1347
6cce2156
GD
13482011-08-30 Gary Dismukes <dismukes@adacore.com>
1349
1350 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1351 return object has an anonymous access type and the function's type is
1352 a named access type.
1353 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1354 conversions on implicit conversions, since such conversions can occur
1355 for anonymous access cases due to expansion. Issue error for attempt
1356 to rename an anonymous expression as an object of a named access type.
1357 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1358 to indicate whether this function should report errors on invalid
1359 conversions.
1360 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1361 the expression is of an anonymous access type and the expected type is
1362 a named general access type, rewrite the expression as a type
1363 conversion, unless this is an expression of a membership test.
1364 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1365 calling of Error_Msg_N on new formal Report_Errs.
1366 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1367 calling of Error_Msg_NE on new formal Report_Errs.
1368 (Valid_Conversion): Move declaration of this function to the package
1369 spec, to allow calls from membership test processing. For Ada 2012,
1370 enforce legality restrictions on implicit conversions of anonymous
1371 access values to general access types, disallowing such conversions in
1372 cases where the expression has a dynamic accessibility level (access
1373 parameters, stand-alone anonymous access objects, or a component of a
1374 dereference of one of the first two cases).
1375 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1376 in the context of a named general access expected type.
1377 * exp_ch4.adb Add with and use of Exp_Ch2.
1378 (Expand_N_In): Add processing for membership tests applied to
1379 expressions of an anonymous access type. First, Valid_Conversion is
1380 called to check whether the test is statically False, and then the
1381 conversion is expanded to test that the expression's accessibility
1382 level is no deeper than that of the tested type. In the case of
1383 anonymous access-to-tagged types, a tagged membership test is applied
1384 as well.
1385 (Tagged_Membership): Extend to handle access type cases, applying the
1386 test to the designated types.
1387 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1388 accessibility level, and the actual is a 'Access applied to a current
1389 instance, pass the accessibility level of the type of the current
1390 instance rather than applying Object_Access_Level to the prefix. Add a
1391 ??? comment, since this level isn't quite right either (will eventually
1392 need to pass an implicit level parameter to init procs).
1393
747de90b
AC
13942011-08-30 Bob Duff <duff@adacore.com>
1395
1396 * s-taskin.ads: Minor comment fix.
1397
13982011-08-30 Ed Schonberg <schonberg@adacore.com>
1399
1400 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1401 component and the selector is a dispatching operation, check if it is
1402 a prefixed call before rewriting as a parameterless function call.
1403
cdc4cc65
JJ
14042011-08-29 Jakub Jelinek <jakub@redhat.com>
1405
1406 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1407 tsystem.h into $(RTSDIR) instead of rts.
1408
226a7fa4
AC
14092011-08-29 Robert Dewar <dewar@adacore.com>
1410
1411 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1412 reformatting.
1413 * gcc-interface/Make-lang.in: Update dependencies.
1414
14152011-08-29 Yannick Moy <moy@adacore.com>
1416
1417 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1418 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1419 table to hold dereferences.
1420 (Add_ALFA_Xrefs): Take into account dereferences as special
1421 reads/writes to the variable "HEAP".
1422 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1423 (Generate_Dereference): New procedure to store a read/write dereferencew
1424 in the table Drefs.
1425 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1426 the special "HEAP" var.
1427 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1428 in ALFA mode.
1429 * sem_util.adb (Note_Possible_Modification): Store write dereference
1430 in ALFA mode.
1431
dfbcb149
HK
14322011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1433
1434 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1435 ensures that the level of the subpool access type is not deeper than
1436 that of the pool object.
1437 * sem_util.adb (Object_Access_Level): Expand to handle defining
1438 identifiers.
1439 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1440 subpool handle name of a rewritten allocator.
1441
1df4f514
AC
14422011-08-29 Robert Dewar <dewar@adacore.com>
1443
1444 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1445
14462011-08-29 Thomas Quinot <quinot@adacore.com>
1447
1448 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1449 values, we generate multiple triples of parameters in the TypeCode.
1450 Bump Choice_Index for each such triple so that a subsequent default
1451 choice is associated with the correct index in the typecode.
1452
14532011-08-29 Ed Schonberg <schonberg@adacore.com>
1454
1455 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1456 container.
1457 (First, Last): Handle properly an iterator over a null container.
1458
14592011-08-29 Bob Duff <duff@adacore.com>
1460
1461 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1462 processing if we run across a node with no Scope. This can happen if
1463 we're with-ing an library-level instance, and that instance got errors
1464 that caused "instantiation abandoned".
1465 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1466 an exception instead of using Assert, so it won't go into an infinite
1467 loop, even when assertions are turned off.
1468
14692011-08-29 Ed Schonberg <schonberg@adacore.com>
1470
1471 * a-coorse.adb: Proper handling of empty ordered sets.
1472
14f0f659
AC
14732011-08-29 Johannes Kanig <kanig@adacore.com>
1474
1475 * debug.adb: Add comments.
1476
8027b455
AC
14772011-08-29 Thomas Quinot <quinot@adacore.com>
1478
1479 * a-except.adb, a-except-2005.adb: Minor comment rewording and
1480 reformatting.
1481
14822011-08-29 Yannick Moy <moy@adacore.com>
1483
1484 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1485 declaration for Itypes in Alfa mode.
1486
d85fd922
AC
14872011-08-29 Robert Dewar <dewar@adacore.com>
1488
1489 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1490 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1491 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1492 reformatting.
1493
14942011-08-29 Tristan Gingold <gingold@adacore.com>
1495
1496 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1497 package spec.
1498 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1499 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1500 while raising PE.
1501
fd3d2680
AC
15022011-08-29 Robert Dewar <dewar@adacore.com>
1503
1504 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1505
15062011-08-29 Javier Miranda <miranda@adacore.com>
1507
1508 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1509 renamings of formal subprograms when the actual for a formal type is
1510 class-wide.
1511
dfbf013f
MH
15122011-08-29 Matthew Heaney <heaney@adacore.com>
1513
1514 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1515 to Target.
1516
15172011-08-29 Matthew Heaney <heaney@adacore.com>
1518
1519 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1520 components of record type.
1521 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1522 to Target.
1523
a6dd3a54
ES
15242011-08-29 Ed Schonberg <schonberg@adacore.com>
1525
1526 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1527 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1528 container packages.
1529
c54796e0
AC
15302011-08-29 Robert Dewar <dewar@adacore.com>
1531
1532 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1533 reformatting.
1534
15352011-08-29 Matthew Heaney <heaney@adacore.com>
1536
1537 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1538 components of record type.
1539
15402011-08-29 Bob Duff <duff@adacore.com>
1541
1542 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1543 by the termination handler.
1544
9fd9d2be
AC
15452011-08-29 Yannick Moy <moy@adacore.com>
1546
1547 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1548 created in Alfa mode, instead of inserting artificial declarations of
1549 non-Itypes in the tree.
1550 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1551 know if an Itype has a corresponding declaration, as defined in
1552 itypes.ads.
1553
15542011-08-29 Yannick Moy <moy@adacore.com>
1555
1556 * gnat1drv.adb: Minor rewrite.
1557
15582011-08-29 Bob Duff <duff@adacore.com>
1559
1560 * s-tasuti.adb (Make_Passive): Work around race condition in
1561 Make_Independent, which can cause Wait_Count to be zero. So instead of
1562 asserting that Wait_Count > 0, and then decrementing it, decrement it
1563 only if Wait_Count > 0.
1564 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1565 should be nonnegative, so declare them Natural instead of Integer.
1566
833eaa8a
AC
15672011-08-29 Robert Dewar <dewar@adacore.com>
1568
1569 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1570 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1571 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1572 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1573 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1574
15752011-08-29 Tristan Gingold <gingold@adacore.com>
1576
1577 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1578
15792011-08-29 Vadim Godunko <godunko@adacore.com>
1580
1581 * s-parint.ads: Minor comment clarification.
1582
15832011-08-29 Vincent Celier <celier@adacore.com>
1584
1585 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1586 may be used as identifiers.
1587
15882011-08-29 Ed Schonberg <schonberg@adacore.com>
1589
1590 * a-coinho.ads: Minor reformating.
1591
3a613a36
AC
15922011-08-29 Ed Schonberg <schonberg@adacore.com>
1593
1594 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1595 container of a derived type.
1596
3a613a36
AC
15972011-08-29 Ed Schonberg <schonberg@adacore.com>
1598
1599 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1600 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1601
14848f57
AC
16022011-08-29 Pascal Obry <obry@adacore.com>
1603
1604 * exp_disp.adb: Minor comment fix.
1605 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1606 to avoid warnings when compiling with -Wall.
1607 (Make_Disp_Conditional_Select_Body): Likewise.
1608 (Make_Disp_Timed_Select_Body): Likewise.
1609
16102011-08-29 Ed Schonberg <schonberg@adacore.com>
1611
1612 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1613 an entity name, generate reference for it.
1614
16152011-08-29 Ed Schonberg <schonberg@adacore.com>
1616
1617 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1618 iterator form.
1619 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1620 the class-wide type.
1621 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1622
16232011-08-29 Ed Schonberg <schonberg@adacore.com>
1624
1625 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1626 subtype for an object whose type is an unconstrained union.
1627
16282011-08-29 Ed Schonberg <schonberg@adacore.com>
1629
1630 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1631 is allowed in a component definition, by AI95-406.
1632
16332011-08-29 Matthew Heaney <heaney@adacore.com>
1634
1635 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1636
16372011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1638
1639 * a-except-2005.adb: Alphabetize all routines.
1640 (Triggered_By_Abort): New routine.
1641 * a-except-2005.ads (Triggered_By_Abort): New routine.
1642 * a-except.adb Alphabetize all routines.
1643 (Triggered_By_Abort): New routine.
1644 * a-except.ads (Triggered_By_Abort): New routine.
1645 * exp_ch7.adb: Update all comments involving the detection of aborts in
1646 finalization code.
1647 (Build_Object_Declarations): Do not generate code to detect the
1648 presence of an abort at the start of finalization code, use a runtime
1649 routine istead.
1650 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1651 RE_Unit_Table.
1652 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1653 allocate a task on a subpool.
1654 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1655 The flag disables all actions related to the maintenance of
1656 Finalize_Address_Table when subpools are not in use.
1657 (Allocate_Any_Controlled): Signal the machinery that subpools are in
1658 use.
1659 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1660 performs costly task locking when subpools are not in use.
1661
57a8057a
AC
16622011-08-29 Yannick Moy <moy@adacore.com>
1663
1664 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1665 types and dispatching calls in Alfa mode.
1666 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1667 correspondance between body and spec scopes, to reuse utility functions
1668 (Traverse_Declarations_Or_Statements): Protect access to body for stub
1669 by testing the presence of the library unit for the body
1670 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1671 mode the expansion of accept statements is skipped
1672 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1673 the unique entity corresponding to the one returned by
1674 Unique_Defining_Entity applied to the enclosing declaration of the
1675 argument.
1676
16772011-08-29 Bob Duff <duff@adacore.com>
1678
1679 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1680 gdb when x is not a node (it can be a node list, name_id, etc). pp is
1681 an alias for pn. ppp is an alias for pt.
1682
16832011-08-29 Javier Miranda <miranda@adacore.com>
1684
1685 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1686 aggregate to take a consistent decision on the need to convert into
1687 assignments aggregates that initialize constant objects.
1688
16892011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1690
1691 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1692 Build_Allocate_Deallocate_Proc in order to handle allocation of
1693 non-controlled objects on subpools.
1694 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1695 to be end-user visible.
1696 * s-finmas.adb: Add with and use clause for System.HTable.
1697 Add an instantiation of Simple_HTable which provides a mapping between
1698 the address of a controlled object and the corresponding
1699 Finalize_Address used to clean up the object. The table is used when a
1700 master is operating in heterogeneous mode.
1701 (Attach): Explain why the input node is not verified on being already
1702 attached.
1703 (Delete_Finalize_Address): New routine.
1704 (Detach): Add pragma Assert which ensures that a node is already
1705 attached.
1706 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1707 since nodes are no longer removed on traversal. Explain why node
1708 detachment is undesirable in this case.
1709 (Get_Finalize_Address): New routine.
1710 (Hash): New routine.
1711 (Is_Empty_List): Removed.
1712 (pm): Renamed to Print_Master. Add output for discriminant
1713 Is_Homogeneous.
1714 Comment reformatting.
1715 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1716 * s-finmas.ads: Various comments additions / improvements.
1717 Type Finalization_Master has a discriminant which determines the mode of
1718 operation.
1719 (Delete_Finalize_Address): New routine.
1720 (Get_Finalize_Address): New routine.
1721 (pm): Renamed to Print_Master.
1722 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1723 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1724 use clause for System.IO.
1725 (Allocate_Any_Controlled): Add machinery to set TSS primitive
1726 Finalize_Address depending on the mode of allocation and the mode of
1727 the master.
1728 (Deallocate_Any_Controlled): Remove the relation pair object -
1729 Finalize_Address regardless of the master mode. Add comment explaining
1730 the reason.
1731 (Detach): Ensure that fields Prev and Next are null after detachment.
1732 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1733 scheme to check whether the list of subpools is empty. There is no
1734 longer need to store the next subpool or advance the current pointer.
1735 (Is_Empty_List): New routine.
1736 (Print_Pool): New routine.
1737 (Print_Subpool): New routine.
1738 * s-stposu.ads: Various comments additions / improvements.
1739 Field Master of type Root_Subpool is now a heterogeneous collection.
1740 (Print_Pool): New routine.
1741 (Print_Subpool): New routine.
1742
17432011-08-29 Ed Schonberg <schonberg@adacore.com>
1744
1745 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1746 forms, using aspects of container types.
1747 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1748 Has_Implicit_Dereference flags, that may be set on the partial view.
1749 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1750 container type with an indexing aspect.
1751 (Analyze_Quantified_Expression): Analyze construct with expansion
1752 disabled, because it will be rewritten as a loop during expansion.
1753 (Try_Container_Indexing): The prefix itself may be a container type
1754 with an indexing aspect, as with a vector of vectors.
1755 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1756 the original doamin of iteration, for name capture.
1757 (Analyze_Iterator_Specification): If the domain is an expression that
1758 needs finalization, create a separate declaration for it.
1759 For an iterator with "of" retrieve default iterator info from aspect of
1760 container type. For "in" iterator, retrieve type of Iterate function.
1761 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1762 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1763 analysis, to prevent spurious errors about late attributes.
1764 * sprint.adb: Handle quantified expression with either loop or iterator
1765 specification.
1766 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1767 iterator.
1768
ddf67a1d
AC
17692011-08-29 Vincent Celier <celier@adacore.com>
1770
1771 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1772 Binder or Linker of the main project file.
1773
17742011-08-29 Ed Schonberg <schonberg@adacore.com>
1775
1776 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1777 unit.
1778
17792011-08-29 Yannick Moy <moy@adacore.com>
1780
1781 * exp_ch9.adb: Partial revert of previous change for Alfa mode
1782
17832011-08-29 Yannick Moy <moy@adacore.com>
1784
1785 * exp_ch11.adb: Minor expansion of comment.
1786
17872011-08-29 Yannick Moy <moy@adacore.com>
1788
1789 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1790
17912011-08-29 Ed Schonberg <schonberg@adacore.com>
1792
1793 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1794 interpretation, set the type before resolving the operands, because
1795 legality checks on an exponention operand need to know the type of the
1796 context.
1797
17982011-08-29 Ed Schonberg <schonberg@adacore.com>
1799
1800 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1801 cleanups on a master if the instance is within a generic unit.
1802 Complement to the corresponding fix to inline.adb for K520-030.
1803
18042011-08-29 Tristan Gingold <gingold@adacore.com>
1805
1806 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1807 occurrence.
1808 * exp_intr.adb: Minor comment fix.
1809
18102011-08-29 Bob Duff <duff@adacore.com>
1811
1812 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1813 Delay_Required was used as an uninitialized variable.
1814
690943fc
RD
18152011-08-29 Robert Dewar <dewar@adacore.com>
1816
1817 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1818 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1819 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1820
9f0ee988
TQ
18212011-08-29 Thomas Quinot <quinot@adacore.com>
1822
1823 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1824 Remove unused variables.
1825
3e24afaa
AC
18262011-08-29 Ed Schonberg <schonberg@adacore.com>
1827
1828 * sem_res.adb: Remove Build_Explicit_Dereference.
1829 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1830 from sem_res.adb, used in analysis of additional constructs.
1831 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1832 expansion of iterators.
1833 (Is_Object_Reference): Recognize variables rewritten as explicit
1834 dereferences in Ada2012.
1835 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1836 Reversible_Iterator names, for expansion of Ada2012 iterators.
1837 * aspects.ads, aspects.adb (Find_Aspect): Utility.
1838 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1839 linked list container.
1840 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1841 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1842
18432011-08-29 Ed Schonberg <schonberg@adacore.com>
1844
1845 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1846 containers.
1847
18482011-08-29 Vincent Celier <celier@adacore.com>
1849
1850 * make.adb (Gnatmake): Get the maximum number of simultaneous
1851 compilation processes after the Builder switches has been scanned, as
1852 there may include -jnn.
1853
18542011-08-29 Matthew Heaney <heaney@adacore.com>
1855
1856 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1857
18582011-08-29 Tristan Gingold <gingold@adacore.com>
1859
1860 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1861 GNAT_DRIVER_COMMAND_LINE to 255.
1862
18632011-08-29 Pascal Obry <obry@adacore.com>
1864
1865 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1866 reformatting and style fix (class attribute casing).
1867
18682011-08-29 Yannick Moy <moy@adacore.com>
1869
1870 * exp_ch11.adb: Yet another case where expansion should be common
1871 between CodePeer and Alfa.
1872
18732011-08-29 Yannick Moy <moy@adacore.com>
1874
1875 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1876
18772011-08-29 Ed Schonberg <schonberg@adacore.com>
1878
1879 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1880 incomplete type and its completion match.
1881
3ddd922e
AC
18822011-08-29 Yannick Moy <moy@adacore.com>
1883
1884 * exp_ch13.adb: Adjust previous change.
1885
18862011-08-29 Robert Dewar <dewar@adacore.com>
1887
1888 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1889 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1890 Minor reformatting.
1891
444acbdd
AC
18922011-08-29 Emmanuel Briot <briot@adacore.com>
1893
1894 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1895 initialize aggregated projects.
1896
18972011-08-29 Ed Schonberg <schonberg@adacore.com>
1898
1899 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1900 depth of candidates to resolve a potentially spurious ambiguity between
1901 two visible subprograms.
1902
e0296583
AC
19032011-08-29 Yannick Moy <moy@adacore.com>
1904
1905 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1906 Requires/Ensures.
1907 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1908 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1909 Requires/Ensures.
1910
19112011-08-29 Arnaud Charlet <charlet@adacore.com>
1912
1913 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1914 Add comment.
1915
19162011-08-29 Thomas Quinot <quinot@adacore.com>
1917
1918 * sem_res.adb: Minor reformatting.
1919
69794413
JK
19202011-08-29 Johannes Kanig <kanig@adacore.com>
1921
1922 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1923 mode.
1924 * gnat1drv.adb (Adjust_Global_Switches): Set
1925 Use_Expressions_With_Actions to False in ALFA mode.
1926 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1927 ALFA mode.
1928
59e6b23c
AC
19292011-08-29 Yannick Moy <moy@adacore.com>
1930
1931 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1932 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1933 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1934 tagged types and dispatching calls in Alfa mode.
1935
19362011-08-29 Javier Miranda <miranda@adacore.com>
1937
1938 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1939 we do not report an error on an Empty node.
1940
19412011-08-29 Geert Bosch <bosch@adacore.com>
1942
1943 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1944 a-nlrear.o and a-nurear.o.
1945
19462011-08-29 Robert Dewar <dewar@adacore.com>
1947
1948 * freeze.adb: Minor code reorganization.
1949 Minor reformatting.
1950 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1951 sem_ch6.adb: Minor reformatting
1952
19532011-08-29 Tristan Gingold <gingold@adacore.com>
1954
1955 * s-except.ads, s-except.adb: Provide dummy body.
1956
19572011-08-29 Yannick Moy <moy@adacore.com>
1958
1959 * sem_warn.adb (Within_Postcondition): Take into account the case of
1960 an Ensures component in a Test_Case.
1961
4d792549
AC
19622011-08-29 Tristan Gingold <gingold@adacore.com>
1963
1964 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1965 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1966 System_Exceptions_Debug
1967 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1968 * a-except.adb: With and use System.Exceptions_Debug instead of
1969 System.Exceptions.
1970 * a-except-2005.adb: Likewise.
1971 * s-assert.adb: Likewise.
1972 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1973 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
1974 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1975 s-excdeb. Update dependencies.
1976 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1977 as these no longer need external libraries.
1978
19792011-08-29 Ed Schonberg <schonberg@adacore.com>
1980
1981 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1982 exponentiation operator on universal values in a context that requires
1983 a fixed-point type.
1984
19852011-08-29 Tristan Gingold <gingold@adacore.com>
1986
1987 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
1988 before calling notify_handled_exception.
1989 * a-exextr.adb: Fix comment.
1990
b254da66
AC
19912011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1992
1993 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1994 Finalize_Address of the access type's finalization master.
1995 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1996 access type's finalization master. Add a guard to prevent
1997 Associated_Storage_Pool from being set on .NET/JVM.
1998 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1999 attribute Finalize_Address of the access type's finalization master.
2000 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
2001 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
2002 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
2003 RE_Unit_Table.
2004 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
2005 use clause for System.IO
2006 (Detach): Relax the assertion, to be reinstated later.
2007 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
2008 Relax the assertion on Finalize_Address, to be reinstated later.
2009 (Is_Empty_List): New routine.
2010 (pm): New debug routine.
2011 (Set_Finalize_Address): New routine.
2012 * s-finmas.ads (pm): New debug routine.
2013 (Set_Finalize_Address): New routine.
2014 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2015
20162011-08-29 Tristan Gingold <gingold@adacore.com>
2017
2018 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
2019 Remove convention C.
2020
20212011-08-29 Tristan Gingold <gingold@adacore.com>
2022
2023 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
2024 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
2025 (Finalize_TCB): Remove its finalization.
2026 (Initialize): Remove assignment of GET_Exc_Stack_Addr
2027 * s-soflin.adb (NT_Exc_Stack): Remove
2028 (Get_Exc_Stack_Addr_NT): Likewise.
2029 (Get_Exc_Stack_Addr_Soft): Likewise.
2030 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
2031 (Get_Exc_Stack_Addr): Likewise.
2032 (Get_Exc_Stack_Addr_Soft): Likewise
2033 * s-taspri-vms.ads (Exc_Stack_T): Remove.
2034 (Exc_Stack_Ptr_T): Likewise.
2035 (Private_Data): Remove Exc_Stack_Ptr component.
2036
20372011-08-29 Tristan Gingold <gingold@adacore.com>
2038
2039 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
2040
20412011-08-29 Tristan Gingold <gingold@adacore.com>
2042
2043 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2044
20452011-08-29 Geert Bosch <bosch@adacore.com>
2046
2047 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
2048 L2_Norm, Swap_Column): New generic subprograms
2049 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
2050 L2_Norm, Swap_Column): Implement new subprograms in order to
2051 eliminate dependency on BLAS and LAPACK libraries in
2052 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
2053 version. Forward_Eliminate/Back_Substitute can be used to put a
2054 matrix in row echelon or reduced row echelon form using partial
2055 pivoting.
2056 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
2057 Swap_Column): Instantiate from System.Generic_Array_Operations.
2058 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
2059 (Sqrt): Local function for simple computation of square root without
2060 adding dependencies on Generic_Elementary_Functions.
2061 (Swap): New subprogram to exchange floating point numbers.
2062 (Inverse): Reimplement using Jordan-Gauss elimination.
2063 (Jacobi): New procedure implementing Jacobi's method for computation
2064 of eigensystems, based on Rutishauser's implementation.
2065 (L2_Norm): Implement directly using the inner product.
2066 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
2067 decreasing eigenvalue as required by the Ada RM.
2068 (Swap_Column): New helper procedure for Sort_Eigensystem.
2069 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
2070 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
2071 Sort_Eigensystems.
2072
20732011-08-29 Thomas Quinot <quinot@adacore.com>
2074
2075 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
2076 statements line.
2077
60370fb1
AC
20782011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2079
2080 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
2081 than the current node.
2082 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
2083 Finalization_Master. The list headers have two fields instead of three.
2084 This should fix alignment issue but subpool allocations are now
2085 unusable. Alphabetize subprograms.
2086 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
2087 the size of the header when converting the beginning of the object to
2088 a FM_Node. Set the master's Finalize_Address attribute if not already
2089 set.
2090 (Deallocate_Any_Controlled): Use the offset rather than the size of the
2091 header when converting the beginning of the object to a FM_Node.
2092
20932011-08-29 Gary Dismukes <dismukes@adacore.com>
2094
2095 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
2096 reraise when compiling for CodePeer.
2097
20982011-08-29 Arnaud Charlet <charlet@adacore.com>
2099
2100 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
2101 now needed by a-convec.adb. Fix warning.
2102
21032011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2104
2105 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
2106 processing of TSS routine Finalize_Address when compiling in
2107 CodePeer_Mode.
2108
21092011-08-29 Thomas Quinot <quinot@adacore.com>
2110
2111 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
2112 sem_warn.adb: Minor reformatting.
2113
21142011-08-29 Emmanuel Briot <briot@adacore.com>
2115
2116 * prj-conf.adb (Get_Config_Switches): Also collect the list of
2117 languages from aggregated projects.
2118
21192011-08-29 Yannick Moy <moy@adacore.com>
2120
2121 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
2122 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2123 Traverse_Package_Declaration, Traverse_Subprogram_Body,
2124 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
2125 for stubs are traversed too when parameter is set
2126 (Traverse_All_Compilation_Units): Traverse without going inside stubs
2127 (Traverse_Declarations_Or_Statements): Do the special traversing for
2128 stubs when required.
2129 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
2130 return subprogram or package body from stub.
2131 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
2132 stubs without prior subprogram decl.
2133
21342011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2135
2136 * gnat_ugn.texi: Fix typo.
2137
e9c9d122
HK
21382011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2139
2140 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
2141 which accounts for size vs alignment issues and calculates the size of
2142 the list header.
2143 (Deallocate_Any_Controlled): Ditto.
2144 (Nearest_Multiple_Rounded_Up): New routine.
2145
25ebc085
AC
21462011-08-29 Tristan Gingold <gingold@adacore.com>
2147
2148 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
2149 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
2150 (Set_Exception_Msg): Ditto.
2151 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
2152 Private_Data.
2153 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
2154 Use Save_Occurrence instead of Save_Occurrence_No_Private.
2155 (Raise_With_Msg): Remove Cleanup_Flag.
2156 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
2157 Clean_Flag and Private_Data components.
2158
21592011-08-29 Yannick Moy <moy@adacore.com>
2160
2161 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
2162 in CodePeer mode.
2163 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
2164 of an explicitly declared type, so that the base types of the original
2165 type and this generated type are the same, and a "type" (not a subtype
2166 like previously).
2167 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
2168 small" in Alfa mode, like in CodePeer mode.
2169 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
2170 clauses in Alfa mode.
2171
21722011-08-29 Javier Miranda <miranda@adacore.com>
2173
2174 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
2175 function to the package spec.
2176 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
2177 internally generated bodies of null procedures locate the internally
2178 generated spec enforcing mode conformance.
2179 (Is_Interface_Conformant): Ensure that the controlling formal of the
2180 primitives match.
2181
21822011-08-29 Ed Schonberg <schonberg@adacore.com>
2183
2184 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
2185 reject the pragma if it appears to apply to a formal subprogram.
2186
21872011-08-29 Ed Schonberg <schonberg@adacore.com>
2188
2189 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
2190 inner expression, to prevent double evaluation.
2191
590549fb
AC
21922011-08-29 Tristan Gingold <gingold@adacore.com>
2193
2194 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
2195 they were unused.
2196 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
2197 * a-except-2005.adb (Propagate_Exception): Adjust spec.
2198 (Raise_Current_Excep): Adjust call.
2199 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
2200
22012011-08-29 Thomas Quinot <quinot@adacore.com>
2202
2203 * exp_disp.adb: Minor reformatting.
2204
62380e66
TG
22052011-08-29 Tristan Gingold <gingold@adacore.com>
2206
2207 * a-exexpr.adb (Setup_Exception): Removed.
2208 * a-exexpr-gcc.adb (Setup_Exception): Removed.
2209 * a-except.adb (Exception_Propagation): Removed.
2210 * a-except-2005.adb (Setup_Exception): Removed.
2211 (Reraise): Remove call to Setup_Exception.
2212 (Reraise_Occurrence): Ditto.
2213 (Reraise_Occurrence_Always): Ditto.
2214 (Reraise_Occurrence_No_Defer): Ditto.
2215 (Transfer_Occurrence): Ditto.
2216 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
2217 (Set_Exception_Msg): Ditto.
2218
c95aa61c
AC
22192011-08-29 Robert Dewar <dewar@adacore.com>
2220
2221 * a-convec.adb, exp_disp.adb: Minor reformatting.
2222
22232011-08-29 Tristan Gingold <gingold@adacore.com>
2224
2225 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
2226
624e1688
AC
22272011-08-29 Gary Dismukes <dismukes@adacore.com>
2228
2229 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
2230 Exception_Handlers to No_List instead of Empty_List in the case where
2231 there are no handlers.
2232
22332011-08-29 Tristan Gingold <gingold@adacore.com>
2234
2235 * gcc-interface/gigi.h (enum standard_datatypes): Add
2236 ADT_reraise_zcx_decl
2237 (reraise_zcx_decl): New macro.
2238 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
2239 (gigi): Set reraise_zcx_decl.
2240 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2241 (gnat_to_gnu): Handle N_Raise_Statement.
2242
7134062a
AC
22432011-08-29 Robert Dewar <dewar@adacore.com>
2244
2245 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2246 a-undesu.adb: Minor reformatting.
2247
22482011-08-29 Ed Schonberg <schonberg@adacore.com>
2249
2250 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2251 table, accept an unfrozen untagged component if it is an actual for a
2252 formal incomplete type.
2253 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2254 provide new iterator forms over vectors.
2255 Introduce type Iterator in package body to implement operations of
2256 Reversible_Iterator interface.
2257 * a-iteint.ads: Make package pure so it is usable with new container
2258 packages, that are categorized Remote_Types.
2259
ca5af305
AC
22602011-08-29 Robert Dewar <dewar@adacore.com>
2261
2262 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2263
22642011-08-29 Bob Duff <duff@adacore.com>
2265
2266 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2267 of <>, because this is the routine that checks for dimensionality
2268 errors (for example, for a two-dimensional array, (others => <>) should
2269 be (others => (others => <>)).
2270
22712011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2272
2273 * impunit.adb: Add new run-time units.
2274 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2275 s-stposu.ads, s-stposu.adb: Code clean up.
2276 Handle protected class-wide or task class-wide types
2277 Handle C/C++/CIL/Java types.
2278 * s-spsufi.adb, s-spsufi.ads: New files.
2279
5accd7b6
AC
22802011-08-29 Yannick Moy <moy@adacore.com>
2281
2282 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2283 library-level subprogram.
2284 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2285 placement.
2286 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2287 component.
2288 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2289 component.
2290 * gnat_rm.texi: Update doc for Test_Case pragma.
2291
22922011-08-29 Tristan Gingold <gingold@adacore.com>
2293
2294 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2295 convention C.
2296 (GCC_Exception_Access): New type.
2297 (Unwind_DeleteException): New imported procedure
2298 (Foreign_Exception): Import it.
2299 (GNAT_GCC_Exception): Simply have the occurrence inside.
2300 (To_GCC_Exception): New function.
2301 (To_GNAT_GCC_Exception): New function.
2302 (GNAT_GCC_Exception_Cleanup): New procedure..
2303 (Propagate_GCC_Exception): New procedure.
2304 (Reraise_GCC_Exception): New procedure.
2305 (Setup_Current_Excep): New procedure.
2306 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2307 (Unwind_RaiseException): Ditto.
2308 (Unwind_ForcedUnwind): Ditto.
2309 (Remove): Removed.
2310 (Begin_Handler): Change type of parameter.
2311 (End_Handler): Ditto. Now delete the exception if still present.
2312 (Setup_Key): Removed.
2313 (Is_Setup_And_Not_Propagated): Removed.
2314 (Set_Setup_And_Not_Propagated): Ditto.
2315 (Clear_Setup_And_Not_Propagated): Ditto.
2316 (Save_Occurrence_And_Private): Ditto.
2317 (EID_For): Add 'not null' constraint on parameter.
2318 (Setup_Exception): Does nothing.
2319 (Propagate_Exception): Simplified.
2320 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2321 re-raise is not expanded anymore.
2322 * s-except.ads (Foreign_Exception): New exception - placeholder for
2323 non Ada exceptions.
2324 * raise-gcc.c (__gnat_setup_current_excep): Declare
2325 (CXX_EXCEPTION_CLASS): Define (not yet used)
2326 (GNAT_EXCEPTION_CLASS): Define.
2327 (is_handled_by): Handle foreign exceptions.
2328 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2329
23302011-08-29 Jose Ruiz <ruiz@adacore.com>
2331
2332 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2333
2ef48385
AC
23342011-08-29 Thomas Quinot <quinot@adacore.com>
2335
2336 * a-synbar-posix.adb: Minor reformatting.
2337
23382011-08-29 Jose Ruiz <ruiz@adacore.com>
2339
2340 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2341 a-exetim-default.ads (Interrupt_Clocks_Supported,
2342 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2343 definitions to be compliant with AI-0171. The target systems do not
2344 support separate account for the execution time of interrupt handlers.
2345
23462011-08-29 Jose Ruiz <ruiz@adacore.com>
2347
2348 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2349 in the barrier to put first the easiest to evaluate (and the one which
2350 will be True more often). More efficient.
2351
23522011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2353
2354 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2355
23562011-08-29 Bob Duff <duff@adacore.com>
2357
2358 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2359 attributes that are now aspects, as specified by AI05-0229-1.
2360 * sem_ch13.adb (Analyze_Aspect_Specifications,
2361 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2362 pragmas or attribute references, as appropriate.
2363
0db16b1e
AC
23642011-08-29 Robert Dewar <dewar@adacore.com>
2365
2366 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2367 a-synbar-posix.ads: Minor reformatting.
2368
23692011-08-29 Yannick Moy <moy@adacore.com>
2370
2371 * snames.ads-tmpl: Add name Force.
2372
978ffe02
AC
23732011-08-29 Pascal Obry <obry@adacore.com>
2374
2375 * prj-nmsc.adb: Minor reformatting.
2376
23772011-08-29 Jose Ruiz <ruiz@adacore.com>
2378
2379 * a-exetim.ads (Interrupt_Clocks_Supported,
2380 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2381 definitions to be compliant with AI-0171.
2382
23832011-08-29 Robert Dewar <dewar@adacore.com>
2384
2385 * a-ngelfu.adb: Add comments.
2386
718f39dc
AC
23872011-08-29 Geert Bosch <bosch@adacore.com>
2388
2389 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2390 the closest machine number to Pi / 2.0.
2391
23922011-08-29 Jose Ruiz <ruiz@adacore.com>
2393
2394 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2395 package Ada.Synchronous_Barriers.
2396 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2397 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2398 default implementation using protected objects and another one
2399 a-synbar-posix using POSIX barriers as the underlying support.
2400 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2401 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2402 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2403 Clean up dependencies.
2404 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2405
ee2e3f6b
AC
24062011-08-29 Robert Dewar <dewar@adacore.com>
2407
2408 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2409 exp_dist.adb: Minor code reorganization.
2410 Minor reformatting.
2411
24122011-08-29 Thomas Quinot <quinot@adacore.com>
2413
2414 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2415 primitive operation must support external streaming if it is not a
2416 controlling access result.
2417
646e2823
AC
24182011-08-29 Thomas Quinot <quinot@adacore.com>
2419
2420 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2421
24222011-08-29 Bob Duff <duff@adacore.com>
2423
2424 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2425 restriction on allocators, as required by AI05-0013-1.
2426 * restrict.ads: Minor comment fix.
2427
5d59eef2
AC
24282011-08-29 Tristan Gingold <gingold@adacore.com>
2429
2430 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2431 (To_Jmpbuf_Address): Ditto
2432 (builtin_longjmp): Ditto
2433
24342011-08-29 Thomas Quinot <quinot@adacore.com>
2435
2436 * sem_res.adb: Minor reformatting.
2437
24382011-08-29 Vincent Celier <celier@adacore.com>
2439
2440 * make.adb (Gnatmake): Move special processing for VM targets after the
2441 call to Get_Target_Parameters.
2442
24432011-08-29 Thomas Quinot <quinot@adacore.com>
2444
2445 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2446
949a18cc
AC
24472011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2448
2449 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2450 where an anonymous access discriminant of a limited designated type
2451 appears in a non-immutably limited discriminated type and issue an
2452 error message. Add local variable Desig_T and replace all occurrences
2453 of Designated_Type.
2454
24552011-08-29 Jose Ruiz <ruiz@adacore.com>
2456
2457 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2458 implementation is compliant to RM D.15(15/2) after the modification
2459 imposed by AI05-0094-1 (binding interpretation).
2460
cb25faf8
AC
24612011-08-29 Robert Dewar <dewar@adacore.com>
2462
2463 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2464 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2465
24662011-08-29 Thomas Quinot <quinot@adacore.com>
2467
2468 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2469 the scope name, do not report a missing label as a style violation (it
2470 will be diagnosed as an illegality).
2471 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2472 variant records: Get_Enum_Lit_From_Pos already returns a usage
2473 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2474 on Expr in Integer_Literal case so that it can be used by
2475 Build_To_Any_Call.
2476
1d10f669
AC
24772011-08-29 Tristan Gingold <gingold@adacore.com>
2478
2479 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2480 Adjust comment.
2481 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2482 (Build_Abort_Block_Handler): New function to build an Abort_Signal
2483 exception handler.
2484 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2485 Build_Abort_Block_Handler to build the exception handler. Do not
2486 undefer aborts for the Abort_Signal exception handler if back-end
2487 exception mechanism.
2488 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2489 back_end exceptions for all others and abort_signal.
2490 * s-except.ads (ZCX_By_Default): New constant.
2491 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2492 (Raise_Exception_Always): Ditto.
2493 (Raise_From_Signal_Handler): Ditto.
2494 (Raise_With_Location_And_Msg): Ditto.
2495 (Raise_With_Msg): Ditto.
2496 (Reraise): Ditto.
2497 (Reraise_Occurence): Ditto.
2498 (Reraise_Occurrence_Always): Ditto.
2499 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2500 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1d10f669
AC
2501
25022011-08-29 Thomas Quinot <quinot@adacore.com>
2503
2504 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2505
d986066d
AC
25062011-08-29 Robert Dewar <dewar@adacore.com>
2507
2508 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2509 Minor code reorganization.
2510
25112011-08-29 Bob Duff <duff@adacore.com>
2512
2513 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2514 2012, not just Ada 2005.
2515
25162011-08-29 Vincent Celier <celier@adacore.com>
2517
2518 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2519 with a project file or with gprbuid, if -gnatep= is specified, the
2520 builder may need to be invoked with -x.
2521
25222011-08-29 Tristan Gingold <gingold@adacore.com>
2523
2524 * a-exexpr-gcc.adb: Minor comment fix.
2525
ff4f0ed0
AC
25262011-08-29 Robert Dewar <dewar@adacore.com>
2527
2528 * sem_ch8.adb: Minor reformatting.
2529
25302011-08-29 Bob Duff <duff@adacore.com>
2531
2532 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2533 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2534 treating "some" as unreserved in earlier Ada versions. This is now
2535 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2536 rather than Name_Some, since Tok_Some is now recognized as reserved.
2537 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2538 reserved word.
2539 * scans.ads: Minor comment fixes.
2540 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2541 for other language versions.
2542 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2543 treating "some" as unreserved in earlier Ada versions. This is now
2544 handled in Snames.Is_Keyword_Name.
2545 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2546 Ada 2012.
2547 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2548 unreserved in earlier Ada versions. This is now handled in
2549 Snames.Is_Keyword_Name.
2550 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2551 words as for other language versions.
2552 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2553 Ada 2012, not just Ada 2005.
2554
d941cee6
AC
25552011-08-29 Ed Schonberg <schonberg@adacore.com>
2556
2557 * sem_ch13.adb: Additional semantic checks for aspects involved in
2558 iterators.
2559
25602011-08-29 Matthew Heaney <heaney@adacore.com>
2561
2562 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2563 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2564 Container parameter.
2565 (Ancestor_Find): ditto.
2566
b970af39
TQ
25672011-08-29 Thomas Quinot <quinot@adacore.com>
2568
2569 * par-endh.adb: Minor reformatting.
d941cee6 2570
92db5dee
AC
25712011-08-29 Tristan Gingold <gingold@adacore.com>
2572
2573 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2574 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2575 (Adjust_N_CLeanups_For): Remove.
2576 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2577 stack is reached.
2578 (Propgate_Exception): Adjust.
2579 * raise-gcc.c: Add a few static/const.
2580 (Adjust_N_Cleanups_For): Remove declaration.
2581 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2582
25832011-08-29 Ed Schonberg <schonberg@adacore.com>
2584
2585 * sem_ch8.adb: Use type of function return when rewriting as object
2586 declaration.
2587
1378bf10
AC
25882011-08-29 Gary Dismukes <dismukes@adacore.com>
2589
2590 * sem_type.adb: Minor reformatting.
2591
25922011-08-29 Robert Dewar <dewar@adacore.com>
2593
2594 * makeutl.adb: Minor reformatting.
2595
25962011-08-29 Ed Schonberg <schonberg@adacore.com>
2597
2598 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2599 function call of a limited type, the expansion of the renaming is
2600 complicated by the presence of various temporaries and subtypes that
2601 capture constraints of the renamed object.
2602 Rewrite node as an object declaration, whose expansion is simpler.
2603 Given that the object is limited there is no copy involved and no
2604 performance hit.
2605
164e06c6
AC
26062011-08-29 Robert Dewar <dewar@adacore.com>
2607
2608 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2609 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2610
26112011-08-29 Tristan Gingold <gingold@adacore.com>
2612
2613 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2614 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2615 system-linux-hppa.ads, system-linux-s390.ads,
2616 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2617 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2618 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2619 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2620 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2621 system-solaris-sparc.ads, system-lynxos-x86.ads,
2622 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2623 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2624 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2625 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7d266442 2626 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
164e06c6
AC
2627 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2628 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2629 * opt.ads: Adjust comment.
2630 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2631 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2632 * system.ads: Move GCC_ZCX_Support to obsolete entries.
2633
26342011-08-29 Emmanuel Briot <briot@adacore.com>
2635
2636 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2637 file name is specified on the gnatmake or gprbuild command line, and
2638 before we search for that file in the project.
2639
26402011-08-29 Ed Schonberg <schonberg@adacore.com>
2641
2642 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2643 used to determine whether a possible interpretation for an overloadable
2644 entity is declared within the current instantiation and should be
2645 included in the candidate set.
2646
26472011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2648
2649 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2650
97216ca8
ES
26512011-08-29 Ed Schonberg <schonberg@adacore.com>
2652
2653 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2654 access subtype is access_to_subprogram, when applying checks for
2655 RM 3.10.2 (27).
2656
d3cb4cc0
AC
26572011-08-29 Matthew Heaney <heaney@adacore.com>
2658
2659 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2660 for sibling when common parent.
2661
26622011-08-29 Thomas Quinot <quinot@adacore.com>
2663
2664 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2665 "pragma_".
2666
26672011-08-29 Ed Schonberg <schonberg@adacore.com>
2668
2669 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2670 for the return type when in ASIS mode.
2671
26722011-08-29 Vincent Celier <celier@adacore.com>
2673
2674 * make.adb (Gnatmake): Get the default search dirs, then the target
2675 parameters after getting the Builder switches, as the Builder switches
2676 may include --RTS= and that could change the default search dirs.
2677
26782011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2679
2680 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2681 Make_Final_Call. Move the processing for class-wide types before the
2682 processing for derivations from [Limited_]Controlled.
2683 (Make_Final_Call): Move the processing for class-wide types before the
2684 processing for derivations from [Limited_]Controlled.
2685 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2686 Add code to account for alignments larger than the list header. Add a
2687 comment illustrating the structure of the allocated object + padding +
2688 header.
2689 (Deallocate_Any_Controlled): Add code to account for alignments larger
2690 than the list header.
2691
26922011-08-29 Ed Schonberg <schonberg@adacore.com>
2693
2694 * sinfo.ads, sinfo.adb: New node kind
2695 N_Formal_Incomplete_Type_Definition, related flags.
2696 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2697 Parse formal incomplete types.
2698 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2699 sem_ch12.
2700 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2701 Formal incomplete types do not need completion.
2702 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2703 Validate_Incomplete_Type_Instance): New procedures to handle formal
2704 incomplete types.
2705 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2706 that corresponds to a formal incomplete type.
2707 * sprint.adb: Handle formal incomplete type declarations.
2708 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2709 an insertion point.
2710
d3f70b35
AC
27112011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2712
2713 * a-fihema.ads, a-fihema.adb: Unit removed.
2714 * a-undesu.ads, a-undesu.adb: New unit implementing
2715 Ada.Unchecked_Deallocate_Subpool.
2716 * einfo.adb: Remove Associated_Collection from the node usage.
2717 Add Finalization_Master to the node usage.
2718 (Associated_Collection): Removed.
2719 (Finalization_Master): New routine.
2720 (Set_Associated_Collection): Removed.
2721 (Set_Finalization_Master): New routine.
2722 (Write_Field23_Name): Remove Associated_Collection from the output. Add
2723 Finalization_Master to the output.
2724 * einfo.ads: Remove attribute Associated_Collection and its uses in
2725 entities.
2726 Add new attribute Finalization_Master along with its uses in entitites.
2727 (Associated_Collection): Removed along with its pragma import.
2728 (Finalization_Master): New routine along with a pragma import.
2729 (Set_Associated_Collection): Removed along with its pragma import.
2730 (Set_Finalization_Master): New routine along with a pragma import.
2731 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2732 Build_Finalization_Collection with Build_Finalization_Master.
2733 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2734 before the bodies of the predefined routines. Add comment explaining
2735 this. Replace call to Build_Finalization_Collection with
2736 Build_Finalization_Master.
2737 (Freeze_Type): Replace call to Build_Finalization_Collection with
2738 Build_Finalization_Master.
2739 (Make_Finalize_Address_Body): Comment reformatting.
2740 (Make_Predefined_Primitive_Specs): Code reformatting.
2741 (Stream_Operation_OK): Update comment mentioning finalization
2742 collections. Replace RE_Finalization_Collection with
2743 RE_Finalization_Master.
2744 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2745 Associated_Collection with Finalization_Master. Replace call to
2746 Build_Finalization_Collection with Build_Finalization_Master.
2747 (Expand_Allocator_Expression): Replace call to Associated_Collection
2748 with Finalization_Master. Replace call to Set_Associated_Collection with
2749 Set_Finalization_Master. Remove the generation of
2750 Set_Finalize_Address_Ptr.
2751 (Expand_N_Allocator): Replace call to Associated_Collection with
2752 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2753 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2754 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2755 comment on usage. Replace call to Needs_BIP_Collection with
2756 Needs_BIP_Finalization_Master Remplace BIP_Collection with
2757 BIP_Finalization_Master. Update all comments which mention finalization
2758 collections. Replace Associated_Collection with
2759 Finalization_Master. Replace Build_Finalization_Collection with
2760 Build_Finalization_Master.
2761 (BIP_Formal_Suffix): Update BIP_Collection's case.
2762 (Build_Heap_Allocator): Update the related comment. Rename local
2763 variable Collect to Fin_Mas_Id and update its occurrences. Update
2764 comments which mention finalization collections. Replace
2765 Set_Associated_Collection with Set_Finalization_Master.
2766 (Expand_Call): Update the code which detects a special piece of library
2767 code for .NET/JVM.
2768 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2769 Add_Collection_Actual_To_Build_In_Place_Call with
2770 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2771 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2772 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2773 Add_Collection_Actual_To_Build_In_Place_Call with
2774 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2775 (Make_Build_In_Place_Call_In_Assignment): Replace call to
2776 Add_Collection_Actual_To_Build_In_Place_Call with
2777 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2778 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2779 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2780 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2781 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2782 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2783 Replace call to Set_Associated_Collection with Set_Finalization_Master.
2784 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2785 Replace the call to Associated_Collection with Finalization_Master.
2786 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2787 Update the way finalization master names are generated. Update the
2788 retrieval of the correct access type which will carry the pool and
2789 master attributes.
2790 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2791 (Make_Finalize_Address_Body): Abstract types do not need
2792 Finalize_Address. Code reformatting.
2793 (Make_Finalize_Address_Stmts): Update comment on usage.
2794 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2795 (Process_Declarations): Update comments.
2796 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2797 Build_Finalization_Master. Update associated comment.
2798 (Make_Set_Finalize_Address_Ptr_Call): Removed.
2799 * exp_ch13.adb: Update comments which mention finalization collections.
2800 (Expand_N_Free_Statement): Replace the call to Associated_Collection
2801 with Finalization_Master.
2802 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2803 create calls to routines Allocate_Any_Controlled and
2804 Deallocate_Any_Controlled.
2805 (Find_Finalize_Address): New routine.
2806 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2807 comparison.
2808 (Requires_Cleanup_Actions): Update the comment on freeze node
2809 inspection.
2810 * exp_util.ads: Remove comment on generated code for
2811 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2812 is better to simply look in the body.
2813 * freeze.adb (Freeze_All): Update the comment of finalization
2814 collections. Replace the call to Associated_Collection with
2815 Finalization_Master. Replace the call to Build_Finalization_Collection
2816 with Build_Finalization_Master.
2817 * impunit.adb: Add a-undesu and s-stposu to the list of units.
2818 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2819 a-fihema.
2820 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2821 Ada.Finalization. Add processing for children of System.Storage_Pools.
2822 * rtsfind.ads: Remove the naming of second level children of
2823 Ada.Finalization.
2824 Remove Ada_Finalization_Heap_Management from the list of units.
2825 Remove subtype Ada_Finalization_Child.
2826 Remove the following subprogram entities:
2827
2828 RE_Allocate
2829 RE_Deallocate
2830 RE_Finalization_Collection
2831 RE_Finalization_Collection_Ptr
2832 RE_Set_Finalize_Address_Ptr
2833
2834 Add the naming of second level children of System.Storage_Pools.
2835 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2836 the list of units.
2837 Add subtype System_Storage_Pools_Child.
2838 Add the following subprogram entities to System.Finalization_Masters:
2839
2840 RE_Finalization_Master
2841 RE_Finalization_Master_Ptr
2842
2843 Add the following subprogram entities to System.Storage_Pools.Subpools:
2844
2845 RE_Allocate_Any_Controlled
2846 RE_Deallocate_Any_Controlled
2847 RE_Root_Storage_Pool_With_Subpools
2848 RE_Root_Subpool
2849 RE_Subpool_Handle
2850
2851 Move the following subprogram entities from
2852 Ada.Finalization.Heap_Management to System.Finalization_Masters:
2853
2854 RE_Add_Offset_To_Address
2855 RE_Attach
2856 RE_Base_Pool
2857 RE_Detach
2858
2859 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2860 Set_Associated_Collection with Set_Finalization_Master.
2861 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2862 BIP_Finalization_Master is created.
2863 * s-finmas.adb: New unit System.Finalization_Masters.
2864 * s-finmas.ads: New unit System.Finalization_Masters.
2865 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2866 * s-stposu.ads, s-stposu.adb: New unit implementing
2867 System.Storage_Pools.Subpools.
2868
28692011-08-29 Bob Duff <duff@adacore.com>
2870
2871 * tbuild.adb: Add assertion.
2872
8c889ae4
AC
28732011-08-29 Thomas Quinot <quinot@adacore.com>
2874
2875 * s-pooglo.adb: Minor reformatting.
2876
28772011-08-29 Ed Schonberg <schonberg@adacore.com>
2878
2879 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2880 an indexed component of a packed array whose element type is a record
2881 with a representation clause different from that of the right-hand
2882 side, generate a temporary to minimuze the number of bit-field
2883 operations generated.
2884
28852011-08-29 Ed Schonberg <schonberg@adacore.com>
2886
2887 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2888 declarations, and thus are likely insertion points for actions.
2889
28902011-08-29 Bob Duff <duff@adacore.com>
2891
2892 * einfo.ads: Minor comment fix.
2893
1a07a71a
AC
28942011-08-29 Robert Dewar <dewar@adacore.com>
2895
2896 * frontend.adb, gnat1drv.adb: Minor reformatting.
2897
28982011-08-29 Tristan Gingold <gingold@adacore.com>
2899
2900 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2901 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
2902 space in front of the header.
2903
4bcd6411
JK
29042011-08-29 Johannes Kanig <kanig@adacore.com>
2905
2906 * frontend.adb (Frontend): Exit after creating Standard package when
2907 -gnatd.H is present.
2908 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2909 present.
2910
f0f88eb6
RD
29112011-08-29 Robert Dewar <dewar@adacore.com>
2912
2913 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2914 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2915 snames.ads-tmpl: Minor reformatting.
2916
3e37be71
PG
29172011-08-29 Philippe Gil <gil@adacore.com>
2918
2919 * prj.adb (Reset_Units_In_Table): New procedure.
2920 Reset units to avoid access to freed memory.
2921
94fb7608
AC
29222011-08-29 Thomas Quinot <quinot@adacore.com>
2923
2924 * get_scos.adb: When reading a P statement SCO without a pragma name
2925 (from an older ALI file), ensure that the Pragma_Name component is set
2926 to Unknown_Pragma (not left uninitialized).
2927
29282011-08-29 Vincent Celier <celier@adacore.com>
2929
2930 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2931 modified to compute correctly the object path of a SAL project that is
2932 extending another library project.
2933 (Write_Path_File): New procedure.
2934 * makeutl.ads (Directories): New table moved from Buildgpr
2935 (Get_Directories): New procedure moved from Buildgpr
2936 (Write_Path_File): New procedure
2937 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2938 paths before binding SALs, instead of Set_Ada_Paths.
2939 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2940 Prj.
2941 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2942 (Current_Source_Path_File_Of): New function
2943 (Set_Current_Object_Path_File_Of): New procedure
2944 (Current_Source_Object_File_Of): New function
2945 (Set_Current_Object_Path_File_Of): New procedure
2946 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2947 (Current_Source_Path_File_Of): New function
2948 (Set_Current_Object_Path_File_Of): New procedure
2949 (Current_Source_Object_File_Of): New function
2950 (Set_Current_Object_Path_File_Of): New procedure
2951
29522011-08-29 Ed Schonberg <schonberg@adacore.com>
2953
2954 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2955 packed entity, use a bit-field assignment only if there is no change of
2956 representation.
2957
c5ecd6b7
AC
29582011-08-29 Thomas Quinot <quinot@adacore.com>
2959
2960 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2961 Is_RTU instead of using Chars comparisons.
2962
29632011-08-29 Thomas Quinot <quinot@adacore.com>
2964
2965 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2966 temporary object if the actual is constrained, and the discriminants
2967 read from the stream don't match.
2968
29692011-08-29 Tristan Gingold <gingold@adacore.com>
2970
2971 * sem_attr.adb, exp_attr.adb: Add handling of
2972 Attribute_System_Allocator_Alignment
2973 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2974 Attribute_System_Allocator_Alignment.
2975 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2976 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2977 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2978 get_target_system_allocator_alignment.
2979
29802011-08-29 Arnaud Charlet <charlet@adacore.com>
2981
2982 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2983 dependencies.
2984
8abdac29
AC
29852011-08-29 Arnaud Charlet <charlet@adacore.com>
2986
2987 * exp_ch3.adb (In_Runtime): Fix typo.
2988
df170605
AC
29892011-08-29 Bob Duff <duff@adacore.com>
2990
2991 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2992
29932011-08-29 Ed Schonberg <schonberg@adacore.com>
2994
2995 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2996 and a separate tag assignment is generated, ensure that the tag
2997 assignment is analyzed.
2998
864a4236
ES
29992011-08-29 Ed Schonberg <schonberg@adacore.com>
3000
3001 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
3002 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
3003 of statement lists that may contain local declarations.
df170605
AC
3004 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
3005 duplicate the triggering statements needed for the expansion of this
3006 construct, when the trigger is a dispatching call to a synchronized
3007 primitive.
864a4236 3008
7f394c1d
AC
30092011-08-29 Arnaud Charlet <charlet@adacore.com>
3010
3011 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
3012 * bindgen.adb: Add comments.
3013 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
3014 in CodePeer mode.
3015
2c1a2cf3
RD
30162011-08-29 Robert Dewar <dewar@adacore.com>
3017
3018 * exp_attr.adb: Minor reformatting.
3019 Minor code reorganization and commenting.
3020 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
3021 reformatting.
3022
0bfc9a64
AC
30232011-08-29 Thomas Quinot <quinot@adacore.com>
3024
3025 * get_scos.adb: Ignore chaining indicators not currently supported
3026 by Ada.
3027
30282011-08-29 Arnaud Charlet <charlet@adacore.com>
3029
3030 * system.ads: Minor editing.
3031
30322011-08-29 Arnaud Charlet <charlet@adacore.com>
3033
3034 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
3035 CodePeer mode.
3036 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
3037 Attribute_Elab_Subp_Body.
3038 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
3039 * sem_util.adb: Update comments.
3040
828d4cf0
TQ
30412011-08-29 Thomas Quinot <quinot@adacore.com>
3042
3043 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
3044 pragma name for each SCO statement corresponding to a pragma.
3045
5cd7bb15
AC
30462011-08-29 Arnaud Charlet <charlet@adacore.com>
3047
3048 * opt.ads: Minor editing.
3049
30502011-08-29 Yannick Moy <moy@adacore.com>
3051
3052 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
3053 that only made sense for CodePeer mode.
3054
30552011-08-29 Jose Ruiz <ruiz@adacore.com>
3056
3057 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
3058 which is no longer used.
3059 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
3060 handling of the 64-bit division check.
3061 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
3062 division available.
3063 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
3064 longer used.
3065
30662011-08-29 Thomas Quinot <quinot@adacore.com>
3067
3068 * get_scos.adb: Minor reformatting.
3069
25b589cb
AC
30702011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3071
3072 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
3073 statement list is wrapped in a block, the block is explicitly analyzed
3074 in order to properly redecorate the entities and create a servicing
3075 finalizer.
3076
30772011-08-29 Tristan Gingold <gingold@adacore.com>
3078
3079 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
3080 (Set_Zero_Cost_Handling): Remove.
3081
30822011-08-29 Thomas Quinot <quinot@adacore.com>
3083
3084 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
3085
1197ddb1
AC
30862011-08-29 Geert Bosch <bosch@adacore.com>
3087
3088 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
3089 instruction, as the latter may produce -0.0, which is not a valid VAX
3090 F float number.
3091 (Neg_G): Likewise for VAX F float.
3092
30932011-08-29 Robert Dewar <dewar@adacore.com>
3094
3095 * exp_util.adb: Minor reformatting.
3096
30972011-08-29 Yannick Moy <moy@adacore.com>
3098
3099 * sem_ch3.adb: Minor comment update.
3100
31012011-08-29 Thomas Quinot <quinot@adacore.com>
3102
3103 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
3104 the operand type.
3105
31062011-08-29 Thomas Quinot <quinot@adacore.com>
3107
3108 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
3109 current statement sequence on a generic instantiation or a subprogram
3110 declaration.
3111
8f66cda7
AC
31122011-08-29 Robert Dewar <dewar@adacore.com>
3113
3114 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
3115 Minor reformatting.
3116
31172011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3118
3119 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3120 Correct the check which involves the freeze node of a controlled or
3121 access-to-controlled type.
3122
31232011-08-29 Geert Bosch <bosch@adacore.com>
3124
3125 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
3126 statements.
3127 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
3128 Asm statements.
3129
cf161d66
AC
31302011-08-29 Yannick Moy <moy@adacore.com>
3131
3132 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
3133 for every index type and component type that is not a subtype_mark.
3134 (Process_Subtype): Set Etype of subtype.
3135
31362011-08-29 Robert Dewar <dewar@adacore.com>
3137
3138 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
3139 reorganization. Minor reformatting.
3140
7cc83cd8
AC
31412011-08-29 Steve Baird <baird@adacore.com>
3142
3143 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
3144 for CodePeer and ALFA modes.
3145
31462011-08-29 Ed Schonberg <schonberg@adacore.com>
3147
3148 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
3149 that comes from an enclosing scope if it is not the renaming of an
3150 actual, to handle properly a spurious ambiguity in an instance.
3151
76af4137
AC
31522011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3153
3154 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
3155 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
3156 use it instead of the Esize of the first parameter.
3157 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
3158 above change.
3159 <Size>: Likewise. Call it for composite types on the RM size.
3160
31612011-08-29 Yannick Moy <moy@adacore.com>
3162
3163 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
3164 * sem_util.adb (Unique_Name): Correct behaviour for names of
3165 compilation units.
3166
9b20e59b
AC
31672011-08-29 Yannick Moy <moy@adacore.com>
3168
3169 * sem_prag.adb (Check_Precondition_Postcondition): In formal
3170 verification mode, analyze pragma expression for correctness, for
3171 pre/post on library-level subprogram, as it is not expanded later.
3172
31732011-08-29 Yannick Moy <moy@adacore.com>
3174
3175 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
3176 in formal verification.
3177
31782011-08-29 Thomas Quinot <quinot@adacore.com>
3179
3180 * sem_util.adb: Minor reformatting.
3181 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
3182 there's no pragma.
3183 * par_sco.ads, par_sco.adb: Update comments.
3184
31852011-08-29 Yannick Moy <moy@adacore.com>
3186
3187 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
3188 associated getter/setter.
3189 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
3190
31912011-08-29 Vincent Celier <celier@adacore.com>
3192
3193 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
3194 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
3195 with declarations for Language_Kind and Dependency_Kind for Ada.
3196 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
3197 (Process_Compiler): Take into account the new attributes Dependency_Kind
3198 and Language_Kind.
3199 (Check_Configuration): Check if language kind is unit based, not if the
3200 language name is Ada.
3201 (Process_Exceptions_Unit_Based): Ditto
3202 (Add_Language): Remove default additions of language and dependency kind
3203 * prj.ads: Minor comment change
3204 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
3205
32062011-08-29 Johannes Kanig <kanig@adacore.com>
3207
3208 * debug.adb: Update comments.
3209
c5bc3df6
JM
32102011-08-24 Joseph Myers <joseph@codesourcery.com>
3211
3212 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
3213 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
3214 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
3215 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
3216 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
3217
e3aa9eba
RO
32182011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3219
3220 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
3221 (GNATLIBCFLAGS_FOR_C): Replace
3222 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
3223 (gnatlib-shared-default, gnatlib-shared-dual-win32)
3224 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
3225 (gnatlib-sjlj, gnatlib-zcx): Likewise.
3226
f446d60e
EB
32272011-08-07 Eric Botcazou <ebotcazou@adacore.com>
3228
3229 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
3230
588c8f48
EB
3231 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
3232
3233 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
3234
28d711bf
NR
32352011-08-05 Nicolas Roche <roche@adacore.com>
3236
3237 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
3238 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
3239 canadian cross.
3240 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3241
993f8920
AC
32422011-08-05 Matthew Heaney <heaney@adacore.com>
3243
3244 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3245 subprogram bodies declared out-of-order.
3246
32472011-08-05 Yannick Moy <moy@adacore.com>
3248
3249 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3250 entities directly in package Standard, otherwise skip the standard
3251 prefix.
3252
9b3956dd
RD
32532011-08-05 Robert Dewar <dewar@adacore.com>
3254
3255 * a-cbmutr.adb: Minor reformatting
3256 (Allocate_Node): refactor node allocation algorithm
3257
32582011-08-05 Robert Dewar <dewar@adacore.com>
3259
3260 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3261 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3262 mode.
3263 (Analyze_Pragma, case Check_Policy): Ditto.
3264 * sem_prag.ads (Check_Disabled): New function
3265 * snames.ads-tmpl: Add Name_Disable.
3266
32672011-08-05 Robert Dewar <dewar@adacore.com>
3268
3269 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3270 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3271
79e705d6
AC
32722011-08-05 Ed Schonberg <schonberg@adacore.com>
3273
3274 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3275 that appears in a generic formal part and applies to a formal
3276 subprogram.
3277
32782011-08-05 Robert Dewar <dewar@adacore.com>
3279
3280 * a-cbmutr.ads: Minor reformatting.
3281
23b6deca
AC
32822011-08-05 Matthew Heaney <heaney@adacore.com>
3283
3284 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3285 to check count, check sign of value instead.
3286 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3287 (Copy_Subtree): allocate copy of source element
3288 (Equal_Subtree): compare elements, not access objects
3289
32902011-08-05 Vincent Celier <celier@adacore.com>
3291
3292 * gnat_ugn.texi: Fix VMS alternative.
3293
a2773bd3
AC
32942011-08-05 Thomas Quinot <quinot@adacore.com>
3295
3296 * sem_ch11.adb: Add comment.
3297
32982011-08-05 Robert Dewar <dewar@adacore.com>
3299
3300 * exp_util.adb: Minor comment fix.
3301
33022011-08-05 Robert Dewar <dewar@adacore.com>
3303
3304 * scng.adb (Error_Unterminated_String): Improve flag position when
3305 comma present.
3306
33072011-08-05 Matthew Heaney <heaney@adacore.com>
3308
3309 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3310 tree containers).
3311 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3312 multiway tree containers.
3313
33142011-08-05 Robert Dewar <dewar@adacore.com>
3315
3316 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3317 * stylesw.adb: Implement -gnatyC to control comment spacing
3318 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3319 -gnatyc/C).
3320 * usage.adb: Add line for -gnatyC.
3321
33222011-08-05 Robert Dewar <dewar@adacore.com>
3323
f446d60e 3324 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
3325 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3326 synonym for COMMENTS2).
3327
dedac3eb
RD
33282011-08-05 Robert Dewar <dewar@adacore.com>
3329
3330 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3331 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3332 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3333 a-comutr.ads, lib-xref.adb: Minor reformatting.
3334
33352011-08-05 Robert Dewar <dewar@adacore.com>
3336
3337 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3338 warning if there is an exception handler present.
3339
7c62a85a
AC
33402011-08-05 Pascal Obry <obry@adacore.com>
3341
3342 * a-iteint.ads: Fix copyright year.
3343
33442011-08-05 Thomas Quinot <quinot@adacore.com>
3345
3346 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3347 statement SCO for a USE clause or a representation clause.
3348
33492011-08-05 Yannick Moy <moy@adacore.com>
3350
3351 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3352 between body and spec for stub.
3353 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3354 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3355 pragma precondition or postcondition, for which the enclosing
3356 subprogram or package in the AST is not the desired one, return empty.
3357
e49208a9
AC
33582011-08-05 Thomas Quinot <quinot@adacore.com>
3359
3360 * g-expect.adb: Minor reformatting.
3361
33622011-08-05 Bob Duff <duff@adacore.com>
3363
3364 * a-fihema.adb: Comment out OS_Lib.
3365
33662011-08-05 Matthew Heaney <heaney@adacore.com>
3367
3368 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3369 (unbounded multiway tree containers) and a-iteint.ads.
3370 * a-comutr.ads, a-comutr.adb:
3371 This is the new Ada 2012 unit for unbounded multiway tree containers
3372 * a-cimutr.ads, a-cimutr.adb
3373 This is the new Ada 2012 unit for indefinite multiway tree containers
3374 * a-iteint.ads: New file.
3375
201cdb74
RO
33762011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3377
f446d60e 3378 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 3379
d50f4827
AC
33802011-08-05 Bob Duff <duff@adacore.com>
3381
3382 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3383 subpools.
3384 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3385
33862011-08-05 Ed Schonberg <schonberg@adacore.com>
3387
3388 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3389 general indexing aspects of Ada2012. Called when analyzing indexed
3390 components when other interpretations fail.
3391 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3392 in an expression context where overloading is meaningful. This excludes
3393 the occurrence in an aspect specification (efficiency only).
3394 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3395 related to iterators can be set by an attribute specification, but
3396 cannot be queried.
3397 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3398 Constant_Indexing and Variable_Indexing.
3399 (Check_Indexing_Functions): New procedure to perform legality checks.
3400 Additional semantic checks at end of declarations.
3401
efe05dfc
AC
34022011-08-05 Sergey Rybin <rybin@adacore.com>
3403
3404 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3405 order of calling Tree_Write/Tree_Read routines made for aspects.
3406
34072011-08-05 Bob Duff <duff@adacore.com>
3408
3409 * a-fihema.adb (Finalize): Fix race condition.
3410
5f9cdefe
AC
34112011-08-05 Yannick Moy <moy@adacore.com>
3412
3413 * sem_ch12.adb (Analyze_Package_Instantiation,
3414 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3415 mode.
3416
34172011-08-05 Ed Schonberg <schonberg@adacore.com>
3418
3419 * sem_type.adb (Specific_Type): in an instance, the type-specific
3420 operand of an equality check that involves null may have a private
3421 type. Use full view to determine legality of construct.
3422
822868aa
AC
34232011-08-05 Vincent Celier <celier@adacore.com>
3424
3425 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3426 delete or close the file when the call to gnatmake was successful.
3427
34282011-08-05 Yannick Moy <moy@adacore.com>
3429
3430 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3431 Global_Discard_Names.
3432
34332011-08-05 Ed Schonberg <schonberg@adacore.com>
3434
3435 * sinfo.ads: comments on use of entity field for aspect specifications.
3436
34372011-08-05 Ed Schonberg <schonberg@adacore.com>
3438
3439 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3440 node is not itself an entity but a selected component, it is a
3441 rewritten parameterless call to an en enclosing synchronized operation,
3442 and this expansion will be performed again in the instance, so there is
3443 no global information to preserve.
3444
44a10091
AC
34452011-08-05 Javier Miranda <miranda@adacore.com>
3446
3447 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3448 for renamings of predefined primitives.
3449 (In_Predef_Prims_DT): New subprogram.
3450
34512011-08-05 Ed Schonberg <schonberg@adacore.com>
3452
3453 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3454 possible interpretation of name is a reference type, add an
3455 interpretation that is the designated type of the reference
3456 discriminant of that type.
3457 * sem_res.adb (resolve): If the interpretation imposed by context is an
3458 implicit dereference, rewrite the node as the deference of the
3459 reference discriminant.
3460 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3461 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3462 parent type or base type.
3463 * sem_ch4.adb (Process_Indexed_Component,
3464 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3465 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3466 Check for implicit dereference.
3467 (List_Operand_Interps): Indicate when an implicit dereference is
3468 ambiguous.
3469 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3470
34712011-08-05 Thomas Quinot <quinot@adacore.com>
3472
3473 * scos.ads: Update documentation of SCO table. Pragma statements can now
3474 be marked as disabled (using 'p' instead of 'P' as the statement kind).
3475 * par_sco.ads, par_sco.adb: Implement the above change.
3476 (Process_Decisions_Defer): Generate a P decision for the first parameter
3477 of a dyadic pragma Debug.
3478 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3479 necessary.
3480 * put_scos.adb: Code simplification based on above change.
3481
bb3c784c
AC
34822011-08-05 Robert Dewar <dewar@adacore.com>
3483
3484 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3485 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3486 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3487 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3488
34892011-08-05 Bob Duff <duff@adacore.com>
3490
3491 * a-stunau.ads, g-spipat.adb: Update comments.
3492
36f686f9
BD
34932011-08-05 Bob Duff <duff@adacore.com>
3494
3495 * a-fihema.ads: Minor comment fix.
3496 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3497 correct.
3498 (Attach, Detach): Remove some unnecessary code.
3499 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3500
7882673f
BD
35012011-08-05 Bob Duff <duff@adacore.com>
3502
3503 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3504 allocation for Objects component. This simplifies the code somewhat. It
3505 is also a little more efficient in the not-so-unusual case where there
3506 are no controlled objects allocated.
3507 Make Finalization_Started flag atomic.
3508 (Finalize): Avoid unnecessary detachment of items from the list.
3509 (pcol): Minor cleanup.
3510
d34cd274
AC
35112011-08-05 Ed Schonberg <schonberg@adacore.com>
3512
3513 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3514 package whose name is the same as that of the generic unit, or its
3515 ultimate prefix.
3516
35172011-08-05 Bob Duff <duff@adacore.com>
3518
3519 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3520 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3521 Minor comment fixes.
3522
00332244
AC
35232011-08-05 Arnaud Charlet <charlet@adacore.com>
3524
3525 * make.adb (Linking_Phase): No longer need to set source search path
3526 before calling gnatlink in CodePeer mode.
3527 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3528 gcc in CodePeer mode, since the binder generated file no longer has a
3529 'with Main'.
3530 * switch.ads, switch.adb (Is_Language_Switch): Removed.
3531 * switch-c.adb: Update comment.
3532
35332011-08-05 Thomas Quinot <quinot@adacore.com>
3534
3535 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3536
35372011-08-05 Nicolas Roche <roche@adacore.com>
3538
3539 * gnat_ugn.texi: Fix minor syntax error issue.
3540
35412011-08-05 Vincent Celier <celier@adacore.com>
3542
3543 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3544 delete or close the file when the call to gnatmake returns a non
3545 successful return code.
3546
35472011-08-05 Ed Schonberg <schonberg@adacore.com>
3548
3549 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3550 check, indicate that the copy of the original node does not come from
3551 source, to prevent an infinite recursion of the expansion.
3552
35532011-08-05 Johannes Kanig <kanig@adacore.com>
3554
3555 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3556 VC generation for subprogram bodies.
3557
35582011-08-05 Yannick Moy <moy@adacore.com>
3559
3560 * einfo.ads: Typo.
3561 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3562 the base type with the smallest allowed base type.
3563
35642011-08-05 Sergey Rybin <rybin@adacore.com>
3565
3566 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3567 aspects.
3568
35692011-08-05 Ed Schonberg <schonberg@adacore.com>
3570
3571 * sem_ch12.ads: minor comment updates.
3572
35732011-08-05 Ed Schonberg <schonberg@adacore.com>
3574
3575 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3576 instantiation and a formal package the compiler generates a package
3577 renaming declaration so that the generic name within the declaration
3578 is interpreted as a renaming of the instance. At the end of a formal
3579 package declaration, this renaming must become invisible.
3580
0da80d7d
AC
35812011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3582
3583 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3584 comparison and rely on concrete entities instead.
3585
35862011-08-05 Ed Schonberg <schonberg@adacore.com>
3587
3588 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3589 and discriminants, to indicate that the type has an access discriminant
3590 that supports implicit dereference.
3591 * snames.ads-tmpl: Add names of aspects and attributes related to
3592 Ada2012 iterators: constant_indexing, default_iterator,
3593 iterator_element, implicit_dereference, variable_indexing.
3594 * aspects.ads, aspects.adb: entries for iterator-related aspects.
3595 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3596 iterator-related aspects.
3597 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3598
35992011-08-05 Sergey Rybin <rybin@adacore.com>
3600
3601 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3602 metrics in gnatmetric to cover new kinds of coupling mentrics.
3603
36042011-08-05 Steve Baird <baird@adacore.com>
3605
3606 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 3607 of calling the user-defined main subprogram.
0da80d7d
AC
3608 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
3609 is set) Call_Main_Subprogram ahead of, as opposed to
3610 inside of, Main.
3611 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3612 generation of a "with" of the user-defined main subprogram.
3613 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3614 (which is now called from Gen_Main instead).
3615
73242473
AC
36162011-08-05 Emmanuel Briot <briot@adacore.com>
3617
3618 * projects.texi: Added reference to the Makefile package.
3619
36202011-08-05 Thomas Quinot <quinot@adacore.com>
3621
3622 * exp_ch7.adb: Minor comment rewording.
3623
36242011-08-05 Ed Falis <falis@adacore.com>
3625
3626 * env.c: Fix comment.
3627
36282011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3629
3630 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3631 character comparison and rely on concrete entities instead.
3632
97ed5872
AC
36332011-08-05 Ed Schonberg <schonberg@adacore.com>
3634
3635 * sem_ch3.adb: (Check_Private_Overriding): better error message,
3636 suggested by AI95-0068.
3637
36382011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
3639
3640 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3641 the two potential initialization calls. This accounts for any
3642 access-before-elaboration checks which may precede the initialization
3643 calls.
3644 (Next_Suitable_Statement): New routine. Returns the next real statement
3645 after the input node while skipping generated checks.
3646 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3647 with comment on usage.
3648 Do not generate Elaborate_All when the trigger is a finalization call
3649 coming from a type init proc.
3650 (Check_Elab_Call): Propagate the initialization procedure context to
3651 subsequent calls to Check_A_Call.
3652 (Check_Internal_Call_Continue): Propagate the initialization procedure
3653 context to subsequent calls to Check_Elab_Call.
3654 (Is_Finalization_Procedure): New routine. Returns True if the input
3655 entity denotes a [Deep_]Finalize routine.
3656 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3657 along with comment on usage.
3658
36592011-08-05 Vadim Godunko <godunko@adacore.com>
3660
3661 * s-atocou.ads: Add list of supported platforms.
3662
36632011-08-05 Yannick Moy <moy@adacore.com>
3664
3665 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3666
3667 * opt.ads (Disable_ALI_File): new Boolean flag
3668 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3669
36702011-08-05 Ed Falis <falis@adacore.com>
3671
3672 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3673 environ is properly defined.
3674
36752011-08-05 Vincent Celier <celier@adacore.com>
3676
3677 * make.adb (Compilation_Phase): Exit immediately when all objects have
3678 been found up to date, to avoid multiple exit messages.
3679 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3680 same project for languages with no compiler.
3681 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3682 -eI.
9aff36e9
RD
36832011-08-05 Robert Dewar <dewar@adacore.com>
3684
3685 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3686 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3687 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3688 s-atocou-builtin.adb: Minor reformatting.
3689
406935b6
AC
36902011-08-05 Yannick Moy <moy@adacore.com>
3691
3692 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3693 if the node to wrap is a pragma check, this node and enclosed
3694 expression are not expanded, so do not apply any transformations here.
3695 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3696 introducing transient scopes.
3697
36982011-08-05 Jose Ruiz <ruiz@adacore.com>
3699
3700 * adaint.c (__gnat_set_writable, __gnat_set_readable,
3701 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3702 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3703 routine is available, so we use the default implementation of these
3704 functions.
3705 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3706 support for copying attributes on VxWorks 6.
3707
37082011-08-05 Yannick Moy <moy@adacore.com>
3709
3710 * debug.adb: Remove use of -gnatd.D.
3711 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3712 * opt.ads: Simplify variables for ALFA mode, to keep one only
3713 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3714 to ALFA mode.
3715
37162011-08-05 Vincent Celier <celier@adacore.com>
3717
3718 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3719 Builder'Default_Switches.
3720
37212011-08-05 Vincent Celier <celier@adacore.com>
3722
3723 * makeusg.adb: Add lines for --create-map-file switches.
3724
37252011-08-05 Ed Schonberg <schonberg@adacore.com>
3726
3727 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3728 profile is incomplete and the full view is available, replace it with
3729 the full view.
3730 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3731 incomplete, freezing the subprogram is delayed until the full view is
3732 frozen.
3733 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3734 fixed-point multiplication operator and the predefined operator is
3735 resolved in favor of the user-defined one.
3736
96c891b3
RO
37372011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3738
3739 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3740 CONST_CAST.
3741
276e7ed0
AC
37422011-08-04 Ed Schonberg <schonberg@adacore.com>
3743
3744 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3745 whether a type lacks user-defined Read or Write operations, or has a
3746 component that lacks them.
3747 * sem_attr.adb (Check_Stream_Attribute): if restriction
3748 No_Default_Stream_Attributes is active, verify that all subcomponent
3749 types of the target have user-defined stream operations, and report
3750 error otherwise.
3751 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3752 * exp_strm.adb: Build_Elementary_Input_Call,
3753 Build_Elementary_Write_Call): remove checks for restriction
3754 No_Default_Stream_Attributes, now checked in semantics.
3755
37562011-08-04 Vincent Celier <celier@adacore.com>
3757
3758 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3759 switches on the command line, look for all valid --RTS switches in the
3760 Builder switches and for each language use the first runtime name found
3761 to invoke gprconfig.
3762 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3763 command line and there is no auto-configuration.
3764 (Runtime_Name_Set_For): New function.
3765
37662011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3767
3768 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3769 elaborate initialization expression for variable Abort when processing
3770 a package body or a declaration.
3771 (Create_Finalizer): Propagate the package context when creating the
3772 exception-related variables.
3773 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3774 For_Package along with usage comment.
3775
19172ae9
AC
37762011-08-04 Arnaud Charlet <charlet@adacore.com>
3777
3778 * gcc-interface/Makefile.in: Clean up targets.
3779 Enable new package for atomic counters and copy-on-write implementation
3780 of unbounded strings on x86 platforms.
3781 * gcc-interface/Make-lang.in: Update dependencies.
3782
0319cacc
AC
37832011-08-04 Robert Dewar <dewar@adacore.com>
3784
3785 * exp_ch7.adb: Minor reformatting.
3786
37872011-08-04 Robert Dewar <dewar@adacore.com>
3788
3789 * exp_strm.adb: Minor reformatting.
3790
37912011-08-04 Vadim Godunko <godunko@adacore.com>
3792
3793 * s-atocou.adb: Replace by dummy version and use on targets where atomic
3794 operations are not supported.
3795 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3796 * s-atocou-x86.adb: New file.
3797 * Makefile.rtl: Add s-atocou.o file
3798
37992011-08-04 Arnaud Charlet <charlet@adacore.com>
3800
3801 * make.adb (Compile): Move setting of CodePeer_Mode to ...
3802 (Compilation_Phase): ... here.
3803 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3804
38052011-08-04 Thomas Quinot <quinot@adacore.com>
3806
3807 * Make-generated.in: Fix minor typo in comment.
3808
26e7e1a0
AC
38092011-08-04 Thomas Quinot <quinot@adacore.com>
3810
3811 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3812 the project path.
3813
38142011-08-04 Robert Dewar <dewar@adacore.com>
3815
3816 * a-coinho.adb: Minor reformatting.
3817
38182011-08-04 Robert Dewar <dewar@adacore.com>
3819
3820 * a-coinho.ads: Minor reformatting.
3821
38222011-08-04 Vadim Godunko <godunko@adacore.com>
3823
3824 * s-atocou.ads, s-atocou.adb: New files.
3825 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3826 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3827 direct use of GCC's atomic builtins and replace them by use of new
3828 atomic counter package.
3829
38302011-08-04 Ed Schonberg <schonberg@adacore.com>
3831
3832 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3833
38342011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3835
3836 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3837 with a call to Get_External_Tag.
3838 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3839 subprogram usage. Remove the guard against package declarations and
3840 bodies since Build_Cleanup_Statements is no longer invoked in that
3841 context.
3842 (Build_Components): Initialize Tagged_Type_Stmts when the context
3843 contains at least one library-level tagged type.
3844 (Build_Finalizer): New local variables Has_Tagged_Types and
3845 Tagged_Type_Stmts along with associated comments on usage. Update the
3846 logic to include tagged type processing.
3847 (Create_Finalizer): Insert all library-level tagged type unregistration
3848 code before the jump block circuitry.
3849 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3850 (Expand_N_Package_Declaration): Remove the call to
3851 Build_Cleanup_Statements.
3852 (Process_Tagged_Type_Declaration): New routine. Generate a call to
3853 unregister the external tag of a tagged type.
3854 (Processing_Actions): Reimplemented to handle tagged types.
3855 (Process_Declarations): Detect the declaration of a library-level
3856 tagged type and carry out the appropriate actions.
3857 (Unregister_Tagged_Types): Removed. The machinery has been directly
3858 merged with Build_Finalizer.
3859
7483c888
AC
38602011-08-04 Robert Dewar <dewar@adacore.com>
3861
3862 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3863 gnatls.adb, exp_ch3.adb: Minor reformatting.
3864
38652011-08-04 Marc Sango <sango@adacore.com>
3866
3867 * sem_attr.adb (Analyze_Attribute): Replace the message
3868 "invisible attribute of}" of the spark restriction violation in
3869 attribute reference by the simple message "invisible attribute of type".
3870 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3871 two insertion characters: '&' and '}'.
3872
38732011-08-04 Vadim Godunko <godunko@adacore.com>
3874
3875 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3876 * a-coinho.ads, a-coinho.adb: New file.
3877 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3878
5207696c
AC
38792011-08-04 Nicolas Roche <roche@adacore.com>
3880
3881 * alfa_test.adb: Not all ali files are containing alfa information even
3882 if compiled with -gnatd.F. So suppress warning about missing ALFA
3883 information.
3884
38852011-08-04 Yannick Moy <moy@adacore.com>
3886
3887 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3888 scope.
3889 * put_alfa.adb: Check that scope name is not empty.
3890
38912011-08-04 Ed Schonberg <schonberg@adacore.com>
3892
3893 * exp_ch3.adb (Stream_Operation_Ok): new predicate
3894 Needs_Elementary_Stream_Operation, to determine whether user-defined
3895 Read and Write attributes are available for the elementary components
3896 of the given type. If only the predefined attributes are available,
3897 then when restriction No_Default_Stream_Attributes is active the
3898 predefined stream attributes for the composite type cannot be created.
3899
39002011-08-04 Robert Dewar <dewar@adacore.com>
3901
3902 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3903 Put routines in alpha order
3904
2bd2d858
JR
39052011-08-04 Jose Ruiz <ruiz@adacore.com>
3906
3907 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3908 * gcc-interface/Make-lang.in: Update dependencies.
3909
8fae6016
AC
39102011-08-04 Arnaud Charlet <charlet@adacore.com>
3911
3912 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3913 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3914 gnat1why).
3915
a54d0eb4
AC
39162011-08-04 Robert Dewar <dewar@adacore.com>
3917
3918 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3919 lib-xref-alfa.adb: Minor reformatting.
3920
39212011-08-04 Marc Sango <sango@adacore.com>
3922
3923 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3924 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3925 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3926 mode.
3927
39282011-08-04 Tristan Gingold <gingold@adacore.com>
3929
3930 * bindgen.adb (Gen_Adainit_C): Remove.
3931 (Gen_Adafinal_C): Ditto.
3932 (Gen_Elab_Externals_C): Ditto.
3933 (Gen_Elab_Calls_C): Ditto.
3934 (Gen_Elab_Order_C): Ditto.
3935 (Gen_Elab_Defs_C): Ditto.
3936 (Gen_Finalize_Library_C): Ditto.
3937 (Gen_Finalize_Library_Defs_C): Ditto.
3938 (Gen_Main_C): Ditto.
3939 (Gen_Output_File_C): Ditto.
3940 (Gen_Restrictions_C): Ditto.
3941 (Gen_Versions_C): Ditto.
3942 (Write_Info_Ada_C): Ditto.
3943 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3944 (Gen_Output_File): Do not force Ada_Bind_File anymore.
3945 Always call Gen_Output_File_Ada.
3946 * gnatlink.adb (Begin_Info): Now a constant.
3947 (End_Info): Ditto.
3948 (Ada_Bind_File): Remove
3949 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
3950 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3951 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3952 * opt.ads (Ada_Bind_File): Remove.
3953
39542011-08-04 Thomas Quinot <quinot@adacore.com>
3955
3956 * projects.texi: Document target-specific directory in default project
3957 path for gnatmake.
3958
39592011-08-04 Thomas Quinot <quinot@adacore.com>
3960
3961 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3962 path in all cases .
3963
24558db8
AC
39642011-08-04 Yannick Moy <moy@adacore.com>
3965
3966 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3967 opt.ads, lib-xref.ads: Code clean up.
3968
39692011-08-04 Yannick Moy <moy@adacore.com>
3970
3971 * gnat_rm.texi: Update description of Test_Case
3972 * gnat_ugn.texi: Typo.
3973
39742011-08-04 Ed Falis <falis@adacore.com>
3975
3976 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3977
39782011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3979
3980 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3981 it is of type Root_Controlled. This action eliminates fields Prev and
3982 Next from type equality.
3983
39842011-08-04 Yannick Moy <moy@adacore.com>
3985
3986 * lib-xref-alfa.adb: Correct typo.
3987
39882011-08-04 Matthew Heaney <heaney@adacore.com>
3989
3990 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3991 component.
3992
1f9939b5
AC
39932011-08-04 Yannick Moy <moy@adacore.com>
3994
3995 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3996 (Analyze_Pragma): allow static string expression for name of Test_Case,
3997 instead of simply string literals.
3998 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3999 expressions.
4000
40012011-08-04 Vincent Celier <celier@adacore.com>
4002
4003 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
4004 case suffixes to find truncated main sources.
4005
40062011-08-04 Tristan Gingold <gingold@adacore.com>
4007
4008 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
4009 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
4010 (Compute_Current_Task): Ditto.
4011
40122011-08-04 Tristan Gingold <gingold@adacore.com>
4013
4014 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
4015
40162011-08-04 Yannick Moy <moy@adacore.com>
4017
4018 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
4019 library-level constant.
4020 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
4021 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
4022 used as selector of parameter association, in ALFA mode.
4023
15d8a51d
AC
40242011-08-04 Robert Dewar <dewar@adacore.com>
4025
4026 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
4027 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
4028 reformatting.
4029
40302011-08-04 Arnaud Charlet <charlet@adacore.com>
4031
4032 * make.adb (Linking_Phase): Set source search path before calling
4033 gnatlink in CodePeer mode.
4034
f46faa08
AC
40352011-08-04 Javier Miranda <miranda@adacore.com>
4036
4037 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
4038 Remove code which takes care of building TSDs.
4039 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
4040 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
4041 the accessibility check in VM targets.
4042 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
4043 (Building_Static_DT): Now returns false for VM targets.
4044 (Build_VM_TSDs): Removed.
4045 (Expand_Interface_Conversion): Generate missing runtime check for
4046 conversions to interface types whose target type is unknown at compile
4047 time.
4048 (Make_VM_TSD): Add missing code to disable the generation of calls to
4049 Check_TSD if the tagged type is not defined at library level, or not
4050 has a representation clause specifying its external tag, or -gnatdQ is
4051 active.
4052 * exp_disp.ads (Build_VM_TSDs): Removed.
4053 (Make_VM_TSDs): Spec relocated from exp_disp.adb
4054 * sem_disp.adb (Check_Dispatching_Operation): No code required to
4055 register primitives in the dispatch tables in VM targets.
4056 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
4057 initialization of class-wide interface objects in VM targets.
4058 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
4059 of Make_DT).
4060
40612011-08-04 Jerome Lambourg <lambourg@adacore.com>
4062
4063 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
4064 when dotnet-ld cannot be found.
4065
40662011-08-04 Arnaud Charlet <charlet@adacore.com>
4067
4068 * bindgen.adb: Simplify significantly generation of binder body file in
4069 CodePeer mode.
4070 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
4071 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
4072 not expanded).
4073
2ba7e31e
AC
40742011-08-04 Yannick Moy <moy@adacore.com>
4075
4076 * sem_prag.adb, sem.ads: Code cleanup.
4077
40782011-08-04 Tristan Gingold <gingold@adacore.com>
4079
4080 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
4081 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
4082 results if possible.
4083 * s-stusta.adb (Print): Adjust after changes in s-stausa.
4084 * gnat_ugn.texi: Update dynamic stack usage section.
4085
40862011-08-04 Steve Baird <baird@adacore.com>
4087
4088 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
4089 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
4090 contains only a call to the user-defined main subprogram.
4091 (Gen_Main_Ada) - If CodePeer_Mode is set, then
4092 call the "wrapper" subprogram instead of directly
4093 calling the user-defined main subprogram.
4094
40952011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4096
4097 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
4098 alternatives of a case statement for controlled objects. Rename local
4099 variable A to Dead_Alt.
4100 (Expand_N_If_Statement): Check the then and else statements of an if
4101 statement for controlled objects. Check the then statements of all
4102 elsif parts of an if statement for controlled objects.
4103 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
4104 objects.
4105 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
4106 detects a loop associated with the expansion of an array object.
4107 Augment the processing of the loop statements to account for a possible
4108 wrap done by Process_Statements_For_Controlled_Objects.
4109 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
4110 statements and abortable part of an asynchronous select for controlled
4111 objects.
4112 (Expand_N_Conditional_Entry_Call): Check the else statements of a
4113 conditional entry call for controlled objects.
4114 (Expand_N_Selective_Accept): Check the alternatives of a selective
4115 accept for controlled objects.
4116 (Expand_N_Timed_Entry_Call): Check the entry call and delay
4117 alternatives of a timed entry call for controlled objects.
4118 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
4119 exception handler for controlled objects.
4120 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4121 Add formal parameter Nested_Constructs along with its associated
4122 comment.
4123 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
4124 Requires_Cleanup_Actions.
4125 (Process_Statements_For_Controlled_Objects): New routine.
4126 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
4127 routine. Inspect a node which contains a non-handled sequence of
4128 statements for controlled objects. If such an object is found, the
4129 statements are wrapped in a block.
4130
1bf773bb
AC
41312011-08-04 Bob Duff <duff@adacore.com>
4132
4133 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
4134 need to compare with Class_Wide_Type (T2), in order to get at the
4135 original class-wide type node.
4136 * sem_type.ads (Covers): Improve the comment.
4137 * einfo.ads (Class_Wide_Type): Improve the comment.
4138 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
4139 the type of the Deref.
4140
41412011-08-04 Yannick Moy <moy@adacore.com>
4142
4143 * gnat_rm.texi: Document that Test_Case pragma can only appear on
4144 separate declarations.
4145 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
4146 check identifier of pragma argument.
4147 (Chain_TC): check that no other test case associated to the same entity
4148 share the same name.
4149 (Check_Test_Case): disallow test case inside subprogram body
4150 (Analyze_Pragma): correct call to check identifier and not argument
4151 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
4152 function gets name from test case pragma.
4153
dac3bede
YM
41542011-08-04 Yannick Moy <moy@adacore.com>
4155
4156 * gnat_rm.texi: Document new pragma and aspect.
4157 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
4158 (No_Duplicates_Allowed): new constant array defining whether duplicates
4159 aspects of each kind can appear on the same declaration.
4160 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
4161 field, which points to a node holding the previous Spec_PPC_List.
4162 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
4163 through the indirection with Contract.
4164 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
4165 * par-prag.adb (Prag): do nothing on Test_Case pragma
4166 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
4167 be called directly.
4168 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
4169 component Ensures of Test_Case.
4170 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
4171 (Analyze_Generic_Subprogram_Declaration,
4172 Analyze_Subprogram_Instantiation,
4173 Analyze_Abstract_Subprogram_Declaration,
4174 Analyze_Subprogram_Body_Helper,
4175 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
4176 insert contract in subprogram node at point of definition
4177 * sem_ch13.adb
4178 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
4179 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
4180 corresponding pragma
4181 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
4182 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
4183 similar to the analysis of pre/post
4184 (Derive_Subprogram): insert contract in subprogram node at point of
4185 derivation.
4186 * sem_prag.adb, sem_prag.ads
4187 (Check_Arg_Is_String_Literal, Check_Identifier):
4188 new checking procedures to be called in treatment of pragmas
4189 (Check_Test_Case): new procedure to check that a Test_Case aspect or
4190 pragma is well-formed. This does not check currently that 'Result is
4191 used only in the Ensures component of a Test_Case.
4192 (Analyze_Pragma): add case for Test_Case
4193 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
4194 components of a Test_Case.
4195 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
4196 expressions in the 3rd (and 4th if present) arguments of a Test_Case
4197 pragma, treated as spec expressions.
4198 (Sig_Flags): add value -1 for Test_Case.
4199 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
4200 Get_Requires_From_Test_Case_Pragma): getters for both expression
4201 components of a Test_Case.
4202 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
4203 indirection between an entry or [generic] subprogram entity and its
4204 pre/post + test-cases.
4205 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
4206 get/set for fields of an N_Contract node.
4207 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
4208 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
4209 names and pragma for Test_Case.
4210 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
4211
6a2e5d0f
AC
42122011-08-04 Vincent Celier <celier@adacore.com>
4213
4214 * gnat_ugn.texi: Improve documentation of gnatmake switch
4215 --source-info-file=.
4216
42172011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4218
4219 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
4220 type). Initialize Atyp to the appropriate type which is later checked
4221 for completion. Rewrite the assertion associated with private type
4222 completion.
4223
42242011-08-04 Ed Falis <falis@adacore.com>
4225
4226 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
4227 initialize the number of CPUs.
4228
42292011-08-04 Ed Schonberg <schonberg@adacore.com>
4230
4231 * sem_type.adb (Disambiguate): New subsidiary routine
4232 In_Same_Declaration_List, to implement AI05-0020: a user-defined
4233 equality on an anonymous access type whose designated type is private
4234 does not lead to an ambiguity with the universal access equality
4235 operator in the body or child units of the defining package. The same
4236 is true for a multiplication operator on a private type completed with
4237 a fixed-point-type.
4238
42392011-08-04 Javier Miranda <miranda@adacore.com>
4240
4241 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4242 (Normalize_Scalars_Config): Removed.
4243 * opt.adb
4244 (Register_Opt_Config_Switches): Remove registering config values of
4245 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4246 (Restore_Opt_Config_Switches): Remove code which restores the values of
4247 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4248 Init_Or_Norm_Scalars.
4249 (Save_Opt_Config_Switches): Remove code which saves values of
4250 Init_Or_Norm_Scalars and Normalize_Scalars.
4251 (Set_Opt_Config_Switches): Remove code which restores config values of
4252 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4253 Init_Or_Norm_Scalars.
4254
42552011-08-04 Yannick Moy <moy@adacore.com>
4256
4257 * frontend.adb (Frontend): remove previous patch to avoid full
4258 qualification in ALFA mode.
4259 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4260 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4261 unique name for an entity, which could be used to identify the entity
4262 across compilation units.
4263
42642011-08-04 Thomas Quinot <quinot@adacore.com>
4265
4266 * prj-env.adb
4267 (Initialize_Default_Project_Path): Add target specific directory
4268 ($prefix/$target/lib/gnat) in front of project path in all cases
4269 (making gnatmake's behaviour consistent with gprbuild).
4270 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4271 Pass target name from Sdefault to project subsystem.
4272 * gnatls.adb: Show new target specific default project directory.
4273
42742011-08-04 Johannes Kanig <kanig@adacore.com>
4275
4276 * cstand.adb: Add Information to Identifier in Standard
4277 (Identifer_For): Set Entity to the corresponding entity
4278
483361a6
AC
42792011-08-04 Sergey Rybin <rybin@adacore.com>
4280
4281 * gnat_ugn.texi: Update doc on gnatcheck.
4282
42832011-08-04 Yannick Moy <moy@adacore.com>
4284
4285 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4286 xrefs in a scope.
4287
42882011-08-04 Yannick Moy <moy@adacore.com>
4289
4290 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4291 performing expansion.
4292 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4293 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4294 it is not called in ALFA mode.
4295
ef5569c6
AC
42962011-08-04 Emmanuel Briot <briot@adacore.com>
4297
4298 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4299 after all, so removed.
4300
43012011-08-04 Sergey Rybin <rybin@adacore.com>
4302
4303 * vms_data.ads: Add missing VMS qualifiers.
4304
1ab4a286
EB
43052011-08-04 Emmanuel Briot <briot@adacore.com>
4306
4307 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4308 the list of files on the command line after processing it through
4309 Complete_Mains.
4310
7ae0d98c
AC
43112011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4312
4313 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4314 processing for .NET/JVM. These targets can now benefit from
4315 Raise_From_Controlled_Operation and they share the same processing with
4316 standard targets.
4317 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4318 These targets need transient scopes in order to properly finalize short
4319 lived controlled objects.
4320 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4321 NET/JVM. These targets can now benefit from
4322 Raise_From_Controlled_Operation and they share the same processing with
4323 standard targets.
4324
43252011-08-04 Geert Bosch <bosch@adacore.com>
4326
4327 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4328
43292011-08-04 Ed Schonberg <schonberg@adacore.com>
4330
4331 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4332 Expand_Record_Aggregate, to determine whether aggregate must be
4333 expanded into assignments. This is the case if the ancestor part is
4334 private, regarless of the setting of the flag Has_Private_Ancestor.
4335
43362011-08-04 Ed Falis <falis@adacore.com>
4337
4338 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4339
43402011-08-04 Bob Duff <duff@adacore.com>
4341
4342 * sinfo.ads: Fix comment.
4343
43442011-08-04 Steve Baird <baird@adacore.com>
4345
4346 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4347 choose a package name in much the same way as is
4348 done for JGNAT when VM_Target /= No_VM, except that
4349 a slightly more distinctive prefix string is used.
4350
43512011-08-04 Emmanuel Briot <briot@adacore.com>
4352
4353 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4354 gnatmake command line.
4355 This behavior was never documented (and was supported only because of
4356 an early bug in the code). This case might lead to ambiguous cases
4357 (between unit names and truncated base names without suffixes).
4358
87729e5a
AC
43592011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4360
4361 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4362 Remove the external tag of a tagged type from the internal hash table.
4363 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4364 expanded usage of the routine. Strenghten the check for Is_Master. Add
4365 processing for tagged types.
4366 (Build_Finalizer): Create all the necessary lists used in finalizer
4367 creation when the processed context is a package that may contain
4368 tagged types.
4369 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4370 Requires_Cleanup_Actions.
4371 (Expand_N_Package_Body): Package bodies may need clean up code
4372 depending on whether they contain tagged types.
4373 (Expand_N_Package_Declaration): Package declarations may need clean up
4374 code depending on whether they contain tagged types.
4375 (Unregister_Tagged_Types): New routine. Search through a list of
4376 declarations or statements, looking for non-abstract Ada tagged types.
4377 For each such type, generate code to unregister the external tag.
4378 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4379 Requires_Cleanup_Actions.
4380 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4381 through a list of declarations or statements looking for non-abstract
4382 Ada tagged types or controlled objects.
4383 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4384 Requires_Cleanup_Actions.
4385 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4386 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4387 RE_Unit_Table.
4388
43892011-08-04 Vincent Celier <celier@adacore.com>
4390
4391 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4392 has Ada sources, not project Project, because if the root project
4393 Project has no sources of its own, all projects will be deemed without
4394 sources.
4395
43962011-08-04 Gary Dismukes <dismukes@adacore.com>
4397
4398 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4399 of the No_Param_Proc acc-to-subp type used for initialization of
4400 __gnat_finalize_library_objects so that it's declared at library level
4401 rather than nested inside of the adainit routine.
4402
44032011-08-04 Javier Miranda <miranda@adacore.com>
4404
4405 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4406 if the tagged type has a representation clause which specifies its
4407 external tag.
4408
44092011-08-04 Ed Schonberg <schonberg@adacore.com>
4410
4411 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4412 Remove previous procedure with that name.
4413 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4414 when appropriate.
4415 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4416 subtype mark, the ancestor cannot have unknown discriminants.
4417 (Resolve_Record_Aggregate): if the type has invisible components
4418 because of a private ancestor, the aggregate is illegal.
4419
44202011-08-04 Vincent Celier <celier@adacore.com>
4421
4422 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4423 account switches -gnat2005, -gnat12 and -gnat2012.
4424
44252011-08-04 Bob Duff <duff@adacore.com>
4426
4427 * s-tasdeb.ads: Minor comment fix.
4428
44292011-08-04 Arnaud Charlet <charlet@adacore.com>
4430
4431 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4432 CodePeer mode.
4433 * switch.ads, switch.adb (Is_Language_Switch): New function.
4434
44352011-08-04 Vincent Celier <celier@adacore.com>
4436
4437 * switch-c.adb: Minor comment addition.
4438
44392011-08-04 Vincent Celier <celier@adacore.com>
4440
4441 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4442 ending with '=' is followed by a space (missing file name).
4443
44442011-08-04 Pascal Obry <obry@adacore.com>
4445
4446 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4447
44482011-08-04 Ed Schonberg <schonberg@adacore.com>
4449
4450 * sem_ch12.adb (Analyze_Associations): New routine
4451 Check_Overloaded_Formal_Subprogram to reject a formal package when
4452 there is a named association or a box initialisation for an overloaded
4453 formal subprogram of the corresponding generic.
4454
44552011-08-04 Yannick Moy <moy@adacore.com>
4456
4457 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4458 * get_alfa.adb, put_alfa.adb: Read and write new component of
4459 cross-reference.
4460 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4461
88f47280
AC
44622011-08-04 Pascal Obry <obry@adacore.com>
4463
4464 * urealp.adb: Minor reformatting.
4465
44662011-08-04 Tristan Gingold <gingold@adacore.com>
4467
4468 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4469 Handle the case when Cleanup_Protected_Object returns Empty.
4470
44712011-08-04 Yannick Moy <moy@adacore.com>
4472
4473 * frontend.adb (Frontend): only qualify names in non-ALFA mode
4474
44752011-08-04 Ed Schonberg <schonberg@adacore.com>
4476
4477 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4478 call, ignore functions.
4479
05c53a69
GB
44802011-08-04 Geert Bosch <bosch@adacore.com>
4481
4482 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4483 point.
4484
23cc1ace
EB
44852011-08-04 Emmanuel Briot <briot@adacore.com>
4486
4487 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4488 as an index for Builder'Switches. This conforms to the documentation.
4489 * make.adb (Insert_Project_Sources): avoid duplicate code
4490
cef14201
AC
44912011-08-04 Emmanuel Briot <briot@adacore.com>
4492
4493 * makeutl.adb (Complete_Mains): if the user has passed a relative file
4494 name on the command line (for instance "../dummy"), never assume it can
4495 be a unit name.
4496
44972011-08-04 Tristan Gingold <gingold@adacore.com>
4498
4499 * bindgen.adb: Remove code the reference or create the
4500 Break_Start/__gnat_break_start procedure.
4501 * s-stalib.adb (Break_Start): Removed.
4502
e2fee30d
EB
45032011-08-04 Emmanuel Briot <briot@adacore.com>
4504
4505 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4506 shared with gprbuild.
4507
2d395256
AC
45082011-08-04 Yannick Moy <moy@adacore.com>
4509
4510 * par-ch4.adb (P_Primary): preferentially issue an error message about
4511 a missing parenthesis arount a conditional or case expression in Ada
4512 2012 mode, if we detect that the alignment is not correct for a
4513 statement.
4514
45152011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4516
4517 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4518 tag-to-class-wide conversion as needing finalization actions.
4519 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4520 a tag-to-class-wide conversion as needing finalization actions.
4521 (Is_Finalizable_Transient): The result of a tag-to-class-wide
4522 conversion does not need finalization actions.
4523 (Is_Tag_To_CW_Conversion): New routine.
4524 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4525 whether an object is the result of a tag-to-class-wide conversion.
4526
45272011-08-04 Yannick Moy <moy@adacore.com>
4528
4529 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4530 the left-hand-side and right-hand-side of a conjunct are inserted when
4531 translating a pre- or postcondition
4532 * sem_ch6.adb: Correct typo in comment
4533
45342011-08-04 Ed Schonberg <schonberg@adacore.com>
4535
4536 * gnat_rm.texi: Ravenscar does not prohibit dependence on
4537 Unchecked_Conversion and Unchecked_Deallocation.
4538
45392011-08-04 Thomas Quinot <quinot@adacore.com>
4540
4541 * make.adb: Minor reformatting.
4542
767ab2fd
EB
45432011-08-04 Emmanuel Briot <briot@adacore.com>
4544
4545 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4546 sources in the project and its imported projects, but not in the whole
4547 tree.
4548
8fb3f5df
AC
45492011-08-04 Emmanuel Briot <briot@adacore.com>
4550
4551 * make.adb: Remove debug trace.
4552
45532011-08-04 Vincent Celier <celier@adacore.com>
4554
4555 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4556 path in canonical form, to be able to compare path names on platforms
4557 such as Windows or Darwin.
4558
45592011-08-04 Thomas Quinot <quinot@adacore.com>
4560
4561 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4562 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4563 * scos.ads: Update documentation accordingly.
4564 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4565 pragmas.
4566
9515740f
AC
45672011-08-04 Ed Schonberg <schonberg@adacore.com>
4568
4569 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4570 attribute only if prefix type is scalar.
4571
45722011-08-04 Emmanuel Briot <briot@adacore.com>
4573
4574 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4575 in gnatmake for specifying mains on the command line that do not belong
4576 to the main project. These mains must currently all belong to the same
4577 project, though.
4578 (Ultimate_Extension_Of): removed, since duplicated
4579 Ultimate_Extending_Project.
4580
92966893
AC
45812011-08-04 Arnaud Charlet <charlet@adacore.com>
4582
4583 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4584 instead.
4585 (CodePeer_Mode_String): New.
4586 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4587 CodePeer mode.
4588 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4589 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4590 mode, since no useful elaboration subprogram is needed by CodePeer.
4591 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4592 In this mode, compile binder file with -gnatC and do stop after this
4593 step.
4594
45952011-08-04 Vincent Celier <celier@adacore.com>
4596
4597 * exp_ch7.adb: Minor comment fix.
4598
5969611f
RD
45992011-08-04 Robert Dewar <dewar@adacore.com>
4600
4601 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4602 exp_ch4.adb, makeutl.adb: Minor reformatting.
4603
6367dd30
AC
46042011-08-04 Emmanuel Briot <briot@adacore.com>
4605
4606 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4607 Create several new subprograms to move code out of Make. This makes the
4608 code more readable, removes code duplication, and is a preparation work
4609 for adding support for aggregate projects.
4610
46112011-08-04 Tristan Gingold <gingold@adacore.com>
4612
4613 * s-po32gl.ads, s-po32gl.adb: New files.
4614 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4615 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4616 (Build_Finalization_Collection): Use it.
4617 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4618 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4619 literals.
4620 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4621 * gcc-interface/Make-lang.in: Update dependencies.
4622
cd8bfe35
EB
46232011-08-04 Emmanuel Briot <briot@adacore.com>
4624
4625 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4626 the command line.
4627
7db29ea7
EB
46282011-08-04 Emmanuel Briot <briot@adacore.com>
4629
4630 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4631 command line is not a file name, also check whether it could be a unit
4632 name.
4633
d9b056ea
AC
46342011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4635
4636 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4637 the header of the finalization routine.
4638 If the unit has no finalizer but is a body whose spec has one, then
4639 generate the decrement of the elaboration entity only.
4640 If the unit has a finalizer and is a spec, then do not generate the
4641 decrement of the elaboration entity.
4642 (Gen_Finalize_Library_C): Likewise.
4643
46442011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4645
4646 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4647 (Bounds_Size_Expression): Removed.
4648 (Double_Alignment_Of): New subsidiary routine.
4649 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4650 for a hole in the dope vector of unconstrained arrays due to different
4651 index and element alignments.
4652
46532011-08-04 Ed Schonberg <schonberg@adacore.com>
4654
4655 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4656 raise program_error because body has not been seen yet.
4657
46582011-08-04 Ed Schonberg <schonberg@adacore.com>
4659
4660 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4661 an unresolved name.
4662
46632011-08-04 Vincent Celier <celier@adacore.com>
4664
4665 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4666
46672011-08-04 Yannick Moy <moy@adacore.com>
4668
4669 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4670 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4671
46722011-08-04 Thomas Quinot <quinot@adacore.com>
4673
4674 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4675 instantiation in RCI.
4676
46772011-08-04 Emmanuel Briot <briot@adacore.com>
4678
4679 * make.adb: Share more code with gprbuild
4680
f5fc5b9d
AC
46812011-08-04 Emmanuel Briot <briot@adacore.com>
4682
4683 * projects.texi: Added documentation for the IDE'Gnat project file
4684 attribute.
4685
46862011-08-04 Nicolas Roche <roche@adacore.com>
4687
4688 * gnat_rm.texi: Minor editing.
4689
46902011-08-04 Javier Miranda <miranda@adacore.com>
4691
4692 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4693 and the library case for VM targets.
4694 (Gen_Adainit_Ada): Likewise.
4695
46962011-08-04 Robert Dewar <dewar@adacore.com>
4697
4698 * g-altive.ads: Minor comment updates.
4699 * prj-nmsc.adb: Minor reformatting.
4700
47012011-08-04 Javier Miranda <miranda@adacore.com>
4702
4703 * opt.ads
4704 (Normalize_Scalars_Config): Value of the configuration switch set by
4705 pragma Normalize_Scalars when it appears in the gnat.adc file.
4706 (Normalize_Scalars): New field for record Config_Switches_Type. Used
4707 to save and restore settings of this pragma.
4708 * opt.adb
4709 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4710 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4711
47122011-08-04 Vincent Celier <celier@adacore.com>
4713
4714 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4715
0c4683cf
AC
47162011-08-04 Arnaud Charlet <charlet@adacore.com>
4717
4718 * makeutl.adb: Minor reformatting.
4719
47202011-08-04 Olivier Hainque <hainque@adacore.com>
4721
4722 * g-altive.ads: Update comments to reflect that only the soft
4723 binding is available today.
4724
2598ee6d
RD
47252011-08-04 Robert Dewar <dewar@adacore.com>
4726
4727 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4728 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4729 * gcc-interface/Make-lang.in: Update dependencies.
4730
c2db4b32
AC
47312011-08-04 Arnaud Charlet <charlet@adacore.com>
4732
4733 * prj-env.adb: Remove local debug traces.
4734
47352011-08-04 Yannick Moy <moy@adacore.com>
4736
4737 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4738 was used instead of Hi_OK, which could cause a read of an uninitialized
4739 value later on. Detected while working on the new warning.
4740 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4741 to local variable.
4742 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4743 in more cases, in order to detect more unreferenced values.
4744 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4745 object for expression, if any.
4746
47472011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4748
4749 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4750 the operand types instead of the Esize.
4751
47522011-08-04 Steve Baird <baird@adacore.com>
4753
4754 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4755 enable CodePeer_Mode.
4756 * bindusg.adb (Display): Add help message describing -P binder switch.
4757 * gnat_ugn.texi: Document -P binder switch.
4758 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4759 user-defined main program directly.
4760 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4761 user-defined main program in the context clause of the package body.
4762
ad05f2e9
AC
47632011-08-04 Yannick Moy <moy@adacore.com>
4764
4765 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4766 duplicate of Defining_Entity
4767 (Get_Unique_Entity_For_Decl): rename function into
4768 Unique_Defining_Entity
4769 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4770 (Formal_Proof_On): remove synthesized flag
4771 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4772 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4773 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4774 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4775 Annotate (Formal_Proof)
4776
47772011-08-04 Emmanuel Briot <briot@adacore.com>
4778
4779 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4780 source files with non-standard naming schemes, in imported projects
4781
756ef2a0
AC
47822011-08-04 Emmanuel Briot <briot@adacore.com>
4783
4784 * makeutl.adb (Complete_Mains): when a multi-unit source file is
4785 specified on the gprbuild command line, we need to compile all units
4786 within that file, not just the first one we find
4787 Fix error message for mains that are not found.
4788
47892011-08-04 Thomas Quinot <quinot@adacore.com>
4790
4791 * sem_ch6.adb: Update comment.
4792 * sem_ch12.adb: Minor reformatting.
4793
47942011-08-04 Bob Duff <duff@adacore.com>
4795
4796 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4797 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4798 race condition whose symptom is to fail to lock Parent. That, in turn,
4799 causes Parent.Awake_Count to be accessed without locking Parent, which
4800 causes another race condition whose symptom is that Parent.Awake_Count
4801 can be off by 1 (either too high or too low). The solution is to lock
4802 Parent unconditionally, and then lock Acceptor, before reading
4803 Acceptor.Terminate_Alternative.
4804
4fdebd93
AC
48052011-08-04 Arnaud Charlet <charlet@adacore.com>
4806
4807 * debug.adb: Update comment.
4808
48092011-08-04 Robert Dewar <dewar@adacore.com>
4810
4811 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4812 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4813 exp_ch6.adb: Minor reformatting.
4814
48152011-08-04 Gary Dismukes <dismukes@adacore.com>
4816
4817 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4818 checks for -gnateE.
4819
48202011-08-04 Ed Schonberg <schonberg@adacore.com>
4821
4822 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4823
48242011-08-04 Thomas Quinot <quinot@adacore.com>
4825
4826 * sinfo.ads: Minor reformatting.
4827
48282011-08-04 Emmanuel Briot <briot@adacore.com>
4829
4830 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4831 even if there is no location.
4832
6aaa0587
ES
48332011-08-04 Ed Schonberg <schonberg@adacore.com>
4834
4835 * sem_res.adb, sem_ch4.adb: move check for restriction
4836 No_Task_Hierarchy to resolve_allocator.
4837
35a1c212
AC
48382011-08-04 Thomas Quinot <quinot@adacore.com>
4839
4840 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4841 This flag of N_Pragma nodes is not used, remove it as well as all of
4842 the associated circuitry.
4843
48442011-08-04 Javier Miranda <miranda@adacore.com>
4845
4846 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4847 runtime check on duplicated externa tags
4848 * debug.adb Document switch -gnatdQ.
4849
48502011-08-04 Gary Dismukes <dismukes@adacore.com>
4851
4852 * a-fihema.ads: Minor typo fix.
4853
48542011-08-04 Yannick Moy <moy@adacore.com>
4855
4856 * sem_ch10.adb: Minor comment update.
4857
48582011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4859
4860 * einfo.adb: Update the node field usage to reflect the renaming of
4861 Return_Flag to Return_ Flag_Or_Transient_Decl.
4862 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4863 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4864 (Write_Field15_Name): Change Return_Flag to
4865 Return_Flag_Or_Transient_Decl.
4866 * einfo.ads: Rename node field Return_Flag to
4867 Return_Flag_Or_Transient_Decl. Update the associated comment and all
4868 occurrences in entities.
4869 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4870 associated Inline pragma.
4871 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4872 associated Inline pragma.
4873 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4874 routine.
4875 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4876 Return_Flag and Set_Return_Flag.
4877 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4878 objects generated for controlled transients declared inside an
4879 Exception_With_Actions. Update the calls to Return_Flag.
4880 (Process_Object_Declaration): Add code to add a null guard for hook
4881 objects generated for controlled transients declared inside an
4882 Exception_With_Actions. Update related comment.
4883 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4884 objects generated for controlled transients declared inside an
4885 Exception_With_Actions. Update the calls to Return_Flag.
4886 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4887
48882011-08-04 Ed Schonberg <schonberg@adacore.com>
4889
4890 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4891 positional aggregate.
4892
48932011-08-04 Vincent Celier <celier@adacore.com>
4894
4895 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4896 SLOC only for pragmas.
4897
48982011-08-04 Emmanuel Briot <briot@adacore.com>
4899
4900 * projects.texi: Minor typo fix.
4901
49022011-08-04 Emmanuel Briot <briot@adacore.com>
4903
4904 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4905 on case-sensitive file systems.
4906
c2873f74
TQ
49072011-08-04 Thomas Quinot <quinot@adacore.com>
4908
4909 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4910 nested in a disabled pragma.
4911 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4912 enclosing pragma, if any, for X decisions.
4913
49142011-08-04 Thomas Quinot <quinot@adacore.com>
4915
4916 * sem_prag.adb: Minor reformatting.
4917
46414266
VC
49182011-08-04 Vincent Celier <celier@adacore.com>
4919
4920 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4921 allowed in no run time mode.
4922
49232011-08-04 Vincent Celier <celier@adacore.com>
4924
4925 * make.adb (Check): When -gnatc is used, check for the source file
4926 inside the ALI file with a canonical case file name.
4927
afab164f
EB
49282011-08-04 Emmanuel Briot <briot@adacore.com>
4929
4930 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4931 overriding the separator.
4932
fe0ec02f
AC
49332011-08-04 Robert Dewar <dewar@adacore.com>
4934
4935 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4936 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4937
49382011-08-04 Robert Dewar <dewar@adacore.com>
4939
4940 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4941
49422011-08-04 Yannick Moy <moy@adacore.com>
4943
4944 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4945 'Result only appears in postcondition of function.
4946
49472011-08-04 Thomas Quinot <quinot@adacore.com>
4948
4949 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4950 external tag, include the value of the external tag in the exception
4951 message.
4952
0180fd26
AC
49532011-08-04 Yannick Moy <moy@adacore.com>
4954
4955 * sem_attr.adb (Result): modify error message for misplaced 'Result
4956
49572011-08-04 Sergey Rybin <rybin@adacore.com>
4958
4959 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4960 clear that the second argument must be an identifier.
4961
49622011-08-04 Thomas Quinot <quinot@adacore.com>
4963
4964 * exp_ch9.adb (Build_Barrier_Function): When compiling with
4965 -fpreserve-control-flow, insert an IF statement on the barrier
4966 condition to ensure that a conditional branch instruction is generated.
4967
49682011-08-04 Emmanuel Briot <briot@adacore.com>
4969
4970 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4971 (Processing_Flags.Ignore_Missing_With): new flag.
4972
49732011-08-04 Emmanuel Briot <briot@adacore.com>
4974
4975 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4976 Source_List_File on case-insensitive systems where the file is actually
4977 on a case-sensitive file system (NFS,...).
4978
49792011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4980
4981 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4982 function return contains a controlled [extension] aggregate and the
4983 return statement is not part of a handled sequence of statements, wrap
4984 the return in a block. This ensures that all controlled temporaries
4985 generated during aggregate resolution will be picked up by the
4986 finalization machinery.
4987
49882011-08-04 Ed Schonberg <schonberg@adacore.com>
4989
4990 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4991 components, freeze type before resolution, to ensure that default
4992 initializations are present for all components.
4993 * sem_res.adb (Resolve_Actuals): the designated object of an
4994 accces-to-constant type is a legal actual in a call to an
4995 initialization procedure.
4996
49972011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4998
4999 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
5000 N_Unchecked_Type_Conversion to the possible containers of a renamed
5001 transient variable.
5002
78efd712
AC
50032011-08-04 Yannick Moy <moy@adacore.com>
5004
5005 * par-ch13.adb (Aspect_Specifications_Present): recognize
5006 "with Identifier'Class =>" as an aspect, so that a meaningful warning
5007 is issued in Strict mode.
5008 * par.adb: Fix typos in comments.
5009
50102011-08-04 Yannick Moy <moy@adacore.com>
5011
5012 * sem_attr.adb (Result): modify error message to take into account Post
5013 aspect when compiling Ada 2012 (or newer) code.
5014
50152011-08-04 Nicolas Roche <roche@adacore.com>
5016
5017 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 5018 remove need for GCC exceptions.
78efd712
AC
5019
50202011-08-04 Vincent Celier <celier@adacore.com>
5021
5022 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
5023 project, not the source file name.
5024 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
5025 excluded, continue looking. This excluded source will only be returned
5026 if there is no other source with the same base name that is not locally
5027 removed.
5028
50292011-08-04 Ed Schonberg <schonberg@adacore.com>
5030
5031 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
5032 private and one of the operands is a real literal, use a qualified
5033 expression rather than a conversion which is not meaningful to the
5034 back-end.
5035
0170a691
AC
50362011-08-04 Yannick Moy <moy@adacore.com>
5037
5038 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
5039 corresponding aspect X'Class are allowed, proceed with analysis of the
5040 aspect instead of skipping it.
5041
50422011-08-04 Tristan Gingold <gingold@adacore.com>
5043
5044 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
5045 This will allow to have an Ada implementation for the subprogram.
5046
deb4f5ba
ES
50472011-08-04 Ed Schonberg <schonberg@adacore.com>
5048
5049 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
5050 completion and aspects are present, apply them to the entity for the
5051 type which is currently the partial view, but which is the one that
5052 will be frozen.
5053 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
5054 applies to a partial view, indicate that the full view has predicates
5055 and delayed aspects.
5056 (Replace_Type_Reference): Handle properly predicates that apply to the
5057 full view of a private completion.
5058
fc893455
AC
50592011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5060
5061 * layout.adb (Layout_Type): For composite types, do not set Esize.
5062 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
5063 set Esize.
5064 (Size_Known): Look at the RM size of components instead of the Esize.
5065 (Freeze_Record_Type): Look at the RM size instead of the Esize to
5066 issue warning and activate Implicit_Packing.
5067 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
5068 if the Esize is not known.
5069 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
5070 for elementary types only.
5071 (Analyze_Record_Representation_Clause): Look at the RM size instead
5072 of the Esize to issue errors.
5073 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
5074 is not known.
5075 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 5076 obsolete block.
fc893455
AC
5077 Look at the RM size instead of the Esize for types if the latter is
5078 not known.
5079 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
5080
50812011-08-04 Ed Schonberg <schonberg@adacore.com>
5082
5083 * sem_type.adb: proper handling of equality not involving anonymous
5084 access types.
5085
b37d5bc6
AC
50862011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5087
5088 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
5089 Vis_Decls. When creating a library-level finalizer for a package spec,
5090 both the declaration and body of the finalizer are inserted either in
5091 the visible or private declarations of the package spec.
5092
50932011-08-04 Javier Miranda <miranda@adacore.com>
5094
5095 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
5096 use of the full-view of a type when invoking Is_Ancestor.
5097 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
5098 the full-view of private parents is requested, then use also the
5099 full-view of the parent of the first derivation.
5100
7ab4d95a
AC
51012011-08-04 Tristan Gingold <gingold@adacore.com>
5102
5103 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
5104 instead of the locally imported procedure.
5105 * s-taprop-mingw.adb (Enter_Task): Ditto.
5106 * s-valrea.adb (Scan_Real): Ditto.
5107 * s-imgrea.adb (Set_Image_Real): Ditto.
5108 * s-flocon.ads: Make the package pure.
5109
51102011-08-04 Thomas Quinot <quinot@adacore.com>
5111
5112 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
5113 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
5114 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
5115 New subprogram, moved here from...
5116 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
5117 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
5118 rewriting of the last argument into a procedure call statement here...
5119 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
5120 instead.
5121
51222011-08-04 Thomas Quinot <quinot@adacore.com>
5123
5124 * par_sco.adb: Minor reformatting.
5125
51c400f5
AC
51262011-08-04 Robert Dewar <dewar@adacore.com>
5127
5128 * erroutc.adb: Minor reformatting.
5129
51302011-08-04 Thomas Quinot <quinot@adacore.com>
5131
5132 * par_sco.adb: Comment update.
5133
51342011-08-04 Tristan Gingold <gingold@adacore.com>
5135
5136 * s-flocon.ads: New file.
5137 * g-flocon.ads: Now a renaming of s-flocon.
5138 * Makefile.rtl: Add s-flocon.o
5139
6a49f110
AC
51402011-08-04 Javier Miranda <miranda@adacore.com>
5141
5142 * exp_strm.adb (Build_Array_Input_Function): if the array type is
5143 constrained, do not attempt to build a subtype of it.
5144
51452011-08-04 Yannick Moy <moy@adacore.com>
5146
5147 * errout.ads Change comments: remove 'R'M as an example where quotes
5148 are needed; add ALFA as another case where quotes are not needed
5149 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
5150 case where quotes are not needed.
5151 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5152 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
5153 Remove all occurrences of 'A'L'F'A
5154
51552011-08-04 Ed Schonberg <schonberg@adacore.com>
5156
5157 * sem_ch13.adb: check legality of invariant pragma.
5158
a4640a39
AC
51592011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5160
5161 * bindgen.adb: Add comments.
5162
51632011-08-04 Yannick Moy <moy@adacore.com>
5164
5165 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
5166 synthesized flag.
5167 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
5168 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
5169
51702011-08-04 Robert Dewar <dewar@adacore.com>
5171
5172 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
5173 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
5174 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
5175
39ade2f9
AC
51762011-08-04 Thomas Quinot <quinot@adacore.com>
5177
5178 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
5179
51802011-08-04 Thomas Quinot <quinot@adacore.com>
5181
5182 PR ada/47880
5183 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
5184 allocated object.
5185
51862011-08-04 Robert Dewar <dewar@adacore.com>
5187
5188 * einfo.ads, exp_ch4.adb: Minor reformatting.
5189
51902011-08-04 Jerome Lambourg <lambourg@adacore.com>
5191
5192 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
5193
7efc3f2d
AC
51942011-08-04 Ed Schonberg <schonberg@adacore.com>
5195
5196 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
5197 type in all cases to compute list of primitive operations, because full
5198 view may be an itype that is not attached to the list of declarations.
5199
52002011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5201
5202 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
5203 library has already been finalized.
5204 (Gen_Adafinal_C): Likewise.
5205 (Gen_Adainit_Ada): Generate an early return if the library has
5206 already been elaborated.
5207 (Gen_Adainit_C): Likewise.
5208 (Gen_Output_File_Ada): Generate an elaboration flag.
5209 (Gen_Output_File_C): Likewise.
5210
f65df609
HK
52112011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5212
5213 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
5214 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
5215 built in the first place.
5216 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
5217 for CodePeer because Finalize_Address was not built to begin with.
5218 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
5219
a0fb8fe8
AC
52202011-08-04 Pascal Obry <obry@adacore.com>
5221
5222 * adaint.c (__gnat_tmp_name): Use current process id to create temp
5223 filenames, this ensures unicity of filenames across processes.
5224
52252011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5226
5227 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
5228 Raise_Controlled to Raise_From_Controlled_Operation. Update the
5229 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
5230 Add False as the actual to From_Abort in the generated call to
5231 Raise_From_Controlled_Operation.
5232
52332011-08-04 Jerome Lambourg <lambourg@adacore.com>
5234
5235 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
5236 so that the ali file name can be retrieved from outside of this package.
5237 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
5238 doing nothing in the general case, but used to update the object file
5239 timestamp if directly generated by the backend.
5240 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5241 to a later time than the ali file one.
5242
9534ab17
AC
52432011-08-04 Yannick Moy <moy@adacore.com>
5244
5245 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5246 entities whose body contains an Annotate pragma which forces formal
5247 proof on this body.
5248 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5249 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5250 Mark_Non_ALFA_Subprogram to pass in a message and node.
5251 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5252 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5253 surrounding subprogram.
5254 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5255 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5256 as not in ALFA is annotated with Formal_Proof being On, then an error
5257 is issued based on the additional parameters for message and node.
5258 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5259 * gcc-interface/Make-lang.in: Update dependencies.
5260
52612011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5262
5263 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5264 Finalize_Address when CodePeer is enabled.
5265
52662011-08-04 Pascal Obry <obry@adacore.com>
5267
5268 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5269 the latter returns a pointer to a static buffer which is deallocated
5270 at the end of the routine.
5271
5c0e97dd
AC
52722011-08-04 Yannick Moy <moy@adacore.com>
5273
5274 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5275 after index creation; mark unconstrained base array type generated as
5276 being in/not in ALFA as well
5277 (Make_Index): mark subtype created as in/not in ALFA
5278 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5279 over a loop as in/not in ALFA, depending on its type and form of loop
5280 iteration.
5281
52822011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5283
5284 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5285 directly to False on .NET and JVM.
5286
7a93c64b
YM
52872011-08-04 Yannick Moy <moy@adacore.com>
5288
5289 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5290 constraint that subtype must come from source code to be in ALFA, so
5291 that anonymous subtypes can be in ALFA too.
5292
e9a1ed9b
YM
52932011-08-04 Yannick Moy <moy@adacore.com>
5294
5295 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5296 reference for ALFA mode.
5297 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5298 procedure public so as to use it from formal verification back-end.
5299
8e293fbd
AC
53002011-08-04 Jerome Lambourg <lambourg@adacore.com>
5301
5302 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5303 invalid checks of the Parameter, making Remove_Switch not working
5304 correctly.
5305
53062011-08-04 Arnaud Charlet <charlet@adacore.com>
5307
5308 * targparm.ads: Update header: no run-time exception is needed on this
5309 file.
5310
53112011-08-04 Vincent Celier <celier@adacore.com>
5312
5313 * a-fihema.adb: Use System.IO instead of GNAT.IO
5314
53152011-08-04 Thomas Quinot <quinot@adacore.com>
5316
5317 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5318 are forbidden in Compiler_Unit mode.
5319
cfae2bed
AC
53202011-08-04 Robert Dewar <dewar@adacore.com>
5321
5322 * sem_util.adb: Minor reformatting.
5323
53242011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5325
5326 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5327 library-level finalizers.
5328 (Gen_Finalize_Library_C): Update the import string for library-level
5329 finalizers.
5330 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5331 library-level finalizer.
5332 * exp_ch7.adb: Remove with and use clauses for Stringt.
5333 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5334 Spec_Decl. Add local variable Body_Id. The names of library-level
5335 finalizers are now manually fully qualified and are no longer external.
5336 A single name is now capable of servicing .NET, JVM and non-VM targets.
5337 Pragma Export is no longer required to provide visibility for the name.
5338 (Create_Finalizer_String): Removed.
5339 (New_Finalizer_Name): New routine which mimics New_..._Name.
5340
01f0729a
AC
53412011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5342
5343 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5344 elaboration counter to Standard_Short_Integer.
5345 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5346 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5347 (Gen_Elab_Externals_C): Likewise.
5348
53492011-08-04 Ed Falis <falis@adacore.com>
5350
5351 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5352 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5353 system-vxworks-mips.ads, system-vxworks-x86.ads
5354 (Always_Compatible_Rep): set to False for all VxWorks targets.
5355
2c1b72d7
AC
53562011-08-04 Robert Dewar <dewar@adacore.com>
5357
5358 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5359 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5360 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5361 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5362 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5363 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5364 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5365 Minor reformatting and code reorganization.
5366
53672011-08-04 Emmanuel Briot <briot@adacore.com>
5368
5369 * projects.texi: Added doc for aggregate projects.
5370
824e9320
AC
53712011-08-04 Emmanuel Briot <briot@adacore.com>
5372
5373 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5374 Add support for overriding the Project_Path in aggregate projects.
5375
53762011-08-04 Robert Dewar <dewar@adacore.com>
5377
5378 * a-cofove.ads: Minor reformatting.
5379
53802011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5381
5382 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5383 on the generated code.
5384 (Build_Finalize_Statements): Update the comment on the generated code.
5385 (Build_Initialize_Statements): Update the comment on the generated code.
5386 (Build_Object_Declarations): Add local variable Result. The object
5387 declarations are now built in sequence.
5388 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5389 RE_Unit_Table.
5390
53912011-08-04 Robert Dewar <dewar@adacore.com>
5392
5393 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5394
53952011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5396
5397 * einfo.ads (Elaboration_Entity): Document new definition and use.
5398 (Elaboration_Entity_Required): Adjust to above change.
5399 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5400 * exp_ch12.adb: And with and use for Snames.
5401 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5402 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5403 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5404 <Check_Unit_Name>: Deal with N_Expanded_Name.
5405 <Attribute_Elaborated>: Extend to all unit names.
5406 * sem_elab.adb: And with and use for Uintp.
5407 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5408 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5409 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5410 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5411 from Gen_Adainit_Ada.
5412 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5413 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5414 case, do not call System.Standard_Library.Adafinal; instead call
5415 finalize_library if needed.
5416 (Gen_Adafinal_C): Likewise.
5417 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5418 non-main program case.
5419 (Gen_Adainit_C): Generate a couple of external declarations here.
5420 In the main program case, set SSL.Finalize_Library_Objects.
5421 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5422 (Gen_Elab_Calls_C): Likewise.
5423 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5424 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5425 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5426 objects here.
5427 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5428 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5429 Gen_Adafinal_Ada.
5430 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5431 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 5432 of external declarations. Call Gen_Finalize_Library_C.
824e9320 5433
316d9d4f
EB
54342011-08-04 Emmanuel Briot <briot@adacore.com>
5435
5436 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5437 Compute_Compilation_Phases): new subprogram.
5438 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5439 The number of mains as well as the various compilation phases that
5440 need to be run are now project tree specific, since various
5441 aggregated trees might have different requirements. In particular,
5442 they do not all require bind or link phases.
5443
9434c32e
EB
54442011-08-04 Emmanuel Briot <briot@adacore.com>
5445
5446 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5447 (Project_Tree_Appdata): New type.
5448 It is now possible to associate application-specific data to a project
5449 tree. In particular, this is used in the gprbuild builder to avoid a
5450 number of global tables and htables, especially now that there can be
5451 several project trees loaded at once because of aggregate projects.
5452 (Debug_Name): new procedure.
5453 * projects.texi: Clarify syntax of "**" for Source_Dirs
5454
41ba34db
EB
54552011-08-03 Emmanuel Briot <briot@adacore.com>
5456
5457 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5458 the "roots" for a main.
5459 (Fill_From_Project): add support for aggregate projects. Main units
5460 in aggregated projects are now automatically added in the list of
5461 files to build (although this fails later on in gprbuild, because
5462 these files are not using the root proejct tree, so this needs
5463 further cleanup)
5464 * gcc-interface/Make-lang.in: Update dependencies.
5465
fccd42a9
AC
54662011-08-03 Yannick Moy <moy@adacore.com>
5467
5468 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5469 conditional expression in ALFA.
5470 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5471 expressions as not in ALFA.
5472
54732011-08-03 Robert Dewar <dewar@adacore.com>
5474
5475 * a-cofove.adb: Minor reformatting.
5476
54772011-08-03 Emmanuel Briot <briot@adacore.com>
5478
5479 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5480 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5481 gprbuild sources.
5482 These packages are more logically placed in the Queue package, since
5483 they manipulate the queue. It is also likely that they can be adapted
5484 for gnatmake, thus sharing more code.
5485 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5486 that we could move the above.
5487
54882011-08-03 Emmanuel Briot <briot@adacore.com>
5489
5490 * errutil.adb (Finalize): clean up the list of error messages on exit.
5491 Calling this subprogram multiple times will no longer show duplicate
5492 error messages on stderr.
5493
54942011-08-03 Emmanuel Briot <briot@adacore.com>
5495
5496 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5497 Getopt_Switches when we have already define a command line
5498 configuration.
5499
5e8c8e44
YM
55002011-08-03 Yannick Moy <moy@adacore.com>
5501
5502 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5503 in ALFA. Instead, they are considered as assertions to prove.
5504 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5505 nodes as not in ALFA. Instead, include conditional expressions in ALFA
5506 if they have no ELSE part, or if they occur in pre- and postconditions,
5507 where the Condition cannot have side-effects in ALFA
5508 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5509 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5510 Instead, include type conversion between scalar types in ALFA.
5511 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5512 if-and-only-if its type is in ALFA.
5513
5ffe0bab
AC
55142011-08-03 Thomas Quinot <quinot@adacore.com>
5515
5516 * scos.adb, get_scos.adb, put_scos.adb
5517 New code letter for decisions: G (entry guard)
5518 * par_sco.adb
5519 (Traverse_Subprogram_Body): Rename to...
5520 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5521 (Traverse_Protected_Body): New subprogram
5522 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5523 protected bodies and entry bodies.
5524
55252011-08-03 Yannick Moy <moy@adacore.com>
5526
5527 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5528 entities with get/set subprograms, which is set on procedure entities
5529 generated by the compiler for a postcondition.
5530 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5531 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5532 entity for a declaration
5533 (Get_Unique_Entity_For_Decl): new function returning an entity which
5534 represents a declaration, so that matching spec and body have the same
5535 entity.
5536
55372011-08-03 Robert Dewar <dewar@adacore.com>
5538
5539 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5540 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5541
55422011-08-03 Yannick Moy <moy@adacore.com>
5543
5544 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5545 library-level because retriction No_Implicit_Dynamic_Code in the
5546 front-end prevents its definition as a local subprogram
5547 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5548 for reuse in other contexts
5549 (Traverse_Declarations_Or_Statements,
5550 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5551 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5552 procedures take a callback parameter to be called on all declarations
5553 * lib-xref.ads
5554 (Traverse_All_Compilation_Units): new generic function to traverse a
5555 compilation unit and call a callback parameter on all declarations
5556
f9ad6b62
AC
55572011-08-03 Javier Miranda <miranda@adacore.com>
5558
5559 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5560 in Java since they are always enclosed in a namespace that
5561 differentiates them, and overloaded entities are supported by the VM.
5562
55632011-08-03 Ed Schonberg <schonberg@adacore.com>
5564
5565 * checks.adb (Determine_Range): If a computed bound of an operation is
5566 outside the range of the base type of the expression, and overflow
5567 checks are enabled, the result is unknown and cannot be used for any
5568 subsequent constant folding.
5569 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5570 unknown, so is the result of the comparison.
5571
55722011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5573
5574 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5575 From_Abort. When finalization was triggered by an abort, propagate
5576 Standard'Abort_Signal rather than Program_Error.
5577 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5578 From_Abort.
5579 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5580 From_Abort. When finalization was triggered by an abort, propagate
5581 Standard'Abort_Signal rather than Program_Error.
5582 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5583 From_Abort.
5584 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5585 Abort_Id. Update the calls to Build_Object_Declarations and
5586 Build_Raise_Statement to include Abort_Id.
5587 (Build_Adjust_Statements): New local variable Abort_Id. Update the
5588 calls to Build_Object_Declarations and Build_Raise_Statement to include
5589 Abort_Id.
5590 (Build_Finalize_Statements): New local variable Abort_Id. Update the
5591 calls to Build_Object_Declarations and Build_Raise_Statement to include
5592 Abort_Id.
5593 (Build_Components): Create an entity for Abort_Id when exceptions are
5594 allowed on the target.
5595 (Build_Finalizer): New local variable Abort_Id.
5596 (Build_Initialize_Statements): New local variable Abort_Id. Update the
5597 calls to Build_Object_Declarations and Build_Raise_Statement to include
5598 Abort_Id.
5599 (Build_Object_Declarations): Add new formal Abort_Id. Create the
5600 declaration of flag Abort_Id to preserve the original abort status
5601 before finalization code is executed.
5602 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5603 runtime routine Raise_From_Controlled_Operation.
5604 (Create_Finalizer): Update the call to Build_Raise_Statement to include
5605 Abort_Id. Update the call to Build_Object_Declarations to include
5606 Abort_Id. Update the layout of the finalizer body.
5607 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5608 (Process_Transient_Objects): New local variable Abort_Id. Remove the
5609 clunky code to create all flags and objects related to
5610 exception propagation and replace it with a call to
5611 Build_Object_Declarations. Update the call to Build_Raise_Statement to
5612 include Abort_Id.
5613 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5614 Add new formal Abort_Id and associated comment on its use.
5615 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5616 on its use.
5617 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5618 Remove the clunky code to create all flags and objects related to
5619 exception propagation and replace it with a call to
5620 Build_Object_Declarations. Update the call to Build_Raise_Statement.
5621
56222011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5623
5624 * s-tassta.adb: Fix minor typos.
5625
56262011-08-03 Robert Dewar <dewar@adacore.com>
5627
5628 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5629 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5630
1cdfa9be
AC
56312011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5632
5633 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5634 to packages. This ensures that the finalizer body will not end up
5635 inside the freeze node.
5636 (Process_Declarations): Add code to detect whether a freeze node has a
5637 nested finalization collection.
5638
56392011-08-03 Pascal Obry <obry@adacore.com>
5640
5641 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5642 (Current_Session): Return a not null access to Session_Type.
5643 (Default_Session): Likewise.
5644
243cae0a
AC
56452011-08-03 Robert Dewar <dewar@adacore.com>
5646
5647 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5648 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5649
56502011-08-03 Pascal Obry <obry@adacore.com>
5651
5652 * g-awk.ads: Minor comment fix.
5653
56542011-08-03 Sergey Rybin <rybin@adacore.com>
5655
5656 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5657 the tree structure related to discriminant constraints.
5658 Original_Discriminant cannot be used any more for computing the
5659 defining name for the reference to a discriminant.
5660
56612011-08-03 Ed Schonberg <schonberg@adacore.com>
5662
5663 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5664 function is not visibly tagged, this is not a dispatching call and
5665 therfore is not Tag_Indeterminate, even if the function is marked as
5666 dispatching on result.
5667
f553e7bc
AC
56682011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5669
5670 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5671 (Expand_N_Free_Statement): Add a guard to protect against run-times
5672 which do not support controlled types.
5673 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5674 against run-times which do not support controlled types.
5675 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5676 against run-times which do not support controlled types.
5677 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5678 against run-times which do not support controlled types.
5679 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5680 protect against run-times which do not support controlled types.
5681
56822011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5683
5684 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5685 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5686
e4982b64
AC
56872011-08-03 Ed Schonberg <schonberg@adacore.com>
5688
5689 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5690 modified in the source, to prevent spurious warnings when compiling
5691 with -gnatg.
5692
56932011-08-03 Thomas Quinot <quinot@adacore.com>
5694
5695 * a-except-2005.adb: Minor reformatting.
5696
56972011-08-03 Ed Schonberg <schonberg@adacore.com>
5698
5699 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5700 is a renaming declaration in the private part of a package, do not emit
5701 a warning that the with_clause could be moved because the renaming may
5702 be used in the body or in a child unit.
5703
57042011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5705
5706 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5707 Propagate the Comes_From_Source attribute from the original return
5708 object to the renaming.
5709
57102011-08-03 Jose Ruiz <ruiz@adacore.com>
5711
5712 * exp_ch7.adb (Build_Raise_Statement): Do not call
5713 Raise_From_Controlled_Operation when this routine is not present in
5714 the run-time library.
5715 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5716 libraries (Ravenscar), tasks are non-terminating, and protected objects
5717 and tasks can only appear at library level, so we do not want
5718 finalization of protected objects nor tasks.
5719 * exp_intr.adb: Minor clarification in comment.
5720 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5721 Gen_Output_File_C): Remove references to finalization of library-level
5722 objects when using restricted run-time libraries.
5723
57242011-08-03 Ed Schonberg <schonberg@adacore.com>
5725
5726 * sem_ch3.adb (Build_Discriminant_Constraints): Set
5727 Original_Discriminant only if the parent type is a generic formal.
5728
deb8dacc
HK
57292011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5730
5731 * exp_ch13.adb: Add with and use clause for Targparm;
5732 (Expand_N_Free_Statement): Prevent the generation of a custom
5733 Deallocate on .NET/JVM targets since this requires pools and address
5734 arithmetic.
5735 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5736 .NET/JVM targets, attach the newly allocated object to the access
5737 type's finalization collection. Do not generate a call to
5738 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5739 exist in the runtime.
5740 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5741 create a custom Allocate for object that do not require initialization.
5742 Attach a newly allocated object to the access type's finalization
5743 collection on .NET/JVM.
5744 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5745 assignment of controlled types on .NET/JVM. The two hidden pointers
5746 Prev and Next and stored and later restored after the assignment takes
5747 place.
5748 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5749 kludge for .NET/JVM to recognize a particular piece of code coming from
5750 Heap_Management and change the call to Finalize into Deep_Finalize.
5751 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5752 finalization collections on .NET/JVM only for types derived from
5753 Controlled. Separate the association of storage pools with a collection
5754 and only allow it on non-.NET/JVM targets.
5755 (Make_Attach_Call): New routine.
5756 (Make_Detach_Call): New routine.
5757 (Process_Object_Declarations): Suppress the generation of
5758 build-in-place return object clean up code on .NET/JVM since it uses
5759 pools.
5760 * exp_ch7.ads (Make_Attach_Call): New routine.
5761 (Make_Detach_Call): New routine.
5762 * exp_intr.adb Add with and use clause for Targparm.
5763 (Expand_Unc_Deallocation): Detach a controlled object from a collection
5764 on .NET/JVM targets.
5765 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5766 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5767 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5768 names used in finalization.
5769
57702011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5771
5772 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5773 (Attach, Detach): Lock the current task when chaining an object onto a
5774 collection.
5775
df3e68b1
HK
57762011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
5777
5778 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5779 Rewritten to create the message strings when the exception is not
5780 raised by an abort during finalization.
5781 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5782 Raise_From_Controlled_Operation and update its associated comment.
5783 * a-fihema.ads, a-fihema.adb: New GNAT unit.
5784 Ada.Finalization.Heap_Management provides key functionality
5785 associated with controlled objects on the heap, their creation,
5786 finalization and reclamation. Type Finalization_Collection is
5787 effectively a wrapper which sits ontop of a storage pool and performs
5788 all necessary bookkeeping for all the objects it contains. Each
5789 access-to-controlled or access-to-class-wide type receives a collection
5790 as part of its expansion. The compiler generates buffer code and
5791 invokes Allocate / Deallocate to create and destroy allocated
5792 controlled objects.
5793 * a-finali.adb ("="): Removed.
5794 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5795 fields Prev and Next.
5796 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5797 A library unit with at least one controlled object on the library level
5798 has a special finalizer which is invoked by the binder. To signal this,
5799 ali files carry field PF.
5800 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5801 associated comment on field usage.
5802 * a-tags.adb (Get_RC_Offset): Removed.
5803 (Needs_Finalization): New routine.
5804 * a-tags.ads: Update the structure of the GNAT dispatch tables.
5805 Dispatch tables now carry field Needs_Finalization which provides
5806 runtime indication whether a type is controlled or has controlled
5807 components or both. Remove field RC_Offset.
5808 (Get_RC_Offset): Removed along with its associated pragma Export.
5809 Since tagged types with controlled components no longer carry hidden
5810 field _controller, the special mechanism to retrieve its location is no
5811 longer needed.
5812 (Needs_Finalization): New routine.
5813 * atree.ads, atree.adb (Elist24): New routine.
5814 (Set_Elist24): New routine.
5815 * atree.h: Add a define clause for Elist24.
5816 * bindgen.adb New library-level variable Lib_Final_Built.
5817 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5818 presence of a VM target, the routine generates calls to the proper
5819 library finalization routine.
5820 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5821 targets. Set the correct library finalization routine depending on
5822 whether the library has controlled objects or this is a VM compilation.
5823 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5824 to library-level finalizers of compiled units in reverse order of
5825 elaboration. It also produces exception management code and reraises a
5826 potential exception after all units have been finalized.
5827 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5828 library-level finalizers of compiled units in reverse order of
5829 elaboration.
5830 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5831 definitions of all library-level finalizers available to the compilation
5832 (Gen_Main_Ada): Directly call Adafinal which now contails all target
5833 dependent code.
5834 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5835 System.Standard_Library.Adafinal directly. If the library needs
5836 finalization actions, create the sequence of finalization calls.
5837 (Gen_Output_File_Ada): Alphabetize local variables and constants.
5838 Generate a with clause for System.Soft_Links when compiling for a VM.
5839 Remove the code which imports System.Standard_Library.Adafinal as
5840 Do_Finalize. Generate the library finalization routine.
5841 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5842 If the library needs finalization actions, create all the definitions
5843 of library- level finalizers.
5844 (Has_Finalizer): New routine. Determines whether at least one compiled
5845 unit has a library-level finalizer.
5846 Add type Qualification_Mode.
5847 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5848 * einfo.adb: New usage of field 15 as Return_Flag.
5849 Remove Finalization_Chain_Entity from the usages of field 19.
5850 Remove Associated_Final_Chain from the usages of field 23.
5851 New usage of field 23 as Associated_Collection.
5852 New usage of field 24 as Finalizer.
5853 New usage of flag 252 as Is_Processed_Transient.
5854 (Associated_Final_Chain): Removed.
5855 (Associated_Collection): New routine.
5856 (Finalization_Chain_Entity): Removed.
5857 (Finalizer): New routine.
5858 (Is_Finalizer): New routine.
5859 (Is_Processed_Transient): New routine.
5860 (Return_Flag): New routine.
5861 (Set_Associated_Final_Chain): Removed.
5862 (Set_Associated_Collection): New routine.
5863 (Set_Finalization_Chain_Entity): Removed.
5864 (Set_Finalizer): New routine.
5865 (Set_Is_Processed_Transient): New routine.
5866 (Set_Return_Flag): New routine.
5867 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5868 displayed flags.
5869 (Write_Field8_Name): Alphabetize the output.
5870 (Write_Field11_Name): Alphabetize the output.
5871 (Write_Field12_Name): Alphabetize the output.
5872 (Write_Field13_Name): Alphabetize the output.
5873 (Write_Field14_Name): Alphabetize the output.
5874 (Write_Field15_Name): Alphabetize the output.
5875 (Write_Field16_Name): Alphabetize the output.
5876 (Write_Field17_Name): Alphabetize the output.
5877 (Write_Field18_Name): Alphabetize the output.
5878 (Write_Field19_Name): Alphabetize the output. Remove the output of
5879 Finalization_Chain_Entity.
5880 (Write_Field20_Name): Alphabetize the output.
5881 (Write_Field21_Name): Alphabetize the output.
5882 (Write_Field22_Name): Alphabetize the output.
5883 (Write_Field23_Name): Alphabetize the output. Remove the output of
5884 Associated_Final_Chain. Add output for Associated_Collection.
5885 (Write_Field24_Name): Alphabetize the output.
5886 (Write_Field25_Name): Add output for Finalizer.
5887 (Write_Field26_Name): Alphabetize the output.
5888 (Write_Field27_Name): Alphabetize the output.
5889 (Write_Field28_Name): Alphabetize the output.
5890 * einfo.ads: Add new field description for Associated_Collection and
5891 its uses in nodes.
5892 Remove Associated_Final_Chain and its uses in nodes.
5893 Remove Finalization_Chain_Entity and its uses in nodes.
5894 Add new field description for Finalizer and its uses in nodes.
5895 Add new synthesized attribute Is_Finalizer.
5896 Add new flag description for Is_Processed_Transient and its uses in
5897 nodes.
5898 Add new field description for Return_Flag and its uses in nodes.
5899 (Associated_Final_Chain): Removed along with its pragma Inline.
5900 (Associated_Collection): New routine and pragma Inline.
5901 (Finalization_Chain_Entity): Removed along with its pragma Inline.
5902 (Finalizer): New routine and pragma Inline.
5903 (Is_Finalizer): New routine and pragma Inline.
5904 (Is_Processed_Transient): New routine and pragma Inline.
5905 (Return_Flag): New routine and pragma Inline.
5906 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5907 (Set_Associated_Collection): New routine and pragma Inline.
5908 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5909 (Set_Finalizer): New routine and pragma Inline.
5910 (Set_Is_Processed_Transient): New routine and pragma Inline.
5911 (Set_Return_Flag): New routine and pragma Inline.
5912 * exp_aggr.adb: Alphabetize subprograms.
5913 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5914 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5915 associated comments. Remove local variables External_Final_List and
5916 Attach.
5917 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5918 Ancestor. Remove the retrieval of finalization lists. Update the call to
5919 Make_Adjust_Call.
5920 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5921 lists. Update the call to Late_Expansion.
5922 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5923 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5924 (Gen_Assign): Remove the retrieval of the finalization list used to
5925 build the assignment. Update the calls to Make_Init_Call and
5926 Make_Adjust_Call.
5927 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5928 Remove the mechanism to determine attachment levels and finalization
5929 list retrieval. Remove the processing for coextensions.
5930 (Init_Controller): Removed. Controllers no longer exist.
5931 (Late_Expansion): Remove formals Flist and Obj along with their
5932 associated comments. Update the calls to Build_Record_Aggr_Code and
5933 Build_Array_Aggr_Code.
5934 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5935 (Expand_N_Freeze_Entity): Add special processing for finalizers which
5936 appear in entry bodies, protected subprograms and task bodies.
5937 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5938 * exp_ch3.adb (Add_Final_Chain): Removed.
5939 (Build_Array_Init_Proc): Alphabetize local variables.
5940 (Build_Assignment): Alphabetize local variables. Update the call to
5941 Maked_Adjust_Call.
5942 (Build_Class_Wide_Master): Rename local variables to better reflect
5943 their role.
5944 (Build_Discriminant_Assignments): Code reformatting.
5945 (Build_Init_Call_Thru): Code reformatting.
5946 (Build_Init_Procedure): Code reformatting. Generate a special version
5947 of Deep_Finalize which is capable of finalizing all initialized
5948 components and ignore the rest.
5949 (Build_Init_Statements): Rename local variables to better reflect their
5950 role.
5951 Reimplement the mechanism to include the creation and update of an index
5952 variable called a "counter". It is used as a bookmark for tracing
5953 initialized and non-initialized components.
5954 (Build_Initialization_Call): Remove local variable Controller_Typ.
5955 Alphabetize all local variables. Remove the initialization of the
5956 record controller and update the call to Make_Init_Call.
5957 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5958 New local variable Counter.
5959 (Constrain_Array): Alphabetize.
5960 (Expand_Freeze_Array_Type): Create a collection instead of a
5961 finalization list.
5962 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5963 Finalize_Address which is used in conjunction with allocated controlled
5964 objects.
5965 (Expand_N_Object_Declaration): Remove the creation of a finalization
5966 list for anonymous access types. Update the calls to Make_Init_Call and
5967 Make_Adjust_Call.
5968 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5969 retrieval of finalization lists. Remove the expansion of the record
5970 controller. Create TSS primitive Finalize_Address used in conjunction
5971 with controlled objects on the heap. Create finalization collections
5972 for access-to-controlled record components.
5973 (Expand_Record_Controller): Removed.
5974 (Freeze_Type): Remove the freezing of record controllers. Freezing of
5975 class-wide types now requires additional processing. Create
5976 finalization collections for access-to-controlled types.
5977 (Increment_Counter): New routine.
5978 (Make_Counter): New routine.
5979 (Make_Eq_If): Remove the mention of Name_uController.
5980 (Make_Predefined_Primitive_Specs): There is no longer need to skip
5981 types coming from System.Finalization_Root.
5982 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5983 (Predefined_Primitive_Bodies): There is no longer need to skip types
5984 coming from System.Finalization_Root.
5985 (Stream_Operation_OK): Do not generate stream routines for
5986 type Ada.Finalization.Heap_Management.Finalization_Collection.
5987 * exp_ch3.ads: Alphabetize subprograms.
5988 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5989 Add with and use clause for Lib.
5990 (Complete_Coextension_Finalization): Removed.
5991 (Complete_Controlled_Allocation): New routine. Create a finalization
5992 collection for anonymous access-to-controlled types. Create a custom
5993 Allocate which interfaces with the back end and the machinery in
5994 Heap_Management.
5995 (Expand_Allocator_Expression): Add necessary calls to
5996 Complete_Controlled_Allocation. Remove the retrieval of finalization
5997 lists. Update the calls to Make_Adjust_Call. Generate a call to
5998 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5999 the associated collection.
6000 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
6001 Code clean up. Remove the retrieval of finalization lists and
6002 attachment levels.
6003 Update the call to Make_Init_Call. Generate a call to
6004 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6005 the associated collection.
6006 (Get_Allocator_Final_List): Removed. Finalization lists are not
6007 available.
6008 (Suitable_Element): Remove the mention of Name_uController.
6009 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
6010 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
6011 the left hand side, carry out the assignment and adjust the left hand
6012 side.
6013 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
6014 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
6015 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
6016 BIP_Collection and BIPcollection.
6017 (Build_Heap_Allocator): New routine used to allocate the return object
6018 of a build-in-place function onto a collection.
6019 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
6020 (Expand_Call): Do not replace direct calls to Deep routines with their
6021 aliases.
6022 (Expand_N_Extended_Return_Statement): Give all variables shorter names
6023 and update their occurrences. Add a special return flag to monitor the
6024 [ab]normal execution of the function. The flag is set right before the
6025 return statement.
6026 Rewrite the mechanism used to allocate a build-in-place return object
6027 on the heap or on a storage pool.
6028 (Is_Direct_Deep_Call): New routine.
6029 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
6030 build-in-place function call instead of a final list. Build a call to
6031 Set_Finalize_Address_Ptr to decorate the associated collection.
6032 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
6033 order to name the build-in-place function call's result for later
6034 finalization. Add a collection to a build-in-place function call
6035 instead of a final list.
6036 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
6037 build-in-place function call instead of a final list. Remove the code
6038 which moves one final list and transforms it into the actual in a
6039 nested build-in-place call.
6040 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
6041 build-in-place function call instead of a final list.
6042 (Move_Final_List): Removed.
6043 (Needs_BIP_Collection): New routine.
6044 (Needs_BIP_Final_List): Removed.
6045 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
6046 enumeration type BIP_Formal_Kind.
6047 Update the related comment.
6048 (Needs_BIP_Collection): New routine.
6049 (Needs_BIP_Final_List): Removed.
6050 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
6051 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
6052 majority of subprograms in this unit. Add Name_Finalize_Address to
6053 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
6054 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
6055 statements for an array type.
6056 (Build_Adjust_Statements): Create the adjust statements for a record
6057 type.
6058 (Build_Cleanup_Statements): New routine. A procedure which given any
6059 construct containing asynchronous calls, references to _master, or is a
6060 task body, a task allocation or a protected body produces the necessary
6061 runtime calls to clean up these constructs.
6062 (Build_Exception_Handler): New routine.
6063 (Build_Final_List): Removed.
6064 (Build_Finalization_Collection): New routine. A core procedure which
6065 creates a collection to service heap allocated controlled objects
6066 associated with an access-to-controlled type.
6067 (Build_Finalize_Statements): Create the finalization statements for a
6068 record types.
6069 (Build_Finalizer): New routine. A core procedure which given any
6070 construct with declarations and/or statements detects all objects which
6071 need any type of clean up (controlled objects, protected objects) and
6072 generates all necessary code to clean up the said objects in the proper
6073 order.
6074 (Build_Finalizer_Call): New routine.
6075 (Build_Initialize_Statements): Create the initialization statements for
6076 an array type. The generated routine contains code to finalize partially
6077 initialized arrays.
6078 (Build_Object_Declarations): New routine.
6079 (Build_Raise_Statement): New routine.
6080 (Clean_Simple_Protected_Objects): Removed.
6081 (Controller_Component): Removed.
6082 (Enclosing_Function): New routine.
6083 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
6084 either declarations or statements or both.
6085 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
6086 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
6087 package.
6088 (Find_Final_List): Removed.
6089 (Global_Flist_Ref): Removed.
6090 (In_Finalization_Root): Removed.
6091 (Insert_Actions_In_Scope_Around): Determine the range of the transient
6092 scope in terms of tree nodes. Process all transient variables within
6093 that range.
6094 (Make_Adjust_Call): Rewritten. There is no longer an attach call
6095 generated after the adjust.
6096 (Make_Attach_Call): Removed.
6097 (Make_Call): New routine.
6098 (Make_Clean): Removed.
6099 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
6100 build routines.
6101 (Make_Deep_Proc): Rewritten to generate the new profile signature used
6102 in Deep routines.
6103 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
6104 build routines.
6105 (Make_Final_Call): Modified to simply create a call to either
6106 Deep_Finalize or Finalize.
6107 (Make_Finalize_Address_Body): New routine.
6108 (Make_Finalize_Address_Stmts): New routine. A function which produces
6109 TSS primitive Finalize_Address used in conjunction with heap allocated
6110 controlled objects.
6111 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
6112 (Make_Init_Call): Rewritten. There is no longer an attach call
6113 generated after initialization.
6114 (Make_Local_Deep_Finalize): New routine.
6115 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6116 (Make_Transient_Block): Remove the finalization list retrieval and
6117 manipulation.
6118 (Needs_Finalization): Moved to Exp_Util.
6119 (Parent_Field_Type): New routine.
6120 (Preprocess_Components): New routine.
6121 (Process_Transient_Objects): New routine.
6122 (Wrap_HSS_In_Block): New routine.
6123 (Wrap_Transient_Declaration): Remove finalization list management and
6124 controller insertion.
6125 (Wrap_Transient_Expression): Code reformatting.
6126 (Wrap_Transient_Statement): Code reformatting.
6127 * exp_ch7.ads (Build_Final_List): Removed.
6128 (Build_Finalization_Collection): New routine.
6129 (Build_Raise_Statement): New routine.
6130 (Controller_Component): Removed.
6131 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
6132 (Find_Final_List): Removed.
6133 (In_Finalization_Root): Removed.
6134 (Is_Simple_Protected_Type): Update related comment.
6135 (Make_Adjust_Call): New parameter profile and associated comments.
6136 (Make_Attach_Call): Removed.
6137 (Make_Final_Call): New parameter profile and associated comments.
6138 (Make_Finalize_Address_Body): New routine.
6139 (Make_Init_Call): New parameter profile and associated comments.
6140 (Make_Local_Deep_Finalize): New routine.
6141 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6142 (Needs_Finalization): Moved to Exp_Util.
6143 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
6144 (Expand_N_Protected_Body): Remove the handling of finalization lists.
6145 (Find_Protection_Type): Moved to Exp_Util.
6146 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
6147 (Make_DT): Update sequence of dispatch table initialization. Remove the
6148 initialization of field RC_Offset. Add initialization of field Needs_
6149 Finalization.
6150 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
6151 Reimplement how an object is first finalized, then deallocated.
6152 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
6153 Code reformatting.
6154 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
6155 Register TSS_Finalize_Address with type TSS_Names.
6156 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
6157 procedure provides the interface between an allocation / deallocation
6158 and the support machinery in Ada.Finalization.Heap_Management.
6159 (Find_Init_Call): Code reformatting.
6160 (Find_Init_Call_In_List): Code reformatting.
6161 (Find_Protection_Type): Moved from Exp_Ch9.
6162 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
6163 (Has_Controlled_Coextensions): Removed.
6164 (Has_Controlled_Objects): New routine.
6165 (In_Library_Level_Package_Body): New routine.
6166 (Insert_Action_After): New routine.
6167 (Is_Finalizable_Transient): New routine. This predicate determines
6168 whether an object declaration is one of the many variants of controlled
6169 transients.
6170 (Is_Null_Access_BIP_Func_Call): New routine.
6171 (Is_Non_BIP_Func_Call): New routine.
6172 (Is_Related_To_Func_Return): New routine.
6173 (Needs_Finalization): Moved from Exp_Ch7.
6174 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
6175 (Find_Protection_Type): Moved from Exp_Ch9.
6176 (Has_Controlled_Coextensions): Removed.
6177 (Has_Controlled_Objects): New routine.
6178 (In_Library_Level_Package_Body): New routine.
6179 (Insert_Action_After): New routine.
6180 (Is_Finalizable_Transient): New routine.
6181 (Is_Null_Access_BIP_Func_Call): New routine.
6182 (Is_Non_BIP_Func_Call): New routine.
6183 (Is_Related_To_Func_Return): New routine.
6184 (Needs_Finalization): Moved from Exp_ch7.
6185 * expander.adb (Expand): Add a case for N_Free_Statement.
6186 * freeze.adb (Freeze_All): Replace the generation of a finalization
6187 list with a collection for access-to-controlled types.
6188 (Freeze_Entity): Code reformatting.
6189 (Freeze_Record_Type): Remove the freezing of a record controller
6190 component.
6191 (Freeze_Subprogram): Code reformatting.
6192 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
6193 finalization list.
6194 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
6195 has a library-level finalizer.
6196 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
6197 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
6198 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
6199 files. Add a-fihema to the list of object files.
6200 * par-ch4.adb:
6201 Alphabetize the associations in type Is_Parameterless_Attribute.
6202 * rtsfind.ads: Ada.Finalization_List.Controller and
6203 System.Finalization_Implementation are no longer a GNAT unit.
6204 Update the range of type Ada_Finalization_Child. Remove the following
6205 recoverable entities:
2c7f9cc0 6206
df3e68b1
HK
6207 RE_Attach_To_Final_List
6208 RE_Deep_Tag_Attach
6209 RE_Finalize_List
6210 RE_Finalize_One
6211 RE_Finalizable_Ptr_Ptr
6212 RE_Global_Final_List
6213 RE_Limited_Record_Controller
6214 RE_List_Controller
6215 RE_Move_Final_List
6216 RE_Record_Controller
6217 RE_Simple_List_Controller
2c7f9cc0 6218
df3e68b1 6219 Add the following recoverable entities:
2c7f9cc0 6220
df3e68b1
HK
6221 RE_Add_Offset_To_Address
6222 RE_Allocate
6223 RE_Base_Pool
6224 RE_Deallocate
6225 RE_Exception_Identity
6226 RE_Finalization_Collection
6227 RE_Finalization_Collection_Ptr
6228 RE_Needs_Finalization
6229 RE_Save_Library_Occurrence
6230 RE_Set_Finalize_Address_Ptr
6231 RE_Set_Storage_Pool_Ptr
6232 RE_Storage_Count
6233 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
6234 Name_uController.
6235 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
6236 (First_Stored_Discriminant): Remove the mention of Name_uController.
6237 * sem_aux.ads: Comment reformatting.
6238 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
6239 to redecorate an already existing class-wide type.
6240 (Decorate_Tagged_Type): New parameter profile and associated comment.
6241 Create a "shadow class-wide type" for a shadow entity.
6242 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6243 of the final chain along with the associated comment.
6244 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6245 Full_Desig and set it to the full view of the designated type.
6246 Initialize the finalization collection to empty.
6247 (Build_Derived_Record_Type): Alphabetize local variables. Code
6248 reformatting.
6249 (Collect_Fixed_Components): Remove the mention of Name_uController.
6250 (Create_Constrained_Components): Remove the mention of Name_uController.
6251 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6252 class-wide type of a shadow entity.
6253 (Process_Full_View): Update the machinery which marks type
6254 Limited_Controlled's entity as limited.
6255 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6256 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6257 list, instead make a collection build-in-place formal.
6258 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6259 a designated type in order to establish a match between the renaming
6260 and the renamed entity.
6261 (Find_Selected_Component): Add guard to prevent spurious exceptions
6262 from being raised on .NET/JVM.
6263 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6264 to the list of primitive that need special processing. Update arrays
6265 C_Names and D_Names.
6266 (Replace_Types): Handle class-wide types.
6267 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6268 different parameter profile, look at the first formal.
6269 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6270 use clauses for Exp_Util.
6271 * sem_res.adb: Remove with and use clauses for Elists.
6272 (Propagate_Coextensions): Removed.
6273 (Resolve_Allocator): Do not propagate the list of coextensions from one
6274 allocator to another.
6275 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6276 Deaccessed_T to Desig_Typ.
6277 (Enter_Name): Remove the mention of Name_uController.
6278 (Gather_Components): Remove the mention of Name_uController.
6279 (Incomplete_Or_Private_View): New routine.
6280 (Is_Coextension_Root): Removed.
6281 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6282 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6283 (Is_Coextension_Root): Removed.
6284 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6285 Controlled types are now derived from a null tagged record. Remove
6286 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6287 * sinfo.adb (Coextensions): Removed.
6288 (Set_Coextensions): Removed.
6289 * sinfo.ads: Remove Coextensions from the explanation of node fields
6290 and its uses in nodes.
6291 Update the field usage of N_Allocator.
6292 (Coextensions): Removed along with its pragma Inline.
6293 (Set_Coextensions): Removed along with its pragma Inline.
6294 * snames.ads-tmpl: Remove names
2c7f9cc0 6295
df3e68b1
HK
6296 Name_uClean
6297 Name_uController
6298 Name_uFinal_List
6299 Name_uLocal_Final_List
6300 Name_Finalization_Root
6301 Name_Next
6302 Name_Prev
2c7f9cc0 6303
df3e68b1 6304 Add names
2c7f9cc0 6305
df3e68b1
HK
6306 Name_uFinalizer
6307 Name_Finalize_Address
6308 * s-pooglo.adb (Allocate): Add overriding indicator.
6309 (Deallocate): Add overriding indicator.
6310 (Storage_Size): Add overriding indicator.
6311 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6312 than Finalize_Global_List.
6313 (Null_Finalize_Global_List): Removed.
6314 (Save_Library_Occurrence): New routine.
6315 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6316 initialization. Add variable Finalize_Library_Objects along with its
6317 pragma Export. Add variables Library_Exception and
6318 Library_Exception_Set along with their pragma Export.
6319 (Null_Finalize_Global_List): Removed.
6320 (Save_Library_Occurrence): New routine.
6321 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6322 rather than Finalize_Global_List.
6323 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6324 of the constructed node.
6325
2ee06322
RO
63262011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6327
6328 * link.c: Include "auto-host.h" before system headers.
6329
f77b022b
VC
63302011-08-03 Vincent Celier <celier@adacore.com>
6331
6332 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6333 that are not extended. Do not check if a library project that is
6334 extended should be regenerated. Do not add to table Library_Paths the
6335 libraries that are in extended projects. Link only with libraries that
6336 are in libray projects that are not extended.
6337 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6338 for a library project that is extended.
6339
0187b60e
AC
63402011-08-03 Gary Dismukes <dismukes@adacore.com>
6341
6342 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6343 conforming subprogram renamings that appear to be completions if they
6344 are not fully conformant.
6345 Such renamings are homographs but not completions.
6346 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6347 names in a subprogram renaming that appears in an instance.
6348
63492011-08-03 Ed Schonberg <schonberg@adacore.com>
6350
6351 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6352 not immutably limited, build actual subtype from expression to provide
6353 proper bounds to caller.
6354
63552011-08-03 Gary Dismukes <dismukes@adacore.com>
6356
6357 * sem_ch8.adb: Minor comment correction.
6358
63592011-08-03 Thomas Quinot <quinot@adacore.com>
6360
6361 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6362 returning a limited array, use an extended return statement.
6363
63642011-08-03 Vincent Celier <celier@adacore.com>
6365
6366 * make.adb (Initialize): If --subdirs= is used, but no project file is
6367 specified, attempt to create the specify subdir if it does not already
6368 exist and use it as the object directory as if -D had been specified.
6369
63702011-08-03 Arnaud Charlet <charlet@adacore.com>
6371
6372 * s-tpopsp-vms.adb: New file.
6373 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6374 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6375
e280f981
AC
63762011-08-03 Emmanuel Briot <briot@adacore.com>
6377
6378 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6379 package.
6380
63812011-08-03 Yannick Moy <moy@adacore.com>
6382
6383 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6384 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6385 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6386 detect that an array has static bounds.
6387
98c99a5a
AC
63882011-08-03 Thomas Quinot <quinot@adacore.com>
6389
6390 * exp_dist.adb: Minor reformatting.
6391
63922011-08-03 Arnaud Charlet <charlet@adacore.com>
6393
6394 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6395 (ATCB_Key): Removed, not always used.
6396
63972011-08-03 Emmanuel Briot <briot@adacore.com>
6398
6399 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6400 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6401 most remaining global variables.
6402
686d0984
AC
64032011-08-03 Robert Dewar <dewar@adacore.com>
6404
6405 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6406 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6407 reformatting.
6408
64092011-08-03 Javier Miranda <miranda@adacore.com>
6410
6411 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6412 that must be passed by copy in VM targets.
6413
64142011-08-03 Emmanuel Briot <briot@adacore.com>
6415
6416 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6417 duplicates a similar htable now in the project tree.
6418
64192011-08-03 Claire Dross <dross@adacore.com>
6420
6421 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6422 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6423 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6424 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6425 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6426 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6427 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6428 update.
6429
64302011-08-03 Arnaud Charlet <charlet@adacore.com>
6431
6432 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6433 (ATCB_Key): Removed, not always used.
6434 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6435 s-taprop-posix.adb.
6436 * s-tpopsp-tls.adb: New file.
6437 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6438 x86/x64/ia64/powerpc/sparc Linux.
6439
64402011-08-03 Arnaud Charlet <charlet@adacore.com>
6441
6442 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6443 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6444
64452011-08-03 Thomas Quinot <quinot@adacore.com>
6446
6447 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6448 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6449 Fix type selection for mapping integer types to PolyORB types.
6450
64512011-08-03 Bob Duff <duff@adacore.com>
6452
6453 * sem_ch7.adb: Minor comment clarification.
6454
64552011-08-03 Bob Duff <duff@adacore.com>
6456
6457 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6458 an error analyzing a choice, skip further processing. Further
6459 processing could cause a crash or cascade errors.
6460
40ecf2f5
EB
64612011-08-03 Emmanuel Briot <briot@adacore.com>
6462
6463 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6464 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6465 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6466 prj-env.ads (Shared_Project_Tree_Data): new type
6467 An aggregate project and its aggregated trees need to share the common
6468 data structures used for lists of strings, packages,... This makes the
6469 code simpler since otherwise we have to pass the root tree (also used
6470 for the configuration file data) in addition to the current project
6471 tree. This also avoids ambiguities as to which tree should be used.
6472 And finally this saves a bit of memory.
6473 (For_Every_Project_Imported): new parameter Tree.
6474 Since aggregated projects are using a different tree, we need to let
6475 the caller know which tree to use to manipulate the returned project.
6476
9fde638d
RD
64772011-08-03 Robert Dewar <dewar@adacore.com>
6478
6479 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6480 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6481 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6482 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6483
95eb8b69
AC
64842011-08-03 Javier Miranda <miranda@adacore.com>
6485
6486 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6487 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6488
64892011-08-03 Bob Duff <duff@adacore.com>
6490
6491 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6492 the Base_Type.
6493
64942011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
6495
6496 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6497 g-sehash.ads: Fix typo. Update header.
6498
64992011-08-03 Thomas Quinot <quinot@adacore.com>
6500
6501 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6502 expansion.
6503
65042011-08-03 Gary Dismukes <dismukes@adacore.com>
6505
6506 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6507 prefixes of private types along with records, since the selector may be
6508 a discriminant.
6509 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6510 private types along with records, since the selector may be a
6511 discriminant.
6512
92e77027
AC
65132011-08-03 Emmanuel Briot <briot@adacore.com>
6514
b2f7ebc1 6515 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
6516
65172011-08-03 Javier Miranda <miranda@adacore.com>
6518
6519 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6520 Tagged_Type_Expansion.
6521
65222011-08-03 Yannick Moy <moy@adacore.com>
6523
b2f7ebc1
GP
6524 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6525 violation when the argument of concatenation is the name of a
6526 constant.
92e77027 6527
ab29a348
EB
65282011-08-03 Emmanuel Briot <briot@adacore.com>
6529
6530 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6531 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6532 (Process_Declarative_Items): new parameter Child_Env.
6533
9466892f
AC
65342011-08-03 Yannick Moy <moy@adacore.com>
6535
589ef536
GP
6536 * alfa.ads: Update format of ALFA section in ALI file in order to
6537 add a mapping from bodies to specs when both are present.
6538 (ALFA_Scope_Record): Add components for spec file/scope.
6539 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6540 present.
6541 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6542 collected, fill in the spec information when relevant.
6543 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
6544 present.
6545
65462011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6547
6548 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6549 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 6550
9466892f
AC
65512011-08-03 Javier Miranda <miranda@adacore.com>
6552
6553 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
6554 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6555 be handled by copy in VM targets.
9466892f
AC
6556
65572011-08-03 Emmanuel Briot <briot@adacore.com>
6558
589ef536 6559 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
6560 code with Makeutl.Get_Switches.
6561 * prj-tree.adb: Update comment.
6562
b5ea9143
AC
65632011-08-03 Thomas Quinot <quinot@adacore.com>
6564
6565 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6566 subprogram with a limited formal that does not support external
6567 streaming.
6568
65692011-08-03 Yannick Moy <moy@adacore.com>
6570
6571 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6572 continuation line
6573 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6574 not from current unit in two phases, because it is not possible to
6575 change the table while iterating over its content.
6576 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6577
65782011-08-03 Sergey Rybin <rybin@adacore.com>
6579
6580 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6581 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6582
668a19bc
ES
65832011-08-03 Ed Schonberg <schonberg@adacore.com>
6584
6585 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6586 and the component type is composite, this is ambiguous for predefined
6587 concatenation, but if the node is not overloaded and the entity is a use
6588 -defined function its profile can be used to resolve that aggregate.
6589
170b2989
AC
65902011-08-03 Robert Dewar <dewar@adacore.com>
6591
6592 * exp_ch4.adb: Minor code cleanup.
6593
65942011-08-03 Thomas Quinot <quinot@adacore.com>
6595
6596 * exp_dist.adb: Do not generate distribution stubs if serious errors
6597 have been diagnosed.
6598
65992011-08-03 Ed Schonberg <schonberg@adacore.com>
6600
6601 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6602 the first formal of a primitive operation, go to the base type to
6603 handle properly an access to a derived type with constrained
6604 discriminants.
6605 * sem_type.adb (Disambiguate): an immediately visible operator hides a
6606 user-defined function that is only use-visible.
170b2989 6607
e917aec2
RD
66082011-08-03 Robert Dewar <dewar@adacore.com>
6609
6610 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6611 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6612 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6613 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6614 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6615 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6616 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6617 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6618
66192011-08-03 Robert Dewar <dewar@adacore.com>
6620
6621 * repinfo.adb (List_Mechanism): Add handling of
6622 Convention_Ada_Pass_By_XXX.
6623 * sem_mech.adb (Set_Mechanism): Ditto.
6624 * sem_prag.adb (Process_Convention): Add entries for
6625 Convention_Ada_Pass_By_XXX.
6626 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6627
49bfcf43
AC
66282011-08-03 Pascal Obry <obry@adacore.com>
6629
6630 * makeutl.adb: Minor reformatting.
6631
66322011-08-03 Vincent Celier <celier@adacore.com>
6633
6634 * fname-uf.adb
6635 (Get_File_Name) If the file cannot be found when there are no config
6636 pragmas file and May_Fail is True, return No_File instead of the file
6637 name, to be consistent.
6638
66392011-08-03 Pascal Obry <obry@adacore.com>
6640
6641 * adaint.c (__gnat_is_executable_file_attr): Avoid access
6642 to null pointer.
6643
66442011-08-03 Javier Miranda <miranda@adacore.com>
6645
6646 * sem_ch13.adb
6647 (Same_Representation): In VM targets the representation of arrays with
6648 aliased components differs from arrays with non-aliased components.
6649
34798441
EB
66502011-08-03 Emmanuel Briot <briot@adacore.com>
6651
6652 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6653 not systematically lower case attribute indexes that contain no "."
6654 Fix definition of several Naming attributes, which take
6655 a unit name as index and therefore should be case insensitive.
6656 Minor refactoring (reduce length of variable names).
6657
66582011-08-03 Emmanuel Briot <briot@adacore.com>
6659
6660 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6661
4437a530
EB
66622011-08-03 Emmanuel Briot <briot@adacore.com>
6663
6664 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6665 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6666 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6667 prj-tree.ads (Prj.Tree.Environment): new type.
6668
804fe3c4
EB
66692011-08-03 Emmanuel Briot <briot@adacore.com>
6670
6671 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6672 prj-tree.adb, prj-tree.ads (Environment): new type.
6673
c565bc66
AC
66742011-08-03 Emmanuel Briot <briot@adacore.com>
6675
6676 * prj-tree.ads: Remove unused variable.
6677
66782011-08-03 Yannick Moy <moy@adacore.com>
6679
6680 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6681 issuing messages related to SPARK restriction violation.
6682
4ee646da
AC
66832011-08-03 Ed Schonberg <schonberg@adacore.com>
6684
6685 * sem_ch6.adb: guard against error nodes in return statements.
6686
66872011-08-03 Arnaud Charlet <charlet@adacore.com>
6688
6689 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6690 a warning can only appear on a configuration file, so emit warning
6691 without further checks.
6692
66932011-08-03 Arnaud Charlet <charlet@adacore.com>
6694
6695 * s-interr.ads: add overriding keyword.
6696
66972011-08-03 Geert Bosch <bosch@adacore.com>
6698
6699 * exp_attr.adb: Fix minor typo.
6700
67012011-08-03 Ed Schonberg <schonberg@adacore.com>
6702
6703 * par-ch4.adb: improve error recovery.
6704
c0e538ad
AC
67052011-08-03 Emmanuel Briot <briot@adacore.com>
6706
6707 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6708 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6709 to Errout_Handling.
6710
67112011-08-03 Emmanuel Briot <briot@adacore.com>
6712
6713 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6714 "external" as an attribute name in aggregate projects.
6715
67162011-08-03 Jose Ruiz <ruiz@adacore.com>
6717
6718 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6719 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6720 from 0, so we need to adjust.
6721
67222011-08-03 Emmanuel Briot <briot@adacore.com>
6723
6724 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6725 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6726
c4d67e2d
AC
67272011-08-03 Yannick Moy <moy@adacore.com>
6728
6729 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6730 restriction on overloaded entity if the entity is not an operator.
6731
67322011-08-03 Yannick Moy <moy@adacore.com>
6733
6734 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6735 restrict.ads: Rename remaining Check_Formal_Restriction* into
6736 Check_SPARK_Restriction*.
6737
67382011-08-03 Emmanuel Briot <briot@adacore.com>
6739
6740 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6741 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6742 qualifier.
6743 (Project_Empty): removed
6744 (Empty_Project): new parameter Qualifier
6745 This is used to have fields specific to aggregate projects, cleaner
6746 New field to store the list of aggregated projects.
6747 (Check_Aggregate_Project): removed
6748 (Process_Aggregated_Projects, Free): new subprograms.
6749
3f5a8fee
AC
67502011-08-03 Olivier Hainque <hainque@adacore.com>
6751
6752 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6753
67542011-08-03 Ed Schonberg <schonberg@adacore.com>
6755
6756 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6757 explicit dereference of an unconstrained type, create a constrained
6758 subtype for it, as is done for function calls that return an
6759 unconstrained type.
6760
67612011-08-03 Thomas Quinot <quinot@adacore.com>
6762
6763 * g-pehage.adb (Finalize): Avoid possible double-free.
6764
67652011-08-03 Steve Baird <baird@adacore.com>
6766
6767 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6768 Elab_Spec/Body attrs in CodePeer_Mode.
6769
67702011-08-03 Javier Miranda <miranda@adacore.com>
6771
6772 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6773 low bound is not known at compile time but they have no others choice.
6774 Done because in this case the bounds can be obtained directly from the
6775 aggregate.
6776
67772011-08-03 Ed Falis <falis@adacore.com>
6778
6779 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6780 on VxWorks SMP. Remove unusable constant ANY_CPU.
6781
a96ca600
EB
67822011-08-03 Emmanuel Briot <briot@adacore.com>
6783
6784 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6785 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6786 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6787 Prj.Env.Initialize_Empty): new subprograms
6788 (Get_Env, Find_Project): remove parameter Target_Name.
6789
3e582869
AC
67902011-08-03 Gary Dismukes <dismukes@adacore.com>
6791
6792 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6793 as a condition for the delayed call to Derived_Subprograms done for the
6794 case of the rewriting of a derived type that constrains the
6795 discriminants of its parent type.
6796 Avoids redundant subprogram derivations for private subtype derivations.
6797
67982011-08-03 Javier Miranda <miranda@adacore.com>
6799
6800 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6801 Build_Record_Aggr_Code.
6802 (Build_Record_Aggr_Code): Add missing support to initialize hidden
6803 discriminants in extension aggregates.
6804
68052011-08-03 Emmanuel Briot <briot@adacore.com>
6806
6807 * prj-pp.adb (Print): also output project qualifiers, since in
6808 particular "aggregate" is mandatory in an aggregate project.
6809
68102011-08-03 Emmanuel Briot <briot@adacore.com>
6811
6812 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6813 (Debug_Output): new function.
6814
56e94186
AC
68152011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6816
6817 * gnat_ugn.texi: Document -Wstack-usage.
6818 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6819
68202011-08-03 Thomas Quinot <quinot@adacore.com>
6821
6822 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6823 have keyword LIMITED.
6824
68252011-08-03 Yannick Moy <moy@adacore.com>
6826
6827 * alfa.adb, alfa.ads, alfa_test.adb: New files.
6828 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6829 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6830 section (does not happen in compiler, only if code directly calls
6831 Scan_ALI).
6832 * get_alfa.adb, get_alfa.ads: New files.
6833 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6834 needed.
6835 * lib-xref-alfa.adb: New file.
6836 * lib-xref.adb, lib-xref.ads
6837 (Xref_Entry): redefine information needed in cross-references for ALFA.
6838 Push ALFA treatments in separated local package.
6839 (Enclosing_Subpragram_Or_Package): treat specially subprogram
6840 identifiers. Return entity of package body instead of spec. Return
6841 Empty for a scope with no location.
6842 (Generate_Reference): adapt to new components for ALFA information.
6843 Remove the need for D references on definitions.
6844 (Is_Local_Reference): moved to ALFA local package
6845 (Output_References): extract subfunction as Extract_Source_Name
6846 (Output_Local_References): remove procedure, replaced by filtering of
6847 cross-references in package ALFA and printing in Put_ALFA.
6848 (Write_Entity_Name): remove procedure
6849 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6850 print exact name of entity as it appears in source file
6851 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6852 * put_alfa.adb, put_alfa.ads: New files.
6853 * xref_lib.adb (Search_Xref): protect read of cross-references against
6854 reading other sections of the ALI file, in gnatxref
6855 (Search): protect read of cross-references against reading other
6856 sections of the ALI file, in gnatfind.
6857 * gcc-interface/Make-lang.in: Update dependencies.
6858
68592011-08-03 Thomas Quinot <quinot@adacore.com>
6860
6861 * sem_ch3.adb: Minor reformatting.
6862
68632011-08-03 Jose Ruiz <ruiz@adacore.com>
6864
6865 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6866 raising an exception.
6867
68682011-08-03 Ed Schonberg <schonberg@adacore.com>
6869
6870 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6871 type, always use 1 as the lower bound or string, even if lower bound of
6872 context is not static, to handle properly null strings in a non-static
6873 context.
6874
68752011-08-03 Bob Duff <duff@adacore.com>
6876
6877 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6878 always legal on the right-hand side of an assignment statement; there
6879 is always an applicable index constraint in this case. Therefore, the
6880 check for Pkind = N_Assignment_Statement is now unconditional -- it
6881 doesn't depend on whether Is_Constrained (Typ).
6882
4317e442
AC
68832011-08-03 Robert Dewar <dewar@adacore.com>
6884
6885 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6886
68872011-08-03 Ed Schonberg <schonberg@adacore.com>
6888
6889 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6890 for an itype created within a generic unit.
6891
68922011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6893
6894 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6895 suppresses all inlining.
6896
53f29d4f
AC
68972011-08-03 Robert Dewar <dewar@adacore.com>
6898
6899 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6900 exp_aggr.adb: Minor reformatting.
6901
69022011-08-03 Thomas Quinot <quinot@adacore.com>
6903
6904 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6905 tagged assignment when discriminant checks are suppressed. This is
6906 useless and extremely costly in terms of static stack usage.
6907
69082011-08-03 Bob Duff <duff@adacore.com>
6909
6910 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6911 of generics, because this leads to the wrong entity in the wrong scope,
6912 causing (e.g.) pragma Export_Procedure to get an error if the entity is
6913 an instance.
6914 (Process_Interface_Name): Follow Alias for instances of generics, to
6915 correct for the above change.
6916
69172011-08-03 Ed Schonberg <schonberg@adacore.com>
6918
6919 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6920 is an integer literal it is always safe to replace the reference. In
6921 addition, if the reference appears in the generated code for an object
6922 declaration it is necessary to copy because otherwise the reference
6923 might be to the uninitilized value of the discriminant of the object
6924 itself.
6925
69262011-08-03 Pascal Obry <obry@adacore.com>
6927
6928 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6929 ACL used, in this case we want to check for ending .exe, not .exe
6930 anywhere in the path.
6931
69322011-08-03 Sergey Rybin <rybin@adacore.com>
6933
6934 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6935 the tree structure (semantic decoration of references to record
6936 discriminants).
6937
c0b11850
AC
69382011-08-03 Gary Dismukes <dismukes@adacore.com>
6939
6940 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6941 choices of a named array aggregate, bail out when any choices are
6942 marked as Errors_Posted.
6943
69442011-08-03 Ed Schonberg <schonberg@adacore.com>
6945
6946 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6947 in which entity is frozen, to handle properly loop variables in
6948 iterators.
6949
69502011-08-03 Ed Schonberg <schonberg@adacore.com>
6951
6952 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6953 subtype is not static, compute the upper bound using attributes, to
6954 handle properly index types that are not integer types.
6955
69562011-08-03 Bob Duff <duff@adacore.com>
6957
6958 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6959 Update copyright notice.
6960
69612011-08-03 Ed Schonberg <schonberg@adacore.com>
6962
6963 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6964 Original_Discriminant if within an instance.
6965 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6966
69672011-08-03 Thomas Quinot <quinot@adacore.com>
6968
6969 * einfo.ads: Minor reformatting.
6970
69712011-08-03 Ed Schonberg <schonberg@adacore.com>
6972
6973 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6974 composite type with an unfrozen subcomponent, in the profile of a
6975 primitive operation.
6976
5c34e9cd
AC
69772011-08-03 Robert Dewar <dewar@adacore.com>
6978
6979 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6980
69812011-08-03 Ed Schonberg <schonberg@adacore.com>
6982
6983 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6984 unconstrained type with discriminants is initialized with an aggregate,
6985 use the constrained subtype of the aggregate as the type of the object,
6986 because it is immutable, and this allows the back-end to generate no
6987 code for the object declaration.
6988
abcd9db2
AC
69892011-08-03 Robert Dewar <dewar@adacore.com>
6990
6991 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6992 comparison operand is variable, and turns out to be zero or negative.
6993
69942011-08-03 Javier Miranda <miranda@adacore.com>
6995
6996 * exp_intr.adb
6997 (Expand_Dispatching_Constructor_Call): Disable expansion of
6998 code required for native targets. Done to avoid generating
6999 references to unavailable runtime entities in VM targets.
7000 * exp_ch3.adb
7001 (Expand_N_Object_Declaration): Add missing support to handle
7002 the explicit initialization of class-wide interface objects.
7003 Fix documentation.
7004
70052011-08-03 Matthew Heaney <heaney@adacore.com>
7006
7007 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
7008
70092011-08-03 Matthew Heaney <heaney@adacore.com>
7010
7011 * a-cbdlli.adb (Splice): move source items from first to last
7012
70132011-08-03 Yannick Moy <moy@adacore.com>
7014
7015 * sem_util.ads: comment added.
7016
70172011-08-03 Javier Miranda <miranda@adacore.com>
7018
7019 * exp_aggr.adb
7020 (Expand_Record_Aggregate): In VM targets disable the expansion into
7021 assignments of aggregates whose type is not known at compile time.
7022
b474d6c3
ES
70232011-08-03 Ed Schonberg <schonberg@adacore.com>
7024
7025 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
7026 protected entries and task entries, to build the proper renaming
7027 declaration for entry formals, used in debugging.
7028 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
7029 parameters in the same way.
7030
0580d807
AC
70312011-08-02 Robert Dewar <dewar@adacore.com>
7032
7033 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
7034 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
7035 code reorganization.
7036
70372011-08-02 Robert Dewar <dewar@adacore.com>
7038
7039 * debug.adb: Debug flag d.P to suppress length comparison optimization
7040 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
7041 comparison of Length by comparing First/Last instead.
7042
70432011-08-02 Matthew Heaney <heaney@adacore.com>
7044
7045 * a-cobove.ads: Code clean up.
7046
b191a125
AC
70472011-08-02 Vincent Celier <celier@adacore.com>
7048
7049 * adaint.c (file_names_case_sensitive_cache): New static int.
7050 (__gnat_get_file_names_case_sensitive): Cache the return value in
7051 file_names_case_sensitive_cache at the first invocation, to avoid
7052 multiple calls to getenv.
7053
70542011-08-02 Bob Duff <duff@adacore.com>
7055
7056 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
7057
316a0661
AC
70582011-08-02 Yannick Moy <moy@adacore.com>
7059
7060 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
7061 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
7062 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
7063 indicate that we are in a precondition or postcondition. This is used in
7064 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
7065 decide whether to flag the spec or body of the current subprogram as
7066 not in ALFA.
7067
70682011-08-02 Fabien Chouteau <chouteau@adacore.com>
7069
7070 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
7071 list.
7072 * a-extiin.ads: New file.
7073
70742011-08-02 Bob Duff <duff@adacore.com>
7075
7076 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
7077 now raises Name_Error instead of Use_Error in certain cases. The other
7078 parts of this AI were already implemented properly.
7079
f9adb9d4
AC
70802011-08-02 Vincent Celier <celier@adacore.com>
7081
7082 * link.c: Only import "auto-host.h" when building the gnattools.
7083
70842011-08-02 Yannick Moy <moy@adacore.com>
7085
7086 * sem_util.adb: Inter-unit inlining does not work for a subprogram
7087 which calls a local subprogram, so extract subprogram
7088 from Mark_Non_ALFA_Subprogram_Body.
7089
70902011-08-02 Javier Miranda <miranda@adacore.com>
7091
7092 * exp_ch9.adb
7093 (Extract_Dispatching_Call): If the type of the dispatching object is an
7094 access type then return an explicit dereference in the Object out-mode
7095 parameter.
7096
70972011-08-02 Gary Dismukes <dismukes@adacore.com>
7098
7099 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
7100 compatibility checks for all indexes of an array subtype, not just the
7101 first. Reset Has_Dynamic_Range_Check on the subtype before each
7102 potential check to ensure that Insert_Range_Checks will not elide any
7103 of the dynamic checks.
7104
71052011-08-02 Yannick Moy <moy@adacore.com>
7106
7107 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
7108 SPARK restriction at parsing time.
7109 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
7110 directive only if the SPARK restriction is set for this unit.
7111
83f33150
YM
71122011-08-02 Yannick Moy <moy@adacore.com>
7113
7114 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
7115 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
7116 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
7117 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
7118 Mark_Non_ALFA_Subprogram_Body.
7119 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
7120 inlined.
7121
7b98672f
YM
71222011-08-02 Yannick Moy <moy@adacore.com>
7123
7124 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
7125 might be costly.
7126
052e0603
AC
71272011-08-02 Robert Dewar <dewar@adacore.com>
7128
7129 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
7130 exp_ch3.adb: Minor reformatting.
7131
71322011-08-02 Emmanuel Briot <briot@adacore.com>
7133
7134 * adaint.c (__gnat_locate_exec_on_path): only returns executable
7135 files, not any regular file.
7136 (__gnat_locate_file_with_predicate): new subprogram.
7137
71382011-08-02 Yannick Moy <moy@adacore.com>
7139
7140 * sinfo.adb, sinfo.ads: Restrict the use of flags
7141 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
7142 nodes, plus N_Subtype_Declaration for the 2nd one.
7143
4fbad0ba
AC
71442011-08-02 Sergey Rybin <rybin@adacore.com>
7145
7146 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7147 - fix bugs in the description of Source_Trace;
7148 - get rid of UNIT_NAME;
7149
052e0603
AC
71502011-08-02 Javier Miranda <miranda@adacore.com>
7151
7152 * exp_ch9.adb
7153 (Build_Dispatching_Requeue): Adding support for VM targets
7154 since we cannot directly reference the Tag entity.
7155 * exp_sel.adb (Build_K): Adding support for VM targets.
7156 (Build_S_Assignment): Adding support for VM targets.
7157 * exp_disp.adb
7158 (Default_Prim_Op_Position): In VM targets do not restrict availability
7159 of predefined interface primitives to compiling in Ada 2005 mode.
7160 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7161 restricted to compiling in Ada 2005 mode.
7162 (Make_VM_TSD): Generate code that declares and initializes the OSD
7163 record. Needed to support dispatching calls through synchronized
7164 interfaces.
7165 * exp_ch3.adb
7166 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7167 primitives associated with synchronized interfaces.
7168 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7169 primitives associated with synchronized interfaces.
7170
71712011-08-02 Yannick Moy <moy@adacore.com>
7172
7173 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7174 statements hidden in SPARK if preceded by the HIDE directive
7175 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7176 exception handlers as hidden in SPARK if preceded by the HIDE directive
7177 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7178 if starting with the HIDE directive
7179 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7180 starting with the HIDE directive; mark the declarations in a private
7181 part as hidden in SPARK if the private part starts with the HIDE
7182 directive
7183 * restrict.adb, restrict.ads
7184 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7185 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7186 argument node belongs to a part which is hidden in SPARK
7187 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7188 parts in SPARK; protect the possibly costly call to
7189 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7190 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7191 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7192 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7193 Tok_SPARK_Hide.
7194 (Scan): recognize special comment starting with '#' and followed by
7195 SPARK keyword "hide" as a HIDE directive.
7196
71972011-08-02 Yannick Moy <moy@adacore.com>
7198
7199 * types.ads, erroutc.ads: Minor reformatting.
7200
72012011-08-02 Vincent Celier <celier@adacore.com>
7202
7203 * link.c: Add response file support for cross platforms.
7204
72052011-08-02 Ed Schonberg <schonberg@adacore.com>
7206
7207 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7208 in an association, set parent field of copy before partial analysis.
7209 * sem_res.adb (Resolve_Slice): create reference to itype only when
7210 expansion is enabled.
7211
72122011-08-02 Yannick Moy <moy@adacore.com>
7213
7214 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7215 for new flag denoting which subprogram bodies are in ALFA
7216 * restrict.adb, sem_ch7.adb: Update comment
7217 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7218 sem_ch9.adb, sem_res.adb: Add calls to
7219 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7220 * sem_ch6.adb (Analyze_Function_Return): add calls to
7221 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7222 middle of the body, and extended return.
7223 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7224 False when missing return.
7225 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7226 to True for subprograms whose spec is in ALFA. Remove later on the flag
7227 on the entity used for a subprogram body when there exists a separate
7228 declaration.
7229 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7230 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7231 False, otherwise do nothing.
7232
72332011-08-02 Robert Dewar <dewar@adacore.com>
7234
7235 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7236
72372011-08-02 Yannick Moy <moy@adacore.com>
7238
7239 * sem_ch4.ads: minor formatting.
7240
72412011-08-02 Yannick Moy <moy@adacore.com>
7242
7243 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7244 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7245 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7246 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7247 opt.ads: cleanup of SPARK mode
7248
72492011-08-02 Yannick Moy <moy@adacore.com>
7250
7251 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7252 types.
7253 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7254 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7255 * sem_ch3.adb
7256 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7257 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7258 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7259 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7260 types.
7261 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7262 non-static range.
7263 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7264 functions whose return type is not in ALFA.
7265 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7266 specifications.
7267 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7268 parameter's type is not in ALFA.
7269 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7270 types are in ALFA.
7271
72722011-08-02 Ed Schonberg <schonberg@adacore.com>
7273
7274 * sem_ch6 (Analyze_Expression_Function): treat the function as
7275 Inline_Always, and introduce a subprogram declaration for it when it is
7276 not a completion.
7277 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7278 expression functions, so that the back-end can determine whether they
7279 can in fact be inlined.
7280 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7281 a function body comes from an expression function.
7282
72832011-08-02 Gary Dismukes <dismukes@adacore.com>
7284
7285 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7286 null exclusions to test Can_Never_Be_Null on the anonymous access types
7287 of the formals rather than testing the formals themselves. Exclude this
7288 check in cases where the Old_Formal is marked as a controlling formal,
7289 to avoid issuing spurious errors for bodies completing dispatching
7290 operations (due to the flag not getting set on controlling access
7291 formals in body specs).
7292 (Find_Corresponding_Spec): When checking full and subtype conformance of
7293 subprogram bodies in instances, pass Designated and E in that order, for
7294 consistency with the expected order of the formals (New_Id followed by
7295 Old_Id).
7296
72972011-08-02 Robert Dewar <dewar@adacore.com>
7298
7299 * sem_ch8.adb: Minor reformatting.
7300
73012011-08-02 Ed Schonberg <schonberg@adacore.com>
7302
7303 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7304 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7305 primitive operations of class-wide actuals.
7306
73072011-08-02 Javier Miranda <miranda@adacore.com>
7308
7309 * exp_atag.ads, exp_atag.adb
7310 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7311 since its value is implicitly passed in argument Typ.
7312 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7313 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7314 Build_Common_Dispatching_Select_Statements.
7315
73162011-08-02 Robert Dewar <dewar@adacore.com>
7317
7318 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7319 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7320 Minor reformatting.
7321
73222011-08-02 Robert Dewar <dewar@adacore.com>
7323
7324 * sem_res.adb: Minor reformatting.
7325 * sem_prag.adb: Minor reformatting.
7326
73272011-08-02 Javier Miranda <miranda@adacore.com>
7328
7329 * exp_atag.adb, exp_atags.ads
7330 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7331 by the tagged type Entity. Required to use this routine in the VM
7332 targets since we do not have available the Tag entity in the VM
7333 platforms.
7334 * exp_ch6.adb
7335 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7336 Ada.Tags has not been previously loaded.
7337 * exp_ch7.adb
7338 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7339 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7340 * sem_aux.adb
7341 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7342 view of enclosing scopes. Required to handle enclosing scopes that
7343 are synchronized types whose full view is a task type.
7344 * exp_disp.adb
7345 (Build_VM_TSDs): Minor code improvement to avoid generating and
7346 analyzing lists with empty nodes.
7347 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7348 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7349 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7350 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7351 (Make_Select_Specific_Data_Table): Add support for VM targets.
7352 (Make_VM_TSD): Generate code to initialize the SSD structure of
7353 the TSD.
7354
73552011-08-02 Yannick Moy <moy@adacore.com>
7356
7357 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7358 cross-references section in ALI.
7359 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7360 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7361 Sub).
7362 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7363 subprogram or package entity of a node
7364 (Is_Local_Reference_Type): new function returns True for references
7365 selected in local cross-references.
7366 (Lt): function extracted from Lt in Output_References
7367 (Write_Entity_Name): function extracted from Output_References
7368 (Generate_Definition): generate reference with type 'D' for definition
7369 of objects (object declaration and parameter specification), with
7370 appropriate locations and units, for use in local cross-references.
7371 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7372 references of type 'I' for initialization in object definition.
7373 (Output_References): move part of function Lt and procedure
7374 Write_Entity_Name outside of the body. Ignore references of types 'D'
7375 and 'I' introduced for local cross-references.
7376 (Output_Local_References): new procedure to output the local
7377 cross-references sections.
7378 (Lref_Entity_Status): new array defining whether an entity is a local
7379 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7380 with 'I' type when initialization expression is present.
7381 * get_scos.adb, get_scos.ads: Correct comments and typos
7382
73832011-08-02 Javier Miranda <miranda@adacore.com>
7384
7385 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7386 the JVM target.
7387 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7388 the JVM target.
7389 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7390 TSD support.
7391
73922011-08-02 Vincent Celier <celier@adacore.com>
7393
7394 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7395 (No_Space_Img): New function
7396 (Find_Excluded_Sources): When reading from a file, record the file name
7397 and the line number for each excluded source.
7398 (Mark_Excluded_Sources): When reporting an error, if the excluded
7399 sources were read from a file, include file name and line number in
7400 the error message.
7401
74022011-08-02 Ed Schonberg <schonberg@adacore.com>
7403
7404 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7405
74062011-08-02 Robert Dewar <dewar@adacore.com>
7407
7408 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7409
74102011-08-02 Javier Miranda <miranda@adacore.com>
7411
7412 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7413 generation of TSDs to the DOTNET compiler.
7414 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7415 generation of TSDs to the DOTNET compiler.
7416
74172011-08-02 Javier Miranda <miranda@adacore.com>
7418
7419 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7420 record of all the tagged types declared inside library level package
7421 declarations, library level package bodies or library level subprograms.
7422 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7423 associated with a given tagged type.
7424 (Build_VM_TSDs): New subprogram.
7425 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7426 compilation units that are subprograms.
7427 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7428 compilation units that are package bodies.
7429 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7430 units that are a package declaration or a package instantiation.
7431 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7432 reorganization to improve the error generated by the frontend when the
7433 function Ada.Tags.Secondary_Tag is not available.
7434 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7435 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7436
74372011-08-02 Javier Miranda <miranda@adacore.com>
7438
7439 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7440
74412011-08-02 Robert Dewar <dewar@adacore.com>
7442
7443 * s-imenne.ads: Minor reformatting.
7444
74452011-08-02 Robert Dewar <dewar@adacore.com>
7446
7447 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7448 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7449 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7450
74512011-08-02 Robert Dewar <dewar@adacore.com>
7452
7453 * einfo.ads (Materialize_Entity): Document this is only for renamings
7454 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7455 required debug information in the case where we transform the object
7456 declaration into a renaming declaration.
7457 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7458 object
7459 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7460 Materialize_Entity.
7461
74622011-08-02 Robert Dewar <dewar@adacore.com>
7463
7464 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7465 Suppress_Init_Procs.
7466 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7467 Suppress_Initialization/Initialization_Suppressed.
7468 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7469 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7470 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7471 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7472
74732011-08-02 Robert Dewar <dewar@adacore.com>
7474
7475 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7476 Minor reformatting.
7477
74782011-08-02 Ed Schonberg <schonberg@adacore.com>
7479
7480 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7481 only have inheritable classwide pre/postconditions.
7482
74832011-08-02 Javier Miranda <miranda@adacore.com>
7484
7485 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7486 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7487 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7488 checks if the external tag of a type is the same as the external tag
7489 of some other declaration.
7490
74912011-08-02 Thomas Quinot <quinot@adacore.com>
7492
7493 * s-taskin.ads: Minor reformatting.
7494
74952011-08-02 Emmanuel Briot <briot@adacore.com>
7496
7497 * g-comlin.adb (Display_Help): swap the order in which it prints the
7498 short help and the general usage.
7499
75002011-08-02 Ed Schonberg <schonberg@adacore.com>
7501
7502 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7503 the aspect declarations and attach them to the generic copy for
7504 subsequent analysis.
7505 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7506 declarations of the generic tree to the new subprogram declarations.
7507 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7508 conditions that apply to a subprogram instance.
7509
75102011-08-02 Robert Dewar <dewar@adacore.com>
7511
7512 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7513
75142011-08-02 Ed Schonberg <schonberg@adacore.com>
7515
7516 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7517 private type with a tagged full view is not derived in the immediate
7518 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7519
75202011-08-02 Robert Dewar <dewar@adacore.com>
7521
7522 * exp_ch4.adb: Minor reformatting.
7523
75242011-08-02 Ed Schonberg <schonberg@adacore.com>
7525
7526 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7527 Ada2012 iterator, the loop will be rewritten during expansion into a
7528 while loop with a cursor and an element declaration. Do not analyze the
7529 body in this case, because if the container is for indefinite types the
7530 actual subtype of the elements will only be determined when the cursor
7531 declaration is analyzed.
7532
75332011-08-02 Arnaud Charlet <charlet@adacore.com>
7534
7535 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7536 size/alignment related attributes in CodePeer_Mode.
7537
75382011-08-02 Gary Dismukes <dismukes@adacore.com>
7539
7540 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7541 Prepend_Element, since this can result in the operation getting the
7542 wrong slot in the full type's dispatch table if the full type has
7543 inherited operations. The incomplete type's operation will get added
7544 to the proper position in the full type's primitives
7545 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7546 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7547 dispatching operations, since there are cases where nonprimitive
7548 subprograms can get added to the list of incomplete dependents (such
7549 as subprograms in nested packages).
7550 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7551 private part when determining whether to add a primitive with a
7552 parameter of a tagged incomplete type to the Private_Dependents list.
7553 Such primitives can also occur in the visible part, and should not have
7554 been excluded from being private dependents.
7555 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7556 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7557 list of a Taft-amendment incomplete type is a primitive before issuing
7558 an error that the full type must appear in the same unit. There are
7559 cases where nonprimitives can be in the list (such as subprograms in
7560 nested packages).
7561 * sem_disp.adb (Derives_From): Use correct condition for checking that
7562 a formal's type is derived from the type of the corresponding formal in
7563 the parent subprogram (the condition was completely wrong). Add
7564 checking that was missing for controlling result types being derived
7565 from the result type of the parent operation.
7566
75672011-08-02 Yannick Moy <moy@adacore.com>
7568
7569 * errout.adb (First_Node): minor renaming
7570 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7571 first node.
7572
75732011-08-02 Yannick Moy <moy@adacore.com>
7574
7575 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7576 before accessing operands.
7577 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7578 decide whether an initialization expression respects SPARK rules, as
7579 the plain node is the expanded one. This allows for more valid warnings
7580 to be issued.
7581 * gnat_rm.texi: Minor update.
7582
75832011-08-02 Arnaud Charlet <charlet@adacore.com>
7584
7585 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7586 previous change.
7587
75882011-08-02 Robert Dewar <dewar@adacore.com>
7589
7590 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7591
75922011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7593
7594 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7595 loop statements and the element renaming declaration with a block when
7596 the element type is controlled.
7597
75982011-08-02 Yannick Moy <moy@adacore.com>
7599
7600 * sinfo.ads: Minor formatting.
7601
76022011-08-02 Ed Schonberg <schonberg@adacore.com>
7603
7604 * sem_aggr.adb (Add_Association): if the association has a box and no
7605 expression, use the Sloc of the aggregate itself for the new
7606 association.
7607 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7608 the Original_Node.
7609
76102011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7611
7612 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7613 When a container is provided via a function call, generate a renaming
7614 of the function result. This avoids the creation of a transient scope
7615 and the premature finalization of the container.
7616 * exp_ch7.adb (Is_Container_Cursor): Removed.
7617 (Wrap_Transient_Declaration): Remove the supression of the finalization
7618 of the list controller when the declaration denotes a container cursor,
7619 it is not needed.
7620
76212011-08-02 Yannick Moy <moy@adacore.com>
7622
7623 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7624 node is from source, instead of the original node being from source.
7625 * sem_aggr.adb
7626 (Resolve_Array_Aggregate): refine the check for a static expression, to
7627 recognize also static ranges
7628 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7629 Array_Type_Declaration): postpone the test for the type being a subtype
7630 mark after the type has been resolved, so that component-selection and
7631 expanded-name are discriminated.
7632 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7633 to distinguish the case of an iteration scheme, so that an error is
7634 issed on a non-static range in SPARK except in an iteration scheme.
7635 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7636 In_Iter_Schm = True.
7637 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7638 user-defined operators so that they are allowed in renaming
7639 * sem_ch8.adb
7640 (Find_Selected_Component): refine the check for prefixing of operators
7641 so that they are allowed in renaming. Move the checks for restrictions
7642 on selector name after analysis discriminated between
7643 component-selection and expanded-name.
7644 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7645 concatenation argument of string type if it is static.
7646 * sem_util.adb, sem_util.ads
7647 (Check_Later_Vs_Basic_Declarations): add a new function
7648 Is_Later_Declarative_Item to decice which declarations are allowed as
7649 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7650 mode, add that renamings are considered as later items.
7651 (Enclosing_Package): new function to return the enclosing package
7652 (Enter_Name): correct the rule for homonyms in SPARK
7653 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7654 from source (result of expansion) to avoid issuing wrong warnings.
7655
76562011-08-02 Ed Schonberg <schonberg@adacore.com>
7657
7658 * errout.adb: On anything but an expression First_Node returns its
7659 argument.
7660
76612011-08-02 Pascal Obry <obry@adacore.com>
7662
7663 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7664
76652011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7666
7667 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7668 Set the associated loop as the related expression of internally
7669 generated cursors.
7670 * exp_ch7.adb (Is_Container_Cursor): New routine.
7671 (Wrap_Transient_Declaration): Supress the finalization of the list
7672 controller when the declaration denotes a container cursor.
7673
76742011-08-02 Yannick Moy <moy@adacore.com>
7675
7676 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7677 command line now.
7678 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7679 expression is a simple expression. This check cannot be performed in
7680 the semantics, so just drop it.
7681 (P_Index_Or_Discriminant_Constraint): move check that the index or
7682 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7683 semantics. Other cases were previously checked in the semantics.
7684 * par-ch4.adb (P_Name): move checks that a selector name is not
7685 character literal or an operator symbol to Find_Selected_Component in
7686 the semantics
7687 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7688 declarations are not placed after later declarations in a separate
7689 procedure in Sem_Util (possibly not the best choice?), to be used both
7690 during parsing, for Ada 83 mode, and during semantic analysis, for
7691 SPARK mode.
7692 * par-endh.adb (Check_End): move check that end label is not missing
7693 to Process_End_Label in the semantics
7694 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7695 the special case for SPARK restriction
7696 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7697 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7698 parameter Force to issue the error message even on internal node (used
7699 for generated end label). Call Check_Restriction to check when an error
7700 must be issued. In SPARK mode, issue an error message even if the
7701 restriction is not set.
7702 (Check_Restriction): new procedure with an additional out parameter to
7703 inform the caller that a message has been issued
7704 * sem_aggr.adb: Minor modification of message
7705 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7706 instead of issuing an error message directly
7707 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7708 declarations are not placed after later declarations, by calling
7709 Check_Later_Vs_Basic_Declarations
7710 (Analyze_Subtype_Declaration): move here the check that an index or
7711 discriminant constraint must be a subtype mark. Change the check that
7712 a subtype of String must start at one so that it works on subtype marks.
7713 * sem_ch4.adb (Analyze_Call): move here the check that a named
7714 association cannot follow a positional one in a call
7715 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7716 instead of issuing an error message directly
7717 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7718 selector name is not a character literal or an operator symbol. Move
7719 here the check that the prefix of an expanded name cannot be a
7720 subprogram or a loop statement.
7721 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7722 procedure called from parsing and semantics to check that basic
7723 declarations are not placed after later declarations
7724 (Process_End_Label): move here the check that end label is not missing
7725
77262011-08-02 Arnaud Charlet <charlet@adacore.com>
7727
7728 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7729 representation clause in codepeer mode, since it confuses CodePeer and
7730 does not bring useful info.
7731
77322011-08-02 Ed Falis <falis@adacore.com>
7733
7734 * init.c: initialize fp hw on MILS.
7735
77362011-08-02 Ed Schonberg <schonberg@adacore.com>
7737
7738 * errout.adb (First_Node): for bodies, return the node itself (small
7739 optimization). For other nodes, do not check source_unit if the node
7740 comes from Standard.
7741
77422011-08-02 Robert Dewar <dewar@adacore.com>
7743
7744 * exp_ch3.adb: Minor comment additions.
7745 * sem_ch13.adb: Minor reformatting.
7746
77472011-08-02 Pascal Obry <obry@adacore.com>
7748
7749 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7750
77512011-08-02 Robert Dewar <dewar@adacore.com>
7752
7753 * sem_attr.adb: Minor reformatting.
7754
77552011-08-02 Robert Dewar <dewar@adacore.com>
7756
7757 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7758 (Has_Default_Component_Value): Removed
7759 * einfo.ads Comment updates
7760 (Has_Default_Aspect): Replaces Has_Default_Value
7761 (Has_Default_Component_Value): Removed
7762 * exp_ch13.adb
7763 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7764 * exp_ch3.adb
7765 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7766 (Get_Simple_Init_Val): Handle Default_Value aspect
7767 (Needs_Simple_Initialization): Handle Default_Value aspect
7768 * exp_ch3.ads: Needs_Simple_Initialization
7769 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7770 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7771 * sem_ch13.adb
7772 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7773 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7774 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7775
77762011-08-02 Ed Schonberg <schonberg@adacore.com>
7777
7778 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7779 package containing iteration primitives.
7780 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7781
77822011-08-02 Ed Schonberg <schonberg@adacore.com>
7783
7784 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7785 "of", pre-analyze expression in case it is a function call with
7786 finalization actions that must be placed ahead of the loop.
7787 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7788 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7789
77902011-08-02 Geert Bosch <bosch@adacore.com>
7791
7792 * cstand.adb (Create_Float_Types): Only consider C's long double for
7793 Long_Long_Float, in addition to double.
7794
77952011-08-02 Robert Dewar <dewar@adacore.com>
7796
7797 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7798 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7799 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7800 Minor reformatting.
7801
78022011-08-02 Ed Schonberg <schonberg@adacore.com>
7803
7804 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7805 indexed component.
7806
78072011-08-02 Javier Miranda <miranda@adacore.com>
7808
7809 * einfo.ads, einfo.adb
7810 (Original_Access_Type): Move this attribute to Node26 since there was
7811 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7812 which causes conflicts and breaks the generation of the .NET compiler.
7813 (Interface_Name): Add missing documentation on JGNAT only uses of
7814 this attribute.
7815
78162011-08-02 Geert Bosch <bosch@adacore.com>
7817
7818 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7819 (Find_Back_End_Float_Type): Likewise
7820 (Create_Back_End_Float_Types): Likewise
7821 (Create_Float_Types): Likewise
7822 (Register_Float_Type): Likewise
7823 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7824 Nlist and split out type selection in new local Find_Base_Type function.
7825 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7826 Nlist
7827 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7828
78292011-08-02 Robert Dewar <dewar@adacore.com>
7830
7831 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7832 alpha order).
7833 * opt.ads: Minor comment change.
7834 * sem_ch12.adb: Minor code reorganization.
7835
78362011-08-02 Gary Dismukes <dismukes@adacore.com>
7837
7838 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7839 subtype's list of rep items to the list on the full subtype in the case
7840 where the lists are the same.
7841
78422011-08-02 Geert Bosch <bosch@adacore.com>
7843
7844 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7845 using the one from System.Strings, which also deallocates all strings.
7846
78472011-08-02 Geert Bosch <bosch@adacore.com>
7848
7849 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7850 function.
7851 * gcc-interface/Make-lang.in: Update dependencies.
7852
78532011-08-02 Olivier Hainque <hainque@adacore.com>
7854
7855 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7856 end_locus.
7857
78582011-08-02 Javier Miranda <miranda@adacore.com>
7859
7860 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7861 associated with anonymous access to subprograms.
7862
78632011-08-02 Geert Bosch <bosch@adacore.com>
7864
7865 * opt.ads
7866 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7867 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7868 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7869 (Add_Symbol_Definition): Move to switch-c.adb
7870 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7871 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7872 (Add_Symbol_Definition): Move to switch-c.adb.
7873 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7874 * sem_warn.adb
7875 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7876 Move to warnsw.adb.
7877 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7878 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7879 Move to warnsw.adb.
7880 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7881 (Add_Symbol_Definition): Moved from Prepcomp.
7882 * switch-c.ads: Update copyright notice. Use String_List instead of
7883 Argument_List, removing dependency on System.OS_Lib.
7884
78852011-08-02 Yannick Moy <moy@adacore.com>
7886
7887 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7888 mode on initialization expression which does not respect SPARK
7889 restrictions.
7890 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7891 if the tree referenced by its argument represents an initialization
7892 expression in SPARK, suitable for initializing an object in an object
7893 declaration.
7894
78952011-08-02 Javier Miranda <miranda@adacore.com>
7896
7897 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7898 internally generated access to subprogram with its associated protected
7899 subprogram type.
7900 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7901
79022011-08-02 Geert Bosch <bosch@adacore.com>
7903
7904 * cstand.adb (Register_Float_Type): Print information about type to
7905 register, if the Debug_Flag_Dot_B is set.
7906 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7907 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7908 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7909 with a requested precision of more than Max_Digits digits and no more
7910 than Max_Base_Digits digits, if a range specification is present and the
7911 Predefined_Float_Types list has a suitable type to derive from.
7912 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7913 case of type completion with pragma Import
7914 * sem_prag.adb
7915 (Process_Import_Predefined_Type): Processing to complete a type
7916 with pragma Import. Currently supports floating point types only.
7917 (Set_Convention_From_Pragma): Do nothing without underlying type.
7918 (Process_Convention): Guard against absence of underlying type,
7919 which may happen when importing incomplete types.
7920 (Process_Import_Or_Interface): Handle case of importing predefined
7921 types. Tweak error message.
7922
79232011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7924
7925 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7926 functions to previous change. Reorganize code slightly.
7927
79282011-08-02 Geert Bosch <bosch@adacore.com>
7929
7930 * back_end.ads (Register_Type_Proc): New call back procedure type for
7931 allowing the back end to provide information about available types.
7932 (Register_Back_End_Types): New procedure to register back end types.
7933 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7934 available types.
7935 * cstand.adb (Back_End_Float_Types): New list for floating point types
7936 supported by the back end.
7937 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7938 (Copy_Float_Type): New procedure to make new copies of predefined types.
7939 (Register_Float_Type): New call back procedure to populate the BEFT list
7940 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7941 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7942 (Create_Float_Types): New procedure to create entities for floating
7943 point types predefined in Standard, and put these and any remaining
7944 BEFTs on the Predefined_Float_Types list.
7945 * stand.ads (Predefined_Float_Types): New list for predefined floating
7946 point types that do not have declarations in package Standard.
7947
79482011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7949
7950 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7951 entity node for the unit containing the parameter.
7952 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7953 (Add_Inlined_Subprogram): Likewise.
7954 * gcc-interface/Make-lang.in: Update dependencies.
7955
79562011-08-02 Thomas Quinot <quinot@adacore.com>
7957
7958 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7959 suitable value.
7960
79612011-08-02 Geert Bosch <bosch@adacore.com>
7962
7963 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7964
79652011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7966
7967 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7968 computed value of Base_Type.
7969
79702011-08-02 Yannick Moy <moy@adacore.com>
7971
7972 * restrict.adb (Check_Restriction): issue an error for any use of
7973 class-wide, even if the No_Dispatch restriction is not set.
7974 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7975 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7976 when completing a private extension, the type named in the private part
7977 is not the same as that named in the visible part.
7978 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7979 of an inherited primitive operations of a tagged type or type extension
7980 that returns the tagged type.
7981 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7982 function which returns True for an implicit operation inherited by the
7983 derived type declaration for the argument type.
7984 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7985 order.
7986
79872011-08-02 Ed Schonberg <schonberg@adacore.com>
7988
7989 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7990 Process_Bounds, to perform analysis with expansion of a range or an
7991 expression that is the iteration scheme for a loop.
7992 (Analyze_Iterator_Specification): If domain of iteration is given by a
7993 function call with a controlled result, as is the case if call returns
7994 a predefined container, ensure that finalization actions are properly
7995 generated.
7996 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7997
79982011-08-02 Javier Miranda <miranda@adacore.com>
7999
8000 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8001 * gcc-interface/Make-lang.in: Update dependencies.
8002
80032011-08-02 Javier Miranda <miranda@adacore.com>
8004
8005 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8006 determine if the analysis is performed using N or Original_Node (N).
8007 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8008 functionality of routine Is_Variable avoids code duplication.
8009 * checks.adb (Determine_Range): Handle temporaries generated by
8010 Remove_Side_Effects.
8011
80122011-08-02 Javier Miranda <miranda@adacore.com>
8013
8014 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8015 expansion of the condition. Required since the previous analysis was
8016 done with expansion disabled (see Resolve_Quantified_Expression) and
8017 hence checks were not inserted and record comparisons have not been
8018 expanded.
8019
80202011-08-02 Ed Falis <falis@adacore.com>
8021
8022 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8023 Update header.
8024
80252011-08-02 Bob Duff <duff@adacore.com>
8026
8027 * opt.ads: Minor comment fix.
8028
80292011-08-02 Bob Duff <duff@adacore.com>
8030
8031 * sem_ch12.adb (Analyze_Package_Instantiation,
8032 Analyze_Subprogram_Instantiation): Turn off style checking while
8033 analyzing an instance. Whatever style checks that apply to the generic
8034 unit should apply, so it makes no sense to apply them in an instance.
8035 This was causing trouble when compiling an instance of a runtime
8036 unit that violates the -gnatyO switch.
8037 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8038 one of the two case statements, causing spurious errors.
8039
80402011-08-02 Robert Dewar <dewar@adacore.com>
8041
8042 * uname.adb: Minor reformatting.
8043 * gnatcmd.adb: Minor reformatting.
8044 * exp_attr.adb: Minor reformatting.
8045
80462011-08-02 Ed Schonberg <schonberg@adacore.com>
8047
8048 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8049 No_Dispatching_Calls, do not look for the Assign primitive, because
8050 predefined primitives are not created in this case.
8051
80522011-08-02 Bob Duff <duff@adacore.com>
8053
8054 * stylesw.ads: Minor comment fixes.
8055
80562011-08-02 Robert Dewar <dewar@adacore.com>
8057
8058 * freeze.adb (Add_To_Result): New procedure.
8059
80602011-08-02 Jose Ruiz <ruiz@adacore.com>
8061
8062 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8063 time, if the specific run-time routines for handling streams of strings
8064 are not available, use the default mechanism.
8065
80662011-08-02 Arnaud Charlet <charlet@adacore.com>
8067
8068 * s-regpat.ads: Fix typo.
8069
80702011-08-02 Vincent Celier <celier@adacore.com>
8071
8072 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8073 not null, call it to create the in memory config project file without
8074 parsing an existing default config project file.
8075
80762011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8077
8078 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8079
80802011-08-02 Ed Schonberg <schonberg@adacore.com>
8081
8082 * sem_elim.adb: an abstract subprogram does not need an eliminate
8083 pragma for its descendant to be eliminable.
8084
80852011-08-02 Ed Falis <falis@adacore.com>
8086
8087 * init.c: revert to handling before previous checkin for VxWorks
8088 * s-intman-vxworks.adb: delete unnecessary declarations related to
8089 using Ada interrupt facilities for handling signals.
8090 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8091 * s-intman-vxworks.ads: Import __gnat_install_handler as
8092 Initialize_Interrupts.
8093 * s-taprop-vxworks.adb: Delete Signal_Mask.
8094 (Abort_Handler): change construction of mask to unblock exception
8095 signals.
8096
80972011-08-02 Jerome Guitton <guitton@adacore.com>
8098
8099 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8100 Debug_Raise_Exception before propagation starts.
8101
81022011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8103
8104 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8105 to Restriction_Check_Required.
8106 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8107 * sem_res.adb (Resolve_Call): Likewise.
8108 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8109
81102011-08-02 Bob Duff <duff@adacore.com>
8111
8112 * stylesw.ads: Update comment.
8113 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8114 * errout.ads: Remove obsolete comment.
8115
81162011-08-02 Javier Miranda <miranda@adacore.com>
8117
8118 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8119 (Set_Is_Safe_To_Reevaluate): new procedure.
8120 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8121 assignment is allowed on safe-to-reevaluate variables.
8122 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8123 temporary created to remove side effects in expressions that use
8124 the secondary stack as safe-to-reevaluate.
8125 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8126 variables that are not true constants.
8127
81282011-08-02 Robert Dewar <dewar@adacore.com>
8129
8130 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8131 sem_res.adb, sem_ch6.adb: Minor reformatting.
8132
81332011-08-02 Jerome Guitton <guitton@adacore.com>
8134
8135 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8136
81372011-08-02 Ed Schonberg <schonberg@adacore.com>
8138
8139 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8140 not set Overridden_Operation if subprogram is an initialization
8141 procedure.
8142
81432011-08-02 Yannick Moy <moy@adacore.com>
8144
8145 * par-ch6.adb: Correct obsolete name in comments
8146 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8147 which takes two message arguments (existing function takes one), with
8148 second message used for continuation.
8149 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8150 block statements that originate from a source block statement, not
8151 generated block statements
8152 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8153 symmetry with procedure case
8154 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8155 function to issue an error in formal mode if a package specification
8156 contains more than one tagged type or type extension.
8157 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8158 parameters matching formals of tagged types are objects (or ancestor
8159 type conversions of objects), not general expressions. Issue an error
8160 on view conversions that are not involving ancestor conversion of an
8161 extended type.
8162 (Resolve_Type_Conversion): in formal mode, issue an error on the
8163 operand of an ancestor type conversion which is not an object
8164 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8165 procedure so that it works also for actuals of function calls
8166 (Is_Actual_Tagged_Parameter): new function which determines if its
8167 argument is an actual parameter of a formal of tagged type in a
8168 subprogram call
8169 (Is_SPARK_Object_Reference): new function which determines if the tree
8170 referenced by its argument represents an object in SPARK
8171
81722011-08-02 Robert Dewar <dewar@adacore.com>
8173
8174 * sem_ch3.adb: Minor reformatting
8175 Minor comment addition
8176 Minor error msg text change
8177
81782011-08-02 Javier Miranda <miranda@adacore.com>
8179
8180 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8181 function. Used to be more precise when we generate a variable plus one
8182 assignment to remove side effects in the evaluation of the Bound
8183 expressions.
8184 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8185 of the bound expression to force its re-analysis and thus expand the
8186 associated transient scope (if required). Code cleanup replacing the
8187 previous code that declared the constant entity by an invocation to
8188 routine Force_Evaluation which centralizes this work in the frontend.
8189
81902011-08-02 Robert Dewar <dewar@adacore.com>
8191
8192 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8193 (Base_Type): Now uses improved Is_Base_Type function
8194 * einfo.ads (Base_Type): Inline this function
8195
81962011-08-02 Robert Dewar <dewar@adacore.com>
8197
8198 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8199 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8200
82012011-08-02 Arnaud Charlet <charlet@adacore.com>
8202
8203 * gcc-interface/Make-lang.in: Update dependencies.
8204 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8205 targets.
8206
82072011-08-02 Yannick Moy <moy@adacore.com>
8208
8209 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8210 non-simple expression used in delta constraint
8211 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8212 index constraint which is not a subtype mark
8213 * par.adb: With and use Restrict
8214 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8215 mode on component type which is not a subtype mark and default
8216 expression on component
8217 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8218 of string which does not have a lower index bound equal to 1
8219 (Array_Type_Declaration): issue an error in formal mode on index or
8220 component type which is not a subtype mark, and on aliased keyword on
8221 component
8222 (Derived_Type_Declaration): issue an error in formal mode on interface,
8223 limited or abstract type
8224 (Record_Type_Declaration): issue an error in formal mode on interface
8225 (Record_Type_Definition): issue an error in formal mode on tagged types
8226 and type extensions not declared in the specification of a library unit
8227 package; on null non-tagged record; on variant part
8228
82292011-08-02 Vincent Celier <celier@adacore.com>
8230
8231 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8232 not declared for qualified library project when Library_Name is not
8233 declared, but Library_Dir is.
8234
82352011-08-02 Robert Dewar <dewar@adacore.com>
8236
8237 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8238 pragmas (affects aspects [Component_]Default_Value
8239 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8240 component type for the resolution
8241
82422011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8243
8244 * einfo.adb (Base_Type): Tune implementation for speed.
8245
82462011-08-02 Robert Dewar <dewar@adacore.com>
8247
8248 * freeze.adb: Minor reformatting.
8249
82502011-08-02 Thomas Quinot <quinot@adacore.com>
8251
8252 * scos.ads: Update comments.
8253
82542011-08-02 Ed Schonberg <schonberg@adacore.com>
8255
8256 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8257 base type, because the parent may be a subtype of a private type whose
8258 convention is established in a private part.
8259
82602011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8261
8262 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8263 statement in a block when the expansion of the return expression has
8264 created a finalization chain.
8265 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8266 with the parent node.
8267 Add N_Extended_Return_Statement to handle the case where a transient
8268 object declaration appears in the Return_Object_Declarations list of
8269 an extended return statement.
8270
82712011-08-02 Matthew Gingell <gingell@adacore.com>
8272
8273 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8274 unused parameter 'name'.
8275
82762011-08-02 Ed Schonberg <schonberg@adacore.com>
8277
8278 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8279 inherited operation, check whether its alias, which is the source
8280 operastion that it renames, has been marked eliminated.
8281
82822011-08-02 Javier Miranda <miranda@adacore.com>
8283
8284 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8285 in-mode parameter whose type is an access type since it can be used to
8286 modify its designated object. Enforce code that handles as safe an
8287 access type that is not access-to-constant but it is the result of a
8288 previous removal of side-effects.
8289 (Remove_Side_Effects): Minor code reorganization of cases which require
8290 no action. Done to incorporate documentation on new cases uncovered
8291 working in this ticket: no action needed if this routine was invoked
8292 too early and the nodes are not yet decorated.
8293 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8294 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8295 were issued with actuals that are implicitly provided by
8296 Force_Evaluation.
8297
82982011-08-02 Robert Dewar <dewar@adacore.com>
8299
8300 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8301
83022011-08-02 Yannick Moy <moy@adacore.com>
8303
8304 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8305 to issue an error in formal mode on attribute not supported in this mode
8306 (Analyze_Attribute): issue errors on standard attributes not supported
8307 in formal mode.
8308 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8309 comment, and issue error in formal mode on modulus which is not a power
8310 of 2.
8311 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8312 range.
8313 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8314 subtype mark.
8315 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8316 operator on modular type (except 'not').
8317
83182011-08-02 Robert Dewar <dewar@adacore.com>
8319
8320 * gnat_rm.texi: Minor reformatting.
8321
83222011-08-02 Arnaud Charlet <charlet@adacore.com>
8323
8324 * s-osinte-linux.ads: Minor comment update and reformatting.
8325 * i-cexten.ads: Make this unit pure, as for its parent.
8326 Will allow its usage in more contexts if needed.
8327
83282011-08-02 Robert Dewar <dewar@adacore.com>
8329
8330 * s-utf_32.ads: Minor comment fix.
8331
83322011-08-02 Ed Schonberg <schonberg@adacore.com>
8333
8334 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8335 operation of a tagged synchronized type, handle the case where the
8336 controlling argument is overloaded.
8337
83382011-08-02 Yannick Moy <moy@adacore.com>
8339
8340 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8341 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8342 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8343 SPARK mode and formal verification mode on processing SPARK restriction
8344 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8345 requiring consistency checking.
8346
83472011-08-02 Robert Dewar <dewar@adacore.com>
8348
8349 * sem_res.adb: Minor reformatting.
8350
83512011-08-02 Robert Dewar <dewar@adacore.com>
8352
8353 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8354 a-cforse.ads: Remove unneeded with of Ada.Containers
8355 Remove commented out pragma Inline's
8356 Move specifications of new subprograms to the actual specs
8357
83582011-08-02 Yannick Moy <moy@adacore.com>
8359
8360 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8361 a-cforse.ads: Update comments.
8362
83632011-08-02 Ed Schonberg <schonberg@adacore.com>
8364
8365 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8366
83672011-08-02 Robert Dewar <dewar@adacore.com>
8368
8369 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8370 a-cforse.ads, a-cofove.ads: Minor reformatting.
8371
83722011-08-02 Claire Dross <dross@adacore.com>
8373
8374 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8375 a-cofove.ads: Add comments.
8376
83772011-08-02 Yannick Moy <moy@adacore.com>
8378
8379 * gnat_rm.texi: Document formal containers.
8380
83812011-08-02 Emmanuel Briot <briot@adacore.com>
8382
8383 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8384 are empty sections.
8385
83862011-08-02 Robert Dewar <dewar@adacore.com>
8387
8388 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8389 reformatting.
8390
83912011-08-02 Robert Dewar <dewar@adacore.com>
8392
8393 * aspects.adb: New aspects Default_Value and Default_Component_Value
8394 New format of Aspect_Names table checks for omitted entries
8395 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8396 handling of boolean aspects for derived types.
8397 New aspects Default_Value and Default_Component_Value
8398 New format of Aspect_Names table checks for omitted entries
8399 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8400 (Has_Default_Value): New flag
8401 (Has_Default_Component_Value): New flag
8402 (Has_Default_Value): New flag
8403 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8404 table.
8405 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8406 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8407 Default_Value and Default_Component_Value
8408 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8409 New aspects Default_Value and Default_Component_Value
8410 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8411 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8412
84132011-08-02 Vincent Celier <celier@adacore.com>
8414
8415 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8416 inherit library kind.
8417
84182011-08-02 Ed Schonberg <schonberg@adacore.com>
8419
8420 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8421 Minor reformatting.
8422
84232011-08-02 Robert Dewar <dewar@adacore.com>
8424
8425 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8426
84272011-08-02 Yannick Moy <moy@adacore.com>
8428
8429 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8430
84312011-08-02 Robert Dewar <dewar@adacore.com>
8432
8433 * impunit.adb: Add comment.
8434
84352011-08-02 Yannick Moy <moy@adacore.com>
8436
8437 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8438 qualification of aggregates in formal mode
8439 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8440 another aggregate
8441 (Resolve_Aggregate): complete the test that an aggregate is adequately
8442 qualified in formal mode
8443
84442011-08-02 Pascal Obry <obry@adacore.com>
8445
8446 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8447 * mlib-prj.adb: Supress warning when compiling binder generated file.
8448 (Build_Library): Supress all warnings when compiling the binder
8449 generated file.
8450
84512011-08-02 Yannick Moy <moy@adacore.com>
8452
8453 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8454 from here...
8455 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8456 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8457 Add with/use clauses to make Check_Formal_Restriction visible
8458
84592011-08-02 Ed Schonberg <schonberg@adacore.com>
8460
8461 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8462 in-parameters when type of the generic formal is private in the generic
8463 spec and non-private in the body.
8464
84652011-08-02 Claire Dross <dross@adacore.com>
8466
8467 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8468 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8469 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8470 * impunit.adb, Makefile.rtl: Take new files into account.
8471
84722011-08-02 Robert Dewar <dewar@adacore.com>
8473
8474 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8475 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8476
84772011-08-02 Yannick Moy <moy@adacore.com>
8478
8479 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8480 formal mode
8481 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8482 matching static array bounds, taking into account the special case of
8483 string literals
8484 * sem_ch3.adb: Typo in comment.
8485
84862011-08-02 Yannick Moy <moy@adacore.com>
8487
8488 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8489 which issues an error in formal mode if its argument node is originally
8490 from source
8491 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8492 has a discriminant specification so that it does not include the case
8493 of derived types
8494 (Derived_Type_Declaration): move here the test that a derived type has a
8495 discriminant specification
8496 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8497 first element of a component association before accessing its choices
8498 (presence of component association is not enough)
8499 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8500 declaration is a library item before accessing the next element in a
8501 list, as library items are not member of lists
8502 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8503 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8504 Check_Formal_Restriction whenever possible.
8505
85062011-08-02 Ed Schonberg <schonberg@adacore.com>
8507
8508 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8509 reference when needed.
8510
85112011-08-02 Bob Duff <duff@adacore.com>
8512
8513 * gnat_ugn.texi: Fix typo.
8514
85152011-08-02 Vincent Celier <celier@adacore.com>
8516
8517 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8518 archive file name. Do not use the full path name of archives for Open
8519 VMS.
8520
85212011-08-02 Robert Dewar <dewar@adacore.com>
8522
8523 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8524 Analyze_Aspect_Specifications
8525 * sem_ch13.adb
8526 (Analyze_Aspect_Specifications): New handling for boolean aspects
8527 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8528 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8529 sequence for Analyze_Aspect_Specifications
8530 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8531 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8532
85332011-08-02 Robert Dewar <dewar@adacore.com>
8534
8535 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8536 aspects, since these no longer exist.
8537
85382011-08-02 Robert Dewar <dewar@adacore.com>
8539
8540 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8541 semicolon, do not try to see if there are aspects following it.
8542 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8543 aspect spec.
8544
85452011-08-02 Robert Dewar <dewar@adacore.com>
8546
8547 * sem_ch8.adb, aspects.ads: Minor reformatting.
8548
85492011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8550
8551 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8552 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8553 extracted from...
8554 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8555
85562011-08-02 Yannick Moy <moy@adacore.com>
8557
8558 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8559 mode on subprogram declaration outside of package specification, unless
8560 it is followed by a pragma Import
8561 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8562 Access_Type_Declaration): issue error in formal mode on access type
8563 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8564 incomplete type
8565 (Analyze_Object_Declaration): issue error in formal mode on object
8566 declaration which does not respect SPARK restrictions
8567 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8568 declaration which does not respect SPARK restrictions
8569 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8570 error in formal mode on digits or delta constraint
8571 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8572 decimal fixed point type
8573 (Derived_Type_Declaration): issue error in formal mode on derived type
8574 other than type extensions of tagged record types
8575 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8576 with check on access definition
8577 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8578 mode on protected definition.
8579 (Analyze_Task_Definition): issue error in formal mode on task definition
8580
85812011-08-02 Robert Dewar <dewar@adacore.com>
8582
8583 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8584
85852011-08-02 Javier Miranda <miranda@adacore.com>
8586
8587 * sem_ch6.adb (Can_Override_Operator): New function.
8588 (Verify_Overriding_Indicator): Add missing code to check overriding
8589 indicator in operators. Fixes regression.
8590 (Check_Overriding_Indicator): Minor reformating after replacing the
8591 code that evaluates if the subprogram can override an operator by
8592 invocations to the above new function.
8593 * einfo.adb
8594 (Write_Field26_Name): Add missing code to ensure that, following
8595 the documentation in einfo.ads, this field is not shown as attribute
8596 "Static_Initialization" on non-dispatching functions.
8597
85982011-08-02 Jose Ruiz <ruiz@adacore.com>
8599
8600 * sem_res.adb (Resolve_Call): A call to
8601 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8602 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8603 i.e., when the second parameter is of type Time_Span.
8604
86052011-08-02 Vincent Celier <celier@adacore.com>
8606
8607 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8608 with an archive instead of -L<library dir> -l<library name>.
8609
86102011-08-02 Ed Schonberg <schonberg@adacore.com>
8611
8612 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8613 mark the base types In_Use in addition to making the operations
8614 use_visible.
8615
86162011-08-02 Ed Falis <falis@adacore.com>
8617
8618 * init.c: add and setup __gnat_signal_mask for the exception signals
8619 * s-inmaop-vxworks.adb: new file.
8620 * s-intman-vxworks.adb: remove unnecessary initializations and
8621 simplify remaining
8622 * s-intman-vxworks.ads: remove unnecessary variable
8623 * s-taprop-vxworks.adb: simplify signal initialization
8624
86252011-08-02 Robert Dewar <dewar@adacore.com>
8626
8627 * sem_ch8.adb: Minor code reorganization, comment updates.
8628
86292011-08-02 Robert Dewar <dewar@adacore.com>
8630
8631 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8632 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8633 here from Sem_Res.
8634 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8635 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8636
86372011-08-02 Ed Schonberg <schonberg@adacore.com>
8638
8639 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8640 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8641 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8642 use_type_clauses, to handle more efficiently use_type and use_all_type
8643 constructs.
8644 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8645 Ada2012 Use_All_Type clause.
8646 (Use_Class_Wide_Operations): new procedure.
8647
86482011-08-02 Robert Dewar <dewar@adacore.com>
8649
8650 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8651 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8652 expression to expression function.
8653
86542011-08-02 Ed Schonberg <schonberg@adacore.com>
8655
8656 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8657 if types are compatible.
8658
86592011-08-02 Yannick Moy <moy@adacore.com>
8660
8661 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8662 returns True if its argument array types have same dimension and same
8663 static bounds at each index.
8664 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8665 OUT or IN OUT paramaters which are not view conversions in SPARK.
8666 (Resolve_Arithmetic_Op): issue an error in formal mode on
8667 multiplication or division with operands of fixed point types which are
8668 not qualified or explicitly converted.
8669 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8670 Boolean or array type (except String) operands.
8671 (Resolve_Equality_Op): issue an error in formal mode on equality
8672 operators for array types other than String with non-matching static
8673 bounds.
8674 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8675 for array types with non-matching static bounds. Factorize the code in
8676 Matching_Static_Array_Bounds.
8677 (Resolve_Qualified_Expression): issue an error in formal mode on
8678 qualified expressions for array types with non-matching static bounds.
8679 (Resolve_Type_Conversion): issue an error in formal mode on type
8680 conversion for array types with non-matching static bounds
8681
86822011-08-02 Robert Dewar <dewar@adacore.com>
8683
8684 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8685
86862011-08-02 Ed Schonberg <schonberg@adacore.com>
8687
8688 * par-ch9.adb: save location of entry for proper error message.
8689
86902011-08-02 Javier Miranda <miranda@adacore.com>
8691
8692 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8693 (Use_Full_View) which permits this routine to climb through the
8694 ancestors using the full-view of private parents.
8695 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8696 Use_Full_View to true in calls to Is_Ancestor.
8697 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8698 true in call to Is_Ancestor.
8699 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8700 Use_Full_View to true in call to Is_Ancestor.
8701 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8702 call to Is_Ancestor.
8703 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8704 Use_Full_View to true in calls to Is_Ancestor.
8705 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8706 Make_Select_Specific_Data_Table, Register_Primitive,
8707 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8708 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8709 to true in call to Is_Ancestor.
8710 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8711 Use_Full_View to true in calls to Is_Ancestor.
8712 * exp_cg.adb
8713 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8714 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8715
87162011-08-02 Robert Dewar <dewar@adacore.com>
8717
8718 * gnat_rm.texi: Minor reformatting.
8719 * sem_prag.adb: Minor reformatting.
8720
87212011-08-02 Tristan Gingold <gingold@adacore.com>
8722
8723 * vms_data.ads: Add VMS qualifier for -gnateP.
8724
87252011-08-02 Robert Dewar <dewar@adacore.com>
8726
8727 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8728 * par-ch7.adb (P_Package): Proper placement of aspects for package
8729 decl/instantiation.
8730 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8731 (End_Statements): Add Is_Sloc parameterr
8732 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8733 (Check_End): Ad Is_Sloc parameter
8734 (End_Statements): Add Is_Sloc parameterr
8735
87362011-08-02 Vincent Celier <celier@adacore.com>
8737
8738 * ug_words: Add VMS qualifier equivalent to -gnateP:
8739 /SYMBOL_PREPROCESSING.
8740
87412011-08-02 Jose Ruiz <ruiz@adacore.com>
8742
8743 * gnat-style.texi: For hexadecimal numeric literals the typical
8744 grouping of digits is 4 to represent 2 bytes.
8745 A procedure spec which is split into several lines is indented two
8746 characters.
8747
87482011-08-02 Yannick Moy <moy@adacore.com>
8749
8750 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8751 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8752 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8753 properly qualified
8754 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8755 choice in array aggregate
8756 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8757 mark as ancestor
8758 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8759 positional and named aggregate for record, or others in record
8760 aggregate, or multiple choice in record aggregate
8761 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8762 array operands to logical operations AND, OR and XOR do not have the
8763 same static lower and higher bounds
8764 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8765
87662011-08-01 Robert Dewar <dewar@adacore.com>
8767
8768 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8769 Replaces Last_Source_Node_In_Sequence.
8770 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8771 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8772 parens and blank in string (this was inconsistently implemented).
8773 * errout.ads
8774 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8775 blank in string (this was inconsistently implemented).
8776 * gnat1drv.adb
8777 (Set_Global_Switches): Set formal mode switches appropriately
8778 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8779 * par-prag.adb
8780 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8781 call Set_Error_Msg_Lang to set "spark" as language name.
8782 * par.adb: Remove unnecessary call to set formal language for errout
8783 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8784 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8785 name.
8786 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8787 calls to it, moved after resolution so that types are known
8788 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8789 result of concatenation is not of type String
8790 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8791 concatenation is not properly restricted
8792 * gnat_rm.texi: Add doc on pragma Spark_95.
8793 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8794 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8795 * gcc-interface/Make-lang.in: Update dependencies.
8796
87972011-08-01 Javier Miranda <miranda@adacore.com>
8798
8799 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8800 condition that detects if the overridden operation must replace an
8801 existing entity.
8802
88032011-08-01 Javier Miranda <miranda@adacore.com>
8804
8805 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8806 code declarations inserted by Insert_Actions in each alternative of the
8807 N_Case_Expression node.
8808
88092011-08-01 Robert Dewar <dewar@adacore.com>
8810
8811 * sem_ch6.adb: Minor code reorganization.
8812 * sem_util.adb: Minor reformatting.
8813
88142011-08-01 Pascal Obry <obry@adacore.com>
8815
8816 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8817 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8818
88192011-08-01 Yannick Moy <moy@adacore.com>
8820
8821 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8822 literal or operator symbol which is prefixed
8823 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8824 mode on access attributes.
8825 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8826 that concatenation operands are properly restricted in formal mode
8827 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8828 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8829 result of the concatenation has a type different from String.
8830 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8831 Analyze_Quantified_Expression, Analyze_Slice,
8832 Analyze_Null): issue an error in formal mode on unsupported constructs
8833 * sem_ch5.adb
8834 (Analyze_Block_Statement): only issue error on source block statement
8835 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8836 function which returns the last node in a list of nodes for which
8837 Comes_From_Source returns True, if any
8838 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8839 Last_Source_Node_In_Sequence
8840 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8841 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8842 mode on unsupported constructs
8843 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8844 rest of the actions may be needed later on since the error is marked as
8845 not serious.
8846 * sinfo.ads: Typos in comments.
8847
88482011-08-01 Pascal Obry <obry@adacore.com>
8849
8850 * projects.texi: Minor editing.
8851
88522011-08-01 Yannick Moy <moy@adacore.com>
8853
8854 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8855 insertion character ~~
8856 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8857 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8858 with insertion character ~~
8859 (Set_Msg_Text): treat insertion character ~~
8860 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8861 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8862 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8863 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8864 errors related to the formal language restriction not serious
8865 (insertion character |).
8866 * par.adb (Par): set formal language for error messages if needed
8867 * sem_ch6.adb (Check_Missing_Return): take into account possible
8868 generated statements at the end of the function
8869 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8870 enumeration value to define a new pragma SPARK_95
8871 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8872 SPARK_Version): new type and variables to store the SPARK version
8873 (none by default).
8874 (SPARK_Mode): return True when SPARK_Version is set
8875 * par-prag.adb: Correct indentation
8876 (Prag): take Pragma_SPARK_95 into account
8877 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8878 into account.
8879
88802011-08-01 Robert Dewar <dewar@adacore.com>
8881
8882 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8883 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8884 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8885
88862011-08-01 Pascal Obry <obry@adacore.com>
8887
8888 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8889 Target_Name to Get_Path call.
8890 (Parse_Single_Project): Likewise.
8891 (Post_Parse_Context_Clause): Likewise.
8892 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8893 Call Initialise_Project_Path with the proper Target_Name.
8894 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8895 search path.
8896 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8897 with the proper Target_Name.
8898 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8899 Part.Parse routine.
8900 (Parse_Project_And_Apply_Config): Likewise.
8901 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8902 This is fine as this part of the code is supporting only native
8903 compilation.
8904 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8905 is fine as this part of the code is supporting only native compilation.
8906
89072011-08-01 Yannick Moy <moy@adacore.com>
8908
8909 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8910 of homonym, unless the homonym is one of the cases allowed in SPARK
8911 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8912 package declaration occurring after a body.
8913
89142011-08-01 Robert Dewar <dewar@adacore.com>
8915
8916 * checks.adb, exp_ch4.adb: Minor reformatting.
8917
89182011-08-01 Javier Miranda <miranda@adacore.com>
8919
8920 * einfo.ads (Access_Disp_Table): Fix documentation.
8921 (Dispatch_Table_Wrappers): Fix documentation.
8922
89232011-08-01 Pascal Obry <obry@adacore.com>
8924
8925 * prj-env.adb, prj-env.ads: Minor reformatting.
8926
89272011-08-01 Yannick Moy <moy@adacore.com>
8928
8929 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8930 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8931 procedures out of these packages.
2c7f9cc0 8932 * errout.ads, errout.adb
052e0603
AC
8933 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8934 procedures in of this package
8935 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8936 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8937 on misplaced later vs initial declarations, like in Ada 83
8938 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8939 formal mode on attribute of private type whose full type declaration
8940 is not visible
8941 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8942 package declaration inside a package specification
8943 (Analyze_Full_Type_Declaration): issue error in formal mode on
8944 controlled type or discriminant type
8945 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8946 user-defined operator means that it should come from the source
8947 (New_Overloaded_Entity): issue error in formal mode on overloaded
8948 entity.
8949 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8950
89512011-08-01 Thomas Quinot <quinot@adacore.com>
8952
8953 * atree.adb: Minor reformatting.
8954 * checks.adb: Minor reformatting.
8955
89562011-08-01 Vincent Celier <celier@adacore.com>
8957
8958 * s-parame-vms-ia64.ads: Fix typo in comment
8959 Minor reformatting
8960 * s-parame-vms-restrict.ads: Removed, unused.
8961
89622011-08-01 Javier Miranda <miranda@adacore.com>
8963
8964 * exp_ch3.adb
8965 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8966 * sem_ch3.adb
8967 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8968 * sem_ch3.ads, sem_ch3.adb
8969 (Is_Constant_Bound): New extended version of the subprogram that was
8970 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8971 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8972 * sem_aux.ads (Constant_Value): Fix typo in comment.
8973 * checks.adb (Generate_Index_Checks): New implementation which, for
8974 array objects with constant bounds, generates the runtime check
8975 referencing the bounds of the array type. For other cases this routine
8976 provides its previous behavior obtaining such values from the array
8977 object.
8978 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8979 parent type.
8980 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8981 we cannot have semantic interpretations of the new node.
8982
89832011-08-01 Ed Schonberg <schonberg@adacore.com>
8984
8985 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8986 expressions.
8987
89882011-08-01 Arnaud Charlet <charlet@adacore.com>
8989
8990 * sem_ch8.adb: Minor code editing.
8991 * s-vxwext.adb: Remove trailing space.
8992 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8993 consistency with other files.
8994
89952011-08-01 Thomas Quinot <quinot@adacore.com>
8996
8997 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8998
89992011-08-01 Ed Schonberg <schonberg@adacore.com>
9000
9001 * par-ch10.adb: reject parameterized expressions as compilation unit.
9002 * sem_ch4.adb: handle properly conditional expression with overloaded
9003 then_clause and no else_clause.
9004
90052011-08-01 Tristan Gingold <gingold@adacore.com>
9006
9007 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9008 like done by System.Aux_DEC.
9009 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9010
90112011-08-01 Yannick Moy <moy@adacore.com>
9012
9013 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9014 missing label at end of declaration (subprogram or package)
9015 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9016 of positional and named parameter association
9017 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9018 Error_Msg_SP which adds a prefix to the error message giving the name
9019 of the formal language analyzed
9020 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9021 access result type in subprogram, unconstrained array as result type,.
9022 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9023 procedure
9024 * sem_ch8.adb: Code clean up.
9025
90262011-08-01 Javier Miranda <miranda@adacore.com>
9027
9028 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9029 * einfo.ads (Access_Disp_Table): Fix documentation.
9030 (Dispatch_Table_Wrappers): Fix documentation.
9031 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9032 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9033 to enforce the documentation of this attribute.
9034 (Set_Is_Interface): Cleanup the assertion.
9035 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9036 the Underlying_Type entity before reading attribute Access_Disp_Table.
9037 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9038 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9039 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9040 the Underlying_Type entity before reading attribute Access_Disp_Table.
9041 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9042 Locate the Underlying_Type entity before reading attribute
9043 Access_Disp_Table.
9044
90452011-08-01 Ed Schonberg <schonberg@adacore.com>
9046
9047 * s-poosiz.ads: Additional overriding indicators.
9048
90492011-08-01 Yannick Moy <moy@adacore.com>
9050
9051 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9052 formal mode.
9053 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9054 parameter specification does not include a subtype mark.
9055 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9056 formal mode on abstract subprogram.
9057 (Analyze_Subprogram_Specification): issue error in formal mode on
9058 user-defined operator.
9059 (Process_Formals): issue error in formal mode on access parameter and
9060 default expression.
9061 * sem_ch9.adb (Analyze_Abort_Statement,
9062 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9063 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9064 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9065 Analyze_Requeue, Analyze_Selective_Accept,
9066 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9067 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9068 issue error in formal mode on user-defined raise statement.
9069
90702011-08-01 Thomas Quinot <quinot@adacore.com>
9071
9072 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9073 declaration being hidden when overriding an implicit inherited
9074 subprogram.
9075 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9076 (-gnats), do not complain about a source file that contains only a
9077 pragma No_Body.
9078
90792011-08-01 Ed Schonberg <schonberg@adacore.com>
9080
9081 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9082 variable if already set.
9083
90842011-08-01 Arnaud Charlet <charlet@adacore.com>
9085
9086 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9087 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9088 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9089 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9090 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9091 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9092 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9093 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9094 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9095 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9096 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9097 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9098 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9099 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9100 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9101 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9102 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9103 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9104 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9105 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9106 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9107 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9108 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9109 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9110 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9111 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9112 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9113 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9114 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9115 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9116 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9117 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9118 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9119 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9120 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9121 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9122 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9123 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9124 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9125 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9126 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9127 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9128 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9129 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9130 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9131 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9132 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9133 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9134 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9135 Use GNAT instead of GNARL.
9136
91372011-08-01 Bob Duff <duff@adacore.com>
9138
9139 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9140 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9141 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9142 reformatting.
9143
91442011-08-01 Yannick Moy <moy@adacore.com>
9145
9146 * debug.adb (d.D) reverve flag for the SPARK mode
9147 (d.E) reverve flag for SPARK generation mode
9148 (d.F) reverve flag for Why generation mode
2c7f9cc0 9149 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
9150 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9151 functions which return True when the corresponding modes are set
9152 (Formal_Language): return "spark" or "alfa" when in formal verification
9153 mode.
9154 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9155 Error_Msg to prefix the error message with a tag giving the formal
9156 language
9157 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9158 message with a tag giving the formal language
9159 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9160 block statement
9161 (Analyze_Case_Statement): issue error in formal mode on case statement
9162 with a single "others" case alternative
9163 (Analyze_Exit_Statement): issue errors in formal mode on exit
9164 statements which do not respect SPARK restrictions
9165 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9166 (Check_Unreachable_Code): always issue an error (not a warning) in
9167 formal mode on unreachable code (concerns both code after an infinite
9168 loop and after an unconditional jump, both not allowed in SPARK)
9169 * sem_ch6.adb (Analyze_Return_Statement): add call to
9170 Set_Return_Present for a procedure containing a return statement
9171 (already done for functions in Analyze_Function_Return)
9172 (Analyze_Function_Return): issue error in formal mode on extended
9173 return or if return is not last statement in function
9174 (Check_Missing_Return): issue error in formal mode if function does
9175 not end with return or if procedure contains a return
9176 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9177 function to detect if there is an inner scope of its parameter S which
9178 is a loop.
9179
91802011-08-01 Thomas Quinot <quinot@adacore.com>
9181
9182 * sem_ch6.ads: Minor reformatting.
9183
91842011-08-01 Javier Miranda <miranda@adacore.com>
9185
9186 * sem_util.adb (Abstract_Interface_List): Complete condition when
9187 processing private type declarations to avoid reading unavailable
9188 attribute.
9189 (Is_Synchronized_Tagged_Type): Complete condition when processing
9190 private extension declaration nodes to avoid reading unavailable
9191 attribute.
9192
91932011-08-01 Thomas Quinot <quinot@adacore.com>
9194
9195 * sem_ch3.adb: Minor reformatting.
9196
91972011-08-01 Thomas Quinot <quinot@adacore.com>
9198
9199 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9200 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9201 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9202 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9203 for VMS, instead parametrize the common implementation with
9204 System.Parameters declarations.
9205
92062011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9207
9208 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9209
92102011-08-01 Tristan Gingold <gingold@adacore.com>
9211
9212 * seh_init.c: Fix SEH handler installation on win64.
9213
92142011-08-01 Ed Schonberg <schonberg@adacore.com>
9215
9216 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9217 double analysis of an anonymous access to subprogram, because it can
9218 lead to improper sharing of profiles and a back-end crash.
9219
92202011-08-01 Robert Dewar <dewar@adacore.com>
9221
9222 * make.adb, sem_ch4.adb: Minor reformatting.
9223 * gcc-interface/Make-lang.in: Update dependencies.
9224 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9225
92262011-08-01 Arnaud Charlet <charlet@adacore.com>
9227
9228 * gnat_rm.texi: Fix definition of Long_Integer.
9229
92302011-08-01 Ed Schonberg <schonberg@adacore.com>
9231
9232 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9233 to prevent storage exhaustion.
9234 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9235 finalized is a function body, insert the cleanup code before the final
9236 return statement, to prevent spurious warnings.
9237 * s-pooglo.ads: add overriding indicator.
9238
92392011-08-01 Ed Schonberg <schonberg@adacore.com>
9240
9241 * sem_ch4.adb (Operator_Check): improve error message when both a
9242 with_clause and a use_clause are needed to make operator usage legal.
9243 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9244 determine whether a compilation unit is visible within an other,
9245 either through a with_clause in the current unit, or a with_clause in
9246 its library unit or one one of its parents.
9247
92482011-08-01 Ed Schonberg <schonberg@adacore.com>
9249
9250 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9251 over an arbitrary expression of an array or container type.
9252 * lib-xref.adb: clarify comment.
9253
92542011-08-01 Bob Duff <duff@adacore.com>
9255
9256 * einfo.ads: Minor reformatting.
9257 * debug.adb: Minor comment improvement.
9258
92592011-08-01 Javier Miranda <miranda@adacore.com>
9260
9261 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9262 consider hidden subprograms as valid candidates.
9263
92642011-08-01 Arnaud Charlet <charlet@adacore.com>
9265
9266 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9267
92682011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9269
9270 * gnat_ugn.texi: Fix typo.
9271
92722011-08-01 Robert Dewar <dewar@adacore.com>
9273
9274 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9275 lib-xref.adb: Minor reformatting
9276
92772011-08-01 Gary Dismukes <dismukes@adacore.com>
9278
9279 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9280 when to generate a call to Move_Final_List.
9281 (Has_Controlled_Parts): Remove this function.
9282
92832011-08-01 Geert Bosch <bosch@adacore.com>
9284
9285 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9286 "," in choice list.
9287
92882011-08-01 Thomas Quinot <quinot@adacore.com>
9289
9290 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9291 explicit raise of a predefined exception as Comes_From_Source if the
9292 original N_Raise_Statement comes from source.
9293
92942011-08-01 Robert Dewar <dewar@adacore.com>
9295
9296 * sinfo.ads: Add comment.
9297 * sem_ch6.adb: Minor reformatting.
9298
92992011-08-01 Robert Dewar <dewar@adacore.com>
9300
9301 * freeze.adb (Freeze_Entity): Refine check for bad component size
9302 clause to avoid rejecting confirming clause when atomic/aliased present.
9303
93042011-08-01 Ed Schonberg <schonberg@adacore.com>
9305
9306 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9307 better determine whether an entity reference is a write.
9308 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9309 subcomponent.
9310 * lib-xref.adb (Output_References): Do no suppress a read reference at
9311 the same location as an immediately preceeding modify-reference, to
9312 handle properly in-out actuals.
9313
93142011-08-01 Tristan Gingold <gingold@adacore.com>
9315
9316 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9317
93182011-08-01 Quentin Ochem <ochem@adacore.com>
9319
9320 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9321 heap to compute the result.
9322
93232011-08-01 Robert Dewar <dewar@adacore.com>
9324
9325 * atree.ads: Minor reformatting.
9326
93272011-08-01 Emmanuel Briot <briot@adacore.com>
9328
9329 * g-expect.adb (Get_Command_Output): Fix memory leak.
9330
93312011-08-01 Geert Bosch <bosch@adacore.com>
9332
9333 * cstand.adb (P_Float_Type): New procedure to print the definition of
9334 predefined fpt types.
9335 (P_Mixed_Name): New procedure to print a name using mixed case
9336 (Print_Standard): Use P_Float_Type for printing floating point types
9337 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9338 precision IEEE float.
9339
93402011-08-01 Thomas Quinot <quinot@adacore.com>
9341
9342 * sem_ch3.adb: Minor reformatting.
9343
93442011-08-01 Ed Schonberg <schonberg@adacore.com>
9345
9346 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9347 the completion of a generic function, insert the new body rather than
9348 rewriting the original.
9349
93502011-08-01 Yannick Moy <moy@adacore.com>
9351
9352 * sinfo.ads, errout.ads: Typos in comments.
9353
93542011-08-01 Robert Dewar <dewar@adacore.com>
9355
9356 * par-endh.adb: Minor reformatting.
9357
93582011-08-01 Robert Dewar <dewar@adacore.com>
9359
9360 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9361 (Pre_Post_Aspects): New subtype.
9362 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9363 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9364 * par-ch7.adb (P_Package): Remove Decl parameter
9365 (P_Package): Handle new syntax for aspects (before IS)
9366 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9367 new aspect syntax
9368 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9369 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9370 (P_Package): Remove Decl parameter
9371 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9372 aspects
9373 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9374 specs
9375 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9376 * sinfo.ads: Document new syntax for aspects in packages etc.
9377 * sprint.adb: Handle new syntax of aspects before IS in package
9378
93792011-08-01 Thomas Quinot <quinot@adacore.com>
9380
9381 * atree.ads: Minor reformatting.
9382 * sem_prag.adb: Minor reformatting.
9383
93842011-08-01 Robert Dewar <dewar@adacore.com>
9385
9386 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9387 case expr alternative.
9388
93892011-08-01 Ed Schonberg <schonberg@adacore.com>
9390
9391 * sem_ch12.adb: Fix typo.
9392
93932011-08-01 Geert Bosch <bosch@adacore.com>
9394
9395 * sem_prag.adb (Check_No_Link_Name): New procedure.
9396 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9397 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9398 instead of Standard_Long_Long_Float_Size global. Preparation for
9399 eventual removal of per type constants.
9400 * exp_util.ads (Get_Stream_Size): New function returning the stream
9401 size value of subtype E.
9402 * exp_util.adb (Get_Stream_Size): Implement new function.
9403 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9404 function.
9405 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9406 * einfo.adb:
9407 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9408
94092011-08-01 Geert Bosch <bosch@adacore.com>
9410
9411 * cstand.adb: Fix comments.
9412 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9413 count of arguments.
9414
94152011-08-01 Robert Dewar <dewar@adacore.com>
9416
9417 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9418
94192011-08-01 Geert Bosch <bosch@adacore.com>
9420
9421 * atree.ads: Fix comment.
9422
94232011-08-01 Robert Dewar <dewar@adacore.com>
9424
9425 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9426 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9427 * par.adb: Add with for Namet.Sp.
9428 * par-tchk.adb: Minor reformatting.
9429
94302011-08-01 Vincent Celier <celier@adacore.com>
9431
9432 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9433 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9434 of the init procedure of a SAL.
9435 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9436 New procedure.
9437
94382011-08-01 Thomas Quinot <quinot@adacore.com>
9439
9440 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9441 reformatting.
9442
94432011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9444
9445 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9446
94472011-08-01 Thomas Quinot <quinot@adacore.com>
9448
9449 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9450 conformant with its spec (return True only for types that have
9451 an overriding Initialize primitive operation that prevents them from
9452 having preelaborable initialization).
9453 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9454 initialization for controlled types in Ada 2005 or later mode.
9455
94562011-08-01 Robert Dewar <dewar@adacore.com>
9457
9458 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9459 Postcondition.
9460 (Same_Aspect): New function.
9461 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9462 Type_Invariant, Precondition, Postcondition.
9463 * snames.ads-tmpl: Add Name_Type_Invariant.
9464
94652011-08-01 Robert Dewar <dewar@adacore.com>
9466
9467 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9468 here.
9469 (Freeze_All_Ent): Fix error in handling inherited aspects.
9470 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9471 already analyzed, but don't skip entire processing of a declaration,
9472 that's wrong in some cases of declarations being rewritten.
9473 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9474 Don't delay for integer, string literals
9475 Treat predicates in usual manner for delay, remove special case code,
9476 not needed.
9477 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9478 (Build_Predicate_Function): Update saved expression in aspect
9479 (Build_Invariant_Procedure): Update saved expression in aspect
9480 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9481 of replacement of discriminant references if the reference is simple.
9482
94832011-08-01 Robert Dewar <dewar@adacore.com>
9484
9485 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9486 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9487 Static_Predicate and Dynamic_Predicate.
9488 (Build_Predicate_Function): Add processing for Static_Predicate
9489 and Dynamic_Predicate.
9490 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9491 (From_Static_Predicate): New flag
9492 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9493
94942011-08-01 Robert Dewar <dewar@adacore.com>
9495
9496 * usage.adb: Documentation cleanup for Ada version modes in usage.
9497 * expander.adb: Minor reformatting.
9498
94992011-08-01 Robert Dewar <dewar@adacore.com>
9500
9501 * atree.ads: Minor comment fix.
9502 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9503 a-witeio.ads, sem_prag.adb: Minor reformatting.
9504
95052011-08-01 Doug Rupp <rupp@adacore.com>
9506
9507 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9508 pointers. Use descrip.h header file for convenience. Add some
9509 comments.
9510
95112011-08-01 Robert Dewar <dewar@adacore.com>
9512
9513 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9514 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9515 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9516 New procedure.
9517 (Check_Aspect_At_End_Of_Declarations): New procedure
9518 (Analye_Aspect_Specification): Minor changes for above procedures
9519 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9520 specification node as well.
9521
95222011-08-01 Pascal Obry <obry@adacore.com>
9523
9524 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9525 Windows files. Use GetFilesAttributes() in this case to check for file
9526 existence instead of returning with an error code.
9527
95282011-08-01 Vincent Celier <celier@adacore.com>
9529
9530 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9531 High is above Source length.
9532
95332011-08-01 Robert Dewar <dewar@adacore.com>
9534
9535 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9536
95372011-08-01 Robert Dewar <dewar@adacore.com>
9538
9539 * aspects.ads (Boolean_Aspects): New subtype.
9540 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9541 for derived types in cases where the parent type and derived type have
9542 aspects.
9543 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9544 with aspects when parent type also has aspects.
9545 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9546 boolean expression at this point).
9547 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9548 accordance with final decision on the Ada 2012 feature.
9549 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9550
95512011-08-01 Matthew Heaney <heaney@adacore.com>
9552
9553 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9554
95552011-08-01 Pascal Obry <obry@adacore.com>
9556
9557 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9558 Fix Replace_Slice when High is above current string size.
9559 (Replace_Slice): Fix DL computation when High is above current
9560 string length.
9561
95622011-08-01 Gary Dismukes <dismukes@adacore.com>
9563
9564 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9565
95662011-08-01 Matthew Heaney <heaney@adacore.com>
9567
9568 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9569 of node.
9570
95712011-08-01 Pascal Obry <obry@adacore.com>
9572
9573 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9574 reformatting.
9575
95762011-08-01 Ed Schonberg <schonberg@adacore.com>
9577
9578 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9579 access to protected subprograms in generic bodies.
9580 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9581 protected type, indicate that the convention of the subprogram is
9582 Convention_Protected, because it may be used in subsequent declarations
9583 within the protected declaration.
9584
95852011-08-01 Vincent Celier <celier@adacore.com>
9586
9587 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9588 and "final" procedures when the name of the library is "ada", to avoid
9589 duplicate symbols "adainit" and "adafinal" in executables.
9590
95912011-08-01 Ed Schonberg <schonberg@adacore.com>
9592
9593 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9594 quantified expression that appears within a postcondition and uses the
9595 Ada2012 'Result attribute.
9596
95972011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9598
9599 * init.c (__gnat_error_handler): Cast reason to int.
9600 (__gnat_install_handler): Explain sa_sigaction use.
9601
96022011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9603
9604 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9605 subprogram has copy-in copy-out parameters, try to promote the mode of
9606 the return type if it is passed in registers.
9607
96082011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9609
9610 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9611 left operand as addressable.
9612
96132011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9614
9615 * gcc-interface/gigi.h (build_function_stub): Remove.
9616 (build_return_expr): Likewise.
9617 (convert_vms_descriptor): Declare.
9618 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9619 (build_function_stub): Move to...
9620 * gcc-interface/utils2.c (build_return_expr): Move to...
9621 * gcc-interface/trans.c (build_function_stub): ...here.
9622 (build_return_expr): ...here.
9623 (Subprogram_Body_to_gnu): Add local variable for language_function.
9624 Disconnect the parameter attributes cache, if any, once done with it.
9625 Call end_subprog_body only after setting the end_locus.
9626 Build the stub associated with the function, if any, at the very end.
9627 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9628 variables and streamline control flow.
9629
96302011-07-23 Arnaud Charlet <charlet@adacore.com>
9631
9632 PR ada/49819
9633 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9634 g-trasym-dwarf.adb.
9635
96362011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9637
9638 PR bootstrap/49794
9639 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9640 Assign to act.sa_sigaction.
9641 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9642 current->return_address to char * before arithmetic.
9643
96442011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9645
9646 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9647 Correct argument types.
9648 Extract code from reason.
9649 (__gnat_install_handler): Assign to act.sa_sigaction.
9650
96512011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9652
9653 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9654 (GNAT1_OBJS): ...here.
9655
96562011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9657
9658 PR ada/48711
9659 * g-socthi-mingw.adb (Fill): Fix formatting.
9660
9661 * gcc-interface/gigi.h: Move around comment.
9662
96632011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9664
9665 PR ada/46350
9666 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9667
96682011-07-14 Florian Weimer <fw@deneb.enyo.de>
9669
9670 PR ada/48711
9671 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9672
96732011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9674
9675 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9676 range comparison if Pmode is SImode.
9677
96782011-07-12 Laurent GUERBY <laurent@guerby.net>
9679 Eric Botcazou <ebotcazou@adacore.com>
9680
9681 * adadecode.c: Wrap up in extern "C" block.
9682 * adadecode.h: Likewise.
9683 * adaint.c: Likewise. Remove 'const' keyword.
9684 * adaint.h: Likewise.
9685 * argv.c: Likewise.
9686 * atree.h: Likewise.
9687 * cio.c: Likewise.
9688 * cstreams.c: Likewise.
9689 * env.c: Likewise.
9690 * exit.c: Likewise.
9691 * fe.h: Likewise.
9692 * final.c: Likewise.
9693 * init.c: Likewise.
9694 * initialize.c: Likewise.
9695 * link.c: Likewise.
9696 * namet.h: Likewise.
9697 * nlists.h: Likewise.
9698 * raise.c: Likewise.
9699 * raise.h: Likewise.
9700 * repinfo.h: Likewise.
9701 * seh_init.c: Likewise.
9702 * targext.c: Likewise.
9703 * tracebak.c: Likewise.
9704 * uintp.h: Likewise.
9705 * urealp.h: Likewise.
9706 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9707 * xsinfo.adb: Likewise.
9708 * xsnamest.adb: Likewise.
9709 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9710 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9711 * gcc-interface/misc.c: Likewise.
9712 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9713 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9714 ada/targext.o here...
9715 (GNAT_ADA_OBJS): ...and not here.
9716 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9717 (GNATBIND_OBJS): Reorder.
9718
97192011-07-07 Richard Henderson <rth@redhat.com>
9720
9721 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9722 dwarf2out_frame_init.
9723
97242011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9725
9726 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9727
97282011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9729
9730 PR target/39150
9731 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9732
97332011-07-06 Richard Guenther <rguenther@suse.de>
9734
9735 * gcc-interface/misc.c (gnat_init): Merge calls to
9736 build_common_tree_nodes and build_common_tree_nodes_2.
9737 Re-initialize boolean_false_node.
9738
97392011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9740 Olivier Hainque <hainque@adacore.com>
9741 Nicolas Setton <setton@adacore.com>
9742
9743 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9744 the type according to the ARTIFICIAL_P parameter.
9745 (create_type_decl): Likewise.
9746 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9747
97482011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9749
9750 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9751 (gnatbind): Likewise.
9752
97532011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9754
9755 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9756
97572011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9758
9759 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9760 local variable throughout. Remove useless call to Base_Type.
9761 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9762 Take it also into account for the volatileness of the field. Set the
9763 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9764
97652011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9766
9767 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9768 on a dereference built for a by-ref object if it has an address clause.
9769
97702011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9771
9772 * einfo.ads (Address_Taken): Document use for the second argument of
9773 Asm_Input and Asm_Output attributes.
9774 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9775 argument is an entity name, then set Address_Taken on it.
9776 <Attribute_Asm_Output>: Likewise.
9777 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9778 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9779 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9780 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9781
97822011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9783
9784 PR middle-end/46500
9785 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9786
97872011-06-14 Joseph Myers <joseph@codesourcery.com>
9788
9789 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9790 (ada/utils.o): Update dependencies.
9791 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9792 ../../../libcpp/libcpp.a.
9793 * gcc-interface/utils.c: Include common/common-target.h.
9794 (process_attributes): Use targetm_common.have_named_sections.
9795
97962011-06-07 Richard Guenther <rguenther@suse.de>
9797
9798 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9799 set_sizetype.
9800
98012011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9802
9803 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9804 TREE_THIS_NOTRAP flag.
9805
98062011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9807
9808 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9809 Fix thinko.
9810
98112011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9812
9813 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9814 constants whose full view has discriminants specially.
9815
98162011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9817
9818 * gcc-interface/utils.c: Include diagnostic.h.
9819 (gnat_write_global_declarations): Output debug information for all
9820 global type declarations before finalizing the compilation unit.
9821 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9822
98232011-05-25 Jakub Jelinek <jakub@redhat.com>
9824
9825 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9826
98272011-05-25 Kai Tietz <ktietz@redhat.com>
9828
9829 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9830 initialization instead of const/none-const pointer assignment.
9831
98322011-05-24 Joseph Myers <joseph@codesourcery.com>
9833
9834 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9835 $(EXTRA_GNAT1_OBJS).
9836 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9837 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9838 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9839 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9840 libcommon-target.a instead of prefix.o.
9841
98422011-05-21 Joseph Myers <joseph@codesourcery.com>
9843
9844 PR ada/49097
9845 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9846
98472011-05-20 Joseph Myers <joseph@codesourcery.com>
9848
9849 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9850 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9851 instead of version.o.
9852
98532011-05-18 Kai Tietz <ktietz@redhat.com>
9854
9855 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9856 boolean_false_node instead of integer_zero_node.
9857 (convert_with_check): Likewise.
9858 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9859
98602011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9861
9862 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9863 type of the parameter is an unconstrained array, convert the actual to
9864 the type of the formal in the In Out and Out cases as well.
9865
98662011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9867
9868 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9869 call build_function_type_array or build_varargs_function_type_array
9870 instead.
9871 (create_subprog_type): Don't call build_function_type; call
9872 build_function_type_vec instead.
9873
98742011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9875
9876 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9877 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9878 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9879
98802011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9881
9882 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9883
9884 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9885 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9886
98872011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9888
9889 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9890
98912011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9892
9893 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9894 instead of accessing TYPE_ARG_TYPES directly.
9895 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9896
98972011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9898
9899 PR ada/48844
9900 * gcc-interface/gigi.h (get_variant_part): Declare.
9901 * gcc-interface/decl.c (get_variant_part): Make global.
9902 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9903 types have the same constant size, are record types and T1 has a
9904 variant part while T2 doesn't.
9905
99062011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9907
9908 * gcc-interface/utils.c (begin_subprog_body): Do not call
9909 get_pending_sizes.
9910 (end_subprog_body): Likewise.
9911
99122011-05-04 Richard Guenther <rguenther@suse.de>
9913
9914 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9915 int_const_binop.
9916 (pos_to_constructor): Likewise.
9917
99182011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 9919 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
9920
9921 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9922 of build_function_type. Adjust calls to...
9923 (build_raise_check): ...this. Do not take a void_tree parameter.
9924 Call build_function_type_list instead of build_function_type.
9925 Fix head comment and swap couple of conditional blocks.
9926
99272011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9928
9929 * gnatvsn.ads (Library_Version): Bump to 4.7.
9930 (Current_Year): Bump to 2011.
9931
99322011-04-29 Michael Matz <matz@suse.de>
9933
9934 * gcc-interface/misc.c (gnat_handle_option): Set
9935 warn_maybe_uninitialized.
9936
99372011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9938
9939 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9940 the Watson/McCabe paper.
9941
99422011-04-23 Jim Meyering <meyering@redhat.com>
9943
9944 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9945
99462011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9947
9948 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9949 onto the new type.
9950
99512011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9952
9953 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9954 parameter.
9955 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9956 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9957 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9958 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9959 <all>: Do not set flags on the reused DECL node coming from an alias.
9960 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9961 don't need debug info here...
9962 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9963 (gigi): Adjust calls to create_subprog_decl.
9964 (build_raise_check): Likewise.
9965 (establish_gnat_vms_condition_handler): Likewise.
9966 (Compilation_Unit_to_gnu): Likewise.
9967 (gnat_to_gnu): Likewise.
9968
99692011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9970
9971 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9972 (NO_REORDER_ADAFLAGS): New variable.
9973 (EXTRA_GNATTOOLS): Always define.
9974 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9975 Clean up and adjust list of files compiled with special options.
9976 * gcc-interface/Make-lang.in: Likewise.
9977 (ada/decl.o): Cosmetical change.
9978 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9979
99802011-04-20 Jim Meyering <meyering@redhat.com>
9981
9982 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9983
99842011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9985
9986 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9987 $(CFLAGS) on the link line.
9988
99892011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9990
9991 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9992 padded type built for the return type if it is unconstrained.
9993
99942011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9995
9996 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9997
99982011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9999
10000 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10001 before calling TREE_CHAIN.
10002 * gcc-interface/misc.c (gnat_init_ts): New function.
10003 (LANG_HOOKS_INIT_TS): Define.
10004
100052011-04-12 Martin Jambor <mjambor@suse.cz>
10006
10007 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10008 instead of cgraph_node.
10009
100102011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10011
10012 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10013 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10014 mechanism.
10015
100162011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10017
10018 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10019 of aggregate types that contain a placeholder.
10020
100212011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10022
10023 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10024 TYPE_ARG_TYPES.
10025 (handle_type_generic_attribute): Likewise.
10026
100272011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10028
10029 PR ada/47163
10030 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10031
100322011-04-04 Kai Tietz <ktietz@redhat.com>
10033
10034 PR ada/47163
10035 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10036 to flag value.
10037
100382011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10039
10040 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10041 type case, do not strip a padding type around the array type.
10042
100432011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10044
10045 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10046 types.
10047
100482011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10049
10050 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10051 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10052 code for -feliminate-unused-debug-types.
10053 (gnat_post_options): Likewise.
10054
100552011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10056
10057 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10058 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10059 distinct copy.
10060
100612011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10062
10063 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10064 DECL_ARTIFICIAL flag on enumeration types.
10065
100662011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10067
10068 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10069 fat pointer types artificial unconditionally.
10070 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10071 isn't artificial.
10072
100732011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10074
10075 * gcc-interface/gigi.h (get_dummy_type): Declare.
10076 (build_dummy_unc_pointer_types): Likewise.
10077 (finish_fat_pointer_type): Likewise.
10078 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10079 fat pointer type has been built, complete it in place.
10080 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10081 and thin pointers. Remove useless variable.
10082 (finish_fat_pointer_type): Make global and move to...
10083 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10084 (get_dummy_type): New function.
10085 (build_dummy_unc_pointer_types): Likewise.
10086 (gnat_pushdecl): Propage the name to the anonymous variants only.
10087 (update_pointer_to): Only adjust the pointer types in the unconstrained
10088 array case.
10089
100902011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10091
10092 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10093 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10094 if this is a Taft amendment type and the full declaration is available.
10095 * gcc-interface/trans.c (process_type): Likewise.
10096 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10097 (process_freeze_entity): Likewise.
10098 * gcc-interface/utils.c (dummy_global): New static variable.
10099 (gnat_write_global_declarations): If there are types declared as used
10100 at the global level, insert them in the global hash table.
10101
101022011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10103
10104 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10105 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10106 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10107 copy.
10108 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10109 flag of the type accordingly.
10110 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10111
101122011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10113
10114 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10115 finalizing types when updating the pointers to the designated type.
10116 <all>: Finalize the deferred types even if we didn't defer processing
10117 of incomplete types in this invocation.
10118
101192011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
10120 Nicolas Setton <setton@adacore.com>
10121 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
10122
10123 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10124 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10125
101262011-03-28 Kai Tietz <ktietz@redhat.com>
10127
10128 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10129 Windows targets.
10130 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10131 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10132
10133 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10134
101352011-03-28 Tristan Gingold <gingold@adacore.com>
10136
10137 PR ada/44431
10138 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10139 Use ada output of gnatbind.
10140 (ada/b_gnatb.adb): Ditto.
10141 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10142 (ada.mostlyclean, ada.stage1)
10143 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10144 (ada.stagefeedback): Adjust.
10145 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10146 Use ada output of gnatbind.
10147 (b_gnatm.adb): Ditto.
10148 (b_gnatl.o, b_gnatm.o): New rules.
10149
101502011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10151
10152 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10153 for the padded type built to support a specified size or alignment.
10154
101552011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10156
10157 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10158 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10159 unconditionally to the end of the unit when the designated type is
10160 limited_with'ed.
10161 <all>: Rename local variable. Attempt to un-defer types only and do it
10162 for limited_with'ed types as well.
10163 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10164 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10165 consistently and remove redundant call to finalize_from_with_types.
10166
101672011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10168
10169 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10170 subprograms without a previous spec declared in the same unit.
10171 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10172 subprograms at the end of the unit instead of at the beginning.
10173 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10174 isn't public for the special handling of non-inline functions nested
10175 inside inline external functions.
10176
101772011-03-25 Jeff Law <law@redhat.com>
10178
10179 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10180
101812011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10182
10183 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10184 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10185 to compute Set_Size_Depends_On_Discriminant.
10186 (Layout_Type): Call it on array types in back-end layout mode.
10187 * sem_util.adb (Requires_Transient_Scope): Return true for array
10188 types only if the size depends on the value of discriminants.
10189 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10190 type if the RHS is a call to a function that returns an unconstrained
10191 type with default discriminant.
10192
101932011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10194
10195 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10196 non-conversion to the nominal result type at the end.
10197
101982011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10199
10200 * gcc-interface/trans.c (create_temporary): New function taken from...
10201 (create_init_temporary): ...here. Call it.
10202 (call_to_gnu): Create the temporary for the return value early, if any.
10203 Create it for a function with copy-in/copy-out parameters if there is
10204 no target; in other cases of copy-in/copy-out, use another temporary.
10205 Push the new binding level lazily. Add and rename local variables.
10206
102072011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10208
10209 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10210 error message.
10211 (set_rm_size): Likewise.
10212
102132011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10214
10215 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10216 for the padded type built in order to support a specified alignment.
10217 Fix incorrect formatting.
10218
102192011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10220
10221 PR bootstrap/48216
10222 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10223
102242011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10225
10226 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10227 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10228 to the end of the list. Adjust recursive call. Rename local variable.
10229 If REORDER is true, reorder components of the record type.
10230 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10231 components_to_record and adjust the parameter list.
10232
102332011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10234
10235 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10236 disabled, use the variable for bounds of loop iteration scheme.
10237
102382011-03-21 Kai Tietz <ktietz@redhat.com>
10239
10240 PR target/12171
10241 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10242
102432011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10244
10245 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10246 out whether the expression is read-only. Short-circuit placeholder
10247 case and rename a couple of local variables.
10248
102492011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10250
10251 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10252 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10253 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10254 (convert): Deal with conversions from a smaller form type specially.
10255
102562011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10257
10258 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10259 its argument, except for the special -I- switch.
10260
102612011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10262
10263 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10264 "Ada Issues".
10265
102662011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10267
10268 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10269
102702011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10271
10272 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10273 GNAT_FORMAL.
10274 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10275 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10276 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10277 Do not generate the check directly, instead instantiate the template
10278 check present in the descriptor.
10279 (make_descriptor_field): Move around.
10280 (build_vms_descriptor32): Build a template check in the POINTER field.
10281 (build_vms_descriptor): Remove useless suffixes.
10282 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10283
102842011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10285
10286 PR bootstrap/47467
10287 * targext.c: Include target files if IN_RTS is defined.
10288
102892011-01-26 Richard Guenther <rguenther@suse.de>
10290
10291 PR bootstrap/47467
10292 * targext.c: Include config.h.
10293 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10294 dependency.
10295
102962011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 10297 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
10298
10299 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10300
103012011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10302
10303 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10304 end-of-case on the end label and its associated gotos, if any.
10305
103062011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10307
10308 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10309 expressions of the parameter cache within the statement group of
10310 the CICO mechanism.
10311
103122011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 10313 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
10314
10315 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10316 (set_end_locus_from_node): New function.
10317 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10318 make and the function end_locus.
10319 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10320 for the elaboration subprogram.
10321 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10322 set the end_locus of the expression as well.
10323
103242011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10325
10326 PR ada/47131
10327 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10328 variables that are referenced in exception handlers volatile.
10329
10330
10331\f
10332Copyright (C) 2011 Free Software Foundation, Inc.
10333
10334Copying and distribution of this file, with or without modification,
10335are permitted in any medium without royalty provided the copyright
10336notice and this notice are preserved.
10337
10338 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10339 - fix bugs in the description of Source_Trace;
10340 - get rid of UNIT_NAME;
10341
4fbad0ba
AC
103422011-08-02 Javier Miranda <miranda@adacore.com>
10343
10344 * exp_ch9.adb
10345 (Build_Dispatching_Requeue): Adding support for VM targets
10346 since we cannot directly reference the Tag entity.
10347 * exp_sel.adb (Build_K): Adding support for VM targets.
10348 (Build_S_Assignment): Adding support for VM targets.
10349 * exp_disp.adb
10350 (Default_Prim_Op_Position): In VM targets do not restrict availability
10351 of predefined interface primitives to compiling in Ada 2005 mode.
10352 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10353 restricted to compiling in Ada 2005 mode.
10354 (Make_VM_TSD): Generate code that declares and initializes the OSD
10355 record. Needed to support dispatching calls through synchronized
10356 interfaces.
10357 * exp_ch3.adb
10358 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10359 primitives associated with synchronized interfaces.
10360 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10361 primitives associated with synchronized interfaces.
10362
103632011-08-02 Yannick Moy <moy@adacore.com>
10364
10365 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10366 statements hidden in SPARK if preceded by the HIDE directive
10367 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10368 exception handlers as hidden in SPARK if preceded by the HIDE directive
10369 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10370 if starting with the HIDE directive
10371 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10372 starting with the HIDE directive; mark the declarations in a private
10373 part as hidden in SPARK if the private part starts with the HIDE
10374 directive
10375 * restrict.adb, restrict.ads
10376 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10377 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10378 argument node belongs to a part which is hidden in SPARK
10379 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10380 parts in SPARK; protect the possibly costly call to
10381 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10382 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10383 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10384 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10385 Tok_SPARK_Hide.
10386 (Scan): recognize special comment starting with '#' and followed by
10387 SPARK keyword "hide" as a HIDE directive.
10388
103892011-08-02 Yannick Moy <moy@adacore.com>
10390
10391 * types.ads, erroutc.ads: Minor reformatting.
10392
103932011-08-02 Vincent Celier <celier@adacore.com>
10394
10395 * link.c: Add response file support for cross platforms.
10396
6ff6152d
ES
103972011-08-02 Ed Schonberg <schonberg@adacore.com>
10398
10399 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10400 in an association, set parent field of copy before partial analysis.
10401 * sem_res.adb (Resolve_Slice): create reference to itype only when
10402 expansion is enabled.
10403
975c6896
YM
104042011-08-02 Yannick Moy <moy@adacore.com>
10405
10406 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10407 for new flag denoting which subprogram bodies are in ALFA
10408 * restrict.adb, sem_ch7.adb: Update comment
10409 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10410 sem_ch9.adb, sem_res.adb: Add calls to
10411 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10412 * sem_ch6.adb (Analyze_Function_Return): add calls to
10413 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10414 middle of the body, and extended return.
10415 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10416 False when missing return.
10417 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10418 to True for subprograms whose spec is in ALFA. Remove later on the flag
10419 on the entity used for a subprogram body when there exists a separate
10420 declaration.
10421 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10422 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10423 False, otherwise do nothing.
10424
afc8324d
AC
104252011-08-02 Robert Dewar <dewar@adacore.com>
10426
10427 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10428
104292011-08-02 Yannick Moy <moy@adacore.com>
10430
10431 * sem_ch4.ads: minor formatting.
10432
2ba431e5
YM
104332011-08-02 Yannick Moy <moy@adacore.com>
10434
10435 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10436 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10437 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10438 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10439 opt.ads: cleanup of SPARK mode
10440
0f853035
YM
104412011-08-02 Yannick Moy <moy@adacore.com>
10442
10443 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10444 types.
10445 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10446 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10447 * sem_ch3.adb
10448 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10449 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10450 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10451 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10452 types.
10453 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10454 non-static range.
10455 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10456 functions whose return type is not in ALFA.
10457 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10458 specifications.
10459 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10460 parameter's type is not in ALFA.
10461 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10462 types are in ALFA.
10463
d2b10647
ES
104642011-08-02 Ed Schonberg <schonberg@adacore.com>
10465
10466 * sem_ch6 (Analyze_Expression_Function): treat the function as
10467 Inline_Always, and introduce a subprogram declaration for it when it is
10468 not a completion.
10469 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10470 expression functions, so that the back-end can determine whether they
10471 can in fact be inlined.
10472 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10473 a function body comes from an expression function.
10474
c7b9d548
AC
104752011-08-02 Gary Dismukes <dismukes@adacore.com>
10476
10477 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10478 null exclusions to test Can_Never_Be_Null on the anonymous access types
10479 of the formals rather than testing the formals themselves. Exclude this
10480 check in cases where the Old_Formal is marked as a controlling formal,
10481 to avoid issuing spurious errors for bodies completing dispatching
10482 operations (due to the flag not getting set on controlling access
10483 formals in body specs).
10484 (Find_Corresponding_Spec): When checking full and subtype conformance of
10485 subprogram bodies in instances, pass Designated and E in that order, for
10486 consistency with the expected order of the formals (New_Id followed by
10487 Old_Id).
10488
104892011-08-02 Robert Dewar <dewar@adacore.com>
10490
10491 * sem_ch8.adb: Minor reformatting.
10492
1138cf59
AC
104932011-08-02 Ed Schonberg <schonberg@adacore.com>
10494
10495 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10496 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10497 primitive operations of class-wide actuals.
10498
104992011-08-02 Javier Miranda <miranda@adacore.com>
10500
10501 * exp_atag.ads, exp_atag.adb
10502 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10503 since its value is implicitly passed in argument Typ.
10504 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10505 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10506 Build_Common_Dispatching_Select_Statements.
10507
7b9db926
RD
105082011-08-02 Robert Dewar <dewar@adacore.com>
10509
10510 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10511 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10512 Minor reformatting.
10513
e8374e7a
AC
105142011-08-02 Robert Dewar <dewar@adacore.com>
10515
10516 * sem_res.adb: Minor reformatting.
10517 * sem_prag.adb: Minor reformatting.
10518
105192011-08-02 Javier Miranda <miranda@adacore.com>
10520
10521 * exp_atag.adb, exp_atags.ads
10522 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10523 by the tagged type Entity. Required to use this routine in the VM
10524 targets since we do not have available the Tag entity in the VM
10525 platforms.
10526 * exp_ch6.adb
10527 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10528 Ada.Tags has not been previously loaded.
10529 * exp_ch7.adb
10530 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10531 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10532 * sem_aux.adb
10533 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10534 view of enclosing scopes. Required to handle enclosing scopes that
10535 are synchronized types whose full view is a task type.
10536 * exp_disp.adb
10537 (Build_VM_TSDs): Minor code improvement to avoid generating and
10538 analyzing lists with empty nodes.
10539 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10540 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10541 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10542 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10543 (Make_Select_Specific_Data_Table): Add support for VM targets.
10544 (Make_VM_TSD): Generate code to initialize the SSD structure of
10545 the TSD.
10546
105472011-08-02 Yannick Moy <moy@adacore.com>
10548
10549 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10550 cross-references section in ALI.
10551 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10552 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10553 Sub).
10554 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10555 subprogram or package entity of a node
10556 (Is_Local_Reference_Type): new function returns True for references
10557 selected in local cross-references.
10558 (Lt): function extracted from Lt in Output_References
10559 (Write_Entity_Name): function extracted from Output_References
10560 (Generate_Definition): generate reference with type 'D' for definition
10561 of objects (object declaration and parameter specification), with
10562 appropriate locations and units, for use in local cross-references.
10563 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10564 references of type 'I' for initialization in object definition.
10565 (Output_References): move part of function Lt and procedure
10566 Write_Entity_Name outside of the body. Ignore references of types 'D'
10567 and 'I' introduced for local cross-references.
10568 (Output_Local_References): new procedure to output the local
10569 cross-references sections.
10570 (Lref_Entity_Status): new array defining whether an entity is a local
10571 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10572 with 'I' type when initialization expression is present.
10573 * get_scos.adb, get_scos.ads: Correct comments and typos
10574
1f6439e3
AC
105752011-08-02 Javier Miranda <miranda@adacore.com>
10576
10577 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10578 the JVM target.
10579 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10580 the JVM target.
10581 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10582 TSD support.
10583
105842011-08-02 Vincent Celier <celier@adacore.com>
10585
10586 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10587 (No_Space_Img): New function
10588 (Find_Excluded_Sources): When reading from a file, record the file name
10589 and the line number for each excluded source.
10590 (Mark_Excluded_Sources): When reporting an error, if the excluded
10591 sources were read from a file, include file name and line number in
10592 the error message.
10593
105942011-08-02 Ed Schonberg <schonberg@adacore.com>
10595
10596 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10597
ab027d28
RD
105982011-08-02 Robert Dewar <dewar@adacore.com>
10599
10600 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10601
b3b28b0c
JM
106022011-08-02 Javier Miranda <miranda@adacore.com>
10603
10604 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10605 generation of TSDs to the DOTNET compiler.
10606 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10607 generation of TSDs to the DOTNET compiler.
10608
9732e886
JM
106092011-08-02 Javier Miranda <miranda@adacore.com>
10610
10611 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10612 record of all the tagged types declared inside library level package
10613 declarations, library level package bodies or library level subprograms.
10614 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10615 associated with a given tagged type.
10616 (Build_VM_TSDs): New subprogram.
10617 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10618 compilation units that are subprograms.
10619 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10620 compilation units that are package bodies.
10621 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10622 units that are a package declaration or a package instantiation.
10623 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10624 reorganization to improve the error generated by the frontend when the
10625 function Ada.Tags.Secondary_Tag is not available.
10626 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10627 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10628
e526d0c7
AC
106292011-08-02 Javier Miranda <miranda@adacore.com>
10630
10631 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10632
106332011-08-02 Robert Dewar <dewar@adacore.com>
10634
10635 * s-imenne.ads: Minor reformatting.
10636
106372011-08-02 Robert Dewar <dewar@adacore.com>
10638
10639 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10640 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10641 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10642
106432011-08-02 Robert Dewar <dewar@adacore.com>
10644
10645 * einfo.ads (Materialize_Entity): Document this is only for renamings
10646 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10647 required debug information in the case where we transform the object
10648 declaration into a renaming declaration.
10649 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10650 object
10651 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10652 Materialize_Entity.
10653
5b1e6aca
RD
106542011-08-02 Robert Dewar <dewar@adacore.com>
10655
10656 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10657 Suppress_Init_Procs.
10658 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10659 Suppress_Initialization/Initialization_Suppressed.
10660 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10661 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10662 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10663 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10664
5ad4969d
RD
106652011-08-02 Robert Dewar <dewar@adacore.com>
10666
10667 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10668 Minor reformatting.
10669
8c4ee6f5
AC
106702011-08-02 Ed Schonberg <schonberg@adacore.com>
10671
10672 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10673 only have inheritable classwide pre/postconditions.
10674
106752011-08-02 Javier Miranda <miranda@adacore.com>
10676
10677 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10678 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10679 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10680 checks if the external tag of a type is the same as the external tag
10681 of some other declaration.
10682
0b3d16c0
AC
106832011-08-02 Thomas Quinot <quinot@adacore.com>
10684
10685 * s-taskin.ads: Minor reformatting.
10686
106872011-08-02 Emmanuel Briot <briot@adacore.com>
10688
10689 * g-comlin.adb (Display_Help): swap the order in which it prints the
10690 short help and the general usage.
10691
106922011-08-02 Ed Schonberg <schonberg@adacore.com>
10693
10694 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10695 the aspect declarations and attach them to the generic copy for
10696 subsequent analysis.
10697 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10698 declarations of the generic tree to the new subprogram declarations.
10699 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10700 conditions that apply to a subprogram instance.
10701
107022011-08-02 Robert Dewar <dewar@adacore.com>
10703
10704 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10705
107062011-08-02 Ed Schonberg <schonberg@adacore.com>
10707
10708 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10709 private type with a tagged full view is not derived in the immediate
10710 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10711
4637729f
AC
107122011-08-02 Robert Dewar <dewar@adacore.com>
10713
10714 * exp_ch4.adb: Minor reformatting.
10715
107162011-08-02 Ed Schonberg <schonberg@adacore.com>
10717
10718 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10719 Ada2012 iterator, the loop will be rewritten during expansion into a
10720 while loop with a cursor and an element declaration. Do not analyze the
10721 body in this case, because if the container is for indefinite types the
10722 actual subtype of the elements will only be determined when the cursor
10723 declaration is analyzed.
10724
107252011-08-02 Arnaud Charlet <charlet@adacore.com>
10726
10727 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10728 size/alignment related attributes in CodePeer_Mode.
10729
107302011-08-02 Gary Dismukes <dismukes@adacore.com>
10731
10732 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10733 Prepend_Element, since this can result in the operation getting the
10734 wrong slot in the full type's dispatch table if the full type has
10735 inherited operations. The incomplete type's operation will get added
10736 to the proper position in the full type's primitives
10737 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10738 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10739 dispatching operations, since there are cases where nonprimitive
10740 subprograms can get added to the list of incomplete dependents (such
10741 as subprograms in nested packages).
10742 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10743 private part when determining whether to add a primitive with a
10744 parameter of a tagged incomplete type to the Private_Dependents list.
10745 Such primitives can also occur in the visible part, and should not have
10746 been excluded from being private dependents.
10747 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10748 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10749 list of a Taft-amendment incomplete type is a primitive before issuing
10750 an error that the full type must appear in the same unit. There are
10751 cases where nonprimitives can be in the list (such as subprograms in
10752 nested packages).
10753 * sem_disp.adb (Derives_From): Use correct condition for checking that
10754 a formal's type is derived from the type of the corresponding formal in
10755 the parent subprogram (the condition was completely wrong). Add
10756 checking that was missing for controlling result types being derived
10757 from the result type of the parent operation.
10758
4c60de0c
YM
107592011-08-02 Yannick Moy <moy@adacore.com>
10760
10761 * errout.adb (First_Node): minor renaming
10762 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10763 first node.
10764
f5afb270
AC
107652011-08-02 Yannick Moy <moy@adacore.com>
10766
10767 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10768 before accessing operands.
10769 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10770 decide whether an initialization expression respects SPARK rules, as
10771 the plain node is the expanded one. This allows for more valid warnings
10772 to be issued.
10773 * gnat_rm.texi: Minor update.
10774
107752011-08-02 Arnaud Charlet <charlet@adacore.com>
10776
10777 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10778 previous change.
10779
107802011-08-02 Robert Dewar <dewar@adacore.com>
10781
10782 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10783
107842011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10785
10786 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10787 loop statements and the element renaming declaration with a block when
10788 the element type is controlled.
10789
107902011-08-02 Yannick Moy <moy@adacore.com>
10791
10792 * sinfo.ads: Minor formatting.
10793
107942011-08-02 Ed Schonberg <schonberg@adacore.com>
10795
10796 * sem_aggr.adb (Add_Association): if the association has a box and no
10797 expression, use the Sloc of the aggregate itself for the new
10798 association.
10799 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10800 the Original_Node.
10801
db72f10a
AC
108022011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10803
10804 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10805 When a container is provided via a function call, generate a renaming
10806 of the function result. This avoids the creation of a transient scope
10807 and the premature finalization of the container.
10808 * exp_ch7.adb (Is_Container_Cursor): Removed.
10809 (Wrap_Transient_Declaration): Remove the supression of the finalization
10810 of the list controller when the declaration denotes a container cursor,
10811 it is not needed.
10812
108132011-08-02 Yannick Moy <moy@adacore.com>
10814
10815 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10816 node is from source, instead of the original node being from source.
10817 * sem_aggr.adb
10818 (Resolve_Array_Aggregate): refine the check for a static expression, to
10819 recognize also static ranges
10820 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10821 Array_Type_Declaration): postpone the test for the type being a subtype
10822 mark after the type has been resolved, so that component-selection and
10823 expanded-name are discriminated.
10824 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10825 to distinguish the case of an iteration scheme, so that an error is
10826 issed on a non-static range in SPARK except in an iteration scheme.
10827 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10828 In_Iter_Schm = True.
10829 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10830 user-defined operators so that they are allowed in renaming
10831 * sem_ch8.adb
10832 (Find_Selected_Component): refine the check for prefixing of operators
10833 so that they are allowed in renaming. Move the checks for restrictions
10834 on selector name after analysis discriminated between
10835 component-selection and expanded-name.
10836 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10837 concatenation argument of string type if it is static.
10838 * sem_util.adb, sem_util.ads
10839 (Check_Later_Vs_Basic_Declarations): add a new function
10840 Is_Later_Declarative_Item to decice which declarations are allowed as
10841 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10842 mode, add that renamings are considered as later items.
10843 (Enclosing_Package): new function to return the enclosing package
10844 (Enter_Name): correct the rule for homonyms in SPARK
10845 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10846 from source (result of expansion) to avoid issuing wrong warnings.
10847
108482011-08-02 Ed Schonberg <schonberg@adacore.com>
10849
10850 * errout.adb: On anything but an expression First_Node returns its
10851 argument.
10852
23685ae6
AC
108532011-08-02 Pascal Obry <obry@adacore.com>
10854
10855 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10856
108572011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10858
10859 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10860 Set the associated loop as the related expression of internally
10861 generated cursors.
10862 * exp_ch7.adb (Is_Container_Cursor): New routine.
10863 (Wrap_Transient_Declaration): Supress the finalization of the list
10864 controller when the declaration denotes a container cursor.
10865
108662011-08-02 Yannick Moy <moy@adacore.com>
10867
10868 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10869 command line now.
10870 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10871 expression is a simple expression. This check cannot be performed in
10872 the semantics, so just drop it.
10873 (P_Index_Or_Discriminant_Constraint): move check that the index or
10874 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10875 semantics. Other cases were previously checked in the semantics.
10876 * par-ch4.adb (P_Name): move checks that a selector name is not
10877 character literal or an operator symbol to Find_Selected_Component in
10878 the semantics
10879 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10880 declarations are not placed after later declarations in a separate
10881 procedure in Sem_Util (possibly not the best choice?), to be used both
10882 during parsing, for Ada 83 mode, and during semantic analysis, for
10883 SPARK mode.
10884 * par-endh.adb (Check_End): move check that end label is not missing
10885 to Process_End_Label in the semantics
10886 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10887 the special case for SPARK restriction
10888 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10889 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10890 parameter Force to issue the error message even on internal node (used
10891 for generated end label). Call Check_Restriction to check when an error
10892 must be issued. In SPARK mode, issue an error message even if the
10893 restriction is not set.
10894 (Check_Restriction): new procedure with an additional out parameter to
10895 inform the caller that a message has been issued
10896 * sem_aggr.adb: Minor modification of message
10897 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10898 instead of issuing an error message directly
10899 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10900 declarations are not placed after later declarations, by calling
10901 Check_Later_Vs_Basic_Declarations
10902 (Analyze_Subtype_Declaration): move here the check that an index or
10903 discriminant constraint must be a subtype mark. Change the check that
10904 a subtype of String must start at one so that it works on subtype marks.
10905 * sem_ch4.adb (Analyze_Call): move here the check that a named
10906 association cannot follow a positional one in a call
10907 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10908 instead of issuing an error message directly
10909 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10910 selector name is not a character literal or an operator symbol. Move
10911 here the check that the prefix of an expanded name cannot be a
10912 subprogram or a loop statement.
10913 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10914 procedure called from parsing and semantics to check that basic
10915 declarations are not placed after later declarations
10916 (Process_End_Label): move here the check that end label is not missing
10917
109182011-08-02 Arnaud Charlet <charlet@adacore.com>
10919
10920 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10921 representation clause in codepeer mode, since it confuses CodePeer and
10922 does not bring useful info.
10923
109242011-08-02 Ed Falis <falis@adacore.com>
10925
10926 * init.c: initialize fp hw on MILS.
10927
109282011-08-02 Ed Schonberg <schonberg@adacore.com>
10929
10930 * errout.adb (First_Node): for bodies, return the node itself (small
10931 optimization). For other nodes, do not check source_unit if the node
10932 comes from Standard.
10933
d2d9cc22
AC
109342011-08-02 Robert Dewar <dewar@adacore.com>
10935
10936 * exp_ch3.adb: Minor comment additions.
10937 * sem_ch13.adb: Minor reformatting.
10938
109392011-08-02 Pascal Obry <obry@adacore.com>
10940
10941 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10942
a01b9df6
AC
109432011-08-02 Robert Dewar <dewar@adacore.com>
10944
10945 * sem_attr.adb: Minor reformatting.
10946
109472011-08-02 Robert Dewar <dewar@adacore.com>
10948
10949 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10950 (Has_Default_Component_Value): Removed
10951 * einfo.ads Comment updates
10952 (Has_Default_Aspect): Replaces Has_Default_Value
10953 (Has_Default_Component_Value): Removed
10954 * exp_ch13.adb
10955 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10956 * exp_ch3.adb
10957 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10958 (Get_Simple_Init_Val): Handle Default_Value aspect
10959 (Needs_Simple_Initialization): Handle Default_Value aspect
10960 * exp_ch3.ads: Needs_Simple_Initialization
10961 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10962 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10963 * sem_ch13.adb
10964 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10965 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10966 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10967
109682011-08-02 Ed Schonberg <schonberg@adacore.com>
10969
10970 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10971 package containing iteration primitives.
10972 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10973
75c90775
AC
109742011-08-02 Ed Schonberg <schonberg@adacore.com>
10975
10976 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10977 "of", pre-analyze expression in case it is a function call with
10978 finalization actions that must be placed ahead of the loop.
10979 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10980 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10981
109822011-08-02 Geert Bosch <bosch@adacore.com>
10983
10984 * cstand.adb (Create_Float_Types): Only consider C's long double for
10985 Long_Long_Float, in addition to double.
10986
ded8909b
AC
109872011-08-02 Robert Dewar <dewar@adacore.com>
10988
10989 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10990 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10991 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10992 Minor reformatting.
10993
109942011-08-02 Ed Schonberg <schonberg@adacore.com>
10995
10996 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10997 indexed component.
10998
109992011-08-02 Javier Miranda <miranda@adacore.com>
11000
11001 * einfo.ads, einfo.adb
11002 (Original_Access_Type): Move this attribute to Node26 since there was
11003 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11004 which causes conflicts and breaks the generation of the .NET compiler.
11005 (Interface_Name): Add missing documentation on JGNAT only uses of
11006 this attribute.
11007
70c34e1c
AC
110082011-08-02 Geert Bosch <bosch@adacore.com>
11009
11010 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11011 (Find_Back_End_Float_Type): Likewise
11012 (Create_Back_End_Float_Types): Likewise
11013 (Create_Float_Types): Likewise
11014 (Register_Float_Type): Likewise
11015 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11016 Nlist and split out type selection in new local Find_Base_Type function.
11017 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11018 Nlist
11019 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11020
110212011-08-02 Robert Dewar <dewar@adacore.com>
11022
11023 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11024 alpha order).
11025 * opt.ads: Minor comment change.
11026 * sem_ch12.adb: Minor code reorganization.
11027
b715bc59
AC
110282011-08-02 Gary Dismukes <dismukes@adacore.com>
11029
11030 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11031 subtype's list of rep items to the list on the full subtype in the case
11032 where the lists are the same.
11033
110342011-08-02 Geert Bosch <bosch@adacore.com>
11035
11036 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11037 using the one from System.Strings, which also deallocates all strings.
11038
002bdd68
AC
110392011-08-02 Geert Bosch <bosch@adacore.com>
11040
11041 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11042 function.
11043 * gcc-interface/Make-lang.in: Update dependencies.
11044
110452011-08-02 Olivier Hainque <hainque@adacore.com>
11046
11047 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11048 end_locus.
11049
499769ec
AC
110502011-08-02 Javier Miranda <miranda@adacore.com>
11051
11052 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11053 associated with anonymous access to subprograms.
11054
110552011-08-02 Geert Bosch <bosch@adacore.com>
11056
11057 * opt.ads
11058 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11059 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11060 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11061 (Add_Symbol_Definition): Move to switch-c.adb
11062 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11063 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11064 (Add_Symbol_Definition): Move to switch-c.adb.
11065 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11066 * sem_warn.adb
11067 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11068 Move to warnsw.adb.
11069 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11070 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11071 Move to warnsw.adb.
11072 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11073 (Add_Symbol_Definition): Moved from Prepcomp.
11074 * switch-c.ads: Update copyright notice. Use String_List instead of
11075 Argument_List, removing dependency on System.OS_Lib.
11076
aa1e353a
AC
110772011-08-02 Yannick Moy <moy@adacore.com>
11078
11079 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11080 mode on initialization expression which does not respect SPARK
11081 restrictions.
11082 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11083 if the tree referenced by its argument represents an initialization
11084 expression in SPARK, suitable for initializing an object in an object
11085 declaration.
11086
110872011-08-02 Javier Miranda <miranda@adacore.com>
11088
11089 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11090 internally generated access to subprogram with its associated protected
11091 subprogram type.
11092 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11093
15b682ca
GB
110942011-08-02 Geert Bosch <bosch@adacore.com>
11095
11096 * cstand.adb (Register_Float_Type): Print information about type to
11097 register, if the Debug_Flag_Dot_B is set.
11098 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11099 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11100 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11101 with a requested precision of more than Max_Digits digits and no more
11102 than Max_Base_Digits digits, if a range specification is present and the
11103 Predefined_Float_Types list has a suitable type to derive from.
11104 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11105 case of type completion with pragma Import
11106 * sem_prag.adb
11107 (Process_Import_Predefined_Type): Processing to complete a type
11108 with pragma Import. Currently supports floating point types only.
11109 (Set_Convention_From_Pragma): Do nothing without underlying type.
11110 (Process_Convention): Guard against absence of underlying type,
11111 which may happen when importing incomplete types.
11112 (Process_Import_Or_Interface): Handle case of importing predefined
11113 types. Tweak error message.
11114
f8726f2b
AC
111152011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11116
11117 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11118 functions to previous change. Reorganize code slightly.
11119
111202011-08-02 Geert Bosch <bosch@adacore.com>
11121
11122 * back_end.ads (Register_Type_Proc): New call back procedure type for
11123 allowing the back end to provide information about available types.
11124 (Register_Back_End_Types): New procedure to register back end types.
11125 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11126 available types.
11127 * cstand.adb (Back_End_Float_Types): New list for floating point types
11128 supported by the back end.
11129 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11130 (Copy_Float_Type): New procedure to make new copies of predefined types.
11131 (Register_Float_Type): New call back procedure to populate the BEFT list
11132 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11133 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11134 (Create_Float_Types): New procedure to create entities for floating
11135 point types predefined in Standard, and put these and any remaining
11136 BEFTs on the Predefined_Float_Types list.
11137 * stand.ads (Predefined_Float_Types): New list for predefined floating
11138 point types that do not have declarations in package Standard.
11139
feecad68
AC
111402011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11141
11142 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11143 entity node for the unit containing the parameter.
11144 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11145 (Add_Inlined_Subprogram): Likewise.
11146 * gcc-interface/Make-lang.in: Update dependencies.
11147
111482011-08-02 Thomas Quinot <quinot@adacore.com>
11149
11150 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11151 suitable value.
11152
12f0c50c
AC
111532011-08-02 Geert Bosch <bosch@adacore.com>
11154
11155 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11156
111572011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11158
11159 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11160 computed value of Base_Type.
11161
111622011-08-02 Yannick Moy <moy@adacore.com>
11163
11164 * restrict.adb (Check_Restriction): issue an error for any use of
11165 class-wide, even if the No_Dispatch restriction is not set.
11166 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11167 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11168 when completing a private extension, the type named in the private part
11169 is not the same as that named in the visible part.
11170 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11171 of an inherited primitive operations of a tagged type or type extension
11172 that returns the tagged type.
11173 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11174 function which returns True for an implicit operation inherited by the
11175 derived type declaration for the argument type.
11176 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11177 order.
11178
fb86fe11
ES
111792011-08-02 Ed Schonberg <schonberg@adacore.com>
11180
11181 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11182 Process_Bounds, to perform analysis with expansion of a range or an
11183 expression that is the iteration scheme for a loop.
11184 (Analyze_Iterator_Specification): If domain of iteration is given by a
11185 function call with a controlled result, as is the case if call returns
11186 a predefined container, ensure that finalization actions are properly
11187 generated.
11188 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11189
62be5d0a
JM
111902011-08-02 Javier Miranda <miranda@adacore.com>
11191
11192 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11193 * gcc-interface/Make-lang.in: Update dependencies.
11194
111952011-08-02 Javier Miranda <miranda@adacore.com>
11196
11197 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11198 determine if the analysis is performed using N or Original_Node (N).
11199 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11200 functionality of routine Is_Variable avoids code duplication.
11201 * checks.adb (Determine_Range): Handle temporaries generated by
11202 Remove_Side_Effects.
11203
112042011-08-02 Javier Miranda <miranda@adacore.com>
11205
11206 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11207 expansion of the condition. Required since the previous analysis was
11208 done with expansion disabled (see Resolve_Quantified_Expression) and
11209 hence checks were not inserted and record comparisons have not been
11210 expanded.
11211
a20f4389
AC
112122011-08-02 Ed Falis <falis@adacore.com>
11213
11214 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11215 Update header.
11216
112172011-08-02 Bob Duff <duff@adacore.com>
11218
11219 * opt.ads: Minor comment fix.
11220
112212011-08-02 Bob Duff <duff@adacore.com>
11222
11223 * sem_ch12.adb (Analyze_Package_Instantiation,
11224 Analyze_Subprogram_Instantiation): Turn off style checking while
11225 analyzing an instance. Whatever style checks that apply to the generic
11226 unit should apply, so it makes no sense to apply them in an instance.
11227 This was causing trouble when compiling an instance of a runtime
11228 unit that violates the -gnatyO switch.
11229 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11230 one of the two case statements, causing spurious errors.
11231
112322011-08-02 Robert Dewar <dewar@adacore.com>
11233
11234 * uname.adb: Minor reformatting.
11235 * gnatcmd.adb: Minor reformatting.
11236 * exp_attr.adb: Minor reformatting.
11237
90878b12
AC
112382011-08-02 Ed Schonberg <schonberg@adacore.com>
11239
11240 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11241 No_Dispatching_Calls, do not look for the Assign primitive, because
11242 predefined primitives are not created in this case.
11243
112442011-08-02 Bob Duff <duff@adacore.com>
11245
11246 * stylesw.ads: Minor comment fixes.
11247
112482011-08-02 Robert Dewar <dewar@adacore.com>
11249
11250 * freeze.adb (Add_To_Result): New procedure.
11251
112522011-08-02 Jose Ruiz <ruiz@adacore.com>
11253
11254 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11255 time, if the specific run-time routines for handling streams of strings
11256 are not available, use the default mechanism.
11257
112582011-08-02 Arnaud Charlet <charlet@adacore.com>
11259
11260 * s-regpat.ads: Fix typo.
11261
112622011-08-02 Vincent Celier <celier@adacore.com>
11263
11264 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11265 not null, call it to create the in memory config project file without
11266 parsing an existing default config project file.
11267
112682011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11269
11270 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11271
112722011-08-02 Ed Schonberg <schonberg@adacore.com>
11273
11274 * sem_elim.adb: an abstract subprogram does not need an eliminate
11275 pragma for its descendant to be eliminable.
11276
112772011-08-02 Ed Falis <falis@adacore.com>
11278
11279 * init.c: revert to handling before previous checkin for VxWorks
11280 * s-intman-vxworks.adb: delete unnecessary declarations related to
11281 using Ada interrupt facilities for handling signals.
11282 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11283 * s-intman-vxworks.ads: Import __gnat_install_handler as
11284 Initialize_Interrupts.
11285 * s-taprop-vxworks.adb: Delete Signal_Mask.
11286 (Abort_Handler): change construction of mask to unblock exception
11287 signals.
11288
273adcdf
AC
112892011-08-02 Jerome Guitton <guitton@adacore.com>
11290
11291 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11292 Debug_Raise_Exception before propagation starts.
11293
112942011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11295
11296 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11297 to Restriction_Check_Required.
11298 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11299 * sem_res.adb (Resolve_Call): Likewise.
11300 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11301
113022011-08-02 Bob Duff <duff@adacore.com>
11303
11304 * stylesw.ads: Update comment.
11305 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11306 * errout.ads: Remove obsolete comment.
11307
113082011-08-02 Javier Miranda <miranda@adacore.com>
11309
11310 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11311 (Set_Is_Safe_To_Reevaluate): new procedure.
11312 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11313 assignment is allowed on safe-to-reevaluate variables.
11314 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11315 temporary created to remove side effects in expressions that use
11316 the secondary stack as safe-to-reevaluate.
11317 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11318 variables that are not true constants.
11319
6320f5e1
AC
113202011-08-02 Robert Dewar <dewar@adacore.com>
11321
11322 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11323 sem_res.adb, sem_ch6.adb: Minor reformatting.
11324
113252011-08-02 Jerome Guitton <guitton@adacore.com>
11326
11327 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11328
2fe829ae
ES
113292011-08-02 Ed Schonberg <schonberg@adacore.com>
11330
11331 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11332 not set Overridden_Operation if subprogram is an initialization
11333 procedure.
11334
e24329cd
YM
113352011-08-02 Yannick Moy <moy@adacore.com>
11336
11337 * par-ch6.adb: Correct obsolete name in comments
11338 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11339 which takes two message arguments (existing function takes one), with
11340 second message used for continuation.
11341 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11342 block statements that originate from a source block statement, not
11343 generated block statements
11344 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11345 symmetry with procedure case
11346 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11347 function to issue an error in formal mode if a package specification
11348 contains more than one tagged type or type extension.
11349 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11350 parameters matching formals of tagged types are objects (or ancestor
11351 type conversions of objects), not general expressions. Issue an error
11352 on view conversions that are not involving ancestor conversion of an
11353 extended type.
11354 (Resolve_Type_Conversion): in formal mode, issue an error on the
11355 operand of an ancestor type conversion which is not an object
11356 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11357 procedure so that it works also for actuals of function calls
11358 (Is_Actual_Tagged_Parameter): new function which determines if its
11359 argument is an actual parameter of a formal of tagged type in a
11360 subprogram call
11361 (Is_SPARK_Object_Reference): new function which determines if the tree
11362 referenced by its argument represents an object in SPARK
11363
176dadf6
AC
113642011-08-02 Robert Dewar <dewar@adacore.com>
11365
11366 * sem_ch3.adb: Minor reformatting
11367 Minor comment addition
11368 Minor error msg text change
11369
113702011-08-02 Javier Miranda <miranda@adacore.com>
11371
11372 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11373 function. Used to be more precise when we generate a variable plus one
11374 assignment to remove side effects in the evaluation of the Bound
11375 expressions.
11376 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11377 of the bound expression to force its re-analysis and thus expand the
11378 associated transient scope (if required). Code cleanup replacing the
11379 previous code that declared the constant entity by an invocation to
11380 routine Force_Evaluation which centralizes this work in the frontend.
11381
d8b962d8
AC
113822011-08-02 Robert Dewar <dewar@adacore.com>
11383
11384 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11385 (Base_Type): Now uses improved Is_Base_Type function
11386 * einfo.ads (Base_Type): Inline this function
11387
113882011-08-02 Robert Dewar <dewar@adacore.com>
11389
11390 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11391 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11392
113932011-08-02 Arnaud Charlet <charlet@adacore.com>
11394
11395 * gcc-interface/Make-lang.in: Update dependencies.
11396 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11397 targets.
11398
113992011-08-02 Yannick Moy <moy@adacore.com>
11400
11401 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11402 non-simple expression used in delta constraint
11403 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11404 index constraint which is not a subtype mark
11405 * par.adb: With and use Restrict
11406 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11407 mode on component type which is not a subtype mark and default
11408 expression on component
11409 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11410 of string which does not have a lower index bound equal to 1
11411 (Array_Type_Declaration): issue an error in formal mode on index or
11412 component type which is not a subtype mark, and on aliased keyword on
11413 component
11414 (Derived_Type_Declaration): issue an error in formal mode on interface,
11415 limited or abstract type
11416 (Record_Type_Declaration): issue an error in formal mode on interface
11417 (Record_Type_Definition): issue an error in formal mode on tagged types
11418 and type extensions not declared in the specification of a library unit
11419 package; on null non-tagged record; on variant part
11420
114212011-08-02 Vincent Celier <celier@adacore.com>
11422
11423 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11424 not declared for qualified library project when Library_Name is not
11425 declared, but Library_Dir is.
11426
114272011-08-02 Robert Dewar <dewar@adacore.com>
11428
11429 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11430 pragmas (affects aspects [Component_]Default_Value
11431 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11432 component type for the resolution
11433
f96b2d85
AC
114342011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11435
11436 * einfo.adb (Base_Type): Tune implementation for speed.
11437
114382011-08-02 Robert Dewar <dewar@adacore.com>
11439
11440 * freeze.adb: Minor reformatting.
11441
8b3c6430
AC
114422011-08-02 Thomas Quinot <quinot@adacore.com>
11443
11444 * scos.ads: Update comments.
11445
114462011-08-02 Ed Schonberg <schonberg@adacore.com>
11447
11448 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11449 base type, because the parent may be a subtype of a private type whose
11450 convention is established in a private part.
11451
114522011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11453
11454 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11455 statement in a block when the expansion of the return expression has
11456 created a finalization chain.
11457 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11458 with the parent node.
11459 Add N_Extended_Return_Statement to handle the case where a transient
11460 object declaration appears in the Return_Object_Declarations list of
11461 an extended return statement.
11462
114632011-08-02 Matthew Gingell <gingell@adacore.com>
11464
11465 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11466 unused parameter 'name'.
11467
114682011-08-02 Ed Schonberg <schonberg@adacore.com>
11469
11470 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11471 inherited operation, check whether its alias, which is the source
11472 operastion that it renames, has been marked eliminated.
11473
cae81f17
JM
114742011-08-02 Javier Miranda <miranda@adacore.com>
11475
11476 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11477 in-mode parameter whose type is an access type since it can be used to
11478 modify its designated object. Enforce code that handles as safe an
11479 access type that is not access-to-constant but it is the result of a
11480 previous removal of side-effects.
11481 (Remove_Side_Effects): Minor code reorganization of cases which require
11482 no action. Done to incorporate documentation on new cases uncovered
11483 working in this ticket: no action needed if this routine was invoked
11484 too early and the nodes are not yet decorated.
11485 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11486 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11487 were issued with actuals that are implicitly provided by
11488 Force_Evaluation.
11489
218e6dee
RD
114902011-08-02 Robert Dewar <dewar@adacore.com>
11491
11492 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11493
7a489a2b
AC
114942011-08-02 Yannick Moy <moy@adacore.com>
11495
11496 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11497 to issue an error in formal mode on attribute not supported in this mode
11498 (Analyze_Attribute): issue errors on standard attributes not supported
11499 in formal mode.
11500 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11501 comment, and issue error in formal mode on modulus which is not a power
11502 of 2.
11503 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11504 range.
11505 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11506 subtype mark.
11507 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11508 operator on modular type (except 'not').
11509
115102011-08-02 Robert Dewar <dewar@adacore.com>
11511
11512 * gnat_rm.texi: Minor reformatting.
11513
cb7fa356
AC
115142011-08-02 Arnaud Charlet <charlet@adacore.com>
11515
11516 * s-osinte-linux.ads: Minor comment update and reformatting.
11517 * i-cexten.ads: Make this unit pure, as for its parent.
11518 Will allow its usage in more contexts if needed.
11519
115202011-08-02 Robert Dewar <dewar@adacore.com>
11521
11522 * s-utf_32.ads: Minor comment fix.
11523
115242011-08-02 Ed Schonberg <schonberg@adacore.com>
11525
11526 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11527 operation of a tagged synchronized type, handle the case where the
11528 controlling argument is overloaded.
11529
115302011-08-02 Yannick Moy <moy@adacore.com>
11531
11532 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11533 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11534 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11535 SPARK mode and formal verification mode on processing SPARK restriction
11536 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11537 requiring consistency checking.
11538
5cc9353d
RD
115392011-08-02 Robert Dewar <dewar@adacore.com>
11540
11541 * sem_res.adb: Minor reformatting.
11542
e51537ff
RD
115432011-08-02 Robert Dewar <dewar@adacore.com>
11544
11545 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11546 a-cforse.ads: Remove unneeded with of Ada.Containers
11547 Remove commented out pragma Inline's
11548 Move specifications of new subprograms to the actual specs
11549
83fa09c5
AC
115502011-08-02 Yannick Moy <moy@adacore.com>
11551
11552 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11553 a-cforse.ads: Update comments.
11554
115552011-08-02 Ed Schonberg <schonberg@adacore.com>
11556
11557 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11558
d11cfaf8
RD
115592011-08-02 Robert Dewar <dewar@adacore.com>
11560
11561 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11562 a-cforse.ads, a-cofove.ads: Minor reformatting.
11563
300b98bb
AC
115642011-08-02 Claire Dross <dross@adacore.com>
11565
11566 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11567 a-cofove.ads: Add comments.
11568
115692011-08-02 Yannick Moy <moy@adacore.com>
11570
11571 * gnat_rm.texi: Document formal containers.
11572
115732011-08-02 Emmanuel Briot <briot@adacore.com>
11574
11575 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11576 are empty sections.
11577
19fb051c
AC
115782011-08-02 Robert Dewar <dewar@adacore.com>
11579
11580 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11581 reformatting.
11582
115832011-08-02 Robert Dewar <dewar@adacore.com>
11584
11585 * aspects.adb: New aspects Default_Value and Default_Component_Value
11586 New format of Aspect_Names table checks for omitted entries
11587 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11588 handling of boolean aspects for derived types.
11589 New aspects Default_Value and Default_Component_Value
11590 New format of Aspect_Names table checks for omitted entries
11591 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11592 (Has_Default_Value): New flag
11593 (Has_Default_Component_Value): New flag
11594 (Has_Default_Value): New flag
11595 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11596 table.
11597 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11598 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11599 Default_Value and Default_Component_Value
11600 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11601 New aspects Default_Value and Default_Component_Value
11602 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11603 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11604
116052011-08-02 Vincent Celier <celier@adacore.com>
11606
11607 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11608 inherit library kind.
11609
116102011-08-02 Ed Schonberg <schonberg@adacore.com>
11611
11612 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11613 Minor reformatting.
11614
116152011-08-02 Robert Dewar <dewar@adacore.com>
11616
11617 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11618
5f7747af
AC
116192011-08-02 Yannick Moy <moy@adacore.com>
11620
11621 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11622
116232011-08-02 Robert Dewar <dewar@adacore.com>
11624
11625 * impunit.adb: Add comment.
11626
a5fe697b
AC
116272011-08-02 Yannick Moy <moy@adacore.com>
11628
11629 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11630 qualification of aggregates in formal mode
11631 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11632 another aggregate
11633 (Resolve_Aggregate): complete the test that an aggregate is adequately
11634 qualified in formal mode
11635
116362011-08-02 Pascal Obry <obry@adacore.com>
11637
11638 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11639 * mlib-prj.adb: Supress warning when compiling binder generated file.
11640 (Build_Library): Supress all warnings when compiling the binder
11641 generated file.
11642
bd65a2d7 116432011-08-02 Yannick Moy <moy@adacore.com>
d4487611 11644
bd65a2d7
AC
11645 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11646 from here...
11647 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11648 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11649 Add with/use clauses to make Check_Formal_Restriction visible
11650
116512011-08-02 Ed Schonberg <schonberg@adacore.com>
11652
11653 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11654 in-parameters when type of the generic formal is private in the generic
11655 spec and non-private in the body.
11656
116572011-08-02 Claire Dross <dross@adacore.com>
11658
11659 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11660 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11661 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11662 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
11663
116642011-08-02 Robert Dewar <dewar@adacore.com>
11665
11666 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11667 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11668
bd434b3f
YM
116692011-08-02 Yannick Moy <moy@adacore.com>
11670
11671 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11672 formal mode
11673 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11674 matching static array bounds, taking into account the special case of
11675 string literals
11676 * sem_ch3.adb: Typo in comment.
11677
fe5d3068
YM
116782011-08-02 Yannick Moy <moy@adacore.com>
11679
11680 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11681 which issues an error in formal mode if its argument node is originally
11682 from source
11683 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11684 has a discriminant specification so that it does not include the case
11685 of derived types
11686 (Derived_Type_Declaration): move here the test that a derived type has a
11687 discriminant specification
11688 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11689 first element of a component association before accessing its choices
11690 (presence of component association is not enough)
11691 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11692 declaration is a library item before accessing the next element in a
11693 list, as library items are not member of lists
11694 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11695 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11696 Check_Formal_Restriction whenever possible.
11697
b60a3f26
AC
116982011-08-02 Ed Schonberg <schonberg@adacore.com>
11699
11700 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11701 reference when needed.
11702
117032011-08-02 Bob Duff <duff@adacore.com>
11704
11705 * gnat_ugn.texi: Fix typo.
11706
117072011-08-02 Vincent Celier <celier@adacore.com>
11708
11709 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11710 archive file name. Do not use the full path name of archives for Open
11711 VMS.
11712
eaba57fb
RD
117132011-08-02 Robert Dewar <dewar@adacore.com>
11714
11715 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11716 Analyze_Aspect_Specifications
11717 * sem_ch13.adb
11718 (Analyze_Aspect_Specifications): New handling for boolean aspects
11719 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11720 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11721 sequence for Analyze_Aspect_Specifications
11722 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11723 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11724
117252011-08-02 Robert Dewar <dewar@adacore.com>
11726
11727 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11728 aspects, since these no longer exist.
11729
117302011-08-02 Robert Dewar <dewar@adacore.com>
11731
11732 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11733 semicolon, do not try to see if there are aspects following it.
11734 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11735 aspect spec.
11736
8830d1d2
AC
117372011-08-02 Robert Dewar <dewar@adacore.com>
11738
11739 * sem_ch8.adb, aspects.ads: Minor reformatting.
11740
117412011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11742
11743 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11744 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11745 extracted from...
11746 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11747
7ff2d234
AC
117482011-08-02 Yannick Moy <moy@adacore.com>
11749
11750 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11751 mode on subprogram declaration outside of package specification, unless
11752 it is followed by a pragma Import
11753 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11754 Access_Type_Declaration): issue error in formal mode on access type
11755 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11756 incomplete type
11757 (Analyze_Object_Declaration): issue error in formal mode on object
11758 declaration which does not respect SPARK restrictions
11759 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11760 declaration which does not respect SPARK restrictions
11761 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11762 error in formal mode on digits or delta constraint
11763 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11764 decimal fixed point type
11765 (Derived_Type_Declaration): issue error in formal mode on derived type
11766 other than type extensions of tagged record types
11767 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11768 with check on access definition
11769 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11770 mode on protected definition.
11771 (Analyze_Task_Definition): issue error in formal mode on task definition
11772
117732011-08-02 Robert Dewar <dewar@adacore.com>
11774
11775 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11776
806f6d37
AC
117772011-08-02 Javier Miranda <miranda@adacore.com>
11778
11779 * sem_ch6.adb (Can_Override_Operator): New function.
11780 (Verify_Overriding_Indicator): Add missing code to check overriding
11781 indicator in operators. Fixes regression.
11782 (Check_Overriding_Indicator): Minor reformating after replacing the
11783 code that evaluates if the subprogram can override an operator by
11784 invocations to the above new function.
11785 * einfo.adb
11786 (Write_Field26_Name): Add missing code to ensure that, following
11787 the documentation in einfo.ads, this field is not shown as attribute
11788 "Static_Initialization" on non-dispatching functions.
11789
117902011-08-02 Jose Ruiz <ruiz@adacore.com>
11791
11792 * sem_res.adb (Resolve_Call): A call to
11793 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11794 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11795 i.e., when the second parameter is of type Time_Span.
11796
117972011-08-02 Vincent Celier <celier@adacore.com>
11798
11799 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11800 with an archive instead of -L<library dir> -l<library name>.
11801
118022011-08-02 Ed Schonberg <schonberg@adacore.com>
11803
11804 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11805 mark the base types In_Use in addition to making the operations
11806 use_visible.
11807
118082011-08-02 Ed Falis <falis@adacore.com>
11809
11810 * init.c: add and setup __gnat_signal_mask for the exception signals
11811 * s-inmaop-vxworks.adb: new file.
11812 * s-intman-vxworks.adb: remove unnecessary initializations and
11813 simplify remaining
11814 * s-intman-vxworks.ads: remove unnecessary variable
11815 * s-taprop-vxworks.adb: simplify signal initialization
11816
780d052e
RD
118172011-08-02 Robert Dewar <dewar@adacore.com>
11818
11819 * sem_ch8.adb: Minor code reorganization, comment updates.
11820
118212011-08-02 Robert Dewar <dewar@adacore.com>
11822
11823 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11824 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11825 here from Sem_Res.
11826 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11827 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11828
29efbb8c
ES
118292011-08-02 Ed Schonberg <schonberg@adacore.com>
11830
11831 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11832 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11833 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11834 use_type_clauses, to handle more efficiently use_type and use_all_type
11835 constructs.
11836 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11837 Ada2012 Use_All_Type clause.
11838 (Use_Class_Wide_Operations): new procedure.
11839
b0186f71
AC
118402011-08-02 Robert Dewar <dewar@adacore.com>
11841
11842 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11843 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11844 expression to expression function.
11845
118462011-08-02 Ed Schonberg <schonberg@adacore.com>
11847
11848 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11849 if types are compatible.
11850
118512011-08-02 Yannick Moy <moy@adacore.com>
11852
11853 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11854 returns True if its argument array types have same dimension and same
11855 static bounds at each index.
11856 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11857 OUT or IN OUT paramaters which are not view conversions in SPARK.
11858 (Resolve_Arithmetic_Op): issue an error in formal mode on
11859 multiplication or division with operands of fixed point types which are
11860 not qualified or explicitly converted.
11861 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11862 Boolean or array type (except String) operands.
11863 (Resolve_Equality_Op): issue an error in formal mode on equality
11864 operators for array types other than String with non-matching static
11865 bounds.
11866 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11867 for array types with non-matching static bounds. Factorize the code in
11868 Matching_Static_Array_Bounds.
11869 (Resolve_Qualified_Expression): issue an error in formal mode on
11870 qualified expressions for array types with non-matching static bounds.
11871 (Resolve_Type_Conversion): issue an error in formal mode on type
11872 conversion for array types with non-matching static bounds
11873
767bb4e8
AC
118742011-08-02 Robert Dewar <dewar@adacore.com>
11875
11876 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11877
118782011-08-02 Ed Schonberg <schonberg@adacore.com>
11879
11880 * par-ch9.adb: save location of entry for proper error message.
11881
4ac2477e
JM
118822011-08-02 Javier Miranda <miranda@adacore.com>
11883
11884 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11885 (Use_Full_View) which permits this routine to climb through the
11886 ancestors using the full-view of private parents.
11887 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11888 Use_Full_View to true in calls to Is_Ancestor.
11889 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11890 true in call to Is_Ancestor.
11891 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11892 Use_Full_View to true in call to Is_Ancestor.
11893 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11894 call to Is_Ancestor.
11895 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11896 Use_Full_View to true in calls to Is_Ancestor.
11897 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11898 Make_Select_Specific_Data_Table, Register_Primitive,
11899 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11900 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11901 to true in call to Is_Ancestor.
11902 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11903 Use_Full_View to true in calls to Is_Ancestor.
11904 * exp_cg.adb
11905 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11906 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11907
9f90d123
AC
119082011-08-02 Robert Dewar <dewar@adacore.com>
11909
11910 * gnat_rm.texi: Minor reformatting.
11911 * sem_prag.adb: Minor reformatting.
11912
119132011-08-02 Tristan Gingold <gingold@adacore.com>
11914
11915 * vms_data.ads: Add VMS qualifier for -gnateP.
11916
119172011-08-02 Robert Dewar <dewar@adacore.com>
11918
11919 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11920 * par-ch7.adb (P_Package): Proper placement of aspects for package
11921 decl/instantiation.
11922 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11923 (End_Statements): Add Is_Sloc parameterr
11924 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11925 (Check_End): Ad Is_Sloc parameter
11926 (End_Statements): Add Is_Sloc parameterr
11927
119282011-08-02 Vincent Celier <celier@adacore.com>
11929
11930 * ug_words: Add VMS qualifier equivalent to -gnateP:
11931 /SYMBOL_PREPROCESSING.
11932
119332011-08-02 Jose Ruiz <ruiz@adacore.com>
11934
11935 * gnat-style.texi: For hexadecimal numeric literals the typical
11936 grouping of digits is 4 to represent 2 bytes.
11937 A procedure spec which is split into several lines is indented two
11938 characters.
11939
119402011-08-02 Yannick Moy <moy@adacore.com>
11941
11942 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11943 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11944 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11945 properly qualified
11946 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11947 choice in array aggregate
11948 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11949 mark as ancestor
11950 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11951 positional and named aggregate for record, or others in record
11952 aggregate, or multiple choice in record aggregate
11953 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11954 array operands to logical operations AND, OR and XOR do not have the
11955 same static lower and higher bounds
11956 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11957
2933b16c
RD
119582011-08-01 Robert Dewar <dewar@adacore.com>
11959
11960 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11961 Replaces Last_Source_Node_In_Sequence.
11962 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11963 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11964 parens and blank in string (this was inconsistently implemented).
11965 * errout.ads
11966 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11967 blank in string (this was inconsistently implemented).
11968 * gnat1drv.adb
11969 (Set_Global_Switches): Set formal mode switches appropriately
11970 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11971 * par-prag.adb
11972 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11973 call Set_Error_Msg_Lang to set "spark" as language name.
11974 * par.adb: Remove unnecessary call to set formal language for errout
11975 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11976 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11977 name.
11978 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11979 calls to it, moved after resolution so that types are known
11980 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11981 result of concatenation is not of type String
11982 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11983 concatenation is not properly restricted
11984 * gnat_rm.texi: Add doc on pragma Spark_95.
11985 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11986 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11987 * gcc-interface/Make-lang.in: Update dependencies.
11988
05dbd302
AC
119892011-08-01 Javier Miranda <miranda@adacore.com>
11990
11991 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11992 condition that detects if the overridden operation must replace an
11993 existing entity.
11994
119952011-08-01 Javier Miranda <miranda@adacore.com>
11996
11997 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11998 code declarations inserted by Insert_Actions in each alternative of the
11999 N_Case_Expression node.
12000
120012011-08-01 Robert Dewar <dewar@adacore.com>
12002
12003 * sem_ch6.adb: Minor code reorganization.
12004 * sem_util.adb: Minor reformatting.
12005
af9e051f
PO
120062011-08-01 Pascal Obry <obry@adacore.com>
12007
12008 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12009 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12010
1d801f21
AC
120112011-08-01 Yannick Moy <moy@adacore.com>
12012
12013 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12014 literal or operator symbol which is prefixed
12015 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12016 mode on access attributes.
12017 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12018 that concatenation operands are properly restricted in formal mode
12019 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12020 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12021 result of the concatenation has a type different from String.
12022 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12023 Analyze_Quantified_Expression, Analyze_Slice,
12024 Analyze_Null): issue an error in formal mode on unsupported constructs
12025 * sem_ch5.adb
12026 (Analyze_Block_Statement): only issue error on source block statement
12027 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12028 function which returns the last node in a list of nodes for which
12029 Comes_From_Source returns True, if any
12030 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12031 Last_Source_Node_In_Sequence
12032 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12033 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12034 mode on unsupported constructs
12035 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12036 rest of the actions may be needed later on since the error is marked as
12037 not serious.
12038 * sinfo.ads: Typos in comments.
12039
120402011-08-01 Pascal Obry <obry@adacore.com>
12041
12042 * projects.texi: Minor editing.
12043
53beff22
YM
120442011-08-01 Yannick Moy <moy@adacore.com>
12045
12046 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12047 insertion character ~~
12048 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12049 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12050 with insertion character ~~
12051 (Set_Msg_Text): treat insertion character ~~
12052 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12053 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12054 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12055 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12056 errors related to the formal language restriction not serious
12057 (insertion character |).
12058 * par.adb (Par): set formal language for error messages if needed
12059 * sem_ch6.adb (Check_Missing_Return): take into account possible
12060 generated statements at the end of the function
12061 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12062 enumeration value to define a new pragma SPARK_95
12063 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12064 SPARK_Version): new type and variables to store the SPARK version
12065 (none by default).
12066 (SPARK_Mode): return True when SPARK_Version is set
12067 * par-prag.adb: Correct indentation
12068 (Prag): take Pragma_SPARK_95 into account
12069 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12070 into account.
12071
8d606a78
RD
120722011-08-01 Robert Dewar <dewar@adacore.com>
12073
12074 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12075 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12076 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12077
1982d5a8
PO
120782011-08-01 Pascal Obry <obry@adacore.com>
12079
12080 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12081 Target_Name to Get_Path call.
12082 (Parse_Single_Project): Likewise.
12083 (Post_Parse_Context_Clause): Likewise.
12084 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12085 Call Initialise_Project_Path with the proper Target_Name.
12086 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12087 search path.
12088 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12089 with the proper Target_Name.
12090 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12091 Part.Parse routine.
12092 (Parse_Project_And_Apply_Config): Likewise.
12093 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12094 This is fine as this part of the code is supporting only native
12095 compilation.
12096 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12097 is fine as this part of the code is supporting only native compilation.
12098
0d53d36b
AC
120992011-08-01 Yannick Moy <moy@adacore.com>
12100
12101 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12102 of homonym, unless the homonym is one of the cases allowed in SPARK
12103 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12104 package declaration occurring after a body.
12105
121062011-08-01 Robert Dewar <dewar@adacore.com>
12107
12108 * checks.adb, exp_ch4.adb: Minor reformatting.
12109
121102011-08-01 Javier Miranda <miranda@adacore.com>
12111
12112 * einfo.ads (Access_Disp_Table): Fix documentation.
12113 (Dispatch_Table_Wrappers): Fix documentation.
12114
121152011-08-01 Pascal Obry <obry@adacore.com>
12116
12117 * prj-env.adb, prj-env.ads: Minor reformatting.
12118
8ed68165
AC
121192011-08-01 Yannick Moy <moy@adacore.com>
12120
12121 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12122 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12123 procedures out of these packages.
2c7f9cc0 12124 * errout.ads, errout.adb
8ed68165
AC
12125 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12126 procedures in of this package
12127 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12128 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12129 on misplaced later vs initial declarations, like in Ada 83
12130 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12131 formal mode on attribute of private type whose full type declaration
12132 is not visible
12133 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12134 package declaration inside a package specification
12135 (Analyze_Full_Type_Declaration): issue error in formal mode on
12136 controlled type or discriminant type
12137 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12138 user-defined operator means that it should come from the source
12139 (New_Overloaded_Entity): issue error in formal mode on overloaded
12140 entity.
12141 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12142
121432011-08-01 Thomas Quinot <quinot@adacore.com>
12144
12145 * atree.adb: Minor reformatting.
12146 * checks.adb: Minor reformatting.
12147
4230bdb7
AC
121482011-08-01 Vincent Celier <celier@adacore.com>
12149
12150 * s-parame-vms-ia64.ads: Fix typo in comment
12151 Minor reformatting
12152 * s-parame-vms-restrict.ads: Removed, unused.
12153
121542011-08-01 Javier Miranda <miranda@adacore.com>
12155
12156 * exp_ch3.adb
12157 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12158 * sem_ch3.adb
12159 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12160 * sem_ch3.ads, sem_ch3.adb
12161 (Is_Constant_Bound): New extended version of the subprogram that was
12162 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12163 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12164 * sem_aux.ads (Constant_Value): Fix typo in comment.
12165 * checks.adb (Generate_Index_Checks): New implementation which, for
12166 array objects with constant bounds, generates the runtime check
12167 referencing the bounds of the array type. For other cases this routine
12168 provides its previous behavior obtaining such values from the array
12169 object.
12170 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12171 parent type.
12172 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12173 we cannot have semantic interpretations of the new node.
12174
2010d078
AC
121752011-08-01 Ed Schonberg <schonberg@adacore.com>
12176
12177 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12178 expressions.
12179
121802011-08-01 Arnaud Charlet <charlet@adacore.com>
12181
12182 * sem_ch8.adb: Minor code editing.
12183 * s-vxwext.adb: Remove trailing space.
12184 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12185 consistency with other files.
12186
121872011-08-01 Thomas Quinot <quinot@adacore.com>
12188
12189 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12190
121912011-08-01 Ed Schonberg <schonberg@adacore.com>
12192
12193 * par-ch10.adb: reject parameterized expressions as compilation unit.
12194 * sem_ch4.adb: handle properly conditional expression with overloaded
12195 then_clause and no else_clause.
12196
121972011-08-01 Tristan Gingold <gingold@adacore.com>
12198
12199 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12200 like done by System.Aux_DEC.
12201 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12202
daec8eeb
YM
122032011-08-01 Yannick Moy <moy@adacore.com>
12204
12205 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12206 missing label at end of declaration (subprogram or package)
12207 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12208 of positional and named parameter association
12209 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12210 Error_Msg_SP which adds a prefix to the error message giving the name
12211 of the formal language analyzed
12212 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12213 access result type in subprogram, unconstrained array as result type,.
12214 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12215 procedure
12216 * sem_ch8.adb: Code clean up.
12217
38171f43
AC
122182011-08-01 Javier Miranda <miranda@adacore.com>
12219
12220 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12221 * einfo.ads (Access_Disp_Table): Fix documentation.
12222 (Dispatch_Table_Wrappers): Fix documentation.
12223 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12224 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12225 to enforce the documentation of this attribute.
12226 (Set_Is_Interface): Cleanup the assertion.
12227 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12228 the Underlying_Type entity before reading attribute Access_Disp_Table.
12229 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12230 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12231 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12232 the Underlying_Type entity before reading attribute Access_Disp_Table.
12233 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12234 Locate the Underlying_Type entity before reading attribute
12235 Access_Disp_Table.
12236
122372011-08-01 Ed Schonberg <schonberg@adacore.com>
12238
12239 * s-poosiz.ads: Additional overriding indicators.
12240
122412011-08-01 Yannick Moy <moy@adacore.com>
12242
12243 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12244 formal mode.
12245 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12246 parameter specification does not include a subtype mark.
12247 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12248 formal mode on abstract subprogram.
12249 (Analyze_Subprogram_Specification): issue error in formal mode on
12250 user-defined operator.
12251 (Process_Formals): issue error in formal mode on access parameter and
12252 default expression.
12253 * sem_ch9.adb (Analyze_Abort_Statement,
12254 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12255 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12256 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12257 Analyze_Requeue, Analyze_Selective_Accept,
12258 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12259 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12260 issue error in formal mode on user-defined raise statement.
12261
1f250383
AC
122622011-08-01 Thomas Quinot <quinot@adacore.com>
12263
12264 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12265 declaration being hidden when overriding an implicit inherited
12266 subprogram.
12267 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12268 (-gnats), do not complain about a source file that contains only a
12269 pragma No_Body.
12270
122712011-08-01 Ed Schonberg <schonberg@adacore.com>
12272
12273 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12274 variable if already set.
12275
607d0635
AC
122762011-08-01 Arnaud Charlet <charlet@adacore.com>
12277
12278 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12279 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12280 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12281 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12282 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12283 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12284 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12285 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12286 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12287 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12288 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12289 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12290 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12291 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12292 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12293 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12294 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12295 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12296 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12297 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12298 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12299 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12300 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12301 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12302 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12303 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12304 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12305 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12306 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12307 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12308 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12309 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12310 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12311 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12312 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12313 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12314 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12315 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12316 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12317 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12318 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12319 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12320 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12321 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12322 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12323 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12324 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12325 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12326 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12327 Use GNAT instead of GNARL.
12328
123292011-08-01 Bob Duff <duff@adacore.com>
12330
12331 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12332 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12333 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12334 reformatting.
12335
123362011-08-01 Yannick Moy <moy@adacore.com>
12337
12338 * debug.adb (d.D) reverve flag for the SPARK mode
12339 (d.E) reverve flag for SPARK generation mode
12340 (d.F) reverve flag for Why generation mode
2c7f9cc0 12341 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
12342 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12343 functions which return True when the corresponding modes are set
12344 (Formal_Language): return "spark" or "alfa" when in formal verification
12345 mode.
12346 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12347 Error_Msg to prefix the error message with a tag giving the formal
12348 language
12349 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12350 message with a tag giving the formal language
12351 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12352 block statement
12353 (Analyze_Case_Statement): issue error in formal mode on case statement
12354 with a single "others" case alternative
12355 (Analyze_Exit_Statement): issue errors in formal mode on exit
12356 statements which do not respect SPARK restrictions
12357 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12358 (Check_Unreachable_Code): always issue an error (not a warning) in
12359 formal mode on unreachable code (concerns both code after an infinite
12360 loop and after an unconditional jump, both not allowed in SPARK)
12361 * sem_ch6.adb (Analyze_Return_Statement): add call to
12362 Set_Return_Present for a procedure containing a return statement
12363 (already done for functions in Analyze_Function_Return)
12364 (Analyze_Function_Return): issue error in formal mode on extended
12365 return or if return is not last statement in function
12366 (Check_Missing_Return): issue error in formal mode if function does
12367 not end with return or if procedure contains a return
12368 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12369 function to detect if there is an inner scope of its parameter S which
12370 is a loop.
12371
123722011-08-01 Thomas Quinot <quinot@adacore.com>
12373
12374 * sem_ch6.ads: Minor reformatting.
12375
d8b3ccb9
AC
123762011-08-01 Javier Miranda <miranda@adacore.com>
12377
12378 * sem_util.adb (Abstract_Interface_List): Complete condition when
12379 processing private type declarations to avoid reading unavailable
12380 attribute.
12381 (Is_Synchronized_Tagged_Type): Complete condition when processing
12382 private extension declaration nodes to avoid reading unavailable
12383 attribute.
12384
123852011-08-01 Thomas Quinot <quinot@adacore.com>
12386
12387 * sem_ch3.adb: Minor reformatting.
12388
123892011-08-01 Thomas Quinot <quinot@adacore.com>
12390
12391 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12392 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12393 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12394 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12395 for VMS, instead parametrize the common implementation with
12396 System.Parameters declarations.
12397
0bb9276c
AC
123982011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12399
12400 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12401
124022011-08-01 Tristan Gingold <gingold@adacore.com>
12403
12404 * seh_init.c: Fix SEH handler installation on win64.
12405
124062011-08-01 Ed Schonberg <schonberg@adacore.com>
12407
12408 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12409 double analysis of an anonymous access to subprogram, because it can
12410 lead to improper sharing of profiles and a back-end crash.
12411
6a2e4f0b
AC
124122011-08-01 Robert Dewar <dewar@adacore.com>
12413
12414 * make.adb, sem_ch4.adb: Minor reformatting.
12415 * gcc-interface/Make-lang.in: Update dependencies.
12416 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12417
124182011-08-01 Arnaud Charlet <charlet@adacore.com>
12419
12420 * gnat_rm.texi: Fix definition of Long_Integer.
12421
124222011-08-01 Ed Schonberg <schonberg@adacore.com>
12423
12424 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12425 to prevent storage exhaustion.
12426 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12427 finalized is a function body, insert the cleanup code before the final
12428 return statement, to prevent spurious warnings.
12429 * s-pooglo.ads: add overriding indicator.
12430
4561baf7
ES
124312011-08-01 Ed Schonberg <schonberg@adacore.com>
12432
12433 * sem_ch4.adb (Operator_Check): improve error message when both a
12434 with_clause and a use_clause are needed to make operator usage legal.
12435 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12436 determine whether a compilation unit is visible within an other,
12437 either through a with_clause in the current unit, or a with_clause in
12438 its library unit or one one of its parents.
12439
383e179e
AC
124402011-08-01 Ed Schonberg <schonberg@adacore.com>
12441
12442 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12443 over an arbitrary expression of an array or container type.
12444 * lib-xref.adb: clarify comment.
12445
124462011-08-01 Bob Duff <duff@adacore.com>
12447
12448 * einfo.ads: Minor reformatting.
12449 * debug.adb: Minor comment improvement.
12450
124512011-08-01 Javier Miranda <miranda@adacore.com>
12452
12453 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12454 consider hidden subprograms as valid candidates.
12455
124562011-08-01 Arnaud Charlet <charlet@adacore.com>
12457
12458 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12459
124602011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12461
12462 * gnat_ugn.texi: Fix typo.
12463
61c161b2
AC
124642011-08-01 Robert Dewar <dewar@adacore.com>
12465
12466 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12467 lib-xref.adb: Minor reformatting
12468
124692011-08-01 Gary Dismukes <dismukes@adacore.com>
12470
12471 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12472 when to generate a call to Move_Final_List.
12473 (Has_Controlled_Parts): Remove this function.
12474
84df40f7
AC
124752011-08-01 Geert Bosch <bosch@adacore.com>
12476
12477 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12478 "," in choice list.
12479
124802011-08-01 Thomas Quinot <quinot@adacore.com>
12481
12482 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12483 explicit raise of a predefined exception as Comes_From_Source if the
12484 original N_Raise_Statement comes from source.
12485
124862011-08-01 Robert Dewar <dewar@adacore.com>
12487
12488 * sinfo.ads: Add comment.
12489 * sem_ch6.adb: Minor reformatting.
12490
124912011-08-01 Robert Dewar <dewar@adacore.com>
12492
12493 * freeze.adb (Freeze_Entity): Refine check for bad component size
12494 clause to avoid rejecting confirming clause when atomic/aliased present.
12495
124962011-08-01 Ed Schonberg <schonberg@adacore.com>
12497
12498 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12499 better determine whether an entity reference is a write.
12500 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12501 subcomponent.
12502 * lib-xref.adb (Output_References): Do no suppress a read reference at
12503 the same location as an immediately preceeding modify-reference, to
12504 handle properly in-out actuals.
12505
125062011-08-01 Tristan Gingold <gingold@adacore.com>
12507
12508 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12509
125102011-08-01 Quentin Ochem <ochem@adacore.com>
12511
12512 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12513 heap to compute the result.
12514
c7f0d2c0
AC
125152011-08-01 Robert Dewar <dewar@adacore.com>
12516
12517 * atree.ads: Minor reformatting.
12518
125192011-08-01 Emmanuel Briot <briot@adacore.com>
12520
12521 * g-expect.adb (Get_Command_Output): Fix memory leak.
12522
125232011-08-01 Geert Bosch <bosch@adacore.com>
12524
12525 * cstand.adb (P_Float_Type): New procedure to print the definition of
12526 predefined fpt types.
12527 (P_Mixed_Name): New procedure to print a name using mixed case
12528 (Print_Standard): Use P_Float_Type for printing floating point types
12529 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12530 precision IEEE float.
12531
125322011-08-01 Thomas Quinot <quinot@adacore.com>
12533
12534 * sem_ch3.adb: Minor reformatting.
12535
125362011-08-01 Ed Schonberg <schonberg@adacore.com>
12537
12538 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12539 the completion of a generic function, insert the new body rather than
12540 rewriting the original.
12541
125422011-08-01 Yannick Moy <moy@adacore.com>
12543
12544 * sinfo.ads, errout.ads: Typos in comments.
12545
1c54829e
AC
125462011-08-01 Robert Dewar <dewar@adacore.com>
12547
12548 * par-endh.adb: Minor reformatting.
12549
125502011-08-01 Robert Dewar <dewar@adacore.com>
12551
12552 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12553 (Pre_Post_Aspects): New subtype.
12554 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12555 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12556 * par-ch7.adb (P_Package): Remove Decl parameter
12557 (P_Package): Handle new syntax for aspects (before IS)
12558 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12559 new aspect syntax
12560 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12561 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12562 (P_Package): Remove Decl parameter
12563 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12564 aspects
12565 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12566 specs
12567 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12568 * sinfo.ads: Document new syntax for aspects in packages etc.
12569 * sprint.adb: Handle new syntax of aspects before IS in package
12570
125712011-08-01 Thomas Quinot <quinot@adacore.com>
12572
12573 * atree.ads: Minor reformatting.
12574 * sem_prag.adb: Minor reformatting.
12575
125762011-08-01 Robert Dewar <dewar@adacore.com>
12577
12578 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12579 case expr alternative.
12580
125812011-08-01 Ed Schonberg <schonberg@adacore.com>
12582
12583 * sem_ch12.adb: Fix typo.
12584
9eea4346
GB
125852011-08-01 Geert Bosch <bosch@adacore.com>
12586
12587 * sem_prag.adb (Check_No_Link_Name): New procedure.
12588 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12589 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12590 instead of Standard_Long_Long_Float_Size global. Preparation for
12591 eventual removal of per type constants.
12592 * exp_util.ads (Get_Stream_Size): New function returning the stream
12593 size value of subtype E.
12594 * exp_util.adb (Get_Stream_Size): Implement new function.
12595 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12596 function.
12597 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12598 * einfo.adb:
12599 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12600
3d6c3bd7
GB
126012011-08-01 Geert Bosch <bosch@adacore.com>
12602
12603 * cstand.adb: Fix comments.
12604 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12605 count of arguments.
12606
e7d897b8
AC
126072011-08-01 Robert Dewar <dewar@adacore.com>
12608
12609 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12610
126112011-08-01 Geert Bosch <bosch@adacore.com>
12612
12613 * atree.ads: Fix comment.
12614
c228a069
AC
126152011-08-01 Robert Dewar <dewar@adacore.com>
12616
12617 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12618 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12619 * par.adb: Add with for Namet.Sp.
12620 * par-tchk.adb: Minor reformatting.
12621
126222011-08-01 Vincent Celier <celier@adacore.com>
12623
12624 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12625 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12626 of the init procedure of a SAL.
12627 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12628 New procedure.
12629
126302011-08-01 Thomas Quinot <quinot@adacore.com>
12631
12632 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12633 reformatting.
12634
126352011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12636
12637 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12638
126392011-08-01 Thomas Quinot <quinot@adacore.com>
12640
12641 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12642 conformant with its spec (return True only for types that have
12643 an overriding Initialize primitive operation that prevents them from
12644 having preelaborable initialization).
12645 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12646 initialization for controlled types in Ada 2005 or later mode.
12647
857ade1b
RD
126482011-08-01 Robert Dewar <dewar@adacore.com>
12649
12650 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12651 Postcondition.
12652 (Same_Aspect): New function.
12653 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12654 Type_Invariant, Precondition, Postcondition.
12655 * snames.ads-tmpl: Add Name_Type_Invariant.
12656
bd949ee2
RD
126572011-08-01 Robert Dewar <dewar@adacore.com>
12658
12659 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12660 here.
12661 (Freeze_All_Ent): Fix error in handling inherited aspects.
12662 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12663 already analyzed, but don't skip entire processing of a declaration,
12664 that's wrong in some cases of declarations being rewritten.
12665 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12666 Don't delay for integer, string literals
12667 Treat predicates in usual manner for delay, remove special case code,
12668 not needed.
12669 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12670 (Build_Predicate_Function): Update saved expression in aspect
12671 (Build_Invariant_Procedure): Update saved expression in aspect
12672 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12673 of replacement of discriminant references if the reference is simple.
12674
f1c952af
RD
126752011-08-01 Robert Dewar <dewar@adacore.com>
12676
12677 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12678 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12679 Static_Predicate and Dynamic_Predicate.
12680 (Build_Predicate_Function): Add processing for Static_Predicate
12681 and Dynamic_Predicate.
12682 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12683 (From_Static_Predicate): New flag
12684 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12685
126862011-08-01 Robert Dewar <dewar@adacore.com>
12687
12688 * usage.adb: Documentation cleanup for Ada version modes in usage.
12689 * expander.adb: Minor reformatting.
12690
47e11d08
AC
126912011-08-01 Robert Dewar <dewar@adacore.com>
12692
12693 * atree.ads: Minor comment fix.
12694 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12695 a-witeio.ads, sem_prag.adb: Minor reformatting.
12696
126972011-08-01 Doug Rupp <rupp@adacore.com>
12698
12699 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12700 pointers. Use descrip.h header file for convenience. Add some
12701 comments.
12702
127032011-08-01 Robert Dewar <dewar@adacore.com>
12704
12705 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12706 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12707 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12708 New procedure.
12709 (Check_Aspect_At_End_Of_Declarations): New procedure
12710 (Analye_Aspect_Specification): Minor changes for above procedures
12711 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12712 specification node as well.
12713
127142011-08-01 Pascal Obry <obry@adacore.com>
12715
12716 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12717 Windows files. Use GetFilesAttributes() in this case to check for file
12718 existence instead of returning with an error code.
12719
a3a16b21
VC
127202011-08-01 Vincent Celier <celier@adacore.com>
12721
12722 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12723 High is above Source length.
12724
ff58cc69
RD
127252011-08-01 Robert Dewar <dewar@adacore.com>
12726
12727 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12728
6bb88533
AC
127292011-08-01 Robert Dewar <dewar@adacore.com>
12730
12731 * aspects.ads (Boolean_Aspects): New subtype.
12732 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12733 for derived types in cases where the parent type and derived type have
12734 aspects.
12735 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12736 with aspects when parent type also has aspects.
12737 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12738 boolean expression at this point).
12739 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12740 accordance with final decision on the Ada 2012 feature.
12741 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12742
127432011-08-01 Matthew Heaney <heaney@adacore.com>
12744
12745 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12746
060a3f28
AC
127472011-08-01 Pascal Obry <obry@adacore.com>
12748
12749 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12750 Fix Replace_Slice when High is above current string size.
12751 (Replace_Slice): Fix DL computation when High is above current
12752 string length.
12753
127542011-08-01 Gary Dismukes <dismukes@adacore.com>
12755
12756 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12757
e7f567a3
AC
127582011-08-01 Matthew Heaney <heaney@adacore.com>
12759
12760 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12761 of node.
12762
127632011-08-01 Pascal Obry <obry@adacore.com>
12764
12765 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12766 reformatting.
12767
1a265e78
AC
127682011-08-01 Ed Schonberg <schonberg@adacore.com>
12769
12770 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12771 access to protected subprograms in generic bodies.
12772 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12773 protected type, indicate that the convention of the subprogram is
12774 Convention_Protected, because it may be used in subsequent declarations
12775 within the protected declaration.
12776
127772011-08-01 Vincent Celier <celier@adacore.com>
12778
12779 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12780 and "final" procedures when the name of the library is "ada", to avoid
12781 duplicate symbols "adainit" and "adafinal" in executables.
12782
67e28ef8
ES
127832011-08-01 Ed Schonberg <schonberg@adacore.com>
12784
12785 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12786 quantified expression that appears within a postcondition and uses the
12787 Ada2012 'Result attribute.
12788
6da2ca7d
RO
127892011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12790
12791 * init.c (__gnat_error_handler): Cast reason to int.
12792 (__gnat_install_handler): Explain sa_sigaction use.
12793
7d5997c6
EB
127942011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12795
12796 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12797 subprogram has copy-in copy-out parameters, try to promote the mode of
12798 the return type if it is passed in registers.
12799
4b4cfdd5
EB
128002011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12801
12802 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12803 left operand as addressable.
12804
f3d34576
EB
128052011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12806
12807 * gcc-interface/gigi.h (build_function_stub): Remove.
12808 (build_return_expr): Likewise.
12809 (convert_vms_descriptor): Declare.
12810 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12811 (build_function_stub): Move to...
12812 * gcc-interface/utils2.c (build_return_expr): Move to...
12813 * gcc-interface/trans.c (build_function_stub): ...here.
12814 (build_return_expr): ...here.
12815 (Subprogram_Body_to_gnu): Add local variable for language_function.
12816 Disconnect the parameter attributes cache, if any, once done with it.
12817 Call end_subprog_body only after setting the end_locus.
12818 Build the stub associated with the function, if any, at the very end.
12819 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12820 variables and streamline control flow.
12821
0a6ecc08
AC
128222011-07-23 Arnaud Charlet <charlet@adacore.com>
12823
12824 PR ada/49819
12825 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12826 g-trasym-dwarf.adb.
12827
5b6d595b
RO
128282011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12829
12830 PR bootstrap/49794
12831 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12832 Assign to act.sa_sigaction.
12833 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12834 current->return_address to char * before arithmetic.
12835
94017021
RO
128362011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12837
12838 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12839 Correct argument types.
12840 Extract code from reason.
12841 (__gnat_install_handler): Assign to act.sa_sigaction.
12842
52fd02bb
EB
128432011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12844
12845 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12846 (GNAT1_OBJS): ...here.
12847
f39a9ca2
EB
128482011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12849
12850 PR ada/48711
12851 * g-socthi-mingw.adb (Fill): Fix formatting.
12852
9e36aa23
EB
12853 * gcc-interface/gigi.h: Move around comment.
12854
e3aca522
JDA
128552011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12856
12857 PR ada/46350
12858 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12859
696b1960
FW
128602011-07-14 Florian Weimer <fw@deneb.enyo.de>
12861
12862 PR ada/48711
12863 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12864
f542c405
EB
128652011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12866
12867 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12868 range comparison if Pmode is SImode.
12869
9e9bd455
LG
128702011-07-12 Laurent GUERBY <laurent@guerby.net>
12871 Eric Botcazou <ebotcazou@adacore.com>
12872
12873 * adadecode.c: Wrap up in extern "C" block.
12874 * adadecode.h: Likewise.
12875 * adaint.c: Likewise. Remove 'const' keyword.
12876 * adaint.h: Likewise.
12877 * argv.c: Likewise.
12878 * atree.h: Likewise.
12879 * cio.c: Likewise.
12880 * cstreams.c: Likewise.
12881 * env.c: Likewise.
12882 * exit.c: Likewise.
12883 * fe.h: Likewise.
12884 * final.c: Likewise.
12885 * init.c: Likewise.
12886 * initialize.c: Likewise.
12887 * link.c: Likewise.
12888 * namet.h: Likewise.
12889 * nlists.h: Likewise.
12890 * raise.c: Likewise.
12891 * raise.h: Likewise.
12892 * repinfo.h: Likewise.
12893 * seh_init.c: Likewise.
12894 * targext.c: Likewise.
12895 * tracebak.c: Likewise.
12896 * uintp.h: Likewise.
12897 * urealp.h: Likewise.
12898 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12899 * xsinfo.adb: Likewise.
12900 * xsnamest.adb: Likewise.
12901 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12902 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12903 * gcc-interface/misc.c: Likewise.
12904 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12905 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12906 ada/targext.o here...
12907 (GNAT_ADA_OBJS): ...and not here.
12908 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12909 (GNATBIND_OBJS): Reorder.
12910
7644b3c7
RH
129112011-07-07 Richard Henderson <rth@redhat.com>
12912
12913 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12914 dwarf2out_frame_init.
12915
8384ac41
EB
129162011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12917
12918 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12919
fbdd5d87
RO
129202011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12921
12922 PR target/39150
12923 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12924
1a072294
RG
129252011-07-06 Richard Guenther <rguenther@suse.de>
12926
8384ac41
EB
12927 * gcc-interface/misc.c (gnat_init): Merge calls to
12928 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
12929 Re-initialize boolean_false_node.
12930
bc712852
EB
129312011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12932 Olivier Hainque <hainque@adacore.com>
12933 Nicolas Setton <setton@adacore.com>
12934
12935 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12936 the type according to the ARTIFICIAL_P parameter.
12937 (create_type_decl): Likewise.
12938 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12939
2eb22389
EB
129402011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12941
12942 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12943 (gnatbind): Likewise.
12944
4bdaaf2f
RO
129452011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12946
12947 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12948
c020c92b
EB
129492011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12950
12951 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12952 local variable throughout. Remove useless call to Base_Type.
12953 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12954 Take it also into account for the volatileness of the field. Set the
12955 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12956
96769d32
EB
129572011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12958
12959 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12960 on a dereference built for a by-ref object if it has an address clause.
12961
7e4680c1
EB
129622011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12963
12964 * einfo.ads (Address_Taken): Document use for the second argument of
12965 Asm_Input and Asm_Output attributes.
12966 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12967 argument is an entity name, then set Address_Taken on it.
12968 <Attribute_Asm_Output>: Likewise.
12969 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12970 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12971 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12972 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12973
129742011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
12975
12976 PR middle-end/46500
12977 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12978
677f3fa8
JM
129792011-06-14 Joseph Myers <joseph@codesourcery.com>
12980
12981 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12982 (ada/utils.o): Update dependencies.
12983 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12984 ../../../libcpp/libcpp.a.
12985 * gcc-interface/utils.c: Include common/common-target.h.
12986 (process_attributes): Use targetm_common.have_named_sections.
12987
009db074
RG
129882011-06-07 Richard Guenther <rguenther@suse.de>
12989
0bad0e23
EB
12990 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12991 set_sizetype.
009db074 12992
3bfc61cf
EB
129932011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12994
0bad0e23 12995 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
12996 TREE_THIS_NOTRAP flag.
12997
5c4a1c7b
EB
129982011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12999
13000 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13001 Fix thinko.
13002
e9f57686
EB
130032011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13004
13005 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13006 constants whose full view has discriminants specially.
13007
10e4d056
EB
130082011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13009
13010 * gcc-interface/utils.c: Include diagnostic.h.
13011 (gnat_write_global_declarations): Output debug information for all
13012 global type declarations before finalizing the compilation unit.
13013 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13014
0957c029
JJ
130152011-05-25 Jakub Jelinek <jakub@redhat.com>
13016
13017 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13018
52d0a7ac
KT
130192011-05-25 Kai Tietz <ktietz@redhat.com>
13020
13021 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13022 initialization instead of const/none-const pointer assignment.
13023
1ed1641d
JM
130242011-05-24 Joseph Myers <joseph@codesourcery.com>
13025
13026 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13027 $(EXTRA_GNAT1_OBJS).
13028 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13029 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13030 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13031 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13032 libcommon-target.a instead of prefix.o.
13033
9fe72ebd
JM
130342011-05-21 Joseph Myers <joseph@codesourcery.com>
13035
13036 PR ada/49097
0bad0e23 13037 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 13038
2691e6d7
JM
130392011-05-20 Joseph Myers <joseph@codesourcery.com>
13040
0bad0e23
EB
13041 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13042 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13043 instead of version.o.
2691e6d7 13044
bf6490b5
KT
130452011-05-18 Kai Tietz <ktietz@redhat.com>
13046
13047 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13048 boolean_false_node instead of integer_zero_node.
13049 (convert_with_check): Likewise.
13050 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13051
7bf9a5ac
EB
130522011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13053
13054 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13055 type of the parameter is an unconstrained array, convert the actual to
13056 the type of the formal in the In Out and Out cases as well.
13057
e5b00edf
NF
130582011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13059
13060 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13061 call build_function_type_array or build_varargs_function_type_array
13062 instead.
13063 (create_subprog_type): Don't call build_function_type; call
13064 build_function_type_vec instead.
13065
51545682
NF
130662011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13067
13068 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13069 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13070 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13071
c99c0026
EB
130722011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13073
f620bd21
EB
13074 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13075
c99c0026
EB
13076 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13077 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13078
3d528853
NF
130792011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13080
c99c0026 13081 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 13082
d7d058c5
NF
130832011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13084
13085 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13086 instead of accessing TYPE_ARG_TYPES directly.
13087 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13088
805e60a0
EB
130892011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13090
13091 PR ada/48844
13092 * gcc-interface/gigi.h (get_variant_part): Declare.
13093 * gcc-interface/decl.c (get_variant_part): Make global.
13094 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13095 types have the same constant size, are record types and T1 has a
13096 variant part while T2 doesn't.
13097
907a08d9
EB
130982011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13099
13100 * gcc-interface/utils.c (begin_subprog_body): Do not call
13101 get_pending_sizes.
13102 (end_subprog_body): Likewise.
13103
d35936ab
RG
131042011-05-04 Richard Guenther <rguenther@suse.de>
13105
13106 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13107 int_const_binop.
13108 (pos_to_constructor): Likewise.
13109
c1fd8753 131102011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 13111 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
13112
13113 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13114 of build_function_type. Adjust calls to...
13115 (build_raise_check): ...this. Do not take a void_tree parameter.
13116 Call build_function_type_list instead of build_function_type.
13117 Fix head comment and swap couple of conditional blocks.
13118
4fb87d2b
EB
131192011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13120
13121 * gnatvsn.ads (Library_Version): Bump to 4.7.
13122 (Current_Year): Bump to 2011.
13123
fa5e5a76
MM
131242011-04-29 Michael Matz <matz@suse.de>
13125
13126 * gcc-interface/misc.c (gnat_handle_option): Set
13127 warn_maybe_uninitialized.
13128
8d6a2f69
GP
131292011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13130
13131 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13132 the Watson/McCabe paper.
13133
770937fd
JM
131342011-04-23 Jim Meyering <meyering@redhat.com>
13135
13136 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13137
eb601ae1
EB
131382011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13139
13140 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13141 onto the new type.
13142
7d7fcb08
EB
131432011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13144
13145 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13146 parameter.
13147 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13148 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13149 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13150 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13151 <all>: Do not set flags on the reused DECL node coming from an alias.
13152 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13153 don't need debug info here...
13154 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13155 (gigi): Adjust calls to create_subprog_decl.
13156 (build_raise_check): Likewise.
13157 (establish_gnat_vms_condition_handler): Likewise.
13158 (Compilation_Unit_to_gnu): Likewise.
13159 (gnat_to_gnu): Likewise.
13160
e1876cac
EB
131612011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13162
13163 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13164 (NO_REORDER_ADAFLAGS): New variable.
13165 (EXTRA_GNATTOOLS): Always define.
13166 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13167 Clean up and adjust list of files compiled with special options.
13168 * gcc-interface/Make-lang.in: Likewise.
13169 (ada/decl.o): Cosmetical change.
13170 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13171
04695783
JM
131722011-04-20 Jim Meyering <meyering@redhat.com>
13173
13174 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13175
23399579
EB
131762011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13177
13178 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13179 $(CFLAGS) on the link line.
13180
51c5169c
EB
131812011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13182
13183 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13184 padded type built for the return type if it is unconstrained.
13185
61e46a7d
NF
131862011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13187
13188 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13189
81f653d6
NF
131902011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13191
b4867846
EB
13192 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13193 before calling TREE_CHAIN.
81f653d6
NF
13194 * gcc-interface/misc.c (gnat_init_ts): New function.
13195 (LANG_HOOKS_INIT_TS): Define.
13196
a358e188
MJ
131972011-04-12 Martin Jambor <mjambor@suse.cz>
13198
b4867846
EB
13199 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13200 instead of cgraph_node.
a358e188 13201
29b1c5a4
EB
132022011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13203
13204 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13205 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13206 mechanism.
13207
88872b00
EB
132082011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13209
13210 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13211 of aggregate types that contain a placeholder.
13212
dcf0c47e
NF
132132011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13214
13215 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 13216 TYPE_ARG_TYPES.
dcf0c47e
NF
13217 (handle_type_generic_attribute): Likewise.
13218
53e3000c
EB
132192011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13220
13221 PR ada/47163
13222 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13223
ab380bb4
KT
132242011-04-04 Kai Tietz <ktietz@redhat.com>
13225
13226 PR ada/47163
0bad0e23
EB
13227 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13228 to flag value.
ab380bb4 13229
8ffac116
EB
132302011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13231
13232 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13233 type case, do not strip a padding type around the array type.
13234
de9528f0
EB
132352011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13236
13237 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13238 types.
13239
d9d7a26c
EB
132402011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13241
13242 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13243 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 13244 code for -feliminate-unused-debug-types.
d9d7a26c
EB
13245 (gnat_post_options): Likewise.
13246
4cb12a90
EB
132472011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13248
13249 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13250 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13251 distinct copy.
13252
acccc61c
EB
132532011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13254
13255 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13256 DECL_ARTIFICIAL flag on enumeration types.
13257
583eb0c9
EB
132582011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13259
13260 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13261 fat pointer types artificial unconditionally.
13262 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13263 isn't artificial.
13264
e3edbd56
EB
132652011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13266
13267 * gcc-interface/gigi.h (get_dummy_type): Declare.
13268 (build_dummy_unc_pointer_types): Likewise.
13269 (finish_fat_pointer_type): Likewise.
13270 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13271 fat pointer type has been built, complete it in place.
13272 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13273 and thin pointers. Remove useless variable.
13274 (finish_fat_pointer_type): Make global and move to...
13275 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13276 (get_dummy_type): New function.
13277 (build_dummy_unc_pointer_types): Likewise.
13278 (gnat_pushdecl): Propage the name to the anonymous variants only.
13279 (update_pointer_to): Only adjust the pointer types in the unconstrained
13280 array case.
13281
65444786
EB
132822011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13283
13284 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13285 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13286 if this is a Taft amendment type and the full declaration is available.
13287 * gcc-interface/trans.c (process_type): Likewise.
13288 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13289 (process_freeze_entity): Likewise.
13290 * gcc-interface/utils.c (dummy_global): New static variable.
13291 (gnat_write_global_declarations): If there are types declared as used
13292 at the global level, insert them in the global hash table.
13293
1aeb40dd
EB
132942011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13295
13296 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13297 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13298 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13299 copy.
13300 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13301 flag of the type accordingly.
13302 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13303
80ec8b4c
EB
133042011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13305
13306 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13307 finalizing types when updating the pointers to the designated type.
13308 <all>: Finalize the deferred types even if we didn't defer processing
13309 of incomplete types in this invocation.
13310
2a9d769a 133112011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
13312 Nicolas Setton <setton@adacore.com>
13313 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
13314
13315 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13316 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13317
2438d7a6
KT
133182011-03-28 Kai Tietz <ktietz@redhat.com>
13319
333d8aff 13320 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
13321 Windows targets.
13322 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13323 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 13324
80ec8b4c 13325 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 13326
8ad150f6
TG
133272011-03-28 Tristan Gingold <gingold@adacore.com>
13328
13329 PR ada/44431
80ec8b4c
EB
13330 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13331 Use ada output of gnatbind.
8ad150f6
TG
13332 (ada/b_gnatb.adb): Ditto.
13333 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13334 (ada.mostlyclean, ada.stage1)
13335 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13336 (ada.stagefeedback): Adjust.
80ec8b4c 13337 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
13338 Use ada output of gnatbind.
13339 (b_gnatm.adb): Ditto.
13340 (b_gnatl.o, b_gnatm.o): New rules.
13341
51c7954d
EB
133422011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13343
13344 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13345 for the padded type built to support a specified size or alignment.
13346
6ddf9843
EB
133472011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13348
13349 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13350 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13351 unconditionally to the end of the unit when the designated type is
13352 limited_with'ed.
13353 <all>: Rename local variable. Attempt to un-defer types only and do it
13354 for limited_with'ed types as well.
13355 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13356 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13357 consistently and remove redundant call to finalize_from_with_types.
13358
5daed84a
EB
133592011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13360
13361 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13362 subprograms without a previous spec declared in the same unit.
13363 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13364 subprograms at the end of the unit instead of at the beginning.
13365 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13366 isn't public for the special handling of non-inline functions nested
13367 inside inline external functions.
13368
0edf1bb2
JL
133692011-03-25 Jeff Law <law@redhat.com>
13370
5daed84a 13371 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 13372
e3c4580e
EB
133732011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13374
13375 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13376 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13377 to compute Set_Size_Depends_On_Discriminant.
13378 (Layout_Type): Call it on array types in back-end layout mode.
13379 * sem_util.adb (Requires_Transient_Scope): Return true for array
13380 types only if the size depends on the value of discriminants.
13381 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13382 type if the RHS is a call to a function that returns an unconstrained
13383 type with default discriminant.
13384
abbc8c7b
EB
133852011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13386
13387 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13388 non-conversion to the nominal result type at the end.
13389
ddb5a105
EB
133902011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13391
13392 * gcc-interface/trans.c (create_temporary): New function taken from...
13393 (create_init_temporary): ...here. Call it.
13394 (call_to_gnu): Create the temporary for the return value early, if any.
13395 Create it for a function with copy-in/copy-out parameters if there is
13396 no target; in other cases of copy-in/copy-out, use another temporary.
13397 Push the new binding level lazily. Add and rename local variables.
13398
0d853156
EB
133992011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13400
13401 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13402 error message.
13403 (set_rm_size): Likewise.
13404
4184ef1b
EB
134052011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13406
13407 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13408 for the padded type built in order to support a specified alignment.
13409 Fix incorrect formatting.
13410
bf7eefab
EB
134112011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13412
13413 PR bootstrap/48216
13414 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13415
ef0feeb2
EB
134162011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13417
13418 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13419 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13420 to the end of the list. Adjust recursive call. Rename local variable.
13421 If REORDER is true, reorder components of the record type.
13422 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13423 components_to_record and adjust the parameter list.
13424
646f9414
EB
134252011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13426
13427 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13428 disabled, use the variable for bounds of loop iteration scheme.
13429
62d784f7
KT
134302011-03-21 Kai Tietz <ktietz@redhat.com>
13431
13432 PR target/12171
0bad0e23 13433 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 13434
f230d759
EB
134352011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13436
13437 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13438 out whether the expression is read-only. Short-circuit placeholder
13439 case and rename a couple of local variables.
13440
bb1f7929
EB
134412011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13442
13443 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13444 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13445 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13446 (convert): Deal with conversions from a smaller form type specially.
13447
400a2d24
EB
134482011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13449
13450 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13451 its argument, except for the special -I- switch.
13452
c26bc3ad
GP
134532011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13454
0bad0e23
EB
13455 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13456 "Ada Issues".
c26bc3ad 13457
07b8e910
EB
134582011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13459
13460 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13461
31a5a547
EB
134622011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13463
13464 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13465 GNAT_FORMAL.
13466 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13467 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13468 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13469 Do not generate the check directly, instead instantiate the template
13470 check present in the descriptor.
13471 (make_descriptor_field): Move around.
13472 (build_vms_descriptor32): Build a template check in the POINTER field.
13473 (build_vms_descriptor): Remove useless suffixes.
13474 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13475
dcf25f59
EB
134762011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13477
13478 PR bootstrap/47467
13479 * targext.c: Include target files if IN_RTS is defined.
13480
0418e131
RG
134812011-01-26 Richard Guenther <rguenther@suse.de>
13482
13483 PR bootstrap/47467
13484 * targext.c: Include config.h.
13485 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13486 dependency.
13487
c6eecbd8 134882011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 13489 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
13490
13491 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13492
2d3c7e4f
EB
134932011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13494
13495 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13496 end-of-case on the end label and its associated gotos, if any.
13497
0394741f
EB
134982011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13499
13500 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13501 expressions of the parameter cache within the statement group of
13502 the CICO mechanism.
13503
2a02d090 135042011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 13505 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
13506
13507 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13508 (set_end_locus_from_node): New function.
13509 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13510 make and the function end_locus.
13511 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13512 for the elaboration subprogram.
13513 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13514 set the end_locus of the expression as well.
13515
89f5e978
EB
135162011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13517
13518 PR ada/47131
13519 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13520 variables that are referenced in exception handlers volatile.
13521
13522
ad41bd84 13523\f
797103eb 13524Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
13525
13526Copying and distribution of this file, with or without modification,
13527are permitted in any medium without royalty provided the copyright
13528notice and this notice are preserved.