]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
Makefile.in (LOOSE_WARN): Delete.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
0cfaf83f
EB
12011-10-12 Eric Botcazou <ebotcazou@adacore.com>
2
3 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
4 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
5 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
6 (ADA_FLAGS_TO_PASS): Likewise.
7 (COMMON_FLAGS_TO_PASS): New.
8 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
9 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
10 (gnatlib): Use COMMON_FLAGS_TO_PASS.
11 (ada.install-common): Likewise.
12 (install-gnatlib): Likewise.
13 (install-gnatlib-obj): Likewise.
14 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
15 (gnat-cross): Delete.
16 (gnatboot): Likewise.
17 (gnatboot2): Likewise.
18 (gnatboot3): Likewise.
19 (gnatstage1): Likewise.
20 (gnatstage2): Likewise.
21 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
22 (MOST_ADAFLAGS): Likewise.
23 (LOOSE_CFLAGS): Likewise.
24 (gnat-cross): Likewise.
25 (GNATLIBFLAGS): Add -W -Wall.
26 (GNATLIBCFLAGS_FOR_C): Likewise.
27 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
28 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
29
722356ce
EB
302011-10-12 Eric Botcazou <ebotcazou@adacore.com>
31
32 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
33 (push_range_check_info): Likewise.
34 (gnat_to_gnu) <N_Code_Statement>: Likewise.
35 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
36 (gnat_invariant_expr): Likewise.
37 * gcc-interface/utils.c (compute_related_constant): Likewise.
38 (max_size): Fix handling of SAVE_EXPR.
39 (remove_conversions): Fix formatting.
40
15bf7d19
EB
412011-10-12 Eric Botcazou <ebotcazou@adacore.com>
42
43 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
44 (DECL_INDUCTION_VAR): New macro.
45 (SET_DECL_INDUCTION_VAR): Likewise.
46 * gcc-interface/gigi.h (convert_to_index_type): Declare.
47 (gnat_invariant_expr): Likewise.
48 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
49 parameter, set DECL_LOOP_PARM_P on it.
50 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
51 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
52 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
53 (struct range_check_info_d): New type.
54 (struct loop_info_d): Likewise.
55 (gnu_loop_stack): New stack.
56 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
57 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
58 is set, do not test DECL_RENAMED_OBJECT.
59 (push_range_check_info): New function.
60 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
61 the label. Reference the label and the iteration variable from it.
62 Build the special induction variable in the unsigned version of the
63 size type, if it is larger than the base type. And attach it to the
64 iteration variable if the latter isn't by-ref. In the iteration scheme
65 case, initialize the invariant conditions in front of the loop if
66 deemed profitable. Use gnu_loop_stack.
67 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
68 <N_Raise_Constraint_Error>: Always process the reason. In the range
69 check and related cases, and if loop unswitching is enabled, compute
70 invariant conditions and push this information onto the stack.
71 Do not translate again the condition if it has been already translated.
72 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
73 DECL_LOOP_PARM_P isn't set.
74 (convert_to_index_type): New function.
75 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
76 to convert the index from the base index type to sizetype.
77 (gnat_invariant_expr): New function.
78
e79983f4
MM
792011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
80
81 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
82 two parallel arrays to hold standard builtin declarations, and
83 replace it with a function based interface that can support
15bf7d19 84 creating builtins on the fly in the future.
e79983f4
MM
85 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
86 (gnat_to_gnu): Ditto.
87
228ee426
EB
882011-10-07 Eric Botcazou <ebotcazou@adacore.com>
89
90 PR lto/50492
91 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
92 * gcc-interface/utils.c (global_context): New variable.
93 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
94 that are either public external or at top level. Use "No" macro.
95 (end_subprog_body): Call decl_function_context.
96 (rest_of_subprog_body_compilation): Likewise.
97
71196d4e
EB
982011-10-07 Eric Botcazou <ebotcazou@adacore.com>
99
100 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
101 (rest_of_subprog_body_compilation): Likewise.
102 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
103 test for useless conversions by means of gnat_useless_type_conversion.
104 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
105 (language_function): Add named_ret_val and other_ret_val.
106 (f_named_ret_val): New macro.
107 (f_other_ret_val): Likewise.
108 (gigi): Call rest_of_subprog_body_compilation.
109 (struct nrv_data): New structure.
110 (is_nrv_p): New predicate.
111 (prune_nrv_r): New helper function.
112 (prune_nrv_in_block): New function.
113 (finalize_nrv_r): New helper function.
114 (finalize_nrv): New function.
115 (return_value_ok_for_nrv_p): New predicate.
116 (build_return_expr): If optimization is enabled, record candidates for
117 the Named Return Value optimization.
118 (build_function_stub): Call rest_of_subprog_body_compilation.
119 (Subprogram_Body_to_gnu): If optimization is enabled and there are
120 candidates, finalize the Named Return Value optimization.
121 Call rest_of_subprog_body_compilation.
122 (call_to_gnu): At the end, if a return value is needed, simplify the
123 result before wrapping it up in a COMPOUND_EXPR.
124 * gcc-interface/utils.c (end_subprog_body): Split into...
125 (rest_of_subprog_body_compilation): ...this. New function.
126 (gnat_useless_type_conversion): Likewise.
127
885c4871
AC
1282011-10-06 Thomas Quinot <quinot@adacore.com>
129
130 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
131 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
132 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
133 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
134 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
135 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
136 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
137 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
138
1392011-10-06 Ed Schonberg <schonberg@adacore.com>
140
141 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
142 references.
143
1442011-10-06 Matthew Heaney <heaney@adacore.com>
145
146 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
147 (Dequeue_Only_High_Priority): Protected procedure now implemented.
148
1492011-10-06 Vincent Celier <celier@adacore.com>
150
151 * g-trasym.adb: Replace old implementation with the default
152 implementation that returns list of addresses as "0x...".
153 * g-trasym.ads: Update the list of platforms with the full
154 capability. Indicate that there is a default implementation
155 for other platforms.
156 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
157 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
158 is now a default implementation for all platforms without the full
159 capability.
160
ce72a9a3
AC
1612011-10-06 Robert Dewar <dewar@adacore.com>
162
163 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
164 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
165 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
166 reorganization (use conditional expressions).
167
1682011-10-06 Robert Dewar <dewar@adacore.com>
169
170 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
171 floating divide by zero.
172
1732011-10-06 Ed Schonberg <schonberg@adacore.com>
174
175 * sem_ch6.adb: Limited interfaces that are not immutably limited
176 are OK in return statements.
177
a912d7d9
IS
1782011-09-30 Iain Sandoe <iains@gcc.gnu.org>
179
180 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
181 change to powerpc section.
182
39ffb1f9
IS
1832011-09-29 Iain Sandoe <iains@gcc.gnu.org>
184
185 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
186 across the port.
187
ffb35bbf
ES
1882011-09-27 Ed Schonberg <schonberg@adacore.com>
189
190 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
191 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
192 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
193 indefinite sets.
194 * a-coorma.ads: Minor reformmating.
195 * einfo.ads: Improve the comment describing the
196 Directly_Designated_Type function.
197 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
198 ordered maps.
199 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
200 dependencies.
201
da124b6a
AC
2022011-09-27 Robert Dewar <dewar@adacore.com>
203
204 * a-comutr.ads: Minor reformatting.
205
2062011-09-27 Ed Schonberg <schonberg@adacore.com>
207
208 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
209 iterators to multiway trees.
210
2112011-09-27 Yannick Moy <moy@adacore.com>
212
213 * debug.adb (d.D): New option for strict Alfa mode.
214 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
215 permissions as strictly as possible.
216 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
217 Alfa mode, now, interpret ranges of base types like GNAT does; in
218 strict mode, simply change the range of the implicit base Itype.
219 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
220
706a4067
AC
2212011-09-27 Robert Dewar <dewar@adacore.com>
222
223 * exp_ch9.adb: Minor comment fixes.
224
2252011-09-27 Ed Schonberg <schonberg@adacore.com>
226
227 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
228 trees.
229
05c1e7d2
AC
2302011-09-27 Eric Botcazou <ebotcazou@adacore.com>
231
232 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
233 instead of Directly_Designated_Type in the indirect array case.
234
2352011-09-27 Robert Dewar <dewar@adacore.com>
236
237 * exp_util.adb, exp_aggr.adb: Minor reformatting.
238
65e78a74
AC
2392011-09-27 Ed Schonberg <schonberg@adacore.com>
240
241 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
242 on subtype declarations.
243 * exp_aggr.adb: Minor comment update.
244
2452011-09-27 Eric Botcazou <ebotcazou@adacore.com>
246
247 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
248 test in the N_Explicit_Dereference case. Fold double logical
249 negation in the special loop case and conditionalize it on
250 Variable_Ref being true.
251
2522011-09-27 Ed Schonberg <schonberg@adacore.com>
253
254 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
255 single protected object and the selector is a discriminant or an
256 entry family, this is a non-overloaded candidate interpretation,
257 and possible primitive operations of the type must not be
258 examined.
259
2602011-09-27 Arnaud Charlet <charlet@adacore.com>
261
262 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
263
6f5add73
AC
2642011-09-27 Pascal Obry <obry@adacore.com>
265
266 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
267 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
268 Add dummy definitions for pthread_rwlock_t
269 and pthread_rwlockattr_t on all POSIX platforms.
270 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
271 reference.
272 (Finalize_Lock): Likewise.
273 (Write_Lock): Likewise.
274 (Unlock): Likewise.
275
2762011-09-27 Tristan Gingold <gingold@adacore.com>
277
278 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
279 windows 64.
280
64a63cd5
PO
2812011-09-27 Pascal Obry <obry@adacore.com>
282
283 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
284 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
285 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
286 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
287 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
288 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
289 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
290 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
291 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
292 s-taprop-posix.adb: Revert previous changes.
293 (Lock): Now a record containing the two possible lock
294 (mutex and read/write) defined in OS_Interface.
295 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
296 'R' locking policy.
297 (Initialize_Protection): Likewise.
298 (Lock): Likewise.
299 (Lock_Read_Only): Likewise.
300 (Unlock): Likewise.
301
f672a756
AC
3022011-09-27 Pascal Obry <obry@adacore.com>
303
304 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
305 OS_Interface.pthread_rwlock_t.
306
3072011-09-27 Robert Dewar <dewar@adacore.com>
308
309 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
310 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
311 sem_ch5.adb, sem_util.adb: Minor reformatting.
312
7a44cb69
PO
3132011-09-27 Pascal Obry <obry@adacore.com>
314
315 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
316 (Finalize_Lock)[RW_Lock]: Likewise.
317 (Write_Lock)[RW_Lock]: Likewise.
318 (Unlock)[RW_Lock]: Likewise.
319 (Read_Lock): Define L as RW_Lock (instead of Lock).
320 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
321 routine for r/w lock.
322 (Finalize_Lock)[RW_Lock]: Likewise.
323 (Write_Lock)[RW_Lock]: Likewise.
324 (Unlock)[RW_Lock]: Likewise.
325 (Read_Lock): Define L as RW_Lock (instead of Lock).
326
327 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
328 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
329 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
330 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
331 routine for standard lock.
332 (Finalize_Lock)[RW_Lock]: Likewise.
333 (Write_Lock)[RW_Lock]: Likewise.
334 (Unlock)[RW_Lock]: Likewise.
335 (Read_Lock): Define L as RW_Lock (instead of Lock).
336 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
337 in the record definition.
338 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
339 lock for 'R' locking policy.
340 (Initialize_Protection): Likewise.
341 (Lock): Likewise.
342 (Lock_Read_Only): Likewise.
343 (Unlock): Likewise.
344 * s-taspri-posix.ads (RW_Lock): New type defined as
345 OS_Interface.pthread_rwlock_t.
346
347 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
348 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
349 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
350 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
351
4c173b50
PO
3522011-09-27 Pascal Obry <obry@adacore.com>
353
354 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
355
3562011-09-27 Pascal Obry <obry@adacore.com>
357
358 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
359 s-osinte-hpux.ads, s-osinte-irix.ads,
360 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
361 pthread_mutex_t.
362 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
363 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
364 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
365 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
366 pthread_rwlock_destroy, pthread_rwlock_rdlock,
367 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
368
343250a6
PO
3692011-09-27 Pascal Obry <obry@adacore.com>
370
371 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
372 (RE_Id): Add RE_Lock_Read_Only.
373 (RE_Unit_Table): Likewise.
374 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
375 to lift restriction on first character. Handle now the
376 Name_Concurrent_Readers_Locking where policy character is set to
377 'R'.
378 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
379 constant.
380 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
381 read only lock for function in protected object.
382 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
383 this routine is now used.
384
2d0dd51a
EB
3852011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
386
387 * s-atocou-x86.adb (Decrement): Use %;.
388 (Increment): Likewise.
389
bdbebf66
EB
3902011-09-26 Eric Botcazou <ebotcazou@adacore.com>
391
392 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
393 dereference of the pointer to the storage area. Remove useless type
394 conversions and factor out common code.
395
1aa291f7
EB
3962011-09-26 Eric Botcazou <ebotcazou@adacore.com>
397
398 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
399 variable and use it throughout.
400 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
401 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
402 first step. Also convert to the unpadded type as a last step.
403
7d76717d
EB
4042011-09-26 Eric Botcazou <ebotcazou@adacore.com>
405
406 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
407 DECL_CHAIN in comment.
408 * gcc-interface/trans.c (gigi): Likewise.
409 (Attribute_to_gnu): Likewise.
410 (build_function_stub): Likewise.
411 (gnat_to_gnu): Likewise.
412 * gcc-interface/utils.c (create_subprog_decl): Likewise.
413 (convert_vms_descriptor64): Likewise.
414 (convert_vms_descriptor32): Likewise.
415
42acad07
EB
4162011-09-26 Eric Botcazou <ebotcazou@adacore.com>
417
418 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
419 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
420 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
421 the type of the record is TYPE_READONLY.
422
a1d72281
EB
4232011-09-26 Eric Botcazou <ebotcazou@adacore.com>
424 Robert Dewar <dewar@adacore.com>
425
426 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
427 OUT formal parameter which is of an null-exclusion access subtype.
428
a1c7d797
EB
4292011-09-26 Eric Botcazou <ebotcazou@adacore.com>
430
431 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
432 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
433 (gnat_to_gnu_param): Likewise.
434 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
435 maybe_unconstrained_array instead of doing the work manually.
436 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
437 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
438 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
439 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
440 (gnat_stabilize_reference): Likewise.
441
50179d58
EB
4422011-09-26 Eric Botcazou <ebotcazou@adacore.com>
443
444 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
445 (SET_TYPE_NULL_BOUNDS): Likewise.
446 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
447 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
448 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
449 pointer types.
450 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
451 check that the initializer is a valid constant expression for use in
452 initializing a static variable. Add missing guard.
453 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
454 (convert_to_fat_pointer): In the null fat pointer case, build a valid
455 pointer for the bounds.
456 * gcc-interface/utils2.c (compare_fat_pointers): New function.
457 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
458
ad1d36ba
EB
4592011-09-25 Eric Botcazou <ebotcazou@adacore.com>
460
461 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
462 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
463 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
464 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
465 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
466 to the indirect case.
467 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
468 the TREE_THIS_NOTRAP flag.
469
6162cec0
EB
4702011-09-25 Eric Botcazou <ebotcazou@adacore.com>
471
472 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
473 iteration scheme, always generate the do-while form if optimization
474 is enabled. Use more straightforward test at the end.
475
dee12fcd
EB
4762011-09-25 Eric Botcazou <ebotcazou@adacore.com>
477
478 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
479 XNEW instead of xmalloc. Do not build useless pointer type.
480 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
481 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
482 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
483
dea976c4
EB
4842011-09-25 Eric Botcazou <ebotcazou@adacore.com>
485
486 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
487 the alignment if this doesn't prevent BLKmode access to the object.
488
655ae828
IS
4892011-09-24 Iain Sandoe <iains@gcc.gnu.org>
490
491 * gcc-interface/Makefile.in (darwin): Do not issue the
492 '-flat_namespace' linker flag during Ada build.
493 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
494 default shared library options.
495
0e871c15
AO
4962011-09-19 Alexandre Oliva <aoliva@redhat.com>
497
498 * gcc-interface/decl.c (annotate_value): Look up expression for
499 insertion in the cache at the end.
500
1e6a52b4
AC
5012011-09-19 Arnaud Charlet <charlet@adacore.com>
502
503 * gcc-interface/Make-lang.in: Update dependencies.
504
a3068ca6
AC
5052011-09-19 Steve Baird <baird@adacore.com>
506
507 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
508 configuration pragma names so that Is_Configuration_Pragma_Name
509 will return True for Name_Annotate. Make corresponding change in
510 Pragma_Id enumeration type. This is needed to allow an Annotate
511 pragma to occur in a configuration pragma file (typically,
512 a gnat.adc file).
513 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
514 * gnat_rm.texi: Note that pragma Annotate may be used as a
515 configuration pragma.
516
5172011-09-19 Ed Schonberg <schonberg@adacore.com>
518
519 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
520 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
521
5222011-09-19 Yannick Moy <moy@adacore.com>
523
524 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
525 for expansion of set membership.
526 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
527 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
528 visible for use in Alfa expansion.
529 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
530 variable in Alfa mode.
531
5322011-09-19 Thomas Quinot <quinot@adacore.com>
533
534 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
535
5362011-09-19 Thomas Quinot <quinot@adacore.com>
537
538 * exp_ch9.adb: Minor reformatting.
539
5402011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
541
542 * freeze.adb (Build_Renamed_Body): Generic subprograms
543 instantiations cannot be poperly inlined by the compiler, do
544 not set the Body_To_Inline attribute in such cases.
545 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
546 inlining-related flags from the generic subprogram declaration.
547
5482011-09-19 Thomas Quinot <quinot@adacore.com>
549
550 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
551 (Build_Stub_Type): Remove, instead copy components from
552 System.Partition_Interface.RACW_Stub_Type.
553 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
554 (Copy_Component_List): New subprogram.
555
5562011-09-19 Yannick Moy <moy@adacore.com>
557
558 * lib-xref.adb (Generate_Reference): Ignore references to
559 constants in Standard.
560
e7fceebc
AC
5612011-09-19 Robert Dewar <dewar@adacore.com>
562
563 * err_vars.ads, errout.ads: Minor reformatting.
564
5652011-09-19 Robert Dewar <dewar@adacore.com>
566
567 * aspects.ads (Impl_Defined_Aspects): New array
568 * lib-writ.adb (No_Dependences): New name for No_Dependence
569 * restrict.adb (No_Dependences): New name for No_Dependence
570 (Check_Restriction_No_Specification_Of_Aspect): New
571 procedure.
572 (Set_Restriction_No_Specification_Of_Aspect): New procedure
573 (Restricted_Profile_Result): New variable
574 (No_Specification_Of_Aspects): New variable
575 (No_Specification_Of_Aspect_Warning): New variable
576 * restrict.ads (No_Dependences): New name for No_Dependence
577 (Check_Restriction_No_Specification_Of_Aspect): New procedure
578 (Set_Restriction_No_Specification_Of_Aspect): New procedure
579 * s-rident.ads: Add restriction
580 No_Implementation_Aspect_Specifications, this is also added to
581 the No_Implementation_Extensions profile.
582 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
583 No_Implementation_Defined_Aspects
584 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
585 * sem_prag.adb (Analyze_Aspect_Specifications): Check
586 No_Implementation_Aspects
587 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
588 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
589
5902011-09-19 Yannick Moy <moy@adacore.com>
591
592 * lib-xref.adb (Generate_Reference): Take into account multiple
593 renamings for Alfa refs.
594
5952011-09-19 Thomas Quinot <quinot@adacore.com>
596
597 * g-socthi-mingw.adb: Minor reformatting.
598
5992011-09-19 Yannick Moy <moy@adacore.com>
600
601 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
602 expansion to False in mode Alfa
603
6042011-09-19 Pascal Obry <obry@adacore.com>
605
606 * mingw32.h: Remove obsolete code needed for old versions
607 of MingW.
608
e5a163fc
RD
6092011-09-19 Robert Dewar <dewar@adacore.com>
610
611 * errout.ads: Minor reformatting.
612
6d7e5c54
AC
6132011-09-19 Ed Schonberg <schonberg@adacore.com>
614
615 * sem_ch6.adb (Analyze_Expression_Function): When the expression
616 function is transformed into a declaration and a body, insert
617 body at the end of the declarative part, to prevent premature
618 freeze actions, and preserve original specification in the
619 subprogram declaration.
620
6212011-09-19 Vincent Celier <celier@adacore.com>
622
623 * projects.texi: Minor editing.
624
99ba07a3
AC
6252011-09-19 Robert Dewar <dewar@adacore.com>
626
627 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
628 exp_aggr.adb: Minor reformatting.
629
6302011-09-19 Yannick Moy <moy@adacore.com>
631
632 * lib-xref.adb (Generate_Reference): Change entity referenced
633 to underlying object if any, or else reference to the HEAP.
634
41781043
AC
6352011-09-15 Arnaud Charlet <charlet@adacore.com>
636
637 * gcc-interface/Make-lang.in: Update dependencies.
638
804ff4c3
AC
6392011-09-15 Robert Dewar <dewar@adacore.com>
640
641 * tree_io.ads: Minor reformatting.
642 * a-intnam.ads: Fix bad header.
643
6442011-09-15 Thomas Quinot <quinot@adacore.com>
645
646 * a-exexpr-gcc.adb: Minor reformatting.
647
6482011-09-15 Yannick Moy <moy@adacore.com>
649
650 * sem_ch6.adb: Propagate information that an expression function comes
651 from source (otherwise references to this entity are not stored).
652
0b5b2bbc
AC
6532011-09-15 Robert Dewar <dewar@adacore.com>
654
655 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
656 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
657 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
658
6592011-09-15 Ed Schonberg <schonberg@adacore.com>
660
661 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
662 if the expression function is not a completion, create a
663 new specification for the generated declaration, and keep the
664 original specification in the generated body. Shorter code also
665 ensures that proper warnings are generated for unused formals
666 in all cases.
667
6682011-09-15 Sergey Rybin <rybin@adacore.com>
669
670 * tree_io.ads: Update ASIS_Version_Number because of the changes
671 in the tree structures for expression functions.
672
6732011-09-15 Arnaud Charlet <charlet@adacore.com>
674
675 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
676 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
677 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
678 (CLOCK_REALTIME): Fix wrong value on some OSes.
679 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
680
7e169899
EB
6812011-09-11 Eric Botcazou <ebotcazou@adacore.com>
682
683 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
684 to unconstrained array case, deal with each branch of a COND_EXPR.
685 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
686 a COND_EXPR in the initializer, if present.
687
819a653e
EB
6882011-09-11 Eric Botcazou <ebotcazou@adacore.com>
689
690 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
691 of an addressable type.
692 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
693 Deal with those cases for which creating a temporary is mandatory.
694
c946adde
EB
6952011-09-11 Eric Botcazou <ebotcazou@adacore.com>
696
697 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
698 this is a real formal parameter before testing whether it is by ref.
699
dddf8120
EB
7002011-09-11 Eric Botcazou <ebotcazou@adacore.com>
701
702 * gcc-interface/gigi.h (build_call_0_expr): Delete.
703 (build_call_1_expr): Likewise.
704 (build_call_2_expr): Likewise.
705 (build_call_n_expr): New prototype.
706 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
707 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
708 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
709 (Exception_Handler_to_gnu_zcx): Likewise.
710 (gnat_to_gnu): Likewise.
711 (build_binary_op_trapv): Likewise.
712 * gcc-interface/utils2.c (build_call_0_expr): Delete.
713 (build_call_1_expr): Likewise.
714 (build_call_2_expr): Likewise.
715 (build_call_n_expr): New function.
716 (build_call_raise): Use build_call_n_expr.
717 (build_call_raise_range): Likewise.
718 (build_call_raise_column): Likewise.
719 (build_call_alloc_dealloc_proc): Likewise.
720 (maybe_wrap_malloc): Likewise.
721 (maybe_wrap_free): Likewise.
722
d8e38554
EB
7232011-09-11 Eric Botcazou <ebotcazou@adacore.com>
724
725 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
726 MODIFY_EXPR.
727 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
728 the result type is null if ENABLE_CHECKING. Set operation_type at the
729 end unconditionally if not set in the previous cases.
730 Use build2 and void_type_node for MODIFY_EXPR.
731 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
732
416de7d5
EB
7332011-09-08 Eric Botcazou <ebotcazou@adacore.com>
734
735 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
736 precision when converting to or from an integral type whose precision
737 is not equal to its size.
738
88b76013
IS
7392011-09-08 Iain Sandoe <iains@gcc.gnu.org>
740
416de7d5 741 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
88b76013 742
1aeee5ad
IS
7432011-09-07 Iain Sandoe <iains@gcc.gnu.org>
744
416de7d5 745 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1aeee5ad
IS
746 implementation.
747 * system-darwin-ppc64.ads: New file.
748
f61fc398
IS
7492011-09-06 Iain Sandoe <iains@gcc.gnu.org>
750
751 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
752 reference to "-lm".
753
84ef27d3
IS
7542011-09-06 Iain Sandoe <iains@gcc.gnu.org>
755
756 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
757 size switches to the link phase for shared libs.
758
a1bf1ec7
IS
7592011-09-06 Iain Sandoe <iains@gcc.gnu.org>
760
416de7d5 761 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
a1bf1ec7
IS
762 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
763
e972fd52
AC
7642011-09-06 Arnaud Charlet <charlet@adacore.com>
765
766 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
767 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
768 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
769 New targets.
770 (TOOLS_FLAGS_TO_PASS): New.
771 (../stamp-tools): Reintroduce, to avoid merge conflicts.
772
ef417be1
RD
7732011-09-06 Robert Dewar <dewar@adacore.com>
774
775 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
776 name for Is_RM_Defined_Unit. Also several fixes to this unit.
777
0a034606
RD
7782011-09-06 Robert Dewar <dewar@adacore.com>
779
780 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
781 * s-rident.ads: New restriction No_Implementation_Units
782 (this restriction is also part of the profile
783 No_Implementation_Extensions)
784 * sem_ch10.adb (Analyze_With_Clause): Add check for
785 No_Implementation_Units restriction.
786
ebb6faaa
AC
7872011-09-06 Jerome Guitton <guitton@adacore.com>
788
789 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
790 on vThreads.
791
7922011-09-06 Thomas Quinot <quinot@adacore.com>
793
794 * s-solita.adb: Minor reformatting.
795
7962011-09-06 Ed Schonberg <schonberg@adacore.com>
797
798 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
799 is a rewriting of an expression function does not freeze previous
800 entities.
801
8022011-09-06 Robert Dewar <dewar@adacore.com>
803
804 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
805
60435286
TG
8062011-09-06 Tristan Gingold <gingold@adacore.com>
807
808 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
809 powerpc-wrs-vxworksae.
810
08f8a983
AC
8112011-09-06 Thomas Quinot <quinot@adacore.com>
812
813 * s-os_lib.ads (Spawn): Minor documentation clarification,
814 Success is True for a zero exit status.
815
8162011-09-06 Ed Schonberg <schonberg@adacore.com>
817
818 * sem_ch5.adb: Add message for common iterator error.
819
8202011-09-06 Ed Schonberg <schonberg@adacore.com>
821
822 * exp_ch3.adb (Build_Initialization_Call): If the target is a
823 selected component discriminated by a current instance, replace
824 the constraint with a reference to the target object, regardless
825 of whether the context is an init_proc.
826
8272011-09-06 Robert Dewar <dewar@adacore.com>
828
829 * exp_attr.adb: Descriptor_Size is never static.
830
8312011-09-06 Robert Dewar <dewar@adacore.com>
832
833 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
834
8352011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
836
837 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
838 non-static.
839
8402011-09-06 Ed Schonberg <schonberg@adacore.com>
841
842 * sem_res.adb (Resolve): An expression that is the body of an
843 expression function does not freeze.
844
8452011-09-06 Matthew Heaney <heaney@adacore.com>
846
847 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
848 a-cuprqu.adb: Changed copyright notice to indicate current
849 year only.
850
8512011-09-06 Vincent Celier <celier@adacore.com>
852
853 * prj.adb: Minor spelling error fix in comment
854 * sem_res.adb: Minor reformatting
855
8562011-09-06 Pascal Obry <obry@adacore.com>
857
858 * sysdep.c (winflush_nt): Removed as not needed anymore.
859 (winflush_95): Likewise.
860 (winflush_init): Likewise.
861 (winflush_function): Likewise.
862 (getc_immediate_common): Remove call to winflush_function.
863
cb3d8731
HK
8642011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
865
866 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
867 processing for Descriptor_Size.
868 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
869 to account for its broader usage.
870 * sem_attr.adb (Analyze_Attribute): Change the error detection
871 circuitry for Descriptor_Size as the attribute is now applicable
872 to all types.
873
f7e6fc47
RD
8742011-09-06 Robert Dewar <dewar@adacore.com>
875
876 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
877
f8e9fc30
AC
8782011-09-06 Ed Schonberg <schonberg@adacore.com>
879
880 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
881 in a parameter association must not set the Referenced flag on
882 the formal.
883 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
884
8852011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
886
887 * gnat_rm.texi: Add a section on attribute Descriptor_Size
888
e8e38f35
AC
8892011-09-06 Arnaud Charlet <charlet@adacore.com>
890
891 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
892 gnatlink-re): Speed up by using -j0.
893
ba759acd
AC
8942011-09-06 Yannick Moy <moy@adacore.com>
895
896 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
897 Set_Corresponding_Aspect when creating pragma from aspect.
898 (Add_Predicates): Use new field Corresponding_Aspect.
899 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
900 name when present, for the purpose of issuing error messages;
901 remove local procedure Error_Pragma_Arg_Alternate_Name.
902 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
903 N_Pragma node.
904 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
905 N_Pragma node.
906
9072011-09-06 Robert Dewar <dewar@adacore.com>
908
909 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
910
9112011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
912
913 * exp_ch6.adb (Build_Heap_Allocator): Add new
914 local variable Desig_Typ. Code and comment reformatting. Add
915 machinery to ensure that the allocation uses a fat pointer when
916 the type of the return object is a constrained array and the
917 function return type is an unconstrained array.
918
9192011-09-06 Vincent Celier <celier@adacore.com>
920
921 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
922 parameters in subprograms.
923
9242011-09-06 Arnaud Charlet <charlet@adacore.com>
925
926 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
927
9282011-09-06 Thomas Quinot <quinot@adacore.com>
929
930 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
931 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
932 subprogram.
933 (System.Tasking.Primitive_Operations.Specific.Set): If argument
934 is null, destroy task specific data, to make API consistent with
935 other platforms, and thus compatible with the shared version
936 of s-tpoaal.adb.
937 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
938 Document the above assumption.
939
f4f92d9d
AC
9402011-09-06 Ed Schonberg <schonberg@adacore.com>
941
942 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
943 variable for type of return value when return type is
944 unconstrained and context is an assignment.
945
9462011-09-06 Ed Schonberg <schonberg@adacore.com>
947
948 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
949 class-wide operation if expansion is not enabled.
950
9512011-09-06 Eric Botcazou <ebotcazou@adacore.com>
952
953 * checks.adb (Apply_Scalar_Range_Check): Deal with access
954 type prefix.
955
9562011-09-06 Yannick Moy <moy@adacore.com>
957
958 * sem_ch13.adb (Analyze_Aspect_Specifications, case
959 Aspect_Invariant): Do not issue error at this point on illegal
960 pragma placement, as this is checked later on when analyzing
961 the corresponding pragma.
962 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
963 similar to Error_Pragma_Arg, except the source name of the
964 aspect/pragma to use in warnings may be equal to parameter
965 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
966 message to distinguish source name of pragma/aspect, and whether
967 the illegality resides in the type being public, or being private
968 without a public declaration
969
9702011-09-06 Thomas Quinot <quinot@adacore.com>
971
972 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
973 size check (fd_set is implemented differently on that platform).
974
9752011-09-06 Thomas Quinot <quinot@adacore.com>
976
977 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
978 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
979 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
980 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
981 (ATCB_Allocation): New subpackage of
982 System.Tasking.Primitive_Operations, shared across all targets
983 with full tasking runtime.
984 (ATCB_Allocation.New_ATCB): Moved there (from target specific
985 s-taprop bodies).
986 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
987 taking care of establishing a local temporary ATCB if the one
988 being deallocated is Self, to avoid a reference to the freed
989 ATCB in Abort_Undefer.
990
9912011-09-06 Thomas Quinot <quinot@adacore.com>
992
993 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
994 terminated, mark it for deallocation upon termination.
995 (Terminate_Task): Call Free_Task again if the task is marked
996 for automatic deallocation upon termination.
997
df177175
RD
9982011-09-06 Robert Dewar <dewar@adacore.com>
999
1000 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1001 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1002 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1003 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1004 a-intnam-solaris.ads, a-intnam-tru64.ads,
1005 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1006 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1007 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1008 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1009 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1010 Add new profile No_Implementation_Extensions
1011 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1012 profile No_Implementation_Extensions
1013 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1014 Check violation of restriction No_Implementation_Identifiers
1015 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1016 Add entry for Name_No_Implementation_Extensions
1017
10182011-09-06 Robert Dewar <dewar@adacore.com>
1019
1020 * impunit.ads: Minor reformatting.
1021
b991dd43
AC
10222011-09-06 Robert Dewar <dewar@adacore.com>
1023
1024 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1025
10262011-09-06 Pascal Obry <obry@adacore.com>
1027
1028 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1029 types.
1030
516785cc
AC
10312011-09-06 Robert Dewar <dewar@adacore.com>
1032
1033 * g-socket.adb: Minor reformatting
1034
10352011-09-06 Javier Miranda <miranda@adacore.com>
1036
1037 * ali.adb (Scan_ALI): Add missing support to load references of
1038 entities imported from other languages.
1039 * ali.ads (Xref_Record): Adding new fields to store the language and
1040 name of an imported entity.
1041 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1042 in comment.
1043
10442011-09-06 Ed Schonberg <schonberg@adacore.com>
1045
1046 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1047 is allowed on a full type declaration if it is the completion of
1048 a private declarations.
1049 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1050 aspect is allowed on a full type declaration in the private part
1051 of a package.
1052
96691943
AC
10532011-09-06 Robert Dewar <dewar@adacore.com>
1054
1055 * sem_ch8.ads: Minor reformatting
1056
10572011-09-06 Thomas Quinot <quinot@adacore.com>
1058
1059 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1060 Guard against socket values that are not in [0;FD_SETSIZE[
1061
54bf19e4
AC
10622011-09-06 Robert Dewar <dewar@adacore.com>
1063
1064 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1065 reformatting.
1066
10672011-09-06 Arnaud Charlet <charlet@adacore.com>
1068
1069 * s-linux-alpha.ads: Minor reformatting
1070 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1071 Use sizeof instead of corresponding C defines in s-oscons template.
1072
5d42cba1
VG
10732011-09-06 Vadim Godunko <godunko@adacore.com>
1074
1075 * a-convec.ads, a-iteint.ads: Minor reformatting.
1076
77aa62e7
AC
10772011-09-06 Vincent Celier <celier@adacore.com>
1078
1079 * projects.texi: Add menus and @node lines.
1080
10812011-09-06 Ed Schonberg <schonberg@adacore.com>
1082
1083 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1084 where the return type is an unconstrained array and the context
1085 is an assignment. Optimize the case when the target of the
1086 assignment is a selected component.
1087
10882011-09-06 Arnaud Charlet <charlet@adacore.com>
1089
1090 * s-solita.adb: Update comments.
1091
10922011-09-06 Pascal Obry <obry@adacore.com>
1093
1094 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1095 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1096 * s-oscons-tmplt.c: Add support for generating pthread related
1097 types size on GNU/Linux as done for Darwin.
1098 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1099
886b5a18
AC
11002011-09-06 Robert Dewar <dewar@adacore.com>
1101
1102 * exp_ch6.adb: Fix minor typo.
1103
11042011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1105
1106 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1107 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1108 (Double_Size_Of): Alphabetized. Update the comment on usage.
1109 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1110 (Nearest_Multiple_Rounded_Up): New routine.
1111 (Size_Of): Update comment on usage. The generated expression now
1112 accounts for alignment gaps by rounding the size of the type to the
1113 nearest multiple rounded up of the type's alignment.
1114
57a3fca9
AC
11152011-09-06 Robert Dewar <dewar@adacore.com>
1116
1117 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1118
11192011-09-06 Steve Baird <baird@adacore.com>
1120
1121 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1122 derived subprograms in checking for presence of an
1123 Extra_Accessibility_Of_Result formal parameter.
1124 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1125 checking for presence of an Extra_Accessibility_Of_Result formal
1126 parameter.
1127 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1128 case where the Parameter_Associatiations attribute is already set,
1129 but set to an empty list.
1130 (Needs_Result_Accessibility_Level):
1131 Unconditionally return False. This is a temporary
1132 change, disabling the Extra_Accessibility_Of_Result
1133 mechanism.
1134 (Expand_Simple_Function_Return): Check for
1135 Extra_Accessibility_Of_Result parameter's presence instead of
1136 testing Ada_Version when generating a runtime accessibility
1137 check which makes use of the parameter.
1138
eaed0c37
AC
11392011-09-06 Ed Schonberg <schonberg@adacore.com>
1140
1141 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1142 expression in a given case alternative must be attached to the
1143 statement list of the ccrresponding case statement alternative
1144 They cannot be propagated ahead of the case statement, because
1145 the validity of the expression that generated the action may
1146 hold only for that alternative.
1147
11482011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1149
1150 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1151 (Alignment_Of): Remove the code for strict alignment targets.
1152 (Double_Alignment_Of): Removed.
1153 (Double_Size_Of): New routine.
1154 (Make_Finalize_Address_Stmts): Change the
1155 calculation of the dope's size. Update relevant comments.
1156 (Size_Of): New routine.
1157
b8a93198
AC
11582011-09-06 Steve Baird <baird@adacore.com>
1159
1160 * einfo.ads (Extra_Accessibility): Update associated comment to use
1161 the term "present" correctly ("present" just means that it is not
1162 an error to query the value of the attribute - it does not imply
1163 that the value must be non-null).
1164 (Extra_Constrained): Ditto.
1165 (Is_Visible_Formal): Ditto.
1166 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1167 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1168 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1169 * exp_ch6.adb (Expand_Call): The callee may require an
1170 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1171 < Ada_2012. This can occur if the callee is exported from a Gnat
1172 runtimes unit. Also improve a comment.
1173
11742011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1175
1176 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1177 (Alignment_Of): Rename formal parameter Some_Typ
1178 to Typ, update related comment. Use the allocator alignment on
1179 strict alignment targets such as SPARC.
1180 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1181 related comment.
1182
11832011-09-06 Gary Dismukes <dismukes@adacore.com>
1184
1185 * sem_ch9.adb (Check_Interfaces): Test
1186 Is_Limited_Type rather than Is_Limited_Record when checking that
1187 the partial view of a synchronized full view must be limited.
1188
11892011-09-06 Emmanuel Briot <briot@adacore.com>
1190
1191 * g-comlin.adb (Free): Fix memory leak.
1192
ebf494ec
RD
11932011-09-06 Robert Dewar <dewar@adacore.com>
1194
1195 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1196
63585f75
SB
11972011-09-06 Steve Baird <baird@adacore.com>
1198
1199 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1200 (Ada2012) cases described in AI05-0234 where the accessibility
1201 level of a function result is "determined by the point of
1202 call", an implicit parameter representing that accessibility
1203 level is passed in. Extra_Accessibilty_Of_Result yields this
1204 additional formal parameter. Extra_Accessibility_Of_Result
1205 is analogous to the existing Extra_Accessibility
1206 function used in the implementation of access parameters.
1207 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1208 Extra_Accessibility_Of_Result attribute.
1209 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1210 (Set_Extra_Accessibility_Of_Result): New procedure.
1211 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1212 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1213 an accessibility level literal to Natural; introduce a nested
1214 function, Make_Level_Literal, to do this.
1215 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1216 determines whether a given function (or access-to-function
1217 type) needs to have an implicitly-declared accessibility-level
1218 parameter added to its profile.
1219 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1220 previously declared in the body of Exp_Ch6.
1221 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1222 it to exp_ch6.ads.
1223 (Has_Unconstrained_Access_Discriminants): New Function; a
1224 predicate on subtype entities which returns True if the given
1225 subtype is unconstrained and has one or more access discriminants.
1226 (Expand_Call): When expanding a call to a function which takes an
1227 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1228 actual parameter value. In the case of a function call which is
1229 used to initialize an allocator, this may not be possible because
1230 the Etype of the allocator may not have been set yet. In this
1231 case, we defer passing in the parameter and handle it later in
1232 Expand_Allocator_Expression.
1233 (Expand_Simple_Function_Return): When returning from a function which
1234 returns an unconstrained subtype having at least one access
1235 discriminant, generate the accessibility check needed to ensure that
1236 the function result will not outlive any objects designated by its
1237 discriminants.
1238 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1239 description.
1240 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1241 is used to initialize an allocator, we may need to pass in "the
1242 accessibility level determined by the point of call" (AI05-0234)
1243 to the function. Expand_Call, where such actual parameters are
1244 usually generated, is too early in this case because the Etype of
1245 the allocator (which is used in determining the level to be passed
1246 in) may not have been set yet when Expand_Call executes. Instead,
1247 we generate code to pass in the appropriate actual parameter
1248 in Expand_Allocator_Expression.
1249 * sem_ch6.adb (Create_Extra_Formals): Create
1250 the new Extra_Accessibility_Of_Result formal if
1251 Needs_Result_Accessibility_Level returns True. This includes the
1252 introduction of a nested procedure, Check_Against_Result_Level.
1253
1a982c6e
AC
12542011-09-06 Arnaud Charlet <charlet@adacore.com>
1255
1256 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1257 declaration.
1258
e42bcfa3
AC
12592011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1260
1261 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1262 for the synchronization. Move the test for null from
1263 s-stposu.Allocate_Any_Controlled to this routine since the check
1264 needs to be protected too.
1265 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1266 synchronization code.
1267 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1268 explaining the context in which this routine is used.
1269 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1270 to s-finmas.Set_Finalize_Address.
1271
12722011-09-05 Ed Schonberg <schonberg@adacore.com>
1273
1274 * einfo.ads: Document that itypes have no parent field.
1275
12762011-09-05 Robert Dewar <dewar@adacore.com>
1277
1278 * rtsfind.adb (Check_CRT): Check for overloaded entity
1279 * rtsfind.ads: Document that entities to be found by rtsfind
1280 cannot be overloaded
1281 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1282 (Lock_Entries_With_Status): New name for Lock_Entries with two
1283 arguments (changed to meet rtsfind no overloading rule).
1284
544e7c17
AC
12852011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1286
1287 * s-finmas.adb (Set_Finalize_Address (Address,
1288 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1289 (Set_Finalize_Address (in out Finalization_Master,
1290 Finalize_Address_Ptr): Add synchronization code.
1291 * s-finmas.ads (Set_Finalize_Address (Address,
1292 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1293 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1294 Set_Finalize_Address for the heterogeneous case.
1295
12962011-09-05 Ed Schonberg <schonberg@adacore.com>
1297
1298 * sem_ch3.adb: Undo previous change, not suitable after all.
1299
13002011-09-05 Robert Dewar <dewar@adacore.com>
1301
1302 * einfo.ads: Minor comment clarification.
1303
0613fb33
AC
13042011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1305
1306 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1307 no longer needs to search through the entities of the return
1308 statement scope to find the _chain.
1309 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1310 (Analyze_Block_Statement): Add local variable
1311 Is_BIP_Return_Statement. Add machinery to install all entities
1312 produced by the expansion of the return object declaration.
1313 (Install_Return_Entities): New routine.
1314 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1315
13162011-09-05 Ed Schonberg <schonberg@adacore.com>
1317
1318 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1319 of subunit is incomplete.
1320 (Analyze_Proper_Body): If parent spec is not available, do not
1321 attempt analysis.
1322
5dcab3ca
AC
13232011-09-05 Ed Schonberg <schonberg@adacore.com>
1324
1325 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1326 interface type conversions, that are expanded into dereferences.
1327
13282011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1329
1330 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1331 Examine the parameter and return profile of a subprogram and swap
1332 any incomplete types coming from a limited context with their
1333 corresponding non-limited views.
1334 (Exchange_Limited_Views): New routine.
1335
13362011-09-05 Ed Schonberg <schonberg@adacore.com>
1337
1338 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1339 of internal entity to the subtype declaration, so that when
1340 entities are subsequently exchanged in a package body, the tree
1341 remains properly formatted for ASIS.
1342
8da1a312
AC
13432011-09-05 Johannes Kanig <kanig@adacore.com>
1344
1345 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1346 message.
1347 (Display_Help): display the user given help message, if available.
1348
13492011-09-05 Ed Schonberg <schonberg@adacore.com>
1350
1351 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1352 is legal if the original node is an identifier that is a
1353 parameterless function call.
1354
69b73847
PO
13552011-09-05 Pascal Obry <obry@adacore.com>
1356
1357 * prj-nmsc.adb: Minor reformatting.
1358 Add support for standalone aggregate library.
1359 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1360 * projects.texi: Fix documentation for aggregate library projects.
1361
81bf2382
AC
13622011-09-05 Robert Dewar <dewar@adacore.com>
1363
1364 * sem_ch6.adb: Minor reformatting.
1365
13662011-09-05 Matthew Gingell <gingell@adacore.com>
1367
1368 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1369 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1370 the bottom of the stack is not overwritten.
1371
13a0b1e8
AC
13722011-09-05 Thomas Quinot <quinot@adacore.com>
1373
1374 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1375
13762011-09-05 Ed Schonberg <schonberg@adacore.com>
1377
1378 * sem_ch3.adb (Access_Definition): If an access type declaration
1379 appears in a child unit, the scope of whatever anonymous type
1380 may be generated is the child unit itself.
1381
13822011-09-05 Ed Schonberg <schonberg@adacore.com>
1383
1384 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1385 Comes_From_Source on rewritten body.
1386 (Analyze_Subprogram_Body_Helper): Check that the original node for
1387 the body comes from source, when determining whether expansion
1388 of a protected operation is needed.
1389
20428725
AC
13902011-09-05 Ed Schonberg <schonberg@adacore.com>
1391
1392 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1393 a selected component and the right-hand side is a self-referential
1394 access, the proper prefix of the rewritten attribute is a copy
1395 of the left-hand side, not of its prefix.
1396
13972011-09-05 Robert Dewar <dewar@adacore.com>
1398
1399 * sem_ch5.adb: Minor reformatting.
1400 * sem_ch3.adb: Minor code clean up.
1401
14022011-09-05 Jose Ruiz <ruiz@adacore.com>
1403
1404 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1405 restriction No_Dynamic_Attachment is in effect or not should
1406 not influence the default priority associated to a protected
1407 object. With this change, when the restriction is in effect (as
1408 is the case for the Ravenscar profile) the default priority of
1409 a protected object with an interrupt handler is in the range of
1410 interrupt priorities (Default_Interrupt_Priority) as required
1411 by D.3(10).
1412
14132011-09-05 Arnaud Charlet <charlet@adacore.com>
1414
1415 * a-iteint.ads: Fix header.
1416
14172011-09-05 Vincent Celier <celier@adacore.com>
1418
1419 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1420 with a directory separator to avoid output such as:
1421 "/path/to/objauto.cgpr" has been deleted.
1422
4a1bfefb
AC
14232011-09-05 Robert Dewar <dewar@adacore.com>
1424
1425 * sem_ch3.adb: Minor reformatting.
1426
14272011-09-05 Ed Schonberg <schonberg@adacore.com>
1428
1429 * sem_ch5.adb: Better error message.
1430
14312011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1432
1433 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1434 (Expand_Array_Aggregate): Detect a special case of an aggregate
1435 which contains tasks in the context of an unexpanded return
1436 statement of a build-in-place function.
1437 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1438 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1439 which contains tasks and expand it now that the original simple
1440 return statement has been rewritten.
1441 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1442 reformatting. Do not create a chain for an extended return
1443 statement if one is already available.
1444 (Has_Activation_Chain): New routine.
1445
9ec080cb
AC
14462011-09-05 Marc Sango <sango@adacore.com>
1447
1448 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1449 the wrong test and add the correct test to detect the violation
1450 of illegal use of unconstrained string type in SPARK mode.
1451
14522011-09-05 Ed Schonberg <schonberg@adacore.com>
1453
1454 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1455 message on an iterator over an array.
1456
14572011-09-05 Robert Dewar <dewar@adacore.com>
1458
1459 * lib-xref-alfa.adb: Minor reformatting.
1460
aeae67ed
RD
14612011-09-05 Robert Dewar <dewar@adacore.com>
1462
1463 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1464 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1465
d72e7628
AC
14662011-09-05 Gary Dismukes <dismukes@adacore.com>
1467
1468 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1469
14702011-09-05 Johannes Kanig <kanig@adacore.com>
1471
1472 * lib-xref-alfa.adb: Update comments.
1473
14742011-09-05 Thomas Quinot <quinot@adacore.com>
1475
1476 * sem_res.adb: Minor reformatting
1477
0d566e01
ES
14782011-09-05 Ed Schonberg <schonberg@adacore.com>
1479
1480 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1481 present, create them now. Needed in case the return type was
1482 a limited view in the function declaration.
1483 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1484 tasks, build the activation chain for it. Pass a reference to
1485 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1486 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1487 with build_in_place calls.
1488 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1489 incomplete, inatialize its Corresponding_Record_Type component.
1490 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1491 of limited views.
1492
ec09f261
AC
14932011-09-05 Johannes Kanig <kanig@adacore.com>
1494
1495 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1496 information.
1497
14982011-09-05 Ed Schonberg <schonberg@adacore.com>
1499
1500 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1501 appears within a package specification and the token after "IS"
1502 is not a parenthesis, assume that this is an unparenthesized
1503 expression function, even if the token appears in a line by
1504 itself.
1505 * par.adb: Clarify use of Labl field of scope stack in error
1506 recovery.
1507
7109f4f5
AC
15082011-09-05 Bob Duff <duff@adacore.com>
1509
1510 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1511 conversions instead of normal type conversions in all cases where a
1512 type conversion would be illegal. In particular, use unchecked
1513 conversions when the operand types are private.
1514
15152011-09-05 Johannes Kanig <kanig@adacore.com>
1516
1517 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1518 objects of task type or protected type.
1519
66dc8075
AC
15202011-09-05 Ed Schonberg <schonberg@adacore.com>
1521
1522 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1523 function comes from source, indicate that so does its rewriting,
1524 so it is compatible with any subsequent expansion of the
1525 subprogram body (e.g. when it is a protected operation).
1526 * sem_ch4.adb: minor reformatting
1527
15282011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1529
1530 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1531 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1532 may lead to wrong ancestor package in the case of instantiated subunit
1533 bodies. If a subunit is instantiated, follow the chain of instantiations
1534 rather than the stub structure.
1535
bd38b431
AC
15362011-09-02 Robert Dewar <dewar@adacore.com>
1537
1538 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1539 * gcc-interface/Make-lang.in: Update dependencies.
1540
15412011-09-02 Marc Sango <sango@adacore.com>
1542
1543 * sem_ch3.adb (Analyze_Object_Declaration): Change
1544 comment and add additional check to differentiate constant of
1545 type string from others unconstrained type.
1546
99d520ad
ES
15472011-09-02 Ed Schonberg <schonberg@adacore.com>
1548
1549 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1550 present in incomplete type declarations to refine the error
1551 message the full declaration is in the same unit.
1552 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1553 an incomplete type, set the Premature_Use for additional message.
1554 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1555 and Premature_Use is set, place additional information at the
1556 point of premature use.
1557
5b5588dd
AC
15582011-09-02 Bob Duff <duff@adacore.com>
1559
1560 * sem_ch6.adb: (Check_Post_State): Suppress warning
1561 "postcondition refers only to pre-state" when the expression has not
1562 yet been analyzed, because it causes false alarms. This can happen when
1563 the postcondition contains a quantified expression, because those are
1564 analyzed later. This is a temporary/partial fix.
1565 (Process_Post_Conditions): Minor: change wording of warning.
1566
15672011-09-02 Marc Sango <sango@adacore.com>
1568
1569 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1570 illegal use of unconstrained string type in SPARK mode.
1571 * sem_res.adb (Analyze_Operator_Symbol): Set the
1572 right place where the string operand of concatenation should be
1573 violate in SPARK mode.
1574
bd603506
RD
15752011-09-02 Robert Dewar <dewar@adacore.com>
1576
1577 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1578 exp_ch3.adb: Minor reformatting.
1579
24a120ac
AC
15802011-09-02 Vincent Celier <celier@adacore.com>
1581
1582 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1583 as the compiler driver so Is_Compilable returns True for sources.
1584 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1585 for the body.
1586
15872011-09-02 Ed Schonberg <schonberg@adacore.com>
1588
1589 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1590 condition, a reference to a controlling formal must be interpreted
1591 as having the class-wide type (or an access to such) so that the
1592 inherited condition can be properly applied to any overriding
1593 operation (see ARM12 6.6.1 (7)).
1594
15952011-09-02 Tristan Gingold <gingold@adacore.com>
1596
1597 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1598 for LIB$GETSYI.
1599
16002011-09-02 Javier Miranda <miranda@adacore.com>
1601
1602 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1603 initializing expression of a class-wide interface object declaration
1604 if its type is limited.
1605
16062011-09-02 Johannes Kanig <kanig@adacore.com>
1607
1608 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1609 literals, take into account the type name; the type is *not*
1610 the scope for an enumeration literal.
1611
16122011-09-02 Ed Schonberg <schonberg@adacore.com>
1613
1614 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1615 to reject an overriding indicator on a user-defined Adjust
1616 subprogram for a limited controlled type.
1617
16182011-09-02 Ed Schonberg <schonberg@adacore.com>
1619
1620 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1621 for an actual that is a function call returning an unconstrained
1622 limited controlled type.
1623
16242011-09-02 Tristan Gingold <gingold@adacore.com>
1625
1626 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1627
16282011-09-02 Johannes Kanig <kanig@adacore.com>
1629
1630 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1631 from "HEAP" to __HEAP Change comment that refers to that variable
1632 * put_alfa.adb: Change comment that refers to that variable
1633
c5f5123f
AC
16342011-09-02 Robert Dewar <dewar@adacore.com>
1635
1636 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1637
16382011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1639
1640 * exp_util.adb (Extract_Renamed_Object): Renamed to
1641 Find_Renamed_Object. This routine has been reimplemented and now uses
1642 tree traversal to locate a renamed object.
1643 (Is_Aliased): Replace call to Extract_Renamed_Object with
1644 Find_Renamed_Object.
1645
16462011-09-02 Tristan Gingold <gingold@adacore.com>
1647
1648 * init.c: (__gnat_is_vms_v7): New function.
1649
16502011-09-02 Olivier Hainque <hainque@adacore.com>
1651
1652 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
1653 that have a misaligned backchain, necessarily bogus.
1654
2bfa5484
HK
16552011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1656
1657 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
1658 TSS routine Finalize_Address when compiling in Alfa mode.
1659 (Expand_Freeze_Record_Type): Do not create TSS routine
1660 Finalize_Address when compiling in Alfa mode.
1661 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
1662 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
1663 not built.
1664 (Expand_N_Allocator): Do not produce a call to
1665 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
1666 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
1667 produce a call to primitive Set_Finalize_Address in Alfa mode because
1668 Finalize_Address is not built.
1669 * exp_ch7.adb (Build_Finalization_Master): Do not create
1670 finalization masters in Afa mode since they are not needed.
1671 (Build_Finalizer): Do not create scope and library-level
1672 finalizers in Alfa mode since they are not needed.
1673 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
1674 "new" and "free" when applied to controlled objects in Alfa mode since
1675 this is not needed.
1676
7a0ddd20
AC
16772011-09-02 Vincent Celier <celier@adacore.com>
1678
1679 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
1680 only library names with the syntax of Ada identifiers, to avoid errors
1681 when compiling the binder generated files.
1682 * projects.texi: Document restriction on SAL library names
1683
16842011-09-02 Thomas Quinot <quinot@adacore.com>
1685
1686 * a-chtgbo.adb: Minor comment fix.
1687
439b6dfa
AC
16882011-09-02 Robert Dewar <dewar@adacore.com>
1689
1690 * lib-xref.adb: Minor reformatting
1691
16922011-09-02 Vincent Celier <celier@adacore.com>
1693
1694 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
1695 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
1696 --version and --help in usage.
1697 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
1698
f2404867
AC
16992011-09-02 Bob Duff <duff@adacore.com>
1700
1701 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
1702 compilers don't understand it.
1703
17042011-09-02 Gary Dismukes <dismukes@adacore.com>
1705
1706 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
1707 underlying subtype rather than its base type on the call to
1708 Build_Record_Or_Elementary_Input_Function, so that any
1709 constraints on a discriminated subtype will be available for
1710 doing the check required by AI05-0192.
1711 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1712 If the prefix subtype of the 'Input attribute is a constrained
1713 discriminated subtype, then check each constrained discriminant value
1714 against the corresponding value read from the stream.
1715
029b67ba
YM
17162011-09-02 Yannick Moy <moy@adacore.com>
1717
1718 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
1719 warnings on suspicious contracts, and enable them with -gnatwa.
1720
dc36a7e3
RD
17212011-09-02 Robert Dewar <dewar@adacore.com>
1722
1723 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
1724 reformatting.
1725
d5aa443c
AC
17262011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1727
1728 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
1729 which ensure that restriction No_Dynamic_Attachment has not been
1730 violated.
1731 (Make_Initialize_Protection): Protected types with attach or
1732 interrupt handlers must not violate restriction No_Dynamic_Attachment.
1733 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
1734 which ensures that restriction No_Dynamic_Attachment has not been
1735 violated.
1736 * sem_attr.adb: (Eval_Attribute): Transform
1737 VAX_Float_Type'First and 'Last into references to
1738 the temporaries which store the corresponding bounds. The
1739 transformation is needed since the back end cannot evaluate
1740 'First and 'Last on VAX.
1741 (Is_VAX_Float): New routine.
1742
17432011-09-02 Ed Schonberg <schonberg@adacore.com>
1744
1745 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
1746 generic unit is not intrinsic and has an explicit convention,
1747 the instance inherits it.
1748
67c86178
AC
17492011-09-02 Robert Dewar <dewar@adacore.com>
1750
1751 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
1752 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
1753
17542011-09-02 Thomas Quinot <quinot@adacore.com>
1755
1756 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
1757 Guard against a prefix that is an N_Has_Entity but has no
1758 associated entity.
1759
17602011-09-02 Yannick Moy <moy@adacore.com>
1761
1762 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
1763 references.
1764
17652011-09-02 Yannick Moy <moy@adacore.com>
1766
1767 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
1768 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
1769 contracts.
1770 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
1771 procedure looking for suspicious postconditions.
1772 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
1773 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
1774 options -gnatw.t and -gnatw.T.
1775
735ca1b9
PO
17762011-09-02 Pascal Obry <obry@adacore.com>
1777
1778 * prj.adb: Minor code refactoring. Move check for null project in
1779 Project_Changed.
1780 * projects.texi: Fix minor typos.
1781
86828d40
AC
17822011-09-02 Ed Schonberg <schonberg@adacore.com>
1783
1784 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1785 of iteration is an expression, its value must be captured in a
1786 renaming declaration, so that modification of the elements is
1787 propagated to the original container.
1788
17892011-09-02 Pascal Obry <obry@adacore.com>
1790
1791 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
1792 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
1793 prj-tree.adb: Minor reformatting and style fixes.
1794
83de674b
AC
17952011-09-02 Robert Dewar <dewar@adacore.com>
1796
1797 * s-rident.ads: Add new restriction No_Implicit_Aliasing
1798 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
1799 No_Implicit_Aliasing
1800 (Analyze_Attribute, case Address): ditto
1801 (Analyze_Attribute, case Unrestricted_Access): ditto
1802 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
1803 No_Implicit_Aliasing restriction.
1804 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
1805
18062011-09-02 Ed Schonberg <schonberg@adacore.com>
1807
1808 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
1809 is an unchecked conversion, apply test to its expression.
1810
18112011-09-02 Javier Miranda <miranda@adacore.com>
1812
1813 * sem_ch3.adb (Check_Abstract_Overriding): When
1814 traversing the chain of aliased subprograms avoid reporting a
1815 redundant error on the current entity.
1816
18172011-09-02 Sergey Rybin <rybin@adacore.com>
1818
1819 * gnat_ugn.texi: Minor clean up.
1820
18212011-09-02 Bob Duff <duff@adacore.com>
1822
1823 * s-htable.adb (Set_If_Not_Present): Use renaming
1824 instead of ":=", because the type Key is limited in the generic (even
1825 if not in the instances).
1826
2c17ca0a
AC
18272011-09-02 Robert Dewar <dewar@adacore.com>
1828
1829 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
1830 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
1831 reformatting.
1832
18332011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1834
1835 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
1836 inherited component with the enclosing derived type. Code reformatting.
1837
18382011-09-02 Gary Dismukes <dismukes@adacore.com>
1839
1840 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
1841 return done when overflow checks are enabled, since comparisons against
1842 Lor and Hir should not be done when OK1 is False.
1843
18442011-09-02 Gary Dismukes <dismukes@adacore.com>
1845
1846 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1847 Add new formal Master_Exp. When present, add that expression to the
1848 call as an extra actual.
1849 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
1850 Fmaster_Actual and in the case of a BIP call initializing a return
1851 object of an enclosing BIP function set it to a
1852 new reference to the implicit finalization master
1853 formal of the enclosing function. Fmaster_Actual is
1854 then passed to the new formal Master_Exp on the call to
1855 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
1856 initializations of Enclosing_Func to its declaration.
1857
18582011-09-02 Thomas Quinot <quinot@adacore.com>
1859
1860 * csets.ads: Minor reformatting
1861
18622011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1863
1864 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
1865 the full view of a private type coming from an instantiation.
1866 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
1867 loop to iterate over the declarations rather than use the
1868 First_Entity / Next_Entity scheme.
1869
ed32b82e
ES
18702011-09-02 Ed Schonberg <schonberg@adacore.com>
1871
1872 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
1873 X'range (N) into X'First (N) .. X'Last (N), do not share the
1874 dimension indicator N, if present. Even though it is a static
1875 constant, its source location may be modified when printing
1876 expanded code under -gnatDL, and node sharing will lead to chaos
1877 in Sprint on large files, by generating a sloc value that does
1878 not correspond to any source file.
1879
f7bb41af
AC
18802011-09-02 Bob Duff <duff@adacore.com>
1881
1882 * einfo.adb: (Has_Xref_Entry): Do not call
1883 Implementation_Base_Type. Lib.Xref has been
1884 rewritten to avoid the need for it, and it was costly.
1885 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
1886 functions in support of efficient xref.
1887 * lib-xref-alfa.adb: Misc changes related to Key component of
1888 type Xref_Entry.
1889 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
1890 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
1891 no longer does. This is the one place where it is needed.
1892
18932011-09-02 Johannes Kanig <kanig@adacore.com>
1894
1895 * g-comlin.adb (Getopt): New optional argument Concatenate to have
1896 similar interface as the other Getopt function.
1897
18982011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1899
1900 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
1901 a call to Set_Finalize_Address if there is no allocator available.
1902 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
1903 a case of allocator expansion where the allocator is not expanded but
1904 needs a custom allocate routine. Code reformatting.
1905 (Is_Finalizable_Transient): Remove local variables Has_Rens and
1906 Ren_Obj. Code reformatting.
1907 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
1908 through the use of 'reference.
1909 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
1910 as part of build-in-place expansion. They are intentionally marked as
1911 coming from source, but their parents are not.
1912
bd0bc43e
AC
19132011-09-02 Ed Schonberg <schonberg@adacore.com>
1914
1915 * sem_ch10.adb (Analyze_With_Clause): If the library unit
1916 is the generated subprogram declaration for a child unit body
1917 that acts as spec, use the original body in the with_clause,
1918 to prevent binding errors.
1919
19202011-09-02 Vincent Celier <celier@adacore.com>
1921
1922 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
1923 qualifier /MULTI_UNIT_INDEX=
1924
19252011-09-02 Johannes Kanig <kanig@adacore.com>
1926
1927 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
1928 instead of calling the callback function
1929
9fdb5d21
RD
19302011-09-02 Robert Dewar <dewar@adacore.com>
1931
1932 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
1933 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
1934
c6d5d1ac
AC
19352011-09-02 Vincent Celier <celier@adacore.com>
1936
1937 * prj-nmsc.adb: (Find_Sources): When the list of sources is
1938 explicitly declared in an extending project, do not warn if a source
1939 for an inherited naming exception is not found.
1940
19412011-09-02 Gary Dismukes <dismukes@adacore.com>
1942
1943 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
1944 expansion is inactive.
1945
19462011-09-02 Ed Schonberg <schonberg@adacore.com>
1947
1948 * sem_util.adb (Note_Possible_Modification): If the entity
1949 being modified is the renaming generated for an Ada2012 iterator
1950 element, the enclosing container or array is modified as well.
1951
2ba1a7c7
AC
19522011-09-02 Jose Ruiz <ruiz@adacore.com>
1953
1954 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
1955 Initialize): Define and initialize the
1956 mutex attributes and condition variable attributes locally.
1957
19582011-09-02 Vincent Celier <celier@adacore.com>
1959
1960 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
1961 exception replaced in an extending project.
1962 (Check_Object): No error when the other source is locally removed.
1963
19642011-09-02 Yannick Moy <moy@adacore.com>
1965
1966 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
1967 unresolved calls.
1968
d51813db
AC
19692011-08-31 Arnaud Charlet <charlet@adacore.com>
1970
1971 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
1972 run-time files.
1973 * gcc-interface/Make-lang.in: Update dependencies.
1974
9f55bc62
AC
19752011-09-01 Robert Dewar <dewar@adacore.com>
1976
1977 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
1978
19792011-09-01 Jose Ruiz <ruiz@adacore.com>
1980
1981 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
1982 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
1983 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
1984 specific for systems where their glibc version does not define the
1985 routines to handle dynamically allocated CPU sets.
1986
19872011-09-01 Vincent Celier <celier@adacore.com>
1988
1989 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
1990 prj-env.adb: Implement inheritance of naming exceptions in extending
1991 projects.
1992
d7386a7a
AC
19932011-09-01 Romain Berrendonner <berrendo@adacore.com>
1994
1995 * gnatls.adb: Display simple message instead of content of
1996 gnatlic.adl.
1997
19982011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1999
2000 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2001 access discriminant and anonymous access component scopes.
2002 (Inherit_Component): Reuse the itype of an access discriminant
2003 or anonymous access component by copying it in order to set the proper
2004 scope. This is done only when the parent and the derived type
2005 are in different scopes.
2006 (Set_Anonymous_Etype): New routine.
2007
20082011-09-01 Robert Dewar <dewar@adacore.com>
2009
2010 * a-convec.adb: Minor reformatting throughout.
2011
9d1e0e72
JR
20122011-09-01 Jose Ruiz <ruiz@adacore.com>
2013
2014 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2015 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2016 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2017 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2018 CPU_SET_S respectively because we are now using dynamically allocated
2019 CPU sets which are more portable across different glibc versions.
2020 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2021 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2022 masks dynamically according to the number of processors in the target
2023 platform.
2024 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2025 respectively, so we need to pass the size of the masks as
2026 parameters.
2027 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2028 created cpu_set_t masks
2029 with the number of processors available in the target platform,
2030 instead of static bit arrays. It enhances portability because
2031 it uses the information from the target platform.
2032 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2033 are using a restricted run-time library, use the flag
2034 Configurable_Run_Time_Mode instead of Restricted_Profile.
2035
a95be2d4
AC
20362011-09-01 Vincent Celier <celier@adacore.com>
2037
2038 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2039 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2040
20412011-09-01 Nicolas Roche <roche@adacore.com>
2042
2043 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2044 on VxWorks in kernel mode.
2045
6b81741c
AC
20462011-09-01 Jose Ruiz <ruiz@adacore.com>
2047
2048 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2049 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2050 directly the bit array.
2051 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2052 the linux macros with the same name.
2053 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2054 wrappers around the CPU_ZERO and CPU_SET linux macros.
2055
20562011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2057
2058 * exp_ch7.adb (Find_Insertion_List): Removed.
2059 (Process_Transient_Objects): Insert the declarations of the hook
2060 access type and the hook object before the associated transient object.
2061
20622011-09-01 Jose Ruiz <ruiz@adacore.com>
2063
2064 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2065 package System.Aux_Dec when using restricted run-time libraries which
2066 do not have this package.
2067
20682011-09-01 Tristan Gingold <gingold@adacore.com>
2069
2070 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2071
20722011-09-01 Bob Duff <duff@adacore.com>
2073
2074 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2075 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2076
20772011-09-01 Thomas Quinot <quinot@adacore.com>
2078
2079 * exp_ch5.adb: Minor reformatting
2080 * gnat_ugn.texi: Fix minor typos.
2081 * gcc-interface/Make-lang.in: Update dependencies.
2082
8256c1bf
AC
20832011-09-01 Robert Dewar <dewar@adacore.com>
2084
2085 * inline.adb, sem_aggr.adb: Minor reformatting.
2086
20872011-09-01 Ed Schonberg <schonberg@adacore.com>
2088
2089 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2090
d1c5f424
AC
20912011-09-01 Robert Dewar <dewar@adacore.com>
2092
2093 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2094
20952011-09-01 Bob Duff <duff@adacore.com>
2096
2097 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2098 body" the same as "in inlined body", because visibility shouldn't
2099 apply there.
2100
21012011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2102
2103 * inline.adb (Add_Inlined_Body): Refine previous change.
2104
1bb6e262
AC
21052011-09-01 Gary Dismukes <dismukes@adacore.com>
2106
2107 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2108 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2109 Test for case where call
2110 initializes an object of a return statement before testing for
2111 a constrained call, to ensure that all such cases get handled
2112 by simply passing on the caller's parameters. Also, in that
2113 case call Needs_BIP_Alloc_Form to determine whether to pass on
2114 the BIP_Alloc_Form parameter of the enclosing function rather
2115 than testing Is_Constrained. Add similar tests for the return
2116 of a BIP call to later processing to ensure consistent handling.
2117 (Needs_BIP_Alloc_Form): New utility function.
2118 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2119 a BIP_Alloc_Form formal with call to new utility function
2120 Needs_BIP_Alloc_Form.
2121
21222011-09-01 Pascal Obry <obry@adacore.com>
2123
2124 * prj-part.adb: Minor reformatting.
2125
21262011-09-01 Vincent Celier <celier@adacore.com>
2127
2128 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2129 half character in the unit name.
2130
db15225a
AC
21312011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2132
2133 * exp_ch4.adb: Minor code and comment reformatting.
2134
21352011-09-01 Thomas Quinot <quinot@adacore.com>
2136
2137 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2138 for Is_Limited_Type and Is_Tagged_Type in condition checking
2139 for by-reference type.
2140 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2141 subprograms may have a completion because of a previous
2142 Inline_Always clause, but the enclosing package must be marked
2143 inlined for the subprogram body to become visible to the backend.
2144
9d641fc0
TQ
21452011-09-01 Thomas Quinot <quinot@adacore.com>
2146
2147 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2148
dbe36d67
AC
21492011-09-01 Pascal Obry <obry@adacore.com>
2150
2151 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2152
21532011-09-01 Ed Schonberg <schonberg@adacore.com>
2154
2155 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2156 the formals of a subprogram stub that acts as a spec.
2157
21582011-09-01 Ed Schonberg <schonberg@adacore.com>
2159
2160 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2161 type, declare a renaming for it, not an object declaration.
2162
f5037886
AC
21632011-09-01 Yannick Moy <moy@adacore.com>
2164
2165 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2166 Ignore_Errors to ignore failures to read ALI files when True.
2167
21682011-09-01 Javier Miranda <miranda@adacore.com>
2169
2170 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2171 constructor calls associated with non-tagged record types.
2172
21732011-09-01 Robert Dewar <dewar@adacore.com>
2174
2175 * g-socthi-vms.adb: Minor reformatting.
2176
21772011-09-01 Nicolas Roche <roche@adacore.com>
2178
2179 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2180 in order to avoid impact of imcompatible changes.
2181 * cstreams.c: Likewise
2182 * cio.c: Likewise
2183 * aux-io.c: Likewise
2184
21852011-09-01 Yannick Moy <moy@adacore.com>
2186
2187 * lib-writ.adb (Write_With_Lines): Always output complete information
2188 on "with" line in Alfa mode, as this is required by formal verification
2189 back-end.
2190
549e4558
AC
21912011-09-01 Tristan Gingold <gingold@adacore.com>
2192
2193 * g-socthi-vms.adb: Add comments.
2194
21952011-09-01 Pascal Obry <obry@adacore.com>
2196
2197 * prj.ads: Minor reformatting.
2198
70c0422d
AC
21992011-09-01 Vincent Celier <celier@adacore.com>
2200
2201 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2202 exceptions in the config pragmas file.
2203
22042011-09-01 Tristan Gingold <gingold@adacore.com>
2205
2206 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2207
8c5b03a0
AC
22082011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2209
2210 * exp_ch7.adb (Find_Insertion_List): New routine.
2211 (Process_Transient_Objects): Add code to handle the abnormal
2212 finalization of a controlled transient associated with a subprogram
2213 call. Since transients are cleaned up right after the associated
2214 context, an exception raised during a subprogram call may bypass the
2215 finalization code.
2216
22172011-09-01 Robert Dewar <dewar@adacore.com>
2218
2219 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2220 aliased.
2221
3040dbd4
RD
22222011-09-01 Robert Dewar <dewar@adacore.com>
2223
2224 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2225
fecbd779
AC
22262011-09-01 Robert Dewar <dewar@adacore.com>
2227
2228 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2229
22302011-09-01 Thomas Quinot <quinot@adacore.com>
2231
2232 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2233 GNATRTL_NONTASKING_OBJS.
2234
22352011-09-01 Robert Dewar <dewar@adacore.com>
2236
2237 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2238 possibility of this flag being set for formals in Ada 2012 mode.
2239 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2240 2012.
2241 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2242 mode.
2243 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2244 Ada 2012.
2245 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2246 Ada 2012.
2247
22482011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2249
2250 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2251 insertion node in a tree of nested Expression_With_Actions nodes.
2252 (Process_Transient_Object): In the case where a complex if statement
2253 has been converted into nested Expression_With_Actions nodes, the
2254 "hook" object and the associated access type must be inserted before
2255 the top most Expression_With_Actions.
2256
516f608f
AC
22572011-09-01 Robert Dewar <dewar@adacore.com>
2258
2259 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2260 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2261
22622011-09-01 Ed Schonberg <schonberg@adacore.com>
2263
2264 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2265
22662011-09-01 Jose Ruiz <ruiz@adacore.com>
2267
2268 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2269 aspect.
2270 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2271 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2272 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2273 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2274 Dispatching_Domains_Frozen): Move this local data to package
2275 System.Tasking because with the CPU aspect we need to have access
2276 to this data when creating the task in System.Tasking.Stages.Create_Task
2277 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2278 Move these variables from the body of
2279 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2280 we need to have access to this data when creating the task in
2281 System.Tasking.Stages.Create_Task.
2282 * s-taskin.adb (Initialize): Signal the allocation of the environment
2283 task to a CPU, if any, so that we know whether the CPU can be
2284 transferred to a different dispatching domain.
2285 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2286 is being allocated belongs to the dispatching domain where the task
2287 lives. Signal the allocation of the task to a CPU, if any, so that we
2288 know whether the CPU can be transferred to a different dispatching
2289 domain.
2290
2d42e881
ES
22912011-09-01 Ed Schonberg <schonberg@adacore.com>
2292
2293 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2294 attributes Same_Storage and Overlaps_Storage.
2295
579fda56
AC
22962011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2297
2298 * exp_strm.adb: Remove with and use clause for Opt.
2299 (Build_Array_Input_Function): Remove the version-dependent generation
2300 of the return statement. The Ada 2005 tree is now the default.
2301
23022011-09-01 Yannick Moy <moy@adacore.com>
2303
2304 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2305 it is never empty when compiling in Alfa mode.
2306
23072011-09-01 Robert Dewar <dewar@adacore.com>
2308
2309 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2310 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2311 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2312 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2313
23142011-09-01 Matthew Heaney <heaney@adacore.com>
2315
2316 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2317 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2318 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2319 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2320 unbounded queue container.
2321 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2322 bounded queue container.
2323 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2324 unbounded priority queue container.
2325 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2326 bounded priority queue container.
2327
24c34107
AC
23282011-08-31 Pascal Obry <obry@adacore.com>
2329
2330 * a-direct.adb: Do not try to create an UNC path on Windows.
2331 (Create_Path): Skip leading computer name in UNC path if any.
2332
23332011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2334
2335 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2336 version-dependent generation of the return statement. The Ada 2005 tree
2337 is now the default.
2338
23392011-08-31 Thomas Quinot <quinot@adacore.com>
2340
2341 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2342 types Stream_Element_Offset and Storage_Offset have a different native
2343 type depending on whether the platform is 32 or 64 bits. When
2344 exchanging them, always convert to 64 bits.
2345
23462011-08-31 Yannick Moy <moy@adacore.com>
2347
2348 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2349 --force-alfa to gnat2why.
2350
23512011-08-31 Ed Schonberg <schonberg@adacore.com>
2352
2353 * sem_ch12.adb (Save_References): If the node has aspects, save
2354 references within the corresponding expressions in a separate step,
2355 because the aspects are not directly in the tree for the declaration
2356 to which they belong.
2357
23582011-08-31 Arnaud Charlet <charlet@adacore.com>
2359
2360 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2361 in CodePeer mode, since representation clauses are partially ignored.
2362 * gcc-interface/Make-lang.in: Update dependencies.
2363
702d2020
AC
23642011-08-31 Jose Ruiz <ruiz@adacore.com>
2365
2366 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2367 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2368 to any dispatching domain.
2369
23702011-08-31 Thomas Quinot <quinot@adacore.com>
2371
2372 * exp_ch4.adb: Minor reformatting.
2373
23742011-08-31 Bob Duff <duff@adacore.com>
2375
2376 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2377 on nodes for which it is not defined.
2378 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2379 parent type.
2380
23812011-08-31 Bob Duff <duff@adacore.com>
2382
2383 * sem_ch3.adb (Process_Full_View): Disable legality check if
2384 In_Instance, to avoid spurious errors.
2385 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2386 if In_Instance, to avoid spurious errors.
2387
23882011-08-31 Pascal Obry <obry@adacore.com>
2389
2390 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2391 directory speparators.
2392 (Compose): Use Dir_Seps to handle both forms.
2393 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2394 changes.
2395 (Extension): Use Dir_Seps to handle both forms.
2396
23972011-08-31 Pascal Obry <obry@adacore.com>
2398
2399 * prj-conf.adb: Minor reformatting.
2400
67645bde
AC
24012011-08-31 Jose Ruiz <ruiz@adacore.com>
2402
2403 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2404 dispatching domain aspect.
2405 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2406 aspect.
2407 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2408 Dispatching_Domain aspect in a similar way as we do for the Priority
2409 aspect.
2410 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2411 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2412 is present.
2413 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2414 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2415 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2416 Dispatching_Domain and add it to the task definition.
2417 (Sig_Flags): Add Pragma_Dispatching_Domain.
2418 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2419 support to find the types Dispatching_Domain and
2420 Dispatching_Domain_Access.
2421 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2422 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2423 query the availability of a pragma Dispatching_Domain.
2424 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2425 the expander to pass the Dispatching_Domain when creating a task.
2426 (Name_Dispatching_Domain): Add this new name for a pragma.
2427 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2428 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2429 task has been allocated at creation time.
2430 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2431 Ravenscar is always null.
2432 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2433 the task has been allocated at creation time.
2434 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2435 a specific dispatching domain.
2436 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2437 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2438 and CPU are specified for the task, and the CPU value is not contained
2439 within the range of processors for the domain.
2440
24412011-08-31 Vincent Celier <celier@adacore.com>
2442
2443 * make.adb (Original_Gcc) : New constant String_Access.
2444 (Gnatmake): For VM targets, do not use VM version of the compiler if
2445 --GCC= has been specified.
2446
24472011-08-31 Thomas Quinot <quinot@adacore.com>
2448
2449 * sem_ch5.adb: Minor reformatting.
2450
24512011-08-31 Ed Schonberg <schonberg@adacore.com>
2452
2453 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2454 not reanalyze it.
2455
24562011-08-31 Bob Duff <duff@adacore.com>
2457
2458 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2459 the access type is private; we don't care about privacy in expansion.
2460
24612011-08-31 Ed Schonberg <schonberg@adacore.com>
2462
2463 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2464 subcomponents tnat may be limited, because they originate in view
2465 conflicts. If the original aggregate is legal and the actuals are
2466 legal, the aggregate itself is legal.
2467
b8789727
AC
24682011-08-31 Matthew Heaney <heaney@adacore.com>
2469
2470 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2471 status.
2472
24732011-08-31 Ed Schonberg <schonberg@adacore.com>
2474
2475 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2476 errors in B tests.
2477
24782011-08-31 Jose Ruiz <ruiz@adacore.com>
2479
2480 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2481 Interrupt_Priority aspects, force the analysis of the aspect expression
2482 (when building the equivalent pragma). Otherwise, its analysis is done
2483 too late, after the task or protected object has been created.
2484 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2485 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2486 to the object declaration because they are needed in the type
2487 declaration.
2488
e0c32166
AC
24892011-08-31 Robert Dewar <dewar@adacore.com>
2490
2491 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2492 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2493 reformatting.
2494
24952011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2496
2497 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2498 if the corresponding type is malformed due to restriction violations.
2499
25002011-08-31 Robert Dewar <dewar@adacore.com>
2501
2502 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2503
25042011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2505
2506 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2507 would cause the generation of Set_Finalize_Address if the target is a
2508 VM and the designated type is not derived from [Limited_]Controlled.
2509
25102011-08-31 Arnaud Charlet <charlet@adacore.com>
2511
2512 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2513 subprogram.
2514 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2515 case of a compilation error.
2516
25172011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2518
2519 * init.c (__gnat_error_handler): Standardize the stack overflow or
2520 erroneous memory access message.
2521 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2522 or erroneous memory access message.
2523
11bc76df
AC
25242011-08-31 Robert Dewar <dewar@adacore.com>
2525
2526 * sem_ch4.adb: Minor reformatting.
2527 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2528
25292011-08-31 Thomas Quinot <quinot@adacore.com>
2530
2531 * scos.ads: Minor documentation clarification.
2532 * put_scos.adb: Do not generate SCO unit header line for a unit that
2533 has no SCO lines.
2534
876d4394
RD
25352011-08-31 Robert Dewar <dewar@adacore.com>
2536
2537 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2538
36b8f95f
AC
25392011-08-31 Tristan Gingold <gingold@adacore.com>
2540
2541 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2542 hold variables between these following subprograms.
2543 (Build_Exception_Handler, Build_Object_Declarations,
2544 Build_Raise_Statement): Use the above type as parameter.
2545 Make the above adjustments.
2546 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2547
25482011-08-31 Pascal Obry <obry@adacore.com>
2549
2550 * projects.texi: Minor reformatting.
2551
25522011-08-31 Tristan Gingold <gingold@adacore.com>
2553
2554 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2555 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2556
25572011-08-31 Ed Schonberg <schonberg@adacore.com>
2558
2559 * exp_ch5.adb: Minor code cleanup.
2560 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2561 prevent cascaded errors.
2562 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2563 variable of an iterator specification in current scope.
2564 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2565 postconditions on the stack, as they contain no return statements.
2566
25672011-08-31 Yannick Moy <moy@adacore.com>
2568
2569 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2570 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2571 call Qualify_Entity_Names.
2572 (Expand_Alfa): call Qualify_Entity_Names in more cases
2573 * lib-xref-alfa.adb: Take into account system package.
2574 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2575 CodePeer mode in which we are interested in finding bugs even if
2576 compiler cannot compile source.
2577 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2578 deferred constant.
2579
25802011-08-31 Gary Dismukes <dismukes@adacore.com>
2581
2582 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2583 denoted by the subtype mark to ensure getting the concurrent type in
2584 the case where the subtype mark denotes a private subtype of a
2585 concurrent type (needed when using -gnatc).
2586 (Process_Subtype): For the processing specific to type kinds, case on
2587 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2588 subtype denotes a private subtype whose base type is nonprivate (needed
2589 for subtypes of private fulfilled by task types when compiling with
2590 -gnatc).
2591
25922011-08-31 Gary Dismukes <dismukes@adacore.com>
2593
2594 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2595 late primitives that override interface operations when the full
2596 expander is not active, to avoid blowups in Register_Primitive when
2597 types don't have associated secondary dispatch tables.
2598
25992011-08-31 Yannick Moy <moy@adacore.com>
2600
2601 * alfa_test.adb: Code clean up.
2602
26032011-08-31 Marc Sango <sango@adacore.com>
2604
2605 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2606 by Comes_From_Source (Original_Node (N)) in order to treat also the
2607 nodes which have been rewritten.
2608 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2609 explicit dereference and slice violation in spark mode on the nodes
2610 coming only from the source code.
2611
8cf23b91
AC
26122011-08-31 Robert Dewar <dewar@adacore.com>
2613
2614 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2615 lib-xref-alfa.adb: Minor reformatting.
2616
26172011-08-31 Matthew Heaney <heaney@adacore.com>
2618
2619 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2620
26212011-08-31 Javier Miranda <miranda@adacore.com>
2622
2623 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2624 only for class-wide subprograms conflicting with entities of concurrent
2625 tagged types.
2626
26272011-08-31 Matthew Heaney <heaney@adacore.com>
2628
2629 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2630 node to null value.
2631
26322011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2633
2634 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2635 general description of the routine.
2636
26372011-08-31 Ed Schonberg <schonberg@adacore.com>
2638
2639 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2640 doubly-linked lists.
2641
0bb3bfb8
GD
26422011-08-31 Gary Dismukes <dismukes@adacore.com>
2643
2644 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
2645 check is needed for a left-hand side that is a dereference, and the
2646 base type is private without discriminants (whereas the full type does
2647 have discriminants), an extra retrieval of the underlying type may be
2648 needed in the case where the subtype is a record subtype whose base
2649 type is private. Update comments.
2650
11fa950b
AC
26512011-08-31 Javier Miranda <miranda@adacore.com>
2652
2653 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
2654 found check if there is a class-wide subprogram covering the primitive.
2655
26562011-08-31 Yannick Moy <moy@adacore.com>
2657
2658 * sem_res.adb: Further cases where full expansion test is needed,
2659 rather than expansion test.
2660
26612011-08-31 Pascal Obry <obry@adacore.com>
2662
2663 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
2664
26652011-08-31 Ed Schonberg <schonberg@adacore.com>
2666
2667 * exp_ch5.adb: Handle iterators over derived container types.
2668
26692011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2670
2671 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
2672 (Has_Anonymous_Master): New routine.
2673 (Set_Has_Anonymous_Master): New routine.
2674 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
2675 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
2676 (Current_Anonymous_Master): New routine.
2677 (Current_Unit_First_Declaration): Removed.
2678 (Current_Unit_Scope): Removed.
2679 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
2680 their objects on a per-unit heterogeneous finalization master.
2681
26822011-08-31 Matthew Heaney <heaney@adacore.com>
2683
2684 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
2685 array.
2686
26872011-08-31 Jose Ruiz <ruiz@adacore.com>
2688
2689 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
2690 when not needed.
2691
26922011-08-31 Gary Dismukes <dismukes@adacore.com>
2693
2694 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
2695 where the actual is an unexpanded call to 'Input.
2696
d2b4b3da
AC
26972011-08-31 Yannick Moy <moy@adacore.com>
2698
2699 * sem_ch4.adb: Code clean up.
2700
27012011-08-31 Yannick Moy <moy@adacore.com>
2702
2703 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
2704
27052011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2706
2707 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
2708 and TSS primitive Finalize_Address if finalization is suppressed.
2709 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
2710 primitive Finalize_Address if finalization is suppressed.
2711
27122011-08-31 Jose Ruiz <ruiz@adacore.com>
2713
2714 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
2715 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
2716 sure that the underlying task has already been created before trying
2717 to change its affinity.
2718 (Set_CPU): Use the term processor instead of CPU, as we do in
2719 Assign_Task.
2720
27212011-08-31 Vincent Celier <celier@adacore.com>
2722
2723 * prj-attr.adb: New Compiler attribute Source_File_Switches.
2724 * prj-nmsc.adb (Process_Compiler): Process attribute
2725 Source_File_Switches.
2726 * prj.ads (Language_Config): New name list component
2727 Name_Source_File_Switches.
2728 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
2729
27302011-08-31 Ed Schonberg <schonberg@adacore.com>
2731
2732 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
2733 discriminated component of an actual, expand at once to prevent
2734 ouf-of-order references with generated subtypes.
2735
27362011-08-31 Yannick Moy <moy@adacore.com>
2737
2738 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
2739 reference to operator in Alfa xrefs.
2740
27412011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2742
2743 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
2744 where the parent instance was frozen before the current instance due to
2745 the presence of a source body. Update calls to Insert_After_Last_Decl.
2746 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
2747 Update the comment which illustrates the purpose of the routine.
2748 Package instances are now frozen by source bodies which appear after
2749 the instance. This ensures that entities coming from within the
2750 instance are available for use in the said bodies.
2751 (Install_Body): Add code to handle the case where the parent instance
2752 was frozen before the current instance due to the presence of a source
2753 body. Update calls to Insert_After_Last_Decl.
2754
56812278
AC
27552011-08-31 Jose Ruiz <ruiz@adacore.com>
2756
2757 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
2758 access types.
2759 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
2760
27612011-08-31 Yannick Moy <moy@adacore.com>
2762
2763 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
2764 full-expander test.
16c3301a
AC
2765 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
2766 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
2767 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
2768 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
2769 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
2770 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
2771 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
2772 ALFA in Alfa (we dropped acronym).
56812278
AC
2773 * einfo.adb (Primitive_Operations): Correctly return list of primitive
2774 operations in a case where it returned previously No_Elist.
2775
7cda9727
RD
27762011-08-31 Robert Dewar <dewar@adacore.com>
2777
2778 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
2779 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
2780 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2781 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
2782 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
2783 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
2784 reformatting.
2785
0a190dfd
AC
27862011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2787
2788 * sem_ch12 (Check_Private_View): Revert previous change.
2789 * sem_res.adb (Conversion_Check): Do not emit the error message if the
2790 conversion is in a generic instance.
2791
27922011-08-31 Matthew Heaney <heaney@adacore.com>
2793
2794 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
2795 * a-chtgbo.adb (Free): Allow 0 as index value.
2796
27972011-08-31 Matthew Heaney <heaney@adacore.com>
2798
2799 * a-cborma.adb (Insert): Add comment to explain why no element
2800 assignment.
2801
28022011-08-31 Gary Dismukes <dismukes@adacore.com>
2803
2804 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
2805 spec discriminant is already a concurrent type, in which case just use
2806 it, otherwise fetch the Corresponding_Concurrent_Type as before.
2807
7d266442
EB
28082011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2809
2810 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
2811 system-linux-mips.ads, system-linux-mipsel.ads,
2812 system-linux-mips64el.ads, system-linux-ppc64.ads,
2813 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
2814
4f1a975c
EB
28152011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2816
2817 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
2818 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
2819 (build_unary_op): Likewise.
2820
f2991b48
EB
28212011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2822
2823 * raise-gcc.c: Do not include coretypes.h and tm.h.
2824 (setup_to_install): Remove test for compiler macro.
2825 * targext.c: Document use for the library.
2826 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
2827
10a22f43
EB
28282011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2829
2830 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
2831 the expression to the nominal type if the latter is a record type with
2832 a variant part and the type of the former is a record type without one.
2833
bfa2e39d
AC
28342011-08-30 Yannick Moy <moy@adacore.com>
2835
2836 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2837 expansion in Alfa mode.
2838 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
2839 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
2840 Alfa mode.
2841 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
2842 * sem_res.adb: Ditto.
bd34109a 2843 * gcc-interface/Make-lang.in: Update dependencies.
bfa2e39d
AC
2844
28452011-08-30 Thomas Quinot <quinot@adacore.com>
2846
2847 * g-socket.ads: Minor documentation adjustment.
2848
a0347839
AC
28492011-08-30 Robert Dewar <dewar@adacore.com>
2850
2851 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
2852
28532011-08-30 Yannick Moy <moy@adacore.com>
2854
2855 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
2856 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
2857 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
2858 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
2859 Revert change which introduced files for "light"
2860 expansion, to be replaced by a single file for Alfa expansion.
2861
3597c0e9
RD
28622011-08-30 Robert Dewar <dewar@adacore.com>
2863
2864 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
2865 Minor code reorg/reformatting.
2866
da94696d
AC
28672011-08-30 Yannick Moy <moy@adacore.com>
2868
2869 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
2870 common shorthand for (Expander_Active and not ALFA_Mode) that can be
2871 used for testing full expansion, that is active expansion not in the
2872 reduced mode for Alfa
2873 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
2874 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
2875 of the verbose (Expander_Active and not ALFA_Mode)
2876
28772011-08-30 Tristan Gingold <gingold@adacore.com>
2878
2879 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
2880 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5b8ca141
TG
2881 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
2882 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
da94696d 2883
c199ccf7
AC
28842011-08-30 Gary Dismukes <dismukes@adacore.com>
2885
2886 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
2887 access conversions to check that the conversion is a rewritten node,
2888 rather than just having Comes_From_Source set to False, which wasn't
2889 sufficient.
2890
28912011-08-30 Robert Dewar <dewar@adacore.com>
2892
2893 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
2894 g-socket.ads: Minor reformatting.
2895
28962011-08-30 Thomas Quinot <quinot@adacore.com>
2897
2898 * sem_util.adb: Minor reformatting.
2899
29002011-08-30 Tristan Gingold <gingold@adacore.com>
2901
2902 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
2903 to be compliant with the ABI.
2904
dff99e1a
AC
29052011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2906
2907 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
2908 of a designated type when the related access type is an actual in an
2909 instance. This ensures that the full view of designated type is
2910 available when inside the body of the instance.
2911
29122011-08-30 Ed Schonberg <schonberg@adacore.com>
2913
2914 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
2915 in a position to be modified, a slice is treated like an indexed
2916 component.
2917
63be2a5a
AC
29182011-08-30 Thomas Quinot <quinot@adacore.com>
2919
2920 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
2921 field tv_sec in struct timeval.
2922
29232011-08-30 Yannick Moy <moy@adacore.com>
2924
2925 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
2926 blocks of code doing full expansion, previously only guarded by
2927 Expander_Active, by anding the test that ALFA_Mode is not set
2928
29292011-08-30 Ed Schonberg <schonberg@adacore.com>
2930
2931 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
2932 add the function to the list of private dependents, for subsequent
2933 legality check on Taft amendment types.
2934 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
2935 Private_Dependents, as for other incomplete types.
2936 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
2937 Taft-amendment type is used as the return type of a function.
2938
dd54644b
JM
29392011-08-30 Javier Miranda <miranda@adacore.com>
2940
2941 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
2942 which emits an error by a call to a new routine which report the error.
2943 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
2944 entity does not cover an existing interface.
2945 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
2946 code.
2947 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
2948 protected procedures or entries whose mode is not conformant.
2949 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
2950 an error by a call to a new routine which report the error.
2951
d3ba478e
AC
29522011-08-30 Robert Dewar <dewar@adacore.com>
2953
2954 * gnat_rm.texi: Minor change.
2955 * exp_attr_light.adb: Minor reformatting.
2956
29572011-08-30 Ed Schonberg <schonberg@adacore.com>
2958
2959 * sem_ch3.adb: Patch inheritance of aspects in
2960 Complete_Private_Subtype, to avoid infinite loop.
2961
c01817d2
AC
29622011-08-30 Javier Miranda <miranda@adacore.com>
2963
2964 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
2965 been reported and a subprogram covering an interface primitive is not
2966 found then skip generating the internal entity. Done to avoid crashing
2967 the frontend.
2968 (Check_Abstract_Overriding): Change text of error of wrong formal of
2969 protected subprogram or entry. Done for consistency to emit exactly the
2970 same error reported by Check_Synchronized_Overriding. In addition, the
2971 error is restricted to protected types (bug found working on AI05-0090)
2972
29732011-08-30 Yannick Moy <moy@adacore.com>
2974
2975 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2976 expansion in Alfa mode.
2977 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
2978 * exp_light.adb, exp_light.ads: New package defining light expansion.
2979 * expander.adb (Expand): Call light expansion in Alfa mode
2980 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
2981 constructs.
2982 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
2983 constructs.
2984 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
2985 * gnat1drv.adb (Adjust_Global_Switches): Comment
2986
29872011-08-30 Yannick Moy <moy@adacore.com>
2988
2989 * lib-xref-alfa.adb: Minor refactoring.
2990
29912011-08-30 Yannick Moy <moy@adacore.com>
2992
2993 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
2994 mode.
2995 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
2996 expansion in Alfa mode.
2997 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
2998 mode.
2999
30002011-08-30 Robert Dewar <dewar@adacore.com>
3001
3002 * debug_a.adb: Update comment.
3003
996c8821
RD
30042011-08-30 Robert Dewar <dewar@adacore.com>
3005
3006 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3007 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3008 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3009 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3010
30112011-08-30 Robert Dewar <dewar@adacore.com>
3012
3013 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3014 volatile.
3015
3647ca26
HK
30162011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3017
3018 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3019 Build_Finalization_Master by supplying an insertion node and enclosing
3020 scope. In its old version, the call did not generate a finalization
3021 master.
3022 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3023 recognize anonymous access-to-controlled components. Rewrite the
3024 machinery which creates finalization masters to service anonymous
3025 access-to-controlled components of a record type. In its current state,
3026 only one heterogeneous master is necessary to handle multiple anonymous
3027 components.
3028 (Freeze_Type): Comment reformatting.
3029 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3030 RE_Unit_Table.
3031 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3032 associates TSS primitive Finalize_Address with either the master itself
3033 or with the internal hash table depending on the mode of operation of
3034 the master.
3035
6d4e4fbc
JM
30362011-08-30 Javier Miranda <miranda@adacore.com>
3037
3038 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3039 interface type then do not generate code to compare this component.
3040 Required since they have no components and their equality operator is
3041 abstract.
3042
d15f9422
AC
30432011-08-30 Steve Baird <baird@adacore.com>
3044
3045 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3046 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3047 returns the (static) accessibility level of the object. Otherwise, the
3048 same as Type_Access_Level.
3049 (Dynamic_Accessibility_Level): New function; given an expression which
3050 could occur as the rhs of an assignment to a saooaaat (i.e., an
3051 expression of an access-to-object type), return the new value for the
3052 saooaaat's associated Extra_Accessibility object.
3053 (Effective_Extra_Accessibility): New function; same as
3054 Einfo.Extra_Accessibility except that object renames are looked through.
3055 * sem_util.adb
3056 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3057 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3058 description.
3059 (Effective_Extra_Accessibility): New function; see sem_util.ads
3060 description.
3061 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3062 (Extra_Accessibility): Update comments.
3063 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3064 except RM_Size field (which is only for types) is unaffected.
3065 * einfo.adb
3066 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3067 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3068 formals.
3069 (Init_Size): Add assertion that we are not trashing the
3070 Extra_Accessibility attribute of an object.
3071 (Init_Size_Align): Add assertion that we are not trashing the
3072 Extra_Accessibility attribute of an object.
3073 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3074 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3075 differently for the type of a (non-library-level) saooaaat depending
3076 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3077 is queried in this set of changes - everything else (in particular,
3078 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3079 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3080 The special treatment of library-level saooaaats is an optimization,
3081 not required for correctnesss. This is based on the observation that the
3082 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3083 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3084 * exp_ch3.adb
3085 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3086 false for the type of a saooaaat, declare and initialize its
3087 accessibility level object and set the Extra_Accessibility attribute
3088 of the saooaaat to refer to this object.
3089 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3090 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3091 calls to Effective_Extra_Accessibility in order to support
3092 renames of saooaaats.
3093 (Expand_N_Type_Conversion): Add new local function,
3094 Has_Extra_Accessibility, and call it when determining whether an
3095 accessibility check is needed.
3096 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3097 evaluate to True (without raising an exception).
3098 * exp_ch5.adb
3099 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3100 saooaaat, update its associated Extra_Accessibility object (if
3101 it has one). This includes an accessibility check.
3102 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3103 a saooaaat, update its Extra_Accessibility object too (if it
3104 has one).
3105 (Expand_Call): Replace a couple of calls to Type_Access_Level
3106 with calls to Dynamic_Access_Level to handle cases where
3107 passing a literal (any literal) is incorrect.
3108 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3109 checks associated with "Saooaat := Some_Object'Access;"; this must
3110 be rejected if Some_Object is declared in a more nested scope
3111 than Saooaat.
3112 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3113 assignment to a saooaaat even if Is_Local_Anonymous_Access
3114 returns False for its type (indicating a 2012-style saooaaat).
3115 * sem_ch8.adb
3116 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3117 (which is only appropriate for objects, not types) with a call
3118 of Init_Object_Size_Align in order to avoid trashing the
3119 Extra_Accessibility attribute of a rename (the two attributes
3120 share storage).
3121 * sem_res.adb
3122 (Valid_Conversion) Replace six calls to Type_Access_Level with
3123 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3124 Ada2012 non-library-level saooaaat, the former returns library level
3125 while the latter returns the (static) accessibility level of the
3126 saooaaat. A type conversion to the anonymous type of a saooaaat
3127 can only occur as part of an assignment to the saooaaat, so we
3128 know that such a conversion must be in a lhs context, so Deepest
3129 yields the result that we need. If such a conversion could occur,
3130 say, as the operand of an equality operator, then this might not
3131 be right. Also add a test so that static accessibilty checks are
3132 performed for converting to a saooaaat's type even if
3133 Is_Local_Anonymous_Access yields False for the type.
3134
31352011-08-30 Javier Miranda <miranda@adacore.com>
3136
3137 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3138 controls generation of a warning associated with late declaration of
3139 dispatching functions. Required to avoid generating spurious
3140 warnings.
3141
6cce2156
GD
31422011-08-30 Gary Dismukes <dismukes@adacore.com>
3143
3144 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3145 return object has an anonymous access type and the function's type is
3146 a named access type.
3147 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3148 conversions on implicit conversions, since such conversions can occur
3149 for anonymous access cases due to expansion. Issue error for attempt
3150 to rename an anonymous expression as an object of a named access type.
3151 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3152 to indicate whether this function should report errors on invalid
3153 conversions.
3154 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3155 the expression is of an anonymous access type and the expected type is
3156 a named general access type, rewrite the expression as a type
3157 conversion, unless this is an expression of a membership test.
3158 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3159 calling of Error_Msg_N on new formal Report_Errs.
3160 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3161 calling of Error_Msg_NE on new formal Report_Errs.
3162 (Valid_Conversion): Move declaration of this function to the package
3163 spec, to allow calls from membership test processing. For Ada 2012,
3164 enforce legality restrictions on implicit conversions of anonymous
3165 access values to general access types, disallowing such conversions in
3166 cases where the expression has a dynamic accessibility level (access
3167 parameters, stand-alone anonymous access objects, or a component of a
3168 dereference of one of the first two cases).
3169 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3170 in the context of a named general access expected type.
3171 * exp_ch4.adb Add with and use of Exp_Ch2.
3172 (Expand_N_In): Add processing for membership tests applied to
3173 expressions of an anonymous access type. First, Valid_Conversion is
3174 called to check whether the test is statically False, and then the
3175 conversion is expanded to test that the expression's accessibility
3176 level is no deeper than that of the tested type. In the case of
3177 anonymous access-to-tagged types, a tagged membership test is applied
3178 as well.
3179 (Tagged_Membership): Extend to handle access type cases, applying the
3180 test to the designated types.
3181 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3182 accessibility level, and the actual is a 'Access applied to a current
3183 instance, pass the accessibility level of the type of the current
3184 instance rather than applying Object_Access_Level to the prefix. Add a
3185 ??? comment, since this level isn't quite right either (will eventually
3186 need to pass an implicit level parameter to init procs).
3187
747de90b
AC
31882011-08-30 Bob Duff <duff@adacore.com>
3189
3190 * s-taskin.ads: Minor comment fix.
3191
31922011-08-30 Ed Schonberg <schonberg@adacore.com>
3193
3194 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3195 component and the selector is a dispatching operation, check if it is
3196 a prefixed call before rewriting as a parameterless function call.
3197
cdc4cc65
JJ
31982011-08-29 Jakub Jelinek <jakub@redhat.com>
3199
3200 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3201 tsystem.h into $(RTSDIR) instead of rts.
3202
226a7fa4
AC
32032011-08-29 Robert Dewar <dewar@adacore.com>
3204
3205 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3206 reformatting.
3207 * gcc-interface/Make-lang.in: Update dependencies.
3208
32092011-08-29 Yannick Moy <moy@adacore.com>
3210
3211 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3212 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3213 table to hold dereferences.
3214 (Add_ALFA_Xrefs): Take into account dereferences as special
3215 reads/writes to the variable "HEAP".
3216 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3217 (Generate_Dereference): New procedure to store a read/write dereferencew
3218 in the table Drefs.
3219 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3220 the special "HEAP" var.
3221 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3222 in ALFA mode.
3223 * sem_util.adb (Note_Possible_Modification): Store write dereference
3224 in ALFA mode.
3225
dfbcb149
HK
32262011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3227
3228 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3229 ensures that the level of the subpool access type is not deeper than
3230 that of the pool object.
3231 * sem_util.adb (Object_Access_Level): Expand to handle defining
3232 identifiers.
3233 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3234 subpool handle name of a rewritten allocator.
3235
1df4f514
AC
32362011-08-29 Robert Dewar <dewar@adacore.com>
3237
3238 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3239
32402011-08-29 Thomas Quinot <quinot@adacore.com>
3241
3242 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3243 values, we generate multiple triples of parameters in the TypeCode.
3244 Bump Choice_Index for each such triple so that a subsequent default
3245 choice is associated with the correct index in the typecode.
3246
32472011-08-29 Ed Schonberg <schonberg@adacore.com>
3248
3249 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3250 container.
3251 (First, Last): Handle properly an iterator over a null container.
3252
32532011-08-29 Bob Duff <duff@adacore.com>
3254
3255 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3256 processing if we run across a node with no Scope. This can happen if
3257 we're with-ing an library-level instance, and that instance got errors
3258 that caused "instantiation abandoned".
3259 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3260 an exception instead of using Assert, so it won't go into an infinite
3261 loop, even when assertions are turned off.
3262
32632011-08-29 Ed Schonberg <schonberg@adacore.com>
3264
3265 * a-coorse.adb: Proper handling of empty ordered sets.
3266
14f0f659
AC
32672011-08-29 Johannes Kanig <kanig@adacore.com>
3268
3269 * debug.adb: Add comments.
3270
8027b455
AC
32712011-08-29 Thomas Quinot <quinot@adacore.com>
3272
3273 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3274 reformatting.
3275
32762011-08-29 Yannick Moy <moy@adacore.com>
3277
3278 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3279 declaration for Itypes in Alfa mode.
3280
d85fd922
AC
32812011-08-29 Robert Dewar <dewar@adacore.com>
3282
3283 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3284 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3285 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3286 reformatting.
3287
32882011-08-29 Tristan Gingold <gingold@adacore.com>
3289
3290 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3291 package spec.
3292 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3293 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3294 while raising PE.
3295
fd3d2680
AC
32962011-08-29 Robert Dewar <dewar@adacore.com>
3297
3298 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3299
33002011-08-29 Javier Miranda <miranda@adacore.com>
3301
3302 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3303 renamings of formal subprograms when the actual for a formal type is
3304 class-wide.
3305
dfbf013f
MH
33062011-08-29 Matthew Heaney <heaney@adacore.com>
3307
3308 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3309 to Target.
3310
33112011-08-29 Matthew Heaney <heaney@adacore.com>
3312
3313 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3314 components of record type.
3315 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3316 to Target.
3317
a6dd3a54
ES
33182011-08-29 Ed Schonberg <schonberg@adacore.com>
3319
3320 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3321 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3322 container packages.
3323
c54796e0
AC
33242011-08-29 Robert Dewar <dewar@adacore.com>
3325
3326 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3327 reformatting.
3328
33292011-08-29 Matthew Heaney <heaney@adacore.com>
3330
3331 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3332 components of record type.
3333
33342011-08-29 Bob Duff <duff@adacore.com>
3335
3336 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3337 by the termination handler.
3338
9fd9d2be
AC
33392011-08-29 Yannick Moy <moy@adacore.com>
3340
3341 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3342 created in Alfa mode, instead of inserting artificial declarations of
3343 non-Itypes in the tree.
3344 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3345 know if an Itype has a corresponding declaration, as defined in
3346 itypes.ads.
3347
33482011-08-29 Yannick Moy <moy@adacore.com>
3349
3350 * gnat1drv.adb: Minor rewrite.
3351
33522011-08-29 Bob Duff <duff@adacore.com>
3353
3354 * s-tasuti.adb (Make_Passive): Work around race condition in
3355 Make_Independent, which can cause Wait_Count to be zero. So instead of
3356 asserting that Wait_Count > 0, and then decrementing it, decrement it
3357 only if Wait_Count > 0.
3358 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3359 should be nonnegative, so declare them Natural instead of Integer.
3360
833eaa8a
AC
33612011-08-29 Robert Dewar <dewar@adacore.com>
3362
3363 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3364 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3365 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3366 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3367 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3368
33692011-08-29 Tristan Gingold <gingold@adacore.com>
3370
3371 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3372
33732011-08-29 Vadim Godunko <godunko@adacore.com>
3374
3375 * s-parint.ads: Minor comment clarification.
3376
33772011-08-29 Vincent Celier <celier@adacore.com>
3378
3379 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3380 may be used as identifiers.
3381
33822011-08-29 Ed Schonberg <schonberg@adacore.com>
3383
3384 * a-coinho.ads: Minor reformating.
3385
3a613a36
AC
33862011-08-29 Ed Schonberg <schonberg@adacore.com>
3387
3388 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3389 container of a derived type.
3390
3a613a36
AC
33912011-08-29 Ed Schonberg <schonberg@adacore.com>
3392
3393 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3394 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3395
14848f57
AC
33962011-08-29 Pascal Obry <obry@adacore.com>
3397
3398 * exp_disp.adb: Minor comment fix.
3399 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3400 to avoid warnings when compiling with -Wall.
3401 (Make_Disp_Conditional_Select_Body): Likewise.
3402 (Make_Disp_Timed_Select_Body): Likewise.
3403
34042011-08-29 Ed Schonberg <schonberg@adacore.com>
3405
3406 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3407 an entity name, generate reference for it.
3408
34092011-08-29 Ed Schonberg <schonberg@adacore.com>
3410
3411 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3412 iterator form.
3413 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3414 the class-wide type.
3415 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3416
34172011-08-29 Ed Schonberg <schonberg@adacore.com>
3418
3419 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3420 subtype for an object whose type is an unconstrained union.
3421
34222011-08-29 Ed Schonberg <schonberg@adacore.com>
3423
3424 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3425 is allowed in a component definition, by AI95-406.
3426
34272011-08-29 Matthew Heaney <heaney@adacore.com>
3428
3429 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3430
34312011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3432
3433 * a-except-2005.adb: Alphabetize all routines.
3434 (Triggered_By_Abort): New routine.
3435 * a-except-2005.ads (Triggered_By_Abort): New routine.
3436 * a-except.adb Alphabetize all routines.
3437 (Triggered_By_Abort): New routine.
3438 * a-except.ads (Triggered_By_Abort): New routine.
3439 * exp_ch7.adb: Update all comments involving the detection of aborts in
3440 finalization code.
3441 (Build_Object_Declarations): Do not generate code to detect the
3442 presence of an abort at the start of finalization code, use a runtime
3443 routine istead.
3444 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3445 RE_Unit_Table.
3446 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3447 allocate a task on a subpool.
3448 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3449 The flag disables all actions related to the maintenance of
3450 Finalize_Address_Table when subpools are not in use.
3451 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3452 use.
3453 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3454 performs costly task locking when subpools are not in use.
3455
57a8057a
AC
34562011-08-29 Yannick Moy <moy@adacore.com>
3457
3458 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3459 types and dispatching calls in Alfa mode.
3460 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3461 correspondance between body and spec scopes, to reuse utility functions
3462 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3463 by testing the presence of the library unit for the body
3464 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3465 mode the expansion of accept statements is skipped
3466 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3467 the unique entity corresponding to the one returned by
3468 Unique_Defining_Entity applied to the enclosing declaration of the
3469 argument.
3470
34712011-08-29 Bob Duff <duff@adacore.com>
3472
3473 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3474 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3475 an alias for pn. ppp is an alias for pt.
3476
34772011-08-29 Javier Miranda <miranda@adacore.com>
3478
3479 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3480 aggregate to take a consistent decision on the need to convert into
3481 assignments aggregates that initialize constant objects.
3482
34832011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3484
3485 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3486 Build_Allocate_Deallocate_Proc in order to handle allocation of
3487 non-controlled objects on subpools.
3488 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3489 to be end-user visible.
3490 * s-finmas.adb: Add with and use clause for System.HTable.
3491 Add an instantiation of Simple_HTable which provides a mapping between
3492 the address of a controlled object and the corresponding
3493 Finalize_Address used to clean up the object. The table is used when a
3494 master is operating in heterogeneous mode.
3495 (Attach): Explain why the input node is not verified on being already
3496 attached.
3497 (Delete_Finalize_Address): New routine.
3498 (Detach): Add pragma Assert which ensures that a node is already
3499 attached.
3500 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3501 since nodes are no longer removed on traversal. Explain why node
3502 detachment is undesirable in this case.
3503 (Get_Finalize_Address): New routine.
3504 (Hash): New routine.
3505 (Is_Empty_List): Removed.
3506 (pm): Renamed to Print_Master. Add output for discriminant
3507 Is_Homogeneous.
3508 Comment reformatting.
3509 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3510 * s-finmas.ads: Various comments additions / improvements.
3511 Type Finalization_Master has a discriminant which determines the mode of
3512 operation.
3513 (Delete_Finalize_Address): New routine.
3514 (Get_Finalize_Address): New routine.
3515 (pm): Renamed to Print_Master.
3516 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3517 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3518 use clause for System.IO.
3519 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3520 Finalize_Address depending on the mode of allocation and the mode of
3521 the master.
3522 (Deallocate_Any_Controlled): Remove the relation pair object -
3523 Finalize_Address regardless of the master mode. Add comment explaining
3524 the reason.
3525 (Detach): Ensure that fields Prev and Next are null after detachment.
3526 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3527 scheme to check whether the list of subpools is empty. There is no
3528 longer need to store the next subpool or advance the current pointer.
3529 (Is_Empty_List): New routine.
3530 (Print_Pool): New routine.
3531 (Print_Subpool): New routine.
3532 * s-stposu.ads: Various comments additions / improvements.
3533 Field Master of type Root_Subpool is now a heterogeneous collection.
3534 (Print_Pool): New routine.
3535 (Print_Subpool): New routine.
3536
35372011-08-29 Ed Schonberg <schonberg@adacore.com>
3538
3539 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3540 forms, using aspects of container types.
3541 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3542 Has_Implicit_Dereference flags, that may be set on the partial view.
3543 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3544 container type with an indexing aspect.
3545 (Analyze_Quantified_Expression): Analyze construct with expansion
3546 disabled, because it will be rewritten as a loop during expansion.
3547 (Try_Container_Indexing): The prefix itself may be a container type
3548 with an indexing aspect, as with a vector of vectors.
3549 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3550 the original doamin of iteration, for name capture.
3551 (Analyze_Iterator_Specification): If the domain is an expression that
3552 needs finalization, create a separate declaration for it.
3553 For an iterator with "of" retrieve default iterator info from aspect of
3554 container type. For "in" iterator, retrieve type of Iterate function.
3555 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3556 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3557 analysis, to prevent spurious errors about late attributes.
3558 * sprint.adb: Handle quantified expression with either loop or iterator
3559 specification.
3560 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3561 iterator.
3562
ddf67a1d
AC
35632011-08-29 Vincent Celier <celier@adacore.com>
3564
3565 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3566 Binder or Linker of the main project file.
3567
35682011-08-29 Ed Schonberg <schonberg@adacore.com>
3569
3570 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3571 unit.
3572
35732011-08-29 Yannick Moy <moy@adacore.com>
3574
3575 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3576
35772011-08-29 Yannick Moy <moy@adacore.com>
3578
3579 * exp_ch11.adb: Minor expansion of comment.
3580
35812011-08-29 Yannick Moy <moy@adacore.com>
3582
3583 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3584
35852011-08-29 Ed Schonberg <schonberg@adacore.com>
3586
3587 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3588 interpretation, set the type before resolving the operands, because
3589 legality checks on an exponention operand need to know the type of the
3590 context.
3591
35922011-08-29 Ed Schonberg <schonberg@adacore.com>
3593
3594 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3595 cleanups on a master if the instance is within a generic unit.
3596 Complement to the corresponding fix to inline.adb for K520-030.
3597
35982011-08-29 Tristan Gingold <gingold@adacore.com>
3599
3600 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3601 occurrence.
3602 * exp_intr.adb: Minor comment fix.
3603
36042011-08-29 Bob Duff <duff@adacore.com>
3605
3606 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3607 Delay_Required was used as an uninitialized variable.
3608
690943fc
RD
36092011-08-29 Robert Dewar <dewar@adacore.com>
3610
3611 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3612 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3613 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3614
9f0ee988
TQ
36152011-08-29 Thomas Quinot <quinot@adacore.com>
3616
3617 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3618 Remove unused variables.
3619
3e24afaa
AC
36202011-08-29 Ed Schonberg <schonberg@adacore.com>
3621
3622 * sem_res.adb: Remove Build_Explicit_Dereference.
3623 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3624 from sem_res.adb, used in analysis of additional constructs.
3625 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3626 expansion of iterators.
3627 (Is_Object_Reference): Recognize variables rewritten as explicit
3628 dereferences in Ada2012.
3629 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3630 Reversible_Iterator names, for expansion of Ada2012 iterators.
3631 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3632 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3633 linked list container.
3634 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3635 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3636
36372011-08-29 Ed Schonberg <schonberg@adacore.com>
3638
3639 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3640 containers.
3641
36422011-08-29 Vincent Celier <celier@adacore.com>
3643
3644 * make.adb (Gnatmake): Get the maximum number of simultaneous
3645 compilation processes after the Builder switches has been scanned, as
3646 there may include -jnn.
3647
36482011-08-29 Matthew Heaney <heaney@adacore.com>
3649
3650 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
3651
36522011-08-29 Tristan Gingold <gingold@adacore.com>
3653
3654 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
3655 GNAT_DRIVER_COMMAND_LINE to 255.
3656
36572011-08-29 Pascal Obry <obry@adacore.com>
3658
3659 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
3660 reformatting and style fix (class attribute casing).
3661
36622011-08-29 Yannick Moy <moy@adacore.com>
3663
3664 * exp_ch11.adb: Yet another case where expansion should be common
3665 between CodePeer and Alfa.
3666
36672011-08-29 Yannick Moy <moy@adacore.com>
3668
3669 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
3670
36712011-08-29 Ed Schonberg <schonberg@adacore.com>
3672
3673 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
3674 incomplete type and its completion match.
3675
3ddd922e
AC
36762011-08-29 Yannick Moy <moy@adacore.com>
3677
3678 * exp_ch13.adb: Adjust previous change.
3679
36802011-08-29 Robert Dewar <dewar@adacore.com>
3681
3682 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
3683 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
3684 Minor reformatting.
3685
444acbdd
AC
36862011-08-29 Emmanuel Briot <briot@adacore.com>
3687
3688 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
3689 initialize aggregated projects.
3690
36912011-08-29 Ed Schonberg <schonberg@adacore.com>
3692
3693 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
3694 depth of candidates to resolve a potentially spurious ambiguity between
3695 two visible subprograms.
3696
e0296583
AC
36972011-08-29 Yannick Moy <moy@adacore.com>
3698
3699 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
3700 Requires/Ensures.
3701 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
3702 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
3703 Requires/Ensures.
3704
37052011-08-29 Arnaud Charlet <charlet@adacore.com>
3706
3707 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
3708 Add comment.
3709
37102011-08-29 Thomas Quinot <quinot@adacore.com>
3711
3712 * sem_res.adb: Minor reformatting.
3713
69794413
JK
37142011-08-29 Johannes Kanig <kanig@adacore.com>
3715
3716 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
3717 mode.
3718 * gnat1drv.adb (Adjust_Global_Switches): Set
3719 Use_Expressions_With_Actions to False in ALFA mode.
3720 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
3721 ALFA mode.
3722
59e6b23c
AC
37232011-08-29 Yannick Moy <moy@adacore.com>
3724
3725 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
3726 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
3727 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
3728 tagged types and dispatching calls in Alfa mode.
3729
37302011-08-29 Javier Miranda <miranda@adacore.com>
3731
3732 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
3733 we do not report an error on an Empty node.
3734
37352011-08-29 Geert Bosch <bosch@adacore.com>
3736
3737 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
3738 a-nlrear.o and a-nurear.o.
3739
37402011-08-29 Robert Dewar <dewar@adacore.com>
3741
3742 * freeze.adb: Minor code reorganization.
3743 Minor reformatting.
3744 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
3745 sem_ch6.adb: Minor reformatting
3746
37472011-08-29 Tristan Gingold <gingold@adacore.com>
3748
3749 * s-except.ads, s-except.adb: Provide dummy body.
3750
37512011-08-29 Yannick Moy <moy@adacore.com>
3752
3753 * sem_warn.adb (Within_Postcondition): Take into account the case of
3754 an Ensures component in a Test_Case.
3755
4d792549
AC
37562011-08-29 Tristan Gingold <gingold@adacore.com>
3757
3758 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
3759 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
3760 System_Exceptions_Debug
3761 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
3762 * a-except.adb: With and use System.Exceptions_Debug instead of
3763 System.Exceptions.
3764 * a-except-2005.adb: Likewise.
3765 * s-assert.adb: Likewise.
3766 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
3767 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
3768 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
3769 s-excdeb. Update dependencies.
3770 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
3771 as these no longer need external libraries.
3772
37732011-08-29 Ed Schonberg <schonberg@adacore.com>
3774
3775 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
3776 exponentiation operator on universal values in a context that requires
3777 a fixed-point type.
3778
37792011-08-29 Tristan Gingold <gingold@adacore.com>
3780
3781 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
3782 before calling notify_handled_exception.
3783 * a-exextr.adb: Fix comment.
3784
b254da66
AC
37852011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3786
3787 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
3788 Finalize_Address of the access type's finalization master.
3789 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
3790 access type's finalization master. Add a guard to prevent
3791 Associated_Storage_Pool from being set on .NET/JVM.
3792 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
3793 attribute Finalize_Address of the access type's finalization master.
3794 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
3795 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
3796 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
3797 RE_Unit_Table.
3798 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
3799 use clause for System.IO
3800 (Detach): Relax the assertion, to be reinstated later.
3801 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
3802 Relax the assertion on Finalize_Address, to be reinstated later.
3803 (Is_Empty_List): New routine.
3804 (pm): New debug routine.
3805 (Set_Finalize_Address): New routine.
3806 * s-finmas.ads (pm): New debug routine.
3807 (Set_Finalize_Address): New routine.
3808 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
3809
38102011-08-29 Tristan Gingold <gingold@adacore.com>
3811
3812 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
3813 Remove convention C.
3814
38152011-08-29 Tristan Gingold <gingold@adacore.com>
3816
3817 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
3818 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
3819 (Finalize_TCB): Remove its finalization.
3820 (Initialize): Remove assignment of GET_Exc_Stack_Addr
3821 * s-soflin.adb (NT_Exc_Stack): Remove
3822 (Get_Exc_Stack_Addr_NT): Likewise.
3823 (Get_Exc_Stack_Addr_Soft): Likewise.
3824 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
3825 (Get_Exc_Stack_Addr): Likewise.
3826 (Get_Exc_Stack_Addr_Soft): Likewise
3827 * s-taspri-vms.ads (Exc_Stack_T): Remove.
3828 (Exc_Stack_Ptr_T): Likewise.
3829 (Private_Data): Remove Exc_Stack_Ptr component.
3830
38312011-08-29 Tristan Gingold <gingold@adacore.com>
3832
3833 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
3834
38352011-08-29 Tristan Gingold <gingold@adacore.com>
3836
3837 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
3838
38392011-08-29 Geert Bosch <bosch@adacore.com>
3840
3841 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
3842 L2_Norm, Swap_Column): New generic subprograms
3843 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
3844 L2_Norm, Swap_Column): Implement new subprograms in order to
3845 eliminate dependency on BLAS and LAPACK libraries in
3846 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
3847 version. Forward_Eliminate/Back_Substitute can be used to put a
3848 matrix in row echelon or reduced row echelon form using partial
3849 pivoting.
3850 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
3851 Swap_Column): Instantiate from System.Generic_Array_Operations.
3852 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
3853 (Sqrt): Local function for simple computation of square root without
3854 adding dependencies on Generic_Elementary_Functions.
3855 (Swap): New subprogram to exchange floating point numbers.
3856 (Inverse): Reimplement using Jordan-Gauss elimination.
3857 (Jacobi): New procedure implementing Jacobi's method for computation
3858 of eigensystems, based on Rutishauser's implementation.
3859 (L2_Norm): Implement directly using the inner product.
3860 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
3861 decreasing eigenvalue as required by the Ada RM.
3862 (Swap_Column): New helper procedure for Sort_Eigensystem.
3863 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
3864 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
3865 Sort_Eigensystems.
3866
38672011-08-29 Thomas Quinot <quinot@adacore.com>
3868
3869 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
3870 statements line.
3871
60370fb1
AC
38722011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3873
3874 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
3875 than the current node.
3876 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
3877 Finalization_Master. The list headers have two fields instead of three.
3878 This should fix alignment issue but subpool allocations are now
3879 unusable. Alphabetize subprograms.
3880 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
3881 the size of the header when converting the beginning of the object to
3882 a FM_Node. Set the master's Finalize_Address attribute if not already
3883 set.
3884 (Deallocate_Any_Controlled): Use the offset rather than the size of the
3885 header when converting the beginning of the object to a FM_Node.
3886
38872011-08-29 Gary Dismukes <dismukes@adacore.com>
3888
3889 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
3890 reraise when compiling for CodePeer.
3891
38922011-08-29 Arnaud Charlet <charlet@adacore.com>
3893
3894 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
3895 now needed by a-convec.adb. Fix warning.
3896
38972011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3898
3899 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
3900 processing of TSS routine Finalize_Address when compiling in
3901 CodePeer_Mode.
3902
39032011-08-29 Thomas Quinot <quinot@adacore.com>
3904
3905 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
3906 sem_warn.adb: Minor reformatting.
3907
39082011-08-29 Emmanuel Briot <briot@adacore.com>
3909
3910 * prj-conf.adb (Get_Config_Switches): Also collect the list of
3911 languages from aggregated projects.
3912
39132011-08-29 Yannick Moy <moy@adacore.com>
3914
3915 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
3916 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3917 Traverse_Package_Declaration, Traverse_Subprogram_Body,
3918 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
3919 for stubs are traversed too when parameter is set
3920 (Traverse_All_Compilation_Units): Traverse without going inside stubs
3921 (Traverse_Declarations_Or_Statements): Do the special traversing for
3922 stubs when required.
3923 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
3924 return subprogram or package body from stub.
3925 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
3926 stubs without prior subprogram decl.
3927
39282011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3929
3930 * gnat_ugn.texi: Fix typo.
3931
e9c9d122
HK
39322011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3933
3934 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
3935 which accounts for size vs alignment issues and calculates the size of
3936 the list header.
3937 (Deallocate_Any_Controlled): Ditto.
3938 (Nearest_Multiple_Rounded_Up): New routine.
3939
25ebc085
AC
39402011-08-29 Tristan Gingold <gingold@adacore.com>
3941
3942 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
3943 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
3944 (Set_Exception_Msg): Ditto.
3945 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
3946 Private_Data.
3947 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
3948 Use Save_Occurrence instead of Save_Occurrence_No_Private.
3949 (Raise_With_Msg): Remove Cleanup_Flag.
3950 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
3951 Clean_Flag and Private_Data components.
3952
39532011-08-29 Yannick Moy <moy@adacore.com>
3954
3955 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
3956 in CodePeer mode.
3957 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
3958 of an explicitly declared type, so that the base types of the original
3959 type and this generated type are the same, and a "type" (not a subtype
3960 like previously).
3961 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
3962 small" in Alfa mode, like in CodePeer mode.
3963 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
3964 clauses in Alfa mode.
3965
39662011-08-29 Javier Miranda <miranda@adacore.com>
3967
3968 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
3969 function to the package spec.
3970 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
3971 internally generated bodies of null procedures locate the internally
3972 generated spec enforcing mode conformance.
3973 (Is_Interface_Conformant): Ensure that the controlling formal of the
3974 primitives match.
3975
39762011-08-29 Ed Schonberg <schonberg@adacore.com>
3977
3978 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
3979 reject the pragma if it appears to apply to a formal subprogram.
3980
39812011-08-29 Ed Schonberg <schonberg@adacore.com>
3982
3983 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
3984 inner expression, to prevent double evaluation.
3985
590549fb
AC
39862011-08-29 Tristan Gingold <gingold@adacore.com>
3987
3988 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
3989 they were unused.
3990 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
3991 * a-except-2005.adb (Propagate_Exception): Adjust spec.
3992 (Raise_Current_Excep): Adjust call.
3993 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
3994
39952011-08-29 Thomas Quinot <quinot@adacore.com>
3996
3997 * exp_disp.adb: Minor reformatting.
3998
62380e66
TG
39992011-08-29 Tristan Gingold <gingold@adacore.com>
4000
4001 * a-exexpr.adb (Setup_Exception): Removed.
4002 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4003 * a-except.adb (Exception_Propagation): Removed.
4004 * a-except-2005.adb (Setup_Exception): Removed.
4005 (Reraise): Remove call to Setup_Exception.
4006 (Reraise_Occurrence): Ditto.
4007 (Reraise_Occurrence_Always): Ditto.
4008 (Reraise_Occurrence_No_Defer): Ditto.
4009 (Transfer_Occurrence): Ditto.
4010 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4011 (Set_Exception_Msg): Ditto.
4012
c95aa61c
AC
40132011-08-29 Robert Dewar <dewar@adacore.com>
4014
4015 * a-convec.adb, exp_disp.adb: Minor reformatting.
4016
40172011-08-29 Tristan Gingold <gingold@adacore.com>
4018
4019 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4020
624e1688
AC
40212011-08-29 Gary Dismukes <dismukes@adacore.com>
4022
4023 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4024 Exception_Handlers to No_List instead of Empty_List in the case where
4025 there are no handlers.
4026
40272011-08-29 Tristan Gingold <gingold@adacore.com>
4028
4029 * gcc-interface/gigi.h (enum standard_datatypes): Add
4030 ADT_reraise_zcx_decl
4031 (reraise_zcx_decl): New macro.
4032 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4033 (gigi): Set reraise_zcx_decl.
4034 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4035 (gnat_to_gnu): Handle N_Raise_Statement.
4036
7134062a
AC
40372011-08-29 Robert Dewar <dewar@adacore.com>
4038
4039 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4040 a-undesu.adb: Minor reformatting.
4041
40422011-08-29 Ed Schonberg <schonberg@adacore.com>
4043
4044 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4045 table, accept an unfrozen untagged component if it is an actual for a
4046 formal incomplete type.
4047 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4048 provide new iterator forms over vectors.
4049 Introduce type Iterator in package body to implement operations of
4050 Reversible_Iterator interface.
4051 * a-iteint.ads: Make package pure so it is usable with new container
4052 packages, that are categorized Remote_Types.
4053
ca5af305
AC
40542011-08-29 Robert Dewar <dewar@adacore.com>
4055
4056 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4057
40582011-08-29 Bob Duff <duff@adacore.com>
4059
4060 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4061 of <>, because this is the routine that checks for dimensionality
4062 errors (for example, for a two-dimensional array, (others => <>) should
4063 be (others => (others => <>)).
4064
40652011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4066
4067 * impunit.adb: Add new run-time units.
4068 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4069 s-stposu.ads, s-stposu.adb: Code clean up.
4070 Handle protected class-wide or task class-wide types
4071 Handle C/C++/CIL/Java types.
4072 * s-spsufi.adb, s-spsufi.ads: New files.
4073
5accd7b6
AC
40742011-08-29 Yannick Moy <moy@adacore.com>
4075
4076 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4077 library-level subprogram.
4078 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4079 placement.
4080 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4081 component.
4082 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4083 component.
4084 * gnat_rm.texi: Update doc for Test_Case pragma.
4085
40862011-08-29 Tristan Gingold <gingold@adacore.com>
4087
4088 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4089 convention C.
4090 (GCC_Exception_Access): New type.
4091 (Unwind_DeleteException): New imported procedure
4092 (Foreign_Exception): Import it.
4093 (GNAT_GCC_Exception): Simply have the occurrence inside.
4094 (To_GCC_Exception): New function.
4095 (To_GNAT_GCC_Exception): New function.
4096 (GNAT_GCC_Exception_Cleanup): New procedure..
4097 (Propagate_GCC_Exception): New procedure.
4098 (Reraise_GCC_Exception): New procedure.
4099 (Setup_Current_Excep): New procedure.
4100 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4101 (Unwind_RaiseException): Ditto.
4102 (Unwind_ForcedUnwind): Ditto.
4103 (Remove): Removed.
4104 (Begin_Handler): Change type of parameter.
4105 (End_Handler): Ditto. Now delete the exception if still present.
4106 (Setup_Key): Removed.
4107 (Is_Setup_And_Not_Propagated): Removed.
4108 (Set_Setup_And_Not_Propagated): Ditto.
4109 (Clear_Setup_And_Not_Propagated): Ditto.
4110 (Save_Occurrence_And_Private): Ditto.
4111 (EID_For): Add 'not null' constraint on parameter.
4112 (Setup_Exception): Does nothing.
4113 (Propagate_Exception): Simplified.
4114 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4115 re-raise is not expanded anymore.
4116 * s-except.ads (Foreign_Exception): New exception - placeholder for
4117 non Ada exceptions.
4118 * raise-gcc.c (__gnat_setup_current_excep): Declare
4119 (CXX_EXCEPTION_CLASS): Define (not yet used)
4120 (GNAT_EXCEPTION_CLASS): Define.
4121 (is_handled_by): Handle foreign exceptions.
4122 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4123
41242011-08-29 Jose Ruiz <ruiz@adacore.com>
4125
4126 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4127
2ef48385
AC
41282011-08-29 Thomas Quinot <quinot@adacore.com>
4129
4130 * a-synbar-posix.adb: Minor reformatting.
4131
41322011-08-29 Jose Ruiz <ruiz@adacore.com>
4133
4134 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4135 a-exetim-default.ads (Interrupt_Clocks_Supported,
4136 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4137 definitions to be compliant with AI-0171. The target systems do not
4138 support separate account for the execution time of interrupt handlers.
4139
41402011-08-29 Jose Ruiz <ruiz@adacore.com>
4141
4142 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4143 in the barrier to put first the easiest to evaluate (and the one which
4144 will be True more often). More efficient.
4145
41462011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4147
4148 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4149
41502011-08-29 Bob Duff <duff@adacore.com>
4151
4152 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4153 attributes that are now aspects, as specified by AI05-0229-1.
4154 * sem_ch13.adb (Analyze_Aspect_Specifications,
4155 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4156 pragmas or attribute references, as appropriate.
4157
0db16b1e
AC
41582011-08-29 Robert Dewar <dewar@adacore.com>
4159
4160 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4161 a-synbar-posix.ads: Minor reformatting.
4162
41632011-08-29 Yannick Moy <moy@adacore.com>
4164
4165 * snames.ads-tmpl: Add name Force.
4166
978ffe02
AC
41672011-08-29 Pascal Obry <obry@adacore.com>
4168
4169 * prj-nmsc.adb: Minor reformatting.
4170
41712011-08-29 Jose Ruiz <ruiz@adacore.com>
4172
4173 * a-exetim.ads (Interrupt_Clocks_Supported,
4174 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4175 definitions to be compliant with AI-0171.
4176
41772011-08-29 Robert Dewar <dewar@adacore.com>
4178
4179 * a-ngelfu.adb: Add comments.
4180
718f39dc
AC
41812011-08-29 Geert Bosch <bosch@adacore.com>
4182
4183 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4184 the closest machine number to Pi / 2.0.
4185
41862011-08-29 Jose Ruiz <ruiz@adacore.com>
4187
4188 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4189 package Ada.Synchronous_Barriers.
4190 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4191 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4192 default implementation using protected objects and another one
4193 a-synbar-posix using POSIX barriers as the underlying support.
4194 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4195 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4196 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4197 Clean up dependencies.
4198 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4199
ee2e3f6b
AC
42002011-08-29 Robert Dewar <dewar@adacore.com>
4201
4202 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4203 exp_dist.adb: Minor code reorganization.
4204 Minor reformatting.
4205
42062011-08-29 Thomas Quinot <quinot@adacore.com>
4207
4208 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4209 primitive operation must support external streaming if it is not a
4210 controlling access result.
4211
646e2823
AC
42122011-08-29 Thomas Quinot <quinot@adacore.com>
4213
4214 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4215
42162011-08-29 Bob Duff <duff@adacore.com>
4217
4218 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4219 restriction on allocators, as required by AI05-0013-1.
4220 * restrict.ads: Minor comment fix.
4221
5d59eef2
AC
42222011-08-29 Tristan Gingold <gingold@adacore.com>
4223
4224 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4225 (To_Jmpbuf_Address): Ditto
4226 (builtin_longjmp): Ditto
4227
42282011-08-29 Thomas Quinot <quinot@adacore.com>
4229
4230 * sem_res.adb: Minor reformatting.
4231
42322011-08-29 Vincent Celier <celier@adacore.com>
4233
4234 * make.adb (Gnatmake): Move special processing for VM targets after the
4235 call to Get_Target_Parameters.
4236
42372011-08-29 Thomas Quinot <quinot@adacore.com>
4238
4239 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4240
949a18cc
AC
42412011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4242
4243 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4244 where an anonymous access discriminant of a limited designated type
4245 appears in a non-immutably limited discriminated type and issue an
4246 error message. Add local variable Desig_T and replace all occurrences
4247 of Designated_Type.
4248
42492011-08-29 Jose Ruiz <ruiz@adacore.com>
4250
4251 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4252 implementation is compliant to RM D.15(15/2) after the modification
4253 imposed by AI05-0094-1 (binding interpretation).
4254
cb25faf8
AC
42552011-08-29 Robert Dewar <dewar@adacore.com>
4256
4257 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4258 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4259
42602011-08-29 Thomas Quinot <quinot@adacore.com>
4261
4262 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4263 the scope name, do not report a missing label as a style violation (it
4264 will be diagnosed as an illegality).
4265 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4266 variant records: Get_Enum_Lit_From_Pos already returns a usage
4267 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4268 on Expr in Integer_Literal case so that it can be used by
4269 Build_To_Any_Call.
4270
1d10f669
AC
42712011-08-29 Tristan Gingold <gingold@adacore.com>
4272
4273 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4274 Adjust comment.
4275 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4276 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4277 exception handler.
4278 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4279 Build_Abort_Block_Handler to build the exception handler. Do not
4280 undefer aborts for the Abort_Signal exception handler if back-end
4281 exception mechanism.
4282 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4283 back_end exceptions for all others and abort_signal.
4284 * s-except.ads (ZCX_By_Default): New constant.
4285 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4286 (Raise_Exception_Always): Ditto.
4287 (Raise_From_Signal_Handler): Ditto.
4288 (Raise_With_Location_And_Msg): Ditto.
4289 (Raise_With_Msg): Ditto.
4290 (Reraise): Ditto.
4291 (Reraise_Occurence): Ditto.
4292 (Reraise_Occurrence_Always): Ditto.
4293 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4294 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1d10f669
AC
4295
42962011-08-29 Thomas Quinot <quinot@adacore.com>
4297
4298 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4299
d986066d
AC
43002011-08-29 Robert Dewar <dewar@adacore.com>
4301
4302 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4303 Minor code reorganization.
4304
43052011-08-29 Bob Duff <duff@adacore.com>
4306
4307 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4308 2012, not just Ada 2005.
4309
43102011-08-29 Vincent Celier <celier@adacore.com>
4311
4312 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4313 with a project file or with gprbuid, if -gnatep= is specified, the
4314 builder may need to be invoked with -x.
4315
43162011-08-29 Tristan Gingold <gingold@adacore.com>
4317
4318 * a-exexpr-gcc.adb: Minor comment fix.
4319
ff4f0ed0
AC
43202011-08-29 Robert Dewar <dewar@adacore.com>
4321
4322 * sem_ch8.adb: Minor reformatting.
4323
43242011-08-29 Bob Duff <duff@adacore.com>
4325
4326 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4327 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4328 treating "some" as unreserved in earlier Ada versions. This is now
4329 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4330 rather than Name_Some, since Tok_Some is now recognized as reserved.
4331 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4332 reserved word.
4333 * scans.ads: Minor comment fixes.
4334 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4335 for other language versions.
4336 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4337 treating "some" as unreserved in earlier Ada versions. This is now
4338 handled in Snames.Is_Keyword_Name.
4339 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4340 Ada 2012.
4341 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4342 unreserved in earlier Ada versions. This is now handled in
4343 Snames.Is_Keyword_Name.
4344 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4345 words as for other language versions.
4346 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4347 Ada 2012, not just Ada 2005.
4348
d941cee6
AC
43492011-08-29 Ed Schonberg <schonberg@adacore.com>
4350
4351 * sem_ch13.adb: Additional semantic checks for aspects involved in
4352 iterators.
4353
43542011-08-29 Matthew Heaney <heaney@adacore.com>
4355
4356 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4357 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4358 Container parameter.
4359 (Ancestor_Find): ditto.
4360
b970af39
TQ
43612011-08-29 Thomas Quinot <quinot@adacore.com>
4362
4363 * par-endh.adb: Minor reformatting.
d941cee6 4364
92db5dee
AC
43652011-08-29 Tristan Gingold <gingold@adacore.com>
4366
4367 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4368 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4369 (Adjust_N_CLeanups_For): Remove.
4370 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4371 stack is reached.
4372 (Propgate_Exception): Adjust.
4373 * raise-gcc.c: Add a few static/const.
4374 (Adjust_N_Cleanups_For): Remove declaration.
4375 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4376
43772011-08-29 Ed Schonberg <schonberg@adacore.com>
4378
4379 * sem_ch8.adb: Use type of function return when rewriting as object
4380 declaration.
4381
1378bf10
AC
43822011-08-29 Gary Dismukes <dismukes@adacore.com>
4383
4384 * sem_type.adb: Minor reformatting.
4385
43862011-08-29 Robert Dewar <dewar@adacore.com>
4387
4388 * makeutl.adb: Minor reformatting.
4389
43902011-08-29 Ed Schonberg <schonberg@adacore.com>
4391
4392 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4393 function call of a limited type, the expansion of the renaming is
4394 complicated by the presence of various temporaries and subtypes that
4395 capture constraints of the renamed object.
4396 Rewrite node as an object declaration, whose expansion is simpler.
4397 Given that the object is limited there is no copy involved and no
4398 performance hit.
4399
164e06c6
AC
44002011-08-29 Robert Dewar <dewar@adacore.com>
4401
4402 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4403 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4404
44052011-08-29 Tristan Gingold <gingold@adacore.com>
4406
4407 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4408 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4409 system-linux-hppa.ads, system-linux-s390.ads,
4410 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4411 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4412 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4413 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4414 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4415 system-solaris-sparc.ads, system-lynxos-x86.ads,
4416 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4417 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4418 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4419 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7d266442 4420 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
164e06c6
AC
4421 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4422 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4423 * opt.ads: Adjust comment.
4424 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4425 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4426 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4427
44282011-08-29 Emmanuel Briot <briot@adacore.com>
4429
4430 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4431 file name is specified on the gnatmake or gprbuild command line, and
4432 before we search for that file in the project.
4433
44342011-08-29 Ed Schonberg <schonberg@adacore.com>
4435
4436 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4437 used to determine whether a possible interpretation for an overloadable
4438 entity is declared within the current instantiation and should be
4439 included in the candidate set.
4440
44412011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4442
4443 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4444
97216ca8
ES
44452011-08-29 Ed Schonberg <schonberg@adacore.com>
4446
4447 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4448 access subtype is access_to_subprogram, when applying checks for
4449 RM 3.10.2 (27).
4450
d3cb4cc0
AC
44512011-08-29 Matthew Heaney <heaney@adacore.com>
4452
4453 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4454 for sibling when common parent.
4455
44562011-08-29 Thomas Quinot <quinot@adacore.com>
4457
4458 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4459 "pragma_".
4460
44612011-08-29 Ed Schonberg <schonberg@adacore.com>
4462
4463 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4464 for the return type when in ASIS mode.
4465
44662011-08-29 Vincent Celier <celier@adacore.com>
4467
4468 * make.adb (Gnatmake): Get the default search dirs, then the target
4469 parameters after getting the Builder switches, as the Builder switches
4470 may include --RTS= and that could change the default search dirs.
4471
44722011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4473
4474 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4475 Make_Final_Call. Move the processing for class-wide types before the
4476 processing for derivations from [Limited_]Controlled.
4477 (Make_Final_Call): Move the processing for class-wide types before the
4478 processing for derivations from [Limited_]Controlled.
4479 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4480 Add code to account for alignments larger than the list header. Add a
4481 comment illustrating the structure of the allocated object + padding +
4482 header.
4483 (Deallocate_Any_Controlled): Add code to account for alignments larger
4484 than the list header.
4485
44862011-08-29 Ed Schonberg <schonberg@adacore.com>
4487
4488 * sinfo.ads, sinfo.adb: New node kind
4489 N_Formal_Incomplete_Type_Definition, related flags.
4490 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4491 Parse formal incomplete types.
4492 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4493 sem_ch12.
4494 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4495 Formal incomplete types do not need completion.
4496 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4497 Validate_Incomplete_Type_Instance): New procedures to handle formal
4498 incomplete types.
4499 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4500 that corresponds to a formal incomplete type.
4501 * sprint.adb: Handle formal incomplete type declarations.
4502 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4503 an insertion point.
4504
d3f70b35
AC
45052011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4506
4507 * a-fihema.ads, a-fihema.adb: Unit removed.
4508 * a-undesu.ads, a-undesu.adb: New unit implementing
4509 Ada.Unchecked_Deallocate_Subpool.
4510 * einfo.adb: Remove Associated_Collection from the node usage.
4511 Add Finalization_Master to the node usage.
4512 (Associated_Collection): Removed.
4513 (Finalization_Master): New routine.
4514 (Set_Associated_Collection): Removed.
4515 (Set_Finalization_Master): New routine.
4516 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4517 Finalization_Master to the output.
4518 * einfo.ads: Remove attribute Associated_Collection and its uses in
4519 entities.
4520 Add new attribute Finalization_Master along with its uses in entitites.
4521 (Associated_Collection): Removed along with its pragma import.
4522 (Finalization_Master): New routine along with a pragma import.
4523 (Set_Associated_Collection): Removed along with its pragma import.
4524 (Set_Finalization_Master): New routine along with a pragma import.
4525 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4526 Build_Finalization_Collection with Build_Finalization_Master.
4527 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4528 before the bodies of the predefined routines. Add comment explaining
4529 this. Replace call to Build_Finalization_Collection with
4530 Build_Finalization_Master.
4531 (Freeze_Type): Replace call to Build_Finalization_Collection with
4532 Build_Finalization_Master.
4533 (Make_Finalize_Address_Body): Comment reformatting.
4534 (Make_Predefined_Primitive_Specs): Code reformatting.
4535 (Stream_Operation_OK): Update comment mentioning finalization
4536 collections. Replace RE_Finalization_Collection with
4537 RE_Finalization_Master.
4538 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4539 Associated_Collection with Finalization_Master. Replace call to
4540 Build_Finalization_Collection with Build_Finalization_Master.
4541 (Expand_Allocator_Expression): Replace call to Associated_Collection
4542 with Finalization_Master. Replace call to Set_Associated_Collection with
4543 Set_Finalization_Master. Remove the generation of
4544 Set_Finalize_Address_Ptr.
4545 (Expand_N_Allocator): Replace call to Associated_Collection with
4546 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4547 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4548 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4549 comment on usage. Replace call to Needs_BIP_Collection with
4550 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4551 BIP_Finalization_Master. Update all comments which mention finalization
4552 collections. Replace Associated_Collection with
4553 Finalization_Master. Replace Build_Finalization_Collection with
4554 Build_Finalization_Master.
4555 (BIP_Formal_Suffix): Update BIP_Collection's case.
4556 (Build_Heap_Allocator): Update the related comment. Rename local
4557 variable Collect to Fin_Mas_Id and update its occurrences. Update
4558 comments which mention finalization collections. Replace
4559 Set_Associated_Collection with Set_Finalization_Master.
4560 (Expand_Call): Update the code which detects a special piece of library
4561 code for .NET/JVM.
4562 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4563 Add_Collection_Actual_To_Build_In_Place_Call with
4564 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4565 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4566 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4567 Add_Collection_Actual_To_Build_In_Place_Call with
4568 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4569 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4570 Add_Collection_Actual_To_Build_In_Place_Call with
4571 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4572 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4573 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4574 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4575 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4576 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4577 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4578 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4579 Replace the call to Associated_Collection with Finalization_Master.
4580 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4581 Update the way finalization master names are generated. Update the
4582 retrieval of the correct access type which will carry the pool and
4583 master attributes.
4584 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4585 (Make_Finalize_Address_Body): Abstract types do not need
4586 Finalize_Address. Code reformatting.
4587 (Make_Finalize_Address_Stmts): Update comment on usage.
4588 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4589 (Process_Declarations): Update comments.
4590 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4591 Build_Finalization_Master. Update associated comment.
4592 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4593 * exp_ch13.adb: Update comments which mention finalization collections.
4594 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4595 with Finalization_Master.
4596 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4597 create calls to routines Allocate_Any_Controlled and
4598 Deallocate_Any_Controlled.
4599 (Find_Finalize_Address): New routine.
4600 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4601 comparison.
4602 (Requires_Cleanup_Actions): Update the comment on freeze node
4603 inspection.
4604 * exp_util.ads: Remove comment on generated code for
4605 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4606 is better to simply look in the body.
4607 * freeze.adb (Freeze_All): Update the comment of finalization
4608 collections. Replace the call to Associated_Collection with
4609 Finalization_Master. Replace the call to Build_Finalization_Collection
4610 with Build_Finalization_Master.
4611 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4612 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4613 a-fihema.
4614 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4615 Ada.Finalization. Add processing for children of System.Storage_Pools.
4616 * rtsfind.ads: Remove the naming of second level children of
4617 Ada.Finalization.
4618 Remove Ada_Finalization_Heap_Management from the list of units.
4619 Remove subtype Ada_Finalization_Child.
4620 Remove the following subprogram entities:
4621
4622 RE_Allocate
4623 RE_Deallocate
4624 RE_Finalization_Collection
4625 RE_Finalization_Collection_Ptr
4626 RE_Set_Finalize_Address_Ptr
4627
4628 Add the naming of second level children of System.Storage_Pools.
4629 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4630 the list of units.
4631 Add subtype System_Storage_Pools_Child.
4632 Add the following subprogram entities to System.Finalization_Masters:
4633
4634 RE_Finalization_Master
4635 RE_Finalization_Master_Ptr
4636
4637 Add the following subprogram entities to System.Storage_Pools.Subpools:
4638
4639 RE_Allocate_Any_Controlled
4640 RE_Deallocate_Any_Controlled
4641 RE_Root_Storage_Pool_With_Subpools
4642 RE_Root_Subpool
4643 RE_Subpool_Handle
4644
4645 Move the following subprogram entities from
4646 Ada.Finalization.Heap_Management to System.Finalization_Masters:
4647
4648 RE_Add_Offset_To_Address
4649 RE_Attach
4650 RE_Base_Pool
4651 RE_Detach
4652
4653 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
4654 Set_Associated_Collection with Set_Finalization_Master.
4655 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
4656 BIP_Finalization_Master is created.
4657 * s-finmas.adb: New unit System.Finalization_Masters.
4658 * s-finmas.ads: New unit System.Finalization_Masters.
4659 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
4660 * s-stposu.ads, s-stposu.adb: New unit implementing
4661 System.Storage_Pools.Subpools.
4662
46632011-08-29 Bob Duff <duff@adacore.com>
4664
4665 * tbuild.adb: Add assertion.
4666
8c889ae4
AC
46672011-08-29 Thomas Quinot <quinot@adacore.com>
4668
4669 * s-pooglo.adb: Minor reformatting.
4670
46712011-08-29 Ed Schonberg <schonberg@adacore.com>
4672
4673 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
4674 an indexed component of a packed array whose element type is a record
4675 with a representation clause different from that of the right-hand
4676 side, generate a temporary to minimuze the number of bit-field
4677 operations generated.
4678
46792011-08-29 Ed Schonberg <schonberg@adacore.com>
4680
4681 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
4682 declarations, and thus are likely insertion points for actions.
4683
46842011-08-29 Bob Duff <duff@adacore.com>
4685
4686 * einfo.ads: Minor comment fix.
4687
1a07a71a
AC
46882011-08-29 Robert Dewar <dewar@adacore.com>
4689
4690 * frontend.adb, gnat1drv.adb: Minor reformatting.
4691
46922011-08-29 Tristan Gingold <gingold@adacore.com>
4693
4694 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
4695 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
4696 space in front of the header.
4697
4bcd6411
JK
46982011-08-29 Johannes Kanig <kanig@adacore.com>
4699
4700 * frontend.adb (Frontend): Exit after creating Standard package when
4701 -gnatd.H is present.
4702 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
4703 present.
4704
f0f88eb6
RD
47052011-08-29 Robert Dewar <dewar@adacore.com>
4706
4707 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
4708 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
4709 snames.ads-tmpl: Minor reformatting.
4710
3e37be71
PG
47112011-08-29 Philippe Gil <gil@adacore.com>
4712
4713 * prj.adb (Reset_Units_In_Table): New procedure.
4714 Reset units to avoid access to freed memory.
4715
94fb7608
AC
47162011-08-29 Thomas Quinot <quinot@adacore.com>
4717
4718 * get_scos.adb: When reading a P statement SCO without a pragma name
4719 (from an older ALI file), ensure that the Pragma_Name component is set
4720 to Unknown_Pragma (not left uninitialized).
4721
47222011-08-29 Vincent Celier <celier@adacore.com>
4723
4724 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
4725 modified to compute correctly the object path of a SAL project that is
4726 extending another library project.
4727 (Write_Path_File): New procedure.
4728 * makeutl.ads (Directories): New table moved from Buildgpr
4729 (Get_Directories): New procedure moved from Buildgpr
4730 (Write_Path_File): New procedure
4731 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
4732 paths before binding SALs, instead of Set_Ada_Paths.
4733 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
4734 Prj.
4735 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
4736 (Current_Source_Path_File_Of): New function
4737 (Set_Current_Object_Path_File_Of): New procedure
4738 (Current_Source_Object_File_Of): New function
4739 (Set_Current_Object_Path_File_Of): New procedure
4740 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
4741 (Current_Source_Path_File_Of): New function
4742 (Set_Current_Object_Path_File_Of): New procedure
4743 (Current_Source_Object_File_Of): New function
4744 (Set_Current_Object_Path_File_Of): New procedure
4745
47462011-08-29 Ed Schonberg <schonberg@adacore.com>
4747
4748 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
4749 packed entity, use a bit-field assignment only if there is no change of
4750 representation.
4751
c5ecd6b7
AC
47522011-08-29 Thomas Quinot <quinot@adacore.com>
4753
4754 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
4755 Is_RTU instead of using Chars comparisons.
4756
47572011-08-29 Thomas Quinot <quinot@adacore.com>
4758
4759 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
4760 temporary object if the actual is constrained, and the discriminants
4761 read from the stream don't match.
4762
47632011-08-29 Tristan Gingold <gingold@adacore.com>
4764
4765 * sem_attr.adb, exp_attr.adb: Add handling of
4766 Attribute_System_Allocator_Alignment
4767 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
4768 Attribute_System_Allocator_Alignment.
4769 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
4770 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
4771 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
4772 get_target_system_allocator_alignment.
4773
47742011-08-29 Arnaud Charlet <charlet@adacore.com>
4775
4776 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
4777 dependencies.
4778
8abdac29
AC
47792011-08-29 Arnaud Charlet <charlet@adacore.com>
4780
4781 * exp_ch3.adb (In_Runtime): Fix typo.
4782
df170605
AC
47832011-08-29 Bob Duff <duff@adacore.com>
4784
4785 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
4786
47872011-08-29 Ed Schonberg <schonberg@adacore.com>
4788
4789 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
4790 and a separate tag assignment is generated, ensure that the tag
4791 assignment is analyzed.
4792
864a4236
ES
47932011-08-29 Ed Schonberg <schonberg@adacore.com>
4794
4795 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
4796 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
4797 of statement lists that may contain local declarations.
df170605
AC
4798 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
4799 duplicate the triggering statements needed for the expansion of this
4800 construct, when the trigger is a dispatching call to a synchronized
4801 primitive.
864a4236 4802
7f394c1d
AC
48032011-08-29 Arnaud Charlet <charlet@adacore.com>
4804
4805 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
4806 * bindgen.adb: Add comments.
4807 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
4808 in CodePeer mode.
4809
2c1a2cf3
RD
48102011-08-29 Robert Dewar <dewar@adacore.com>
4811
4812 * exp_attr.adb: Minor reformatting.
4813 Minor code reorganization and commenting.
4814 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
4815 reformatting.
4816
0bfc9a64
AC
48172011-08-29 Thomas Quinot <quinot@adacore.com>
4818
4819 * get_scos.adb: Ignore chaining indicators not currently supported
4820 by Ada.
4821
48222011-08-29 Arnaud Charlet <charlet@adacore.com>
4823
4824 * system.ads: Minor editing.
4825
48262011-08-29 Arnaud Charlet <charlet@adacore.com>
4827
4828 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
4829 CodePeer mode.
4830 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
4831 Attribute_Elab_Subp_Body.
4832 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
4833 * sem_util.adb: Update comments.
4834
828d4cf0
TQ
48352011-08-29 Thomas Quinot <quinot@adacore.com>
4836
4837 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
4838 pragma name for each SCO statement corresponding to a pragma.
4839
5cd7bb15
AC
48402011-08-29 Arnaud Charlet <charlet@adacore.com>
4841
4842 * opt.ads: Minor editing.
4843
48442011-08-29 Yannick Moy <moy@adacore.com>
4845
4846 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
4847 that only made sense for CodePeer mode.
4848
48492011-08-29 Jose Ruiz <ruiz@adacore.com>
4850
4851 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
4852 which is no longer used.
4853 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
4854 handling of the 64-bit division check.
4855 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
4856 division available.
4857 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
4858 longer used.
4859
48602011-08-29 Thomas Quinot <quinot@adacore.com>
4861
4862 * get_scos.adb: Minor reformatting.
4863
25b589cb
AC
48642011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4865
4866 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
4867 statement list is wrapped in a block, the block is explicitly analyzed
4868 in order to properly redecorate the entities and create a servicing
4869 finalizer.
4870
48712011-08-29 Tristan Gingold <gingold@adacore.com>
4872
4873 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
4874 (Set_Zero_Cost_Handling): Remove.
4875
48762011-08-29 Thomas Quinot <quinot@adacore.com>
4877
4878 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
4879
1197ddb1
AC
48802011-08-29 Geert Bosch <bosch@adacore.com>
4881
4882 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
4883 instruction, as the latter may produce -0.0, which is not a valid VAX
4884 F float number.
4885 (Neg_G): Likewise for VAX F float.
4886
48872011-08-29 Robert Dewar <dewar@adacore.com>
4888
4889 * exp_util.adb: Minor reformatting.
4890
48912011-08-29 Yannick Moy <moy@adacore.com>
4892
4893 * sem_ch3.adb: Minor comment update.
4894
48952011-08-29 Thomas Quinot <quinot@adacore.com>
4896
4897 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
4898 the operand type.
4899
49002011-08-29 Thomas Quinot <quinot@adacore.com>
4901
4902 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
4903 current statement sequence on a generic instantiation or a subprogram
4904 declaration.
4905
8f66cda7
AC
49062011-08-29 Robert Dewar <dewar@adacore.com>
4907
4908 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
4909 Minor reformatting.
4910
49112011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4912
4913 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4914 Correct the check which involves the freeze node of a controlled or
4915 access-to-controlled type.
4916
49172011-08-29 Geert Bosch <bosch@adacore.com>
4918
4919 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
4920 statements.
4921 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
4922 Asm statements.
4923
cf161d66
AC
49242011-08-29 Yannick Moy <moy@adacore.com>
4925
4926 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
4927 for every index type and component type that is not a subtype_mark.
4928 (Process_Subtype): Set Etype of subtype.
4929
49302011-08-29 Robert Dewar <dewar@adacore.com>
4931
4932 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
4933 reorganization. Minor reformatting.
4934
7cc83cd8
AC
49352011-08-29 Steve Baird <baird@adacore.com>
4936
4937 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
4938 for CodePeer and ALFA modes.
4939
49402011-08-29 Ed Schonberg <schonberg@adacore.com>
4941
4942 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
4943 that comes from an enclosing scope if it is not the renaming of an
4944 actual, to handle properly a spurious ambiguity in an instance.
4945
76af4137
AC
49462011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4947
4948 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
4949 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
4950 use it instead of the Esize of the first parameter.
4951 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
4952 above change.
4953 <Size>: Likewise. Call it for composite types on the RM size.
4954
49552011-08-29 Yannick Moy <moy@adacore.com>
4956
4957 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
4958 * sem_util.adb (Unique_Name): Correct behaviour for names of
4959 compilation units.
4960
9b20e59b
AC
49612011-08-29 Yannick Moy <moy@adacore.com>
4962
4963 * sem_prag.adb (Check_Precondition_Postcondition): In formal
4964 verification mode, analyze pragma expression for correctness, for
4965 pre/post on library-level subprogram, as it is not expanded later.
4966
49672011-08-29 Yannick Moy <moy@adacore.com>
4968
4969 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
4970 in formal verification.
4971
49722011-08-29 Thomas Quinot <quinot@adacore.com>
4973
4974 * sem_util.adb: Minor reformatting.
4975 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
4976 there's no pragma.
4977 * par_sco.ads, par_sco.adb: Update comments.
4978
49792011-08-29 Yannick Moy <moy@adacore.com>
4980
4981 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
4982 associated getter/setter.
4983 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
4984
49852011-08-29 Vincent Celier <celier@adacore.com>
4986
4987 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
4988 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
4989 with declarations for Language_Kind and Dependency_Kind for Ada.
4990 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
4991 (Process_Compiler): Take into account the new attributes Dependency_Kind
4992 and Language_Kind.
4993 (Check_Configuration): Check if language kind is unit based, not if the
4994 language name is Ada.
4995 (Process_Exceptions_Unit_Based): Ditto
4996 (Add_Language): Remove default additions of language and dependency kind
4997 * prj.ads: Minor comment change
4998 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
4999
50002011-08-29 Johannes Kanig <kanig@adacore.com>
5001
5002 * debug.adb: Update comments.
5003
c5bc3df6
JM
50042011-08-24 Joseph Myers <joseph@codesourcery.com>
5005
5006 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5007 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5008 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5009 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5010 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5011
e3aa9eba
RO
50122011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5013
5014 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5015 (GNATLIBCFLAGS_FOR_C): Replace
5016 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5017 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5018 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5019 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5020
f446d60e
EB
50212011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5022
5023 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5024
588c8f48
EB
5025 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5026
5027 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5028
28d711bf
NR
50292011-08-05 Nicolas Roche <roche@adacore.com>
5030
5031 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5032 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5033 canadian cross.
5034 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5035
993f8920
AC
50362011-08-05 Matthew Heaney <heaney@adacore.com>
5037
5038 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5039 subprogram bodies declared out-of-order.
5040
50412011-08-05 Yannick Moy <moy@adacore.com>
5042
5043 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5044 entities directly in package Standard, otherwise skip the standard
5045 prefix.
5046
9b3956dd
RD
50472011-08-05 Robert Dewar <dewar@adacore.com>
5048
5049 * a-cbmutr.adb: Minor reformatting
5050 (Allocate_Node): refactor node allocation algorithm
5051
50522011-08-05 Robert Dewar <dewar@adacore.com>
5053
5054 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5055 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5056 mode.
5057 (Analyze_Pragma, case Check_Policy): Ditto.
5058 * sem_prag.ads (Check_Disabled): New function
5059 * snames.ads-tmpl: Add Name_Disable.
5060
50612011-08-05 Robert Dewar <dewar@adacore.com>
5062
5063 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5064 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5065
79e705d6
AC
50662011-08-05 Ed Schonberg <schonberg@adacore.com>
5067
5068 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5069 that appears in a generic formal part and applies to a formal
5070 subprogram.
5071
50722011-08-05 Robert Dewar <dewar@adacore.com>
5073
5074 * a-cbmutr.ads: Minor reformatting.
5075
23b6deca
AC
50762011-08-05 Matthew Heaney <heaney@adacore.com>
5077
5078 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5079 to check count, check sign of value instead.
5080 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5081 (Copy_Subtree): allocate copy of source element
5082 (Equal_Subtree): compare elements, not access objects
5083
50842011-08-05 Vincent Celier <celier@adacore.com>
5085
5086 * gnat_ugn.texi: Fix VMS alternative.
5087
a2773bd3
AC
50882011-08-05 Thomas Quinot <quinot@adacore.com>
5089
5090 * sem_ch11.adb: Add comment.
5091
50922011-08-05 Robert Dewar <dewar@adacore.com>
5093
5094 * exp_util.adb: Minor comment fix.
5095
50962011-08-05 Robert Dewar <dewar@adacore.com>
5097
5098 * scng.adb (Error_Unterminated_String): Improve flag position when
5099 comma present.
5100
51012011-08-05 Matthew Heaney <heaney@adacore.com>
5102
5103 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5104 tree containers).
5105 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5106 multiway tree containers.
5107
51082011-08-05 Robert Dewar <dewar@adacore.com>
5109
5110 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5111 * stylesw.adb: Implement -gnatyC to control comment spacing
5112 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5113 -gnatyc/C).
5114 * usage.adb: Add line for -gnatyC.
5115
51162011-08-05 Robert Dewar <dewar@adacore.com>
5117
f446d60e 5118 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
5119 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5120 synonym for COMMENTS2).
5121
dedac3eb
RD
51222011-08-05 Robert Dewar <dewar@adacore.com>
5123
5124 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5125 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5126 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5127 a-comutr.ads, lib-xref.adb: Minor reformatting.
5128
51292011-08-05 Robert Dewar <dewar@adacore.com>
5130
5131 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5132 warning if there is an exception handler present.
5133
7c62a85a
AC
51342011-08-05 Pascal Obry <obry@adacore.com>
5135
5136 * a-iteint.ads: Fix copyright year.
5137
51382011-08-05 Thomas Quinot <quinot@adacore.com>
5139
5140 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5141 statement SCO for a USE clause or a representation clause.
5142
51432011-08-05 Yannick Moy <moy@adacore.com>
5144
5145 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5146 between body and spec for stub.
5147 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5148 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5149 pragma precondition or postcondition, for which the enclosing
5150 subprogram or package in the AST is not the desired one, return empty.
5151
e49208a9
AC
51522011-08-05 Thomas Quinot <quinot@adacore.com>
5153
5154 * g-expect.adb: Minor reformatting.
5155
51562011-08-05 Bob Duff <duff@adacore.com>
5157
5158 * a-fihema.adb: Comment out OS_Lib.
5159
51602011-08-05 Matthew Heaney <heaney@adacore.com>
5161
5162 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5163 (unbounded multiway tree containers) and a-iteint.ads.
5164 * a-comutr.ads, a-comutr.adb:
5165 This is the new Ada 2012 unit for unbounded multiway tree containers
5166 * a-cimutr.ads, a-cimutr.adb
5167 This is the new Ada 2012 unit for indefinite multiway tree containers
5168 * a-iteint.ads: New file.
5169
201cdb74
RO
51702011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5171
f446d60e 5172 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 5173
d50f4827
AC
51742011-08-05 Bob Duff <duff@adacore.com>
5175
5176 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5177 subpools.
5178 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5179
51802011-08-05 Ed Schonberg <schonberg@adacore.com>
5181
5182 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5183 general indexing aspects of Ada2012. Called when analyzing indexed
5184 components when other interpretations fail.
5185 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5186 in an expression context where overloading is meaningful. This excludes
5187 the occurrence in an aspect specification (efficiency only).
5188 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5189 related to iterators can be set by an attribute specification, but
5190 cannot be queried.
5191 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5192 Constant_Indexing and Variable_Indexing.
5193 (Check_Indexing_Functions): New procedure to perform legality checks.
5194 Additional semantic checks at end of declarations.
5195
efe05dfc
AC
51962011-08-05 Sergey Rybin <rybin@adacore.com>
5197
5198 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5199 order of calling Tree_Write/Tree_Read routines made for aspects.
5200
52012011-08-05 Bob Duff <duff@adacore.com>
5202
5203 * a-fihema.adb (Finalize): Fix race condition.
5204
5f9cdefe
AC
52052011-08-05 Yannick Moy <moy@adacore.com>
5206
5207 * sem_ch12.adb (Analyze_Package_Instantiation,
5208 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5209 mode.
5210
52112011-08-05 Ed Schonberg <schonberg@adacore.com>
5212
5213 * sem_type.adb (Specific_Type): in an instance, the type-specific
5214 operand of an equality check that involves null may have a private
5215 type. Use full view to determine legality of construct.
5216
822868aa
AC
52172011-08-05 Vincent Celier <celier@adacore.com>
5218
5219 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5220 delete or close the file when the call to gnatmake was successful.
5221
52222011-08-05 Yannick Moy <moy@adacore.com>
5223
5224 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5225 Global_Discard_Names.
5226
52272011-08-05 Ed Schonberg <schonberg@adacore.com>
5228
5229 * sinfo.ads: comments on use of entity field for aspect specifications.
5230
52312011-08-05 Ed Schonberg <schonberg@adacore.com>
5232
5233 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5234 node is not itself an entity but a selected component, it is a
5235 rewritten parameterless call to an en enclosing synchronized operation,
5236 and this expansion will be performed again in the instance, so there is
5237 no global information to preserve.
5238
44a10091
AC
52392011-08-05 Javier Miranda <miranda@adacore.com>
5240
5241 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5242 for renamings of predefined primitives.
5243 (In_Predef_Prims_DT): New subprogram.
5244
52452011-08-05 Ed Schonberg <schonberg@adacore.com>
5246
5247 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5248 possible interpretation of name is a reference type, add an
5249 interpretation that is the designated type of the reference
5250 discriminant of that type.
5251 * sem_res.adb (resolve): If the interpretation imposed by context is an
5252 implicit dereference, rewrite the node as the deference of the
5253 reference discriminant.
5254 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5255 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5256 parent type or base type.
5257 * sem_ch4.adb (Process_Indexed_Component,
5258 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5259 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5260 Check for implicit dereference.
5261 (List_Operand_Interps): Indicate when an implicit dereference is
5262 ambiguous.
5263 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5264
52652011-08-05 Thomas Quinot <quinot@adacore.com>
5266
5267 * scos.ads: Update documentation of SCO table. Pragma statements can now
5268 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5269 * par_sco.ads, par_sco.adb: Implement the above change.
5270 (Process_Decisions_Defer): Generate a P decision for the first parameter
5271 of a dyadic pragma Debug.
5272 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5273 necessary.
5274 * put_scos.adb: Code simplification based on above change.
5275
bb3c784c
AC
52762011-08-05 Robert Dewar <dewar@adacore.com>
5277
5278 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5279 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5280 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5281 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5282
52832011-08-05 Bob Duff <duff@adacore.com>
5284
5285 * a-stunau.ads, g-spipat.adb: Update comments.
5286
36f686f9
BD
52872011-08-05 Bob Duff <duff@adacore.com>
5288
5289 * a-fihema.ads: Minor comment fix.
5290 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5291 correct.
5292 (Attach, Detach): Remove some unnecessary code.
5293 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5294
7882673f
BD
52952011-08-05 Bob Duff <duff@adacore.com>
5296
5297 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5298 allocation for Objects component. This simplifies the code somewhat. It
5299 is also a little more efficient in the not-so-unusual case where there
5300 are no controlled objects allocated.
5301 Make Finalization_Started flag atomic.
5302 (Finalize): Avoid unnecessary detachment of items from the list.
5303 (pcol): Minor cleanup.
5304
d34cd274
AC
53052011-08-05 Ed Schonberg <schonberg@adacore.com>
5306
5307 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5308 package whose name is the same as that of the generic unit, or its
5309 ultimate prefix.
5310
53112011-08-05 Bob Duff <duff@adacore.com>
5312
5313 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5314 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5315 Minor comment fixes.
5316
00332244
AC
53172011-08-05 Arnaud Charlet <charlet@adacore.com>
5318
5319 * make.adb (Linking_Phase): No longer need to set source search path
5320 before calling gnatlink in CodePeer mode.
5321 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5322 gcc in CodePeer mode, since the binder generated file no longer has a
5323 'with Main'.
5324 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5325 * switch-c.adb: Update comment.
5326
53272011-08-05 Thomas Quinot <quinot@adacore.com>
5328
5329 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5330
53312011-08-05 Nicolas Roche <roche@adacore.com>
5332
5333 * gnat_ugn.texi: Fix minor syntax error issue.
5334
53352011-08-05 Vincent Celier <celier@adacore.com>
5336
5337 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5338 delete or close the file when the call to gnatmake returns a non
5339 successful return code.
5340
53412011-08-05 Ed Schonberg <schonberg@adacore.com>
5342
5343 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5344 check, indicate that the copy of the original node does not come from
5345 source, to prevent an infinite recursion of the expansion.
5346
53472011-08-05 Johannes Kanig <kanig@adacore.com>
5348
5349 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5350 VC generation for subprogram bodies.
5351
53522011-08-05 Yannick Moy <moy@adacore.com>
5353
5354 * einfo.ads: Typo.
5355 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5356 the base type with the smallest allowed base type.
5357
53582011-08-05 Sergey Rybin <rybin@adacore.com>
5359
5360 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5361 aspects.
5362
53632011-08-05 Ed Schonberg <schonberg@adacore.com>
5364
5365 * sem_ch12.ads: minor comment updates.
5366
53672011-08-05 Ed Schonberg <schonberg@adacore.com>
5368
5369 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5370 instantiation and a formal package the compiler generates a package
5371 renaming declaration so that the generic name within the declaration
5372 is interpreted as a renaming of the instance. At the end of a formal
5373 package declaration, this renaming must become invisible.
5374
0da80d7d
AC
53752011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5376
5377 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5378 comparison and rely on concrete entities instead.
5379
53802011-08-05 Ed Schonberg <schonberg@adacore.com>
5381
5382 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5383 and discriminants, to indicate that the type has an access discriminant
5384 that supports implicit dereference.
5385 * snames.ads-tmpl: Add names of aspects and attributes related to
5386 Ada2012 iterators: constant_indexing, default_iterator,
5387 iterator_element, implicit_dereference, variable_indexing.
5388 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5389 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5390 iterator-related aspects.
5391 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5392
53932011-08-05 Sergey Rybin <rybin@adacore.com>
5394
5395 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5396 metrics in gnatmetric to cover new kinds of coupling mentrics.
5397
53982011-08-05 Steve Baird <baird@adacore.com>
5399
5400 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 5401 of calling the user-defined main subprogram.
0da80d7d
AC
5402 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5403 is set) Call_Main_Subprogram ahead of, as opposed to
5404 inside of, Main.
5405 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5406 generation of a "with" of the user-defined main subprogram.
5407 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5408 (which is now called from Gen_Main instead).
5409
73242473
AC
54102011-08-05 Emmanuel Briot <briot@adacore.com>
5411
5412 * projects.texi: Added reference to the Makefile package.
5413
54142011-08-05 Thomas Quinot <quinot@adacore.com>
5415
5416 * exp_ch7.adb: Minor comment rewording.
5417
54182011-08-05 Ed Falis <falis@adacore.com>
5419
5420 * env.c: Fix comment.
5421
54222011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5423
5424 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5425 character comparison and rely on concrete entities instead.
5426
97ed5872
AC
54272011-08-05 Ed Schonberg <schonberg@adacore.com>
5428
5429 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5430 suggested by AI95-0068.
5431
54322011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5433
5434 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5435 the two potential initialization calls. This accounts for any
5436 access-before-elaboration checks which may precede the initialization
5437 calls.
5438 (Next_Suitable_Statement): New routine. Returns the next real statement
5439 after the input node while skipping generated checks.
5440 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5441 with comment on usage.
5442 Do not generate Elaborate_All when the trigger is a finalization call
5443 coming from a type init proc.
5444 (Check_Elab_Call): Propagate the initialization procedure context to
5445 subsequent calls to Check_A_Call.
5446 (Check_Internal_Call_Continue): Propagate the initialization procedure
5447 context to subsequent calls to Check_Elab_Call.
5448 (Is_Finalization_Procedure): New routine. Returns True if the input
5449 entity denotes a [Deep_]Finalize routine.
5450 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5451 along with comment on usage.
5452
54532011-08-05 Vadim Godunko <godunko@adacore.com>
5454
5455 * s-atocou.ads: Add list of supported platforms.
5456
54572011-08-05 Yannick Moy <moy@adacore.com>
5458
5459 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5460
5461 * opt.ads (Disable_ALI_File): new Boolean flag
5462 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5463
54642011-08-05 Ed Falis <falis@adacore.com>
5465
5466 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5467 environ is properly defined.
5468
54692011-08-05 Vincent Celier <celier@adacore.com>
5470
5471 * make.adb (Compilation_Phase): Exit immediately when all objects have
5472 been found up to date, to avoid multiple exit messages.
5473 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5474 same project for languages with no compiler.
5475 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5476 -eI.
9aff36e9
RD
54772011-08-05 Robert Dewar <dewar@adacore.com>
5478
5479 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5480 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5481 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5482 s-atocou-builtin.adb: Minor reformatting.
5483
406935b6
AC
54842011-08-05 Yannick Moy <moy@adacore.com>
5485
5486 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5487 if the node to wrap is a pragma check, this node and enclosed
5488 expression are not expanded, so do not apply any transformations here.
5489 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5490 introducing transient scopes.
5491
54922011-08-05 Jose Ruiz <ruiz@adacore.com>
5493
5494 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5495 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5496 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5497 routine is available, so we use the default implementation of these
5498 functions.
5499 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5500 support for copying attributes on VxWorks 6.
5501
55022011-08-05 Yannick Moy <moy@adacore.com>
5503
5504 * debug.adb: Remove use of -gnatd.D.
5505 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5506 * opt.ads: Simplify variables for ALFA mode, to keep one only
5507 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5508 to ALFA mode.
5509
55102011-08-05 Vincent Celier <celier@adacore.com>
5511
5512 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5513 Builder'Default_Switches.
5514
55152011-08-05 Vincent Celier <celier@adacore.com>
5516
5517 * makeusg.adb: Add lines for --create-map-file switches.
5518
55192011-08-05 Ed Schonberg <schonberg@adacore.com>
5520
5521 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5522 profile is incomplete and the full view is available, replace it with
5523 the full view.
5524 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5525 incomplete, freezing the subprogram is delayed until the full view is
5526 frozen.
5527 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5528 fixed-point multiplication operator and the predefined operator is
5529 resolved in favor of the user-defined one.
5530
96c891b3
RO
55312011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5532
5533 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5534 CONST_CAST.
5535
276e7ed0
AC
55362011-08-04 Ed Schonberg <schonberg@adacore.com>
5537
5538 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5539 whether a type lacks user-defined Read or Write operations, or has a
5540 component that lacks them.
5541 * sem_attr.adb (Check_Stream_Attribute): if restriction
5542 No_Default_Stream_Attributes is active, verify that all subcomponent
5543 types of the target have user-defined stream operations, and report
5544 error otherwise.
5545 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5546 * exp_strm.adb: Build_Elementary_Input_Call,
5547 Build_Elementary_Write_Call): remove checks for restriction
5548 No_Default_Stream_Attributes, now checked in semantics.
5549
55502011-08-04 Vincent Celier <celier@adacore.com>
5551
5552 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5553 switches on the command line, look for all valid --RTS switches in the
5554 Builder switches and for each language use the first runtime name found
5555 to invoke gprconfig.
5556 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5557 command line and there is no auto-configuration.
5558 (Runtime_Name_Set_For): New function.
5559
55602011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5561
5562 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5563 elaborate initialization expression for variable Abort when processing
5564 a package body or a declaration.
5565 (Create_Finalizer): Propagate the package context when creating the
5566 exception-related variables.
5567 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5568 For_Package along with usage comment.
5569
19172ae9
AC
55702011-08-04 Arnaud Charlet <charlet@adacore.com>
5571
5572 * gcc-interface/Makefile.in: Clean up targets.
5573 Enable new package for atomic counters and copy-on-write implementation
5574 of unbounded strings on x86 platforms.
5575 * gcc-interface/Make-lang.in: Update dependencies.
5576
0319cacc
AC
55772011-08-04 Robert Dewar <dewar@adacore.com>
5578
5579 * exp_ch7.adb: Minor reformatting.
5580
55812011-08-04 Robert Dewar <dewar@adacore.com>
5582
5583 * exp_strm.adb: Minor reformatting.
5584
55852011-08-04 Vadim Godunko <godunko@adacore.com>
5586
5587 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5588 operations are not supported.
5589 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5590 * s-atocou-x86.adb: New file.
5591 * Makefile.rtl: Add s-atocou.o file
5592
55932011-08-04 Arnaud Charlet <charlet@adacore.com>
5594
5595 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5596 (Compilation_Phase): ... here.
5597 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5598
55992011-08-04 Thomas Quinot <quinot@adacore.com>
5600
5601 * Make-generated.in: Fix minor typo in comment.
5602
26e7e1a0
AC
56032011-08-04 Thomas Quinot <quinot@adacore.com>
5604
5605 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5606 the project path.
5607
56082011-08-04 Robert Dewar <dewar@adacore.com>
5609
5610 * a-coinho.adb: Minor reformatting.
5611
56122011-08-04 Robert Dewar <dewar@adacore.com>
5613
5614 * a-coinho.ads: Minor reformatting.
5615
56162011-08-04 Vadim Godunko <godunko@adacore.com>
5617
5618 * s-atocou.ads, s-atocou.adb: New files.
5619 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5620 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5621 direct use of GCC's atomic builtins and replace them by use of new
5622 atomic counter package.
5623
56242011-08-04 Ed Schonberg <schonberg@adacore.com>
5625
5626 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5627
56282011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5629
5630 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5631 with a call to Get_External_Tag.
5632 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5633 subprogram usage. Remove the guard against package declarations and
5634 bodies since Build_Cleanup_Statements is no longer invoked in that
5635 context.
5636 (Build_Components): Initialize Tagged_Type_Stmts when the context
5637 contains at least one library-level tagged type.
5638 (Build_Finalizer): New local variables Has_Tagged_Types and
5639 Tagged_Type_Stmts along with associated comments on usage. Update the
5640 logic to include tagged type processing.
5641 (Create_Finalizer): Insert all library-level tagged type unregistration
5642 code before the jump block circuitry.
5643 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
5644 (Expand_N_Package_Declaration): Remove the call to
5645 Build_Cleanup_Statements.
5646 (Process_Tagged_Type_Declaration): New routine. Generate a call to
5647 unregister the external tag of a tagged type.
5648 (Processing_Actions): Reimplemented to handle tagged types.
5649 (Process_Declarations): Detect the declaration of a library-level
5650 tagged type and carry out the appropriate actions.
5651 (Unregister_Tagged_Types): Removed. The machinery has been directly
5652 merged with Build_Finalizer.
5653
7483c888
AC
56542011-08-04 Robert Dewar <dewar@adacore.com>
5655
5656 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
5657 gnatls.adb, exp_ch3.adb: Minor reformatting.
5658
56592011-08-04 Marc Sango <sango@adacore.com>
5660
5661 * sem_attr.adb (Analyze_Attribute): Replace the message
5662 "invisible attribute of}" of the spark restriction violation in
5663 attribute reference by the simple message "invisible attribute of type".
5664 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
5665 two insertion characters: '&' and '}'.
5666
56672011-08-04 Vadim Godunko <godunko@adacore.com>
5668
5669 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
5670 * a-coinho.ads, a-coinho.adb: New file.
5671 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
5672
5207696c
AC
56732011-08-04 Nicolas Roche <roche@adacore.com>
5674
5675 * alfa_test.adb: Not all ali files are containing alfa information even
5676 if compiled with -gnatd.F. So suppress warning about missing ALFA
5677 information.
5678
56792011-08-04 Yannick Moy <moy@adacore.com>
5680
5681 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
5682 scope.
5683 * put_alfa.adb: Check that scope name is not empty.
5684
56852011-08-04 Ed Schonberg <schonberg@adacore.com>
5686
5687 * exp_ch3.adb (Stream_Operation_Ok): new predicate
5688 Needs_Elementary_Stream_Operation, to determine whether user-defined
5689 Read and Write attributes are available for the elementary components
5690 of the given type. If only the predefined attributes are available,
5691 then when restriction No_Default_Stream_Attributes is active the
5692 predefined stream attributes for the composite type cannot be created.
5693
56942011-08-04 Robert Dewar <dewar@adacore.com>
5695
5696 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
5697 Put routines in alpha order
5698
2bd2d858
JR
56992011-08-04 Jose Ruiz <ruiz@adacore.com>
5700
5701 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
5702 * gcc-interface/Make-lang.in: Update dependencies.
5703
8fae6016
AC
57042011-08-04 Arnaud Charlet <charlet@adacore.com>
5705
5706 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
5707 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
5708 gnat1why).
5709
a54d0eb4
AC
57102011-08-04 Robert Dewar <dewar@adacore.com>
5711
5712 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
5713 lib-xref-alfa.adb: Minor reformatting.
5714
57152011-08-04 Marc Sango <sango@adacore.com>
5716
5717 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
5718 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
5719 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
5720 mode.
5721
57222011-08-04 Tristan Gingold <gingold@adacore.com>
5723
5724 * bindgen.adb (Gen_Adainit_C): Remove.
5725 (Gen_Adafinal_C): Ditto.
5726 (Gen_Elab_Externals_C): Ditto.
5727 (Gen_Elab_Calls_C): Ditto.
5728 (Gen_Elab_Order_C): Ditto.
5729 (Gen_Elab_Defs_C): Ditto.
5730 (Gen_Finalize_Library_C): Ditto.
5731 (Gen_Finalize_Library_Defs_C): Ditto.
5732 (Gen_Main_C): Ditto.
5733 (Gen_Output_File_C): Ditto.
5734 (Gen_Restrictions_C): Ditto.
5735 (Gen_Versions_C): Ditto.
5736 (Write_Info_Ada_C): Ditto.
5737 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
5738 (Gen_Output_File): Do not force Ada_Bind_File anymore.
5739 Always call Gen_Output_File_Ada.
5740 * gnatlink.adb (Begin_Info): Now a constant.
5741 (End_Info): Ditto.
5742 (Ada_Bind_File): Remove
5743 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
5744 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
5745 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
5746 * opt.ads (Ada_Bind_File): Remove.
5747
57482011-08-04 Thomas Quinot <quinot@adacore.com>
5749
5750 * projects.texi: Document target-specific directory in default project
5751 path for gnatmake.
5752
57532011-08-04 Thomas Quinot <quinot@adacore.com>
5754
5755 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
5756 path in all cases .
5757
24558db8
AC
57582011-08-04 Yannick Moy <moy@adacore.com>
5759
5760 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
5761 opt.ads, lib-xref.ads: Code clean up.
5762
57632011-08-04 Yannick Moy <moy@adacore.com>
5764
5765 * gnat_rm.texi: Update description of Test_Case
5766 * gnat_ugn.texi: Typo.
5767
57682011-08-04 Ed Falis <falis@adacore.com>
5769
5770 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
5771
57722011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5773
5774 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
5775 it is of type Root_Controlled. This action eliminates fields Prev and
5776 Next from type equality.
5777
57782011-08-04 Yannick Moy <moy@adacore.com>
5779
5780 * lib-xref-alfa.adb: Correct typo.
5781
57822011-08-04 Matthew Heaney <heaney@adacore.com>
5783
5784 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
5785 component.
5786
1f9939b5
AC
57872011-08-04 Yannick Moy <moy@adacore.com>
5788
5789 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
5790 (Analyze_Pragma): allow static string expression for name of Test_Case,
5791 instead of simply string literals.
5792 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
5793 expressions.
5794
57952011-08-04 Vincent Celier <celier@adacore.com>
5796
5797 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
5798 case suffixes to find truncated main sources.
5799
58002011-08-04 Tristan Gingold <gingold@adacore.com>
5801
5802 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
5803 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
5804 (Compute_Current_Task): Ditto.
5805
58062011-08-04 Tristan Gingold <gingold@adacore.com>
5807
5808 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
5809
58102011-08-04 Yannick Moy <moy@adacore.com>
5811
5812 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
5813 library-level constant.
5814 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
5815 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
5816 used as selector of parameter association, in ALFA mode.
5817
15d8a51d
AC
58182011-08-04 Robert Dewar <dewar@adacore.com>
5819
5820 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
5821 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
5822 reformatting.
5823
58242011-08-04 Arnaud Charlet <charlet@adacore.com>
5825
5826 * make.adb (Linking_Phase): Set source search path before calling
5827 gnatlink in CodePeer mode.
5828
f46faa08
AC
58292011-08-04 Javier Miranda <miranda@adacore.com>
5830
5831 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
5832 Remove code which takes care of building TSDs.
5833 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
5834 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
5835 the accessibility check in VM targets.
5836 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
5837 (Building_Static_DT): Now returns false for VM targets.
5838 (Build_VM_TSDs): Removed.
5839 (Expand_Interface_Conversion): Generate missing runtime check for
5840 conversions to interface types whose target type is unknown at compile
5841 time.
5842 (Make_VM_TSD): Add missing code to disable the generation of calls to
5843 Check_TSD if the tagged type is not defined at library level, or not
5844 has a representation clause specifying its external tag, or -gnatdQ is
5845 active.
5846 * exp_disp.ads (Build_VM_TSDs): Removed.
5847 (Make_VM_TSDs): Spec relocated from exp_disp.adb
5848 * sem_disp.adb (Check_Dispatching_Operation): No code required to
5849 register primitives in the dispatch tables in VM targets.
5850 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
5851 initialization of class-wide interface objects in VM targets.
5852 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
5853 of Make_DT).
5854
58552011-08-04 Jerome Lambourg <lambourg@adacore.com>
5856
5857 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
5858 when dotnet-ld cannot be found.
5859
58602011-08-04 Arnaud Charlet <charlet@adacore.com>
5861
5862 * bindgen.adb: Simplify significantly generation of binder body file in
5863 CodePeer mode.
5864 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
5865 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
5866 not expanded).
5867
2ba7e31e
AC
58682011-08-04 Yannick Moy <moy@adacore.com>
5869
5870 * sem_prag.adb, sem.ads: Code cleanup.
5871
58722011-08-04 Tristan Gingold <gingold@adacore.com>
5873
5874 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
5875 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
5876 results if possible.
5877 * s-stusta.adb (Print): Adjust after changes in s-stausa.
5878 * gnat_ugn.texi: Update dynamic stack usage section.
5879
58802011-08-04 Steve Baird <baird@adacore.com>
5881
5882 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
5883 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
5884 contains only a call to the user-defined main subprogram.
5885 (Gen_Main_Ada) - If CodePeer_Mode is set, then
5886 call the "wrapper" subprogram instead of directly
5887 calling the user-defined main subprogram.
5888
58892011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5890
5891 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
5892 alternatives of a case statement for controlled objects. Rename local
5893 variable A to Dead_Alt.
5894 (Expand_N_If_Statement): Check the then and else statements of an if
5895 statement for controlled objects. Check the then statements of all
5896 elsif parts of an if statement for controlled objects.
5897 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
5898 objects.
5899 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
5900 detects a loop associated with the expansion of an array object.
5901 Augment the processing of the loop statements to account for a possible
5902 wrap done by Process_Statements_For_Controlled_Objects.
5903 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
5904 statements and abortable part of an asynchronous select for controlled
5905 objects.
5906 (Expand_N_Conditional_Entry_Call): Check the else statements of a
5907 conditional entry call for controlled objects.
5908 (Expand_N_Selective_Accept): Check the alternatives of a selective
5909 accept for controlled objects.
5910 (Expand_N_Timed_Entry_Call): Check the entry call and delay
5911 alternatives of a timed entry call for controlled objects.
5912 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
5913 exception handler for controlled objects.
5914 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5915 Add formal parameter Nested_Constructs along with its associated
5916 comment.
5917 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
5918 Requires_Cleanup_Actions.
5919 (Process_Statements_For_Controlled_Objects): New routine.
5920 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
5921 routine. Inspect a node which contains a non-handled sequence of
5922 statements for controlled objects. If such an object is found, the
5923 statements are wrapped in a block.
5924
1bf773bb
AC
59252011-08-04 Bob Duff <duff@adacore.com>
5926
5927 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
5928 need to compare with Class_Wide_Type (T2), in order to get at the
5929 original class-wide type node.
5930 * sem_type.ads (Covers): Improve the comment.
5931 * einfo.ads (Class_Wide_Type): Improve the comment.
5932 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
5933 the type of the Deref.
5934
59352011-08-04 Yannick Moy <moy@adacore.com>
5936
5937 * gnat_rm.texi: Document that Test_Case pragma can only appear on
5938 separate declarations.
5939 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
5940 check identifier of pragma argument.
5941 (Chain_TC): check that no other test case associated to the same entity
5942 share the same name.
5943 (Check_Test_Case): disallow test case inside subprogram body
5944 (Analyze_Pragma): correct call to check identifier and not argument
5945 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
5946 function gets name from test case pragma.
5947
dac3bede
YM
59482011-08-04 Yannick Moy <moy@adacore.com>
5949
5950 * gnat_rm.texi: Document new pragma and aspect.
5951 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
5952 (No_Duplicates_Allowed): new constant array defining whether duplicates
5953 aspects of each kind can appear on the same declaration.
5954 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
5955 field, which points to a node holding the previous Spec_PPC_List.
5956 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
5957 through the indirection with Contract.
5958 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
5959 * par-prag.adb (Prag): do nothing on Test_Case pragma
5960 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
5961 be called directly.
5962 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
5963 component Ensures of Test_Case.
5964 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
5965 (Analyze_Generic_Subprogram_Declaration,
5966 Analyze_Subprogram_Instantiation,
5967 Analyze_Abstract_Subprogram_Declaration,
5968 Analyze_Subprogram_Body_Helper,
5969 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
5970 insert contract in subprogram node at point of definition
5971 * sem_ch13.adb
5972 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
5973 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
5974 corresponding pragma
5975 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
5976 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
5977 similar to the analysis of pre/post
5978 (Derive_Subprogram): insert contract in subprogram node at point of
5979 derivation.
5980 * sem_prag.adb, sem_prag.ads
5981 (Check_Arg_Is_String_Literal, Check_Identifier):
5982 new checking procedures to be called in treatment of pragmas
5983 (Check_Test_Case): new procedure to check that a Test_Case aspect or
5984 pragma is well-formed. This does not check currently that 'Result is
5985 used only in the Ensures component of a Test_Case.
5986 (Analyze_Pragma): add case for Test_Case
5987 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
5988 components of a Test_Case.
5989 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
5990 expressions in the 3rd (and 4th if present) arguments of a Test_Case
5991 pragma, treated as spec expressions.
5992 (Sig_Flags): add value -1 for Test_Case.
5993 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
5994 Get_Requires_From_Test_Case_Pragma): getters for both expression
5995 components of a Test_Case.
5996 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
5997 indirection between an entry or [generic] subprogram entity and its
5998 pre/post + test-cases.
5999 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6000 get/set for fields of an N_Contract node.
6001 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6002 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6003 names and pragma for Test_Case.
6004 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6005
6a2e5d0f
AC
60062011-08-04 Vincent Celier <celier@adacore.com>
6007
6008 * gnat_ugn.texi: Improve documentation of gnatmake switch
6009 --source-info-file=.
6010
60112011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6012
6013 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6014 type). Initialize Atyp to the appropriate type which is later checked
6015 for completion. Rewrite the assertion associated with private type
6016 completion.
6017
60182011-08-04 Ed Falis <falis@adacore.com>
6019
6020 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6021 initialize the number of CPUs.
6022
60232011-08-04 Ed Schonberg <schonberg@adacore.com>
6024
6025 * sem_type.adb (Disambiguate): New subsidiary routine
6026 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6027 equality on an anonymous access type whose designated type is private
6028 does not lead to an ambiguity with the universal access equality
6029 operator in the body or child units of the defining package. The same
6030 is true for a multiplication operator on a private type completed with
6031 a fixed-point-type.
6032
60332011-08-04 Javier Miranda <miranda@adacore.com>
6034
6035 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6036 (Normalize_Scalars_Config): Removed.
6037 * opt.adb
6038 (Register_Opt_Config_Switches): Remove registering config values of
6039 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6040 (Restore_Opt_Config_Switches): Remove code which restores the values of
6041 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6042 Init_Or_Norm_Scalars.
6043 (Save_Opt_Config_Switches): Remove code which saves values of
6044 Init_Or_Norm_Scalars and Normalize_Scalars.
6045 (Set_Opt_Config_Switches): Remove code which restores config values of
6046 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6047 Init_Or_Norm_Scalars.
6048
60492011-08-04 Yannick Moy <moy@adacore.com>
6050
6051 * frontend.adb (Frontend): remove previous patch to avoid full
6052 qualification in ALFA mode.
6053 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6054 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6055 unique name for an entity, which could be used to identify the entity
6056 across compilation units.
6057
60582011-08-04 Thomas Quinot <quinot@adacore.com>
6059
6060 * prj-env.adb
6061 (Initialize_Default_Project_Path): Add target specific directory
6062 ($prefix/$target/lib/gnat) in front of project path in all cases
6063 (making gnatmake's behaviour consistent with gprbuild).
6064 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6065 Pass target name from Sdefault to project subsystem.
6066 * gnatls.adb: Show new target specific default project directory.
6067
60682011-08-04 Johannes Kanig <kanig@adacore.com>
6069
6070 * cstand.adb: Add Information to Identifier in Standard
6071 (Identifer_For): Set Entity to the corresponding entity
6072
483361a6
AC
60732011-08-04 Sergey Rybin <rybin@adacore.com>
6074
6075 * gnat_ugn.texi: Update doc on gnatcheck.
6076
60772011-08-04 Yannick Moy <moy@adacore.com>
6078
6079 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6080 xrefs in a scope.
6081
60822011-08-04 Yannick Moy <moy@adacore.com>
6083
6084 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6085 performing expansion.
6086 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6087 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6088 it is not called in ALFA mode.
6089
ef5569c6
AC
60902011-08-04 Emmanuel Briot <briot@adacore.com>
6091
6092 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6093 after all, so removed.
6094
60952011-08-04 Sergey Rybin <rybin@adacore.com>
6096
6097 * vms_data.ads: Add missing VMS qualifiers.
6098
1ab4a286
EB
60992011-08-04 Emmanuel Briot <briot@adacore.com>
6100
6101 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6102 the list of files on the command line after processing it through
6103 Complete_Mains.
6104
7ae0d98c
AC
61052011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6106
6107 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6108 processing for .NET/JVM. These targets can now benefit from
6109 Raise_From_Controlled_Operation and they share the same processing with
6110 standard targets.
6111 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6112 These targets need transient scopes in order to properly finalize short
6113 lived controlled objects.
6114 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6115 NET/JVM. These targets can now benefit from
6116 Raise_From_Controlled_Operation and they share the same processing with
6117 standard targets.
6118
61192011-08-04 Geert Bosch <bosch@adacore.com>
6120
6121 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6122
61232011-08-04 Ed Schonberg <schonberg@adacore.com>
6124
6125 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6126 Expand_Record_Aggregate, to determine whether aggregate must be
6127 expanded into assignments. This is the case if the ancestor part is
6128 private, regarless of the setting of the flag Has_Private_Ancestor.
6129
61302011-08-04 Ed Falis <falis@adacore.com>
6131
6132 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6133
61342011-08-04 Bob Duff <duff@adacore.com>
6135
6136 * sinfo.ads: Fix comment.
6137
61382011-08-04 Steve Baird <baird@adacore.com>
6139
6140 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6141 choose a package name in much the same way as is
6142 done for JGNAT when VM_Target /= No_VM, except that
6143 a slightly more distinctive prefix string is used.
6144
61452011-08-04 Emmanuel Briot <briot@adacore.com>
6146
6147 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6148 gnatmake command line.
6149 This behavior was never documented (and was supported only because of
6150 an early bug in the code). This case might lead to ambiguous cases
6151 (between unit names and truncated base names without suffixes).
6152
87729e5a
AC
61532011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6154
6155 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6156 Remove the external tag of a tagged type from the internal hash table.
6157 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6158 expanded usage of the routine. Strenghten the check for Is_Master. Add
6159 processing for tagged types.
6160 (Build_Finalizer): Create all the necessary lists used in finalizer
6161 creation when the processed context is a package that may contain
6162 tagged types.
6163 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6164 Requires_Cleanup_Actions.
6165 (Expand_N_Package_Body): Package bodies may need clean up code
6166 depending on whether they contain tagged types.
6167 (Expand_N_Package_Declaration): Package declarations may need clean up
6168 code depending on whether they contain tagged types.
6169 (Unregister_Tagged_Types): New routine. Search through a list of
6170 declarations or statements, looking for non-abstract Ada tagged types.
6171 For each such type, generate code to unregister the external tag.
6172 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6173 Requires_Cleanup_Actions.
6174 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6175 through a list of declarations or statements looking for non-abstract
6176 Ada tagged types or controlled objects.
6177 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6178 Requires_Cleanup_Actions.
6179 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6180 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6181 RE_Unit_Table.
6182
61832011-08-04 Vincent Celier <celier@adacore.com>
6184
6185 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6186 has Ada sources, not project Project, because if the root project
6187 Project has no sources of its own, all projects will be deemed without
6188 sources.
6189
61902011-08-04 Gary Dismukes <dismukes@adacore.com>
6191
6192 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6193 of the No_Param_Proc acc-to-subp type used for initialization of
6194 __gnat_finalize_library_objects so that it's declared at library level
6195 rather than nested inside of the adainit routine.
6196
61972011-08-04 Javier Miranda <miranda@adacore.com>
6198
6199 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6200 if the tagged type has a representation clause which specifies its
6201 external tag.
6202
62032011-08-04 Ed Schonberg <schonberg@adacore.com>
6204
6205 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6206 Remove previous procedure with that name.
6207 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6208 when appropriate.
6209 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6210 subtype mark, the ancestor cannot have unknown discriminants.
6211 (Resolve_Record_Aggregate): if the type has invisible components
6212 because of a private ancestor, the aggregate is illegal.
6213
62142011-08-04 Vincent Celier <celier@adacore.com>
6215
6216 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6217 account switches -gnat2005, -gnat12 and -gnat2012.
6218
62192011-08-04 Bob Duff <duff@adacore.com>
6220
6221 * s-tasdeb.ads: Minor comment fix.
6222
62232011-08-04 Arnaud Charlet <charlet@adacore.com>
6224
6225 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6226 CodePeer mode.
6227 * switch.ads, switch.adb (Is_Language_Switch): New function.
6228
62292011-08-04 Vincent Celier <celier@adacore.com>
6230
6231 * switch-c.adb: Minor comment addition.
6232
62332011-08-04 Vincent Celier <celier@adacore.com>
6234
6235 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6236 ending with '=' is followed by a space (missing file name).
6237
62382011-08-04 Pascal Obry <obry@adacore.com>
6239
6240 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6241
62422011-08-04 Ed Schonberg <schonberg@adacore.com>
6243
6244 * sem_ch12.adb (Analyze_Associations): New routine
6245 Check_Overloaded_Formal_Subprogram to reject a formal package when
6246 there is a named association or a box initialisation for an overloaded
6247 formal subprogram of the corresponding generic.
6248
62492011-08-04 Yannick Moy <moy@adacore.com>
6250
6251 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6252 * get_alfa.adb, put_alfa.adb: Read and write new component of
6253 cross-reference.
6254 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6255
88f47280
AC
62562011-08-04 Pascal Obry <obry@adacore.com>
6257
6258 * urealp.adb: Minor reformatting.
6259
62602011-08-04 Tristan Gingold <gingold@adacore.com>
6261
6262 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6263 Handle the case when Cleanup_Protected_Object returns Empty.
6264
62652011-08-04 Yannick Moy <moy@adacore.com>
6266
6267 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6268
62692011-08-04 Ed Schonberg <schonberg@adacore.com>
6270
6271 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6272 call, ignore functions.
6273
05c53a69
GB
62742011-08-04 Geert Bosch <bosch@adacore.com>
6275
6276 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6277 point.
6278
23cc1ace
EB
62792011-08-04 Emmanuel Briot <briot@adacore.com>
6280
6281 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6282 as an index for Builder'Switches. This conforms to the documentation.
6283 * make.adb (Insert_Project_Sources): avoid duplicate code
6284
cef14201
AC
62852011-08-04 Emmanuel Briot <briot@adacore.com>
6286
6287 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6288 name on the command line (for instance "../dummy"), never assume it can
6289 be a unit name.
6290
62912011-08-04 Tristan Gingold <gingold@adacore.com>
6292
6293 * bindgen.adb: Remove code the reference or create the
6294 Break_Start/__gnat_break_start procedure.
6295 * s-stalib.adb (Break_Start): Removed.
6296
e2fee30d
EB
62972011-08-04 Emmanuel Briot <briot@adacore.com>
6298
6299 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6300 shared with gprbuild.
6301
2d395256
AC
63022011-08-04 Yannick Moy <moy@adacore.com>
6303
6304 * par-ch4.adb (P_Primary): preferentially issue an error message about
6305 a missing parenthesis arount a conditional or case expression in Ada
6306 2012 mode, if we detect that the alignment is not correct for a
6307 statement.
6308
63092011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6310
6311 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6312 tag-to-class-wide conversion as needing finalization actions.
6313 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6314 a tag-to-class-wide conversion as needing finalization actions.
6315 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6316 conversion does not need finalization actions.
6317 (Is_Tag_To_CW_Conversion): New routine.
6318 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6319 whether an object is the result of a tag-to-class-wide conversion.
6320
63212011-08-04 Yannick Moy <moy@adacore.com>
6322
6323 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6324 the left-hand-side and right-hand-side of a conjunct are inserted when
6325 translating a pre- or postcondition
6326 * sem_ch6.adb: Correct typo in comment
6327
63282011-08-04 Ed Schonberg <schonberg@adacore.com>
6329
6330 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6331 Unchecked_Conversion and Unchecked_Deallocation.
6332
63332011-08-04 Thomas Quinot <quinot@adacore.com>
6334
6335 * make.adb: Minor reformatting.
6336
767ab2fd
EB
63372011-08-04 Emmanuel Briot <briot@adacore.com>
6338
6339 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6340 sources in the project and its imported projects, but not in the whole
6341 tree.
6342
8fb3f5df
AC
63432011-08-04 Emmanuel Briot <briot@adacore.com>
6344
6345 * make.adb: Remove debug trace.
6346
63472011-08-04 Vincent Celier <celier@adacore.com>
6348
6349 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6350 path in canonical form, to be able to compare path names on platforms
6351 such as Windows or Darwin.
6352
63532011-08-04 Thomas Quinot <quinot@adacore.com>
6354
6355 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6356 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6357 * scos.ads: Update documentation accordingly.
6358 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6359 pragmas.
6360
9515740f
AC
63612011-08-04 Ed Schonberg <schonberg@adacore.com>
6362
6363 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6364 attribute only if prefix type is scalar.
6365
63662011-08-04 Emmanuel Briot <briot@adacore.com>
6367
6368 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6369 in gnatmake for specifying mains on the command line that do not belong
6370 to the main project. These mains must currently all belong to the same
6371 project, though.
6372 (Ultimate_Extension_Of): removed, since duplicated
6373 Ultimate_Extending_Project.
6374
92966893
AC
63752011-08-04 Arnaud Charlet <charlet@adacore.com>
6376
6377 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6378 instead.
6379 (CodePeer_Mode_String): New.
6380 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6381 CodePeer mode.
6382 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6383 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6384 mode, since no useful elaboration subprogram is needed by CodePeer.
6385 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6386 In this mode, compile binder file with -gnatC and do stop after this
6387 step.
6388
63892011-08-04 Vincent Celier <celier@adacore.com>
6390
6391 * exp_ch7.adb: Minor comment fix.
6392
5969611f
RD
63932011-08-04 Robert Dewar <dewar@adacore.com>
6394
6395 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6396 exp_ch4.adb, makeutl.adb: Minor reformatting.
6397
6367dd30
AC
63982011-08-04 Emmanuel Briot <briot@adacore.com>
6399
6400 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6401 Create several new subprograms to move code out of Make. This makes the
6402 code more readable, removes code duplication, and is a preparation work
6403 for adding support for aggregate projects.
6404
64052011-08-04 Tristan Gingold <gingold@adacore.com>
6406
6407 * s-po32gl.ads, s-po32gl.adb: New files.
6408 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6409 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6410 (Build_Finalization_Collection): Use it.
6411 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6412 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6413 literals.
6414 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6415 * gcc-interface/Make-lang.in: Update dependencies.
6416
cd8bfe35
EB
64172011-08-04 Emmanuel Briot <briot@adacore.com>
6418
6419 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6420 the command line.
6421
7db29ea7
EB
64222011-08-04 Emmanuel Briot <briot@adacore.com>
6423
6424 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6425 command line is not a file name, also check whether it could be a unit
6426 name.
6427
d9b056ea
AC
64282011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6429
6430 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6431 the header of the finalization routine.
6432 If the unit has no finalizer but is a body whose spec has one, then
6433 generate the decrement of the elaboration entity only.
6434 If the unit has a finalizer and is a spec, then do not generate the
6435 decrement of the elaboration entity.
6436 (Gen_Finalize_Library_C): Likewise.
6437
64382011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6439
6440 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6441 (Bounds_Size_Expression): Removed.
6442 (Double_Alignment_Of): New subsidiary routine.
6443 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6444 for a hole in the dope vector of unconstrained arrays due to different
6445 index and element alignments.
6446
64472011-08-04 Ed Schonberg <schonberg@adacore.com>
6448
6449 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6450 raise program_error because body has not been seen yet.
6451
64522011-08-04 Ed Schonberg <schonberg@adacore.com>
6453
6454 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6455 an unresolved name.
6456
64572011-08-04 Vincent Celier <celier@adacore.com>
6458
6459 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6460
64612011-08-04 Yannick Moy <moy@adacore.com>
6462
6463 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6464 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6465
64662011-08-04 Thomas Quinot <quinot@adacore.com>
6467
6468 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6469 instantiation in RCI.
6470
64712011-08-04 Emmanuel Briot <briot@adacore.com>
6472
6473 * make.adb: Share more code with gprbuild
6474
f5fc5b9d
AC
64752011-08-04 Emmanuel Briot <briot@adacore.com>
6476
6477 * projects.texi: Added documentation for the IDE'Gnat project file
6478 attribute.
6479
64802011-08-04 Nicolas Roche <roche@adacore.com>
6481
6482 * gnat_rm.texi: Minor editing.
6483
64842011-08-04 Javier Miranda <miranda@adacore.com>
6485
6486 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6487 and the library case for VM targets.
6488 (Gen_Adainit_Ada): Likewise.
6489
64902011-08-04 Robert Dewar <dewar@adacore.com>
6491
6492 * g-altive.ads: Minor comment updates.
6493 * prj-nmsc.adb: Minor reformatting.
6494
64952011-08-04 Javier Miranda <miranda@adacore.com>
6496
6497 * opt.ads
6498 (Normalize_Scalars_Config): Value of the configuration switch set by
6499 pragma Normalize_Scalars when it appears in the gnat.adc file.
6500 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6501 to save and restore settings of this pragma.
6502 * opt.adb
6503 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6504 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6505
65062011-08-04 Vincent Celier <celier@adacore.com>
6507
6508 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6509
0c4683cf
AC
65102011-08-04 Arnaud Charlet <charlet@adacore.com>
6511
6512 * makeutl.adb: Minor reformatting.
6513
65142011-08-04 Olivier Hainque <hainque@adacore.com>
6515
6516 * g-altive.ads: Update comments to reflect that only the soft
6517 binding is available today.
6518
2598ee6d
RD
65192011-08-04 Robert Dewar <dewar@adacore.com>
6520
6521 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6522 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6523 * gcc-interface/Make-lang.in: Update dependencies.
6524
c2db4b32
AC
65252011-08-04 Arnaud Charlet <charlet@adacore.com>
6526
6527 * prj-env.adb: Remove local debug traces.
6528
65292011-08-04 Yannick Moy <moy@adacore.com>
6530
6531 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6532 was used instead of Hi_OK, which could cause a read of an uninitialized
6533 value later on. Detected while working on the new warning.
6534 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6535 to local variable.
6536 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6537 in more cases, in order to detect more unreferenced values.
6538 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6539 object for expression, if any.
6540
65412011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6542
6543 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6544 the operand types instead of the Esize.
6545
65462011-08-04 Steve Baird <baird@adacore.com>
6547
6548 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6549 enable CodePeer_Mode.
6550 * bindusg.adb (Display): Add help message describing -P binder switch.
6551 * gnat_ugn.texi: Document -P binder switch.
6552 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6553 user-defined main program directly.
6554 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6555 user-defined main program in the context clause of the package body.
6556
ad05f2e9
AC
65572011-08-04 Yannick Moy <moy@adacore.com>
6558
6559 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6560 duplicate of Defining_Entity
6561 (Get_Unique_Entity_For_Decl): rename function into
6562 Unique_Defining_Entity
6563 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6564 (Formal_Proof_On): remove synthesized flag
6565 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6566 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6567 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6568 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6569 Annotate (Formal_Proof)
6570
65712011-08-04 Emmanuel Briot <briot@adacore.com>
6572
6573 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6574 source files with non-standard naming schemes, in imported projects
6575
756ef2a0
AC
65762011-08-04 Emmanuel Briot <briot@adacore.com>
6577
6578 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6579 specified on the gprbuild command line, we need to compile all units
6580 within that file, not just the first one we find
6581 Fix error message for mains that are not found.
6582
65832011-08-04 Thomas Quinot <quinot@adacore.com>
6584
6585 * sem_ch6.adb: Update comment.
6586 * sem_ch12.adb: Minor reformatting.
6587
65882011-08-04 Bob Duff <duff@adacore.com>
6589
6590 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6591 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6592 race condition whose symptom is to fail to lock Parent. That, in turn,
6593 causes Parent.Awake_Count to be accessed without locking Parent, which
6594 causes another race condition whose symptom is that Parent.Awake_Count
6595 can be off by 1 (either too high or too low). The solution is to lock
6596 Parent unconditionally, and then lock Acceptor, before reading
6597 Acceptor.Terminate_Alternative.
6598
4fdebd93
AC
65992011-08-04 Arnaud Charlet <charlet@adacore.com>
6600
6601 * debug.adb: Update comment.
6602
66032011-08-04 Robert Dewar <dewar@adacore.com>
6604
6605 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6606 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6607 exp_ch6.adb: Minor reformatting.
6608
66092011-08-04 Gary Dismukes <dismukes@adacore.com>
6610
6611 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6612 checks for -gnateE.
6613
66142011-08-04 Ed Schonberg <schonberg@adacore.com>
6615
6616 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6617
66182011-08-04 Thomas Quinot <quinot@adacore.com>
6619
6620 * sinfo.ads: Minor reformatting.
6621
66222011-08-04 Emmanuel Briot <briot@adacore.com>
6623
6624 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6625 even if there is no location.
6626
6aaa0587
ES
66272011-08-04 Ed Schonberg <schonberg@adacore.com>
6628
6629 * sem_res.adb, sem_ch4.adb: move check for restriction
6630 No_Task_Hierarchy to resolve_allocator.
6631
35a1c212
AC
66322011-08-04 Thomas Quinot <quinot@adacore.com>
6633
6634 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6635 This flag of N_Pragma nodes is not used, remove it as well as all of
6636 the associated circuitry.
6637
66382011-08-04 Javier Miranda <miranda@adacore.com>
6639
6640 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6641 runtime check on duplicated externa tags
6642 * debug.adb Document switch -gnatdQ.
6643
66442011-08-04 Gary Dismukes <dismukes@adacore.com>
6645
6646 * a-fihema.ads: Minor typo fix.
6647
66482011-08-04 Yannick Moy <moy@adacore.com>
6649
6650 * sem_ch10.adb: Minor comment update.
6651
66522011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6653
6654 * einfo.adb: Update the node field usage to reflect the renaming of
6655 Return_Flag to Return_ Flag_Or_Transient_Decl.
6656 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
6657 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
6658 (Write_Field15_Name): Change Return_Flag to
6659 Return_Flag_Or_Transient_Decl.
6660 * einfo.ads: Rename node field Return_Flag to
6661 Return_Flag_Or_Transient_Decl. Update the associated comment and all
6662 occurrences in entities.
6663 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
6664 associated Inline pragma.
6665 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
6666 associated Inline pragma.
6667 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
6668 routine.
6669 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
6670 Return_Flag and Set_Return_Flag.
6671 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
6672 objects generated for controlled transients declared inside an
6673 Exception_With_Actions. Update the calls to Return_Flag.
6674 (Process_Object_Declaration): Add code to add a null guard for hook
6675 objects generated for controlled transients declared inside an
6676 Exception_With_Actions. Update related comment.
6677 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
6678 objects generated for controlled transients declared inside an
6679 Exception_With_Actions. Update the calls to Return_Flag.
6680 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
6681
66822011-08-04 Ed Schonberg <schonberg@adacore.com>
6683
6684 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
6685 positional aggregate.
6686
66872011-08-04 Vincent Celier <celier@adacore.com>
6688
6689 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
6690 SLOC only for pragmas.
6691
66922011-08-04 Emmanuel Briot <briot@adacore.com>
6693
6694 * projects.texi: Minor typo fix.
6695
66962011-08-04 Emmanuel Briot <briot@adacore.com>
6697
6698 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
6699 on case-sensitive file systems.
6700
c2873f74
TQ
67012011-08-04 Thomas Quinot <quinot@adacore.com>
6702
6703 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
6704 nested in a disabled pragma.
6705 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
6706 enclosing pragma, if any, for X decisions.
6707
67082011-08-04 Thomas Quinot <quinot@adacore.com>
6709
6710 * sem_prag.adb: Minor reformatting.
6711
46414266
VC
67122011-08-04 Vincent Celier <celier@adacore.com>
6713
6714 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
6715 allowed in no run time mode.
6716
67172011-08-04 Vincent Celier <celier@adacore.com>
6718
6719 * make.adb (Check): When -gnatc is used, check for the source file
6720 inside the ALI file with a canonical case file name.
6721
afab164f
EB
67222011-08-04 Emmanuel Briot <briot@adacore.com>
6723
6724 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
6725 overriding the separator.
6726
fe0ec02f
AC
67272011-08-04 Robert Dewar <dewar@adacore.com>
6728
6729 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
6730 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
6731
67322011-08-04 Robert Dewar <dewar@adacore.com>
6733
6734 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
6735
67362011-08-04 Yannick Moy <moy@adacore.com>
6737
6738 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
6739 'Result only appears in postcondition of function.
6740
67412011-08-04 Thomas Quinot <quinot@adacore.com>
6742
6743 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
6744 external tag, include the value of the external tag in the exception
6745 message.
6746
0180fd26
AC
67472011-08-04 Yannick Moy <moy@adacore.com>
6748
6749 * sem_attr.adb (Result): modify error message for misplaced 'Result
6750
67512011-08-04 Sergey Rybin <rybin@adacore.com>
6752
6753 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
6754 clear that the second argument must be an identifier.
6755
67562011-08-04 Thomas Quinot <quinot@adacore.com>
6757
6758 * exp_ch9.adb (Build_Barrier_Function): When compiling with
6759 -fpreserve-control-flow, insert an IF statement on the barrier
6760 condition to ensure that a conditional branch instruction is generated.
6761
67622011-08-04 Emmanuel Briot <briot@adacore.com>
6763
6764 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
6765 (Processing_Flags.Ignore_Missing_With): new flag.
6766
67672011-08-04 Emmanuel Briot <briot@adacore.com>
6768
6769 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
6770 Source_List_File on case-insensitive systems where the file is actually
6771 on a case-sensitive file system (NFS,...).
6772
67732011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6774
6775 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
6776 function return contains a controlled [extension] aggregate and the
6777 return statement is not part of a handled sequence of statements, wrap
6778 the return in a block. This ensures that all controlled temporaries
6779 generated during aggregate resolution will be picked up by the
6780 finalization machinery.
6781
67822011-08-04 Ed Schonberg <schonberg@adacore.com>
6783
6784 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
6785 components, freeze type before resolution, to ensure that default
6786 initializations are present for all components.
6787 * sem_res.adb (Resolve_Actuals): the designated object of an
6788 accces-to-constant type is a legal actual in a call to an
6789 initialization procedure.
6790
67912011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6792
6793 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
6794 N_Unchecked_Type_Conversion to the possible containers of a renamed
6795 transient variable.
6796
78efd712
AC
67972011-08-04 Yannick Moy <moy@adacore.com>
6798
6799 * par-ch13.adb (Aspect_Specifications_Present): recognize
6800 "with Identifier'Class =>" as an aspect, so that a meaningful warning
6801 is issued in Strict mode.
6802 * par.adb: Fix typos in comments.
6803
68042011-08-04 Yannick Moy <moy@adacore.com>
6805
6806 * sem_attr.adb (Result): modify error message to take into account Post
6807 aspect when compiling Ada 2012 (or newer) code.
6808
68092011-08-04 Nicolas Roche <roche@adacore.com>
6810
6811 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 6812 remove need for GCC exceptions.
78efd712
AC
6813
68142011-08-04 Vincent Celier <celier@adacore.com>
6815
6816 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
6817 project, not the source file name.
6818 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
6819 excluded, continue looking. This excluded source will only be returned
6820 if there is no other source with the same base name that is not locally
6821 removed.
6822
68232011-08-04 Ed Schonberg <schonberg@adacore.com>
6824
6825 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
6826 private and one of the operands is a real literal, use a qualified
6827 expression rather than a conversion which is not meaningful to the
6828 back-end.
6829
0170a691
AC
68302011-08-04 Yannick Moy <moy@adacore.com>
6831
6832 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
6833 corresponding aspect X'Class are allowed, proceed with analysis of the
6834 aspect instead of skipping it.
6835
68362011-08-04 Tristan Gingold <gingold@adacore.com>
6837
6838 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
6839 This will allow to have an Ada implementation for the subprogram.
6840
deb4f5ba
ES
68412011-08-04 Ed Schonberg <schonberg@adacore.com>
6842
6843 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
6844 completion and aspects are present, apply them to the entity for the
6845 type which is currently the partial view, but which is the one that
6846 will be frozen.
6847 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
6848 applies to a partial view, indicate that the full view has predicates
6849 and delayed aspects.
6850 (Replace_Type_Reference): Handle properly predicates that apply to the
6851 full view of a private completion.
6852
fc893455
AC
68532011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6854
6855 * layout.adb (Layout_Type): For composite types, do not set Esize.
6856 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
6857 set Esize.
6858 (Size_Known): Look at the RM size of components instead of the Esize.
6859 (Freeze_Record_Type): Look at the RM size instead of the Esize to
6860 issue warning and activate Implicit_Packing.
6861 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
6862 if the Esize is not known.
6863 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
6864 for elementary types only.
6865 (Analyze_Record_Representation_Clause): Look at the RM size instead
6866 of the Esize to issue errors.
6867 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
6868 is not known.
6869 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 6870 obsolete block.
fc893455
AC
6871 Look at the RM size instead of the Esize for types if the latter is
6872 not known.
6873 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
6874
68752011-08-04 Ed Schonberg <schonberg@adacore.com>
6876
6877 * sem_type.adb: proper handling of equality not involving anonymous
6878 access types.
6879
b37d5bc6
AC
68802011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6881
6882 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
6883 Vis_Decls. When creating a library-level finalizer for a package spec,
6884 both the declaration and body of the finalizer are inserted either in
6885 the visible or private declarations of the package spec.
6886
68872011-08-04 Javier Miranda <miranda@adacore.com>
6888
6889 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
6890 use of the full-view of a type when invoking Is_Ancestor.
6891 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
6892 the full-view of private parents is requested, then use also the
6893 full-view of the parent of the first derivation.
6894
7ab4d95a
AC
68952011-08-04 Tristan Gingold <gingold@adacore.com>
6896
6897 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
6898 instead of the locally imported procedure.
6899 * s-taprop-mingw.adb (Enter_Task): Ditto.
6900 * s-valrea.adb (Scan_Real): Ditto.
6901 * s-imgrea.adb (Set_Image_Real): Ditto.
6902 * s-flocon.ads: Make the package pure.
6903
69042011-08-04 Thomas Quinot <quinot@adacore.com>
6905
6906 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
6907 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
6908 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
6909 New subprogram, moved here from...
6910 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
6911 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
6912 rewriting of the last argument into a procedure call statement here...
6913 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
6914 instead.
6915
69162011-08-04 Thomas Quinot <quinot@adacore.com>
6917
6918 * par_sco.adb: Minor reformatting.
6919
51c400f5
AC
69202011-08-04 Robert Dewar <dewar@adacore.com>
6921
6922 * erroutc.adb: Minor reformatting.
6923
69242011-08-04 Thomas Quinot <quinot@adacore.com>
6925
6926 * par_sco.adb: Comment update.
6927
69282011-08-04 Tristan Gingold <gingold@adacore.com>
6929
6930 * s-flocon.ads: New file.
6931 * g-flocon.ads: Now a renaming of s-flocon.
6932 * Makefile.rtl: Add s-flocon.o
6933
6a49f110
AC
69342011-08-04 Javier Miranda <miranda@adacore.com>
6935
6936 * exp_strm.adb (Build_Array_Input_Function): if the array type is
6937 constrained, do not attempt to build a subtype of it.
6938
69392011-08-04 Yannick Moy <moy@adacore.com>
6940
6941 * errout.ads Change comments: remove 'R'M as an example where quotes
6942 are needed; add ALFA as another case where quotes are not needed
6943 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
6944 case where quotes are not needed.
6945 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6946 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
6947 Remove all occurrences of 'A'L'F'A
6948
69492011-08-04 Ed Schonberg <schonberg@adacore.com>
6950
6951 * sem_ch13.adb: check legality of invariant pragma.
6952
a4640a39
AC
69532011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6954
6955 * bindgen.adb: Add comments.
6956
69572011-08-04 Yannick Moy <moy@adacore.com>
6958
6959 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
6960 synthesized flag.
6961 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
6962 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
6963
69642011-08-04 Robert Dewar <dewar@adacore.com>
6965
6966 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
6967 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
6968 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
6969
39ade2f9
AC
69702011-08-04 Thomas Quinot <quinot@adacore.com>
6971
6972 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
6973
69742011-08-04 Thomas Quinot <quinot@adacore.com>
6975
6976 PR ada/47880
6977 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
6978 allocated object.
6979
69802011-08-04 Robert Dewar <dewar@adacore.com>
6981
6982 * einfo.ads, exp_ch4.adb: Minor reformatting.
6983
69842011-08-04 Jerome Lambourg <lambourg@adacore.com>
6985
6986 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
6987
7efc3f2d
AC
69882011-08-04 Ed Schonberg <schonberg@adacore.com>
6989
6990 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
6991 type in all cases to compute list of primitive operations, because full
6992 view may be an itype that is not attached to the list of declarations.
6993
69942011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6995
6996 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
6997 library has already been finalized.
6998 (Gen_Adafinal_C): Likewise.
6999 (Gen_Adainit_Ada): Generate an early return if the library has
7000 already been elaborated.
7001 (Gen_Adainit_C): Likewise.
7002 (Gen_Output_File_Ada): Generate an elaboration flag.
7003 (Gen_Output_File_C): Likewise.
7004
f65df609
HK
70052011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7006
7007 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7008 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7009 built in the first place.
7010 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7011 for CodePeer because Finalize_Address was not built to begin with.
7012 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7013
a0fb8fe8
AC
70142011-08-04 Pascal Obry <obry@adacore.com>
7015
7016 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7017 filenames, this ensures unicity of filenames across processes.
7018
70192011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7020
7021 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7022 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7023 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7024 Add False as the actual to From_Abort in the generated call to
7025 Raise_From_Controlled_Operation.
7026
70272011-08-04 Jerome Lambourg <lambourg@adacore.com>
7028
7029 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7030 so that the ali file name can be retrieved from outside of this package.
7031 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7032 doing nothing in the general case, but used to update the object file
7033 timestamp if directly generated by the backend.
7034 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7035 to a later time than the ali file one.
7036
9534ab17
AC
70372011-08-04 Yannick Moy <moy@adacore.com>
7038
7039 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7040 entities whose body contains an Annotate pragma which forces formal
7041 proof on this body.
7042 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7043 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7044 Mark_Non_ALFA_Subprogram to pass in a message and node.
7045 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7046 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7047 surrounding subprogram.
7048 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7049 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7050 as not in ALFA is annotated with Formal_Proof being On, then an error
7051 is issued based on the additional parameters for message and node.
7052 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7053 * gcc-interface/Make-lang.in: Update dependencies.
7054
70552011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7056
7057 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7058 Finalize_Address when CodePeer is enabled.
7059
70602011-08-04 Pascal Obry <obry@adacore.com>
7061
7062 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7063 the latter returns a pointer to a static buffer which is deallocated
7064 at the end of the routine.
7065
5c0e97dd
AC
70662011-08-04 Yannick Moy <moy@adacore.com>
7067
7068 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7069 after index creation; mark unconstrained base array type generated as
7070 being in/not in ALFA as well
7071 (Make_Index): mark subtype created as in/not in ALFA
7072 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7073 over a loop as in/not in ALFA, depending on its type and form of loop
7074 iteration.
7075
70762011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7077
7078 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7079 directly to False on .NET and JVM.
7080
7a93c64b
YM
70812011-08-04 Yannick Moy <moy@adacore.com>
7082
7083 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7084 constraint that subtype must come from source code to be in ALFA, so
7085 that anonymous subtypes can be in ALFA too.
7086
e9a1ed9b
YM
70872011-08-04 Yannick Moy <moy@adacore.com>
7088
7089 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7090 reference for ALFA mode.
7091 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7092 procedure public so as to use it from formal verification back-end.
7093
8e293fbd
AC
70942011-08-04 Jerome Lambourg <lambourg@adacore.com>
7095
7096 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7097 invalid checks of the Parameter, making Remove_Switch not working
7098 correctly.
7099
71002011-08-04 Arnaud Charlet <charlet@adacore.com>
7101
7102 * targparm.ads: Update header: no run-time exception is needed on this
7103 file.
7104
71052011-08-04 Vincent Celier <celier@adacore.com>
7106
7107 * a-fihema.adb: Use System.IO instead of GNAT.IO
7108
71092011-08-04 Thomas Quinot <quinot@adacore.com>
7110
7111 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7112 are forbidden in Compiler_Unit mode.
7113
cfae2bed
AC
71142011-08-04 Robert Dewar <dewar@adacore.com>
7115
7116 * sem_util.adb: Minor reformatting.
7117
71182011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7119
7120 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7121 library-level finalizers.
7122 (Gen_Finalize_Library_C): Update the import string for library-level
7123 finalizers.
7124 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7125 library-level finalizer.
7126 * exp_ch7.adb: Remove with and use clauses for Stringt.
7127 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7128 Spec_Decl. Add local variable Body_Id. The names of library-level
7129 finalizers are now manually fully qualified and are no longer external.
7130 A single name is now capable of servicing .NET, JVM and non-VM targets.
7131 Pragma Export is no longer required to provide visibility for the name.
7132 (Create_Finalizer_String): Removed.
7133 (New_Finalizer_Name): New routine which mimics New_..._Name.
7134
01f0729a
AC
71352011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7136
7137 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7138 elaboration counter to Standard_Short_Integer.
7139 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7140 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7141 (Gen_Elab_Externals_C): Likewise.
7142
71432011-08-04 Ed Falis <falis@adacore.com>
7144
7145 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7146 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7147 system-vxworks-mips.ads, system-vxworks-x86.ads
7148 (Always_Compatible_Rep): set to False for all VxWorks targets.
7149
2c1b72d7
AC
71502011-08-04 Robert Dewar <dewar@adacore.com>
7151
7152 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7153 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7154 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7155 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7156 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7157 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7158 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7159 Minor reformatting and code reorganization.
7160
71612011-08-04 Emmanuel Briot <briot@adacore.com>
7162
7163 * projects.texi: Added doc for aggregate projects.
7164
824e9320
AC
71652011-08-04 Emmanuel Briot <briot@adacore.com>
7166
7167 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7168 Add support for overriding the Project_Path in aggregate projects.
7169
71702011-08-04 Robert Dewar <dewar@adacore.com>
7171
7172 * a-cofove.ads: Minor reformatting.
7173
71742011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7175
7176 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7177 on the generated code.
7178 (Build_Finalize_Statements): Update the comment on the generated code.
7179 (Build_Initialize_Statements): Update the comment on the generated code.
7180 (Build_Object_Declarations): Add local variable Result. The object
7181 declarations are now built in sequence.
7182 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7183 RE_Unit_Table.
7184
71852011-08-04 Robert Dewar <dewar@adacore.com>
7186
7187 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7188
71892011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7190
7191 * einfo.ads (Elaboration_Entity): Document new definition and use.
7192 (Elaboration_Entity_Required): Adjust to above change.
7193 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7194 * exp_ch12.adb: And with and use for Snames.
7195 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7196 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7197 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7198 <Check_Unit_Name>: Deal with N_Expanded_Name.
7199 <Attribute_Elaborated>: Extend to all unit names.
7200 * sem_elab.adb: And with and use for Uintp.
7201 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7202 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7203 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7204 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7205 from Gen_Adainit_Ada.
7206 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7207 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7208 case, do not call System.Standard_Library.Adafinal; instead call
7209 finalize_library if needed.
7210 (Gen_Adafinal_C): Likewise.
7211 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7212 non-main program case.
7213 (Gen_Adainit_C): Generate a couple of external declarations here.
7214 In the main program case, set SSL.Finalize_Library_Objects.
7215 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7216 (Gen_Elab_Calls_C): Likewise.
7217 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7218 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7219 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7220 objects here.
7221 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7222 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7223 Gen_Adafinal_Ada.
7224 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7225 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 7226 of external declarations. Call Gen_Finalize_Library_C.
824e9320 7227
316d9d4f
EB
72282011-08-04 Emmanuel Briot <briot@adacore.com>
7229
7230 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7231 Compute_Compilation_Phases): new subprogram.
7232 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7233 The number of mains as well as the various compilation phases that
7234 need to be run are now project tree specific, since various
7235 aggregated trees might have different requirements. In particular,
7236 they do not all require bind or link phases.
7237
9434c32e
EB
72382011-08-04 Emmanuel Briot <briot@adacore.com>
7239
7240 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7241 (Project_Tree_Appdata): New type.
7242 It is now possible to associate application-specific data to a project
7243 tree. In particular, this is used in the gprbuild builder to avoid a
7244 number of global tables and htables, especially now that there can be
7245 several project trees loaded at once because of aggregate projects.
7246 (Debug_Name): new procedure.
7247 * projects.texi: Clarify syntax of "**" for Source_Dirs
7248
41ba34db
EB
72492011-08-03 Emmanuel Briot <briot@adacore.com>
7250
7251 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7252 the "roots" for a main.
7253 (Fill_From_Project): add support for aggregate projects. Main units
7254 in aggregated projects are now automatically added in the list of
7255 files to build (although this fails later on in gprbuild, because
7256 these files are not using the root proejct tree, so this needs
7257 further cleanup)
7258 * gcc-interface/Make-lang.in: Update dependencies.
7259
fccd42a9
AC
72602011-08-03 Yannick Moy <moy@adacore.com>
7261
7262 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7263 conditional expression in ALFA.
7264 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7265 expressions as not in ALFA.
7266
72672011-08-03 Robert Dewar <dewar@adacore.com>
7268
7269 * a-cofove.adb: Minor reformatting.
7270
72712011-08-03 Emmanuel Briot <briot@adacore.com>
7272
7273 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7274 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7275 gprbuild sources.
7276 These packages are more logically placed in the Queue package, since
7277 they manipulate the queue. It is also likely that they can be adapted
7278 for gnatmake, thus sharing more code.
7279 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7280 that we could move the above.
7281
72822011-08-03 Emmanuel Briot <briot@adacore.com>
7283
7284 * errutil.adb (Finalize): clean up the list of error messages on exit.
7285 Calling this subprogram multiple times will no longer show duplicate
7286 error messages on stderr.
7287
72882011-08-03 Emmanuel Briot <briot@adacore.com>
7289
7290 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7291 Getopt_Switches when we have already define a command line
7292 configuration.
7293
5e8c8e44
YM
72942011-08-03 Yannick Moy <moy@adacore.com>
7295
7296 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7297 in ALFA. Instead, they are considered as assertions to prove.
7298 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7299 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7300 if they have no ELSE part, or if they occur in pre- and postconditions,
7301 where the Condition cannot have side-effects in ALFA
7302 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7303 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7304 Instead, include type conversion between scalar types in ALFA.
7305 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7306 if-and-only-if its type is in ALFA.
7307
5ffe0bab
AC
73082011-08-03 Thomas Quinot <quinot@adacore.com>
7309
7310 * scos.adb, get_scos.adb, put_scos.adb
7311 New code letter for decisions: G (entry guard)
7312 * par_sco.adb
7313 (Traverse_Subprogram_Body): Rename to...
7314 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7315 (Traverse_Protected_Body): New subprogram
7316 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7317 protected bodies and entry bodies.
7318
73192011-08-03 Yannick Moy <moy@adacore.com>
7320
7321 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7322 entities with get/set subprograms, which is set on procedure entities
7323 generated by the compiler for a postcondition.
7324 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7325 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7326 entity for a declaration
7327 (Get_Unique_Entity_For_Decl): new function returning an entity which
7328 represents a declaration, so that matching spec and body have the same
7329 entity.
7330
73312011-08-03 Robert Dewar <dewar@adacore.com>
7332
7333 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7334 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7335
73362011-08-03 Yannick Moy <moy@adacore.com>
7337
7338 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7339 library-level because retriction No_Implicit_Dynamic_Code in the
7340 front-end prevents its definition as a local subprogram
7341 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7342 for reuse in other contexts
7343 (Traverse_Declarations_Or_Statements,
7344 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7345 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7346 procedures take a callback parameter to be called on all declarations
7347 * lib-xref.ads
7348 (Traverse_All_Compilation_Units): new generic function to traverse a
7349 compilation unit and call a callback parameter on all declarations
7350
f9ad6b62
AC
73512011-08-03 Javier Miranda <miranda@adacore.com>
7352
7353 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7354 in Java since they are always enclosed in a namespace that
7355 differentiates them, and overloaded entities are supported by the VM.
7356
73572011-08-03 Ed Schonberg <schonberg@adacore.com>
7358
7359 * checks.adb (Determine_Range): If a computed bound of an operation is
7360 outside the range of the base type of the expression, and overflow
7361 checks are enabled, the result is unknown and cannot be used for any
7362 subsequent constant folding.
7363 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7364 unknown, so is the result of the comparison.
7365
73662011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7367
7368 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7369 From_Abort. When finalization was triggered by an abort, propagate
7370 Standard'Abort_Signal rather than Program_Error.
7371 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7372 From_Abort.
7373 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7374 From_Abort. When finalization was triggered by an abort, propagate
7375 Standard'Abort_Signal rather than Program_Error.
7376 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7377 From_Abort.
7378 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7379 Abort_Id. Update the calls to Build_Object_Declarations and
7380 Build_Raise_Statement to include Abort_Id.
7381 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7382 calls to Build_Object_Declarations and Build_Raise_Statement to include
7383 Abort_Id.
7384 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7385 calls to Build_Object_Declarations and Build_Raise_Statement to include
7386 Abort_Id.
7387 (Build_Components): Create an entity for Abort_Id when exceptions are
7388 allowed on the target.
7389 (Build_Finalizer): New local variable Abort_Id.
7390 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7391 calls to Build_Object_Declarations and Build_Raise_Statement to include
7392 Abort_Id.
7393 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7394 declaration of flag Abort_Id to preserve the original abort status
7395 before finalization code is executed.
7396 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7397 runtime routine Raise_From_Controlled_Operation.
7398 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7399 Abort_Id. Update the call to Build_Object_Declarations to include
7400 Abort_Id. Update the layout of the finalizer body.
7401 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7402 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7403 clunky code to create all flags and objects related to
7404 exception propagation and replace it with a call to
7405 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7406 include Abort_Id.
7407 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7408 Add new formal Abort_Id and associated comment on its use.
7409 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7410 on its use.
7411 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7412 Remove the clunky code to create all flags and objects related to
7413 exception propagation and replace it with a call to
7414 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7415
74162011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7417
7418 * s-tassta.adb: Fix minor typos.
7419
74202011-08-03 Robert Dewar <dewar@adacore.com>
7421
7422 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7423 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7424
1cdfa9be
AC
74252011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7426
7427 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7428 to packages. This ensures that the finalizer body will not end up
7429 inside the freeze node.
7430 (Process_Declarations): Add code to detect whether a freeze node has a
7431 nested finalization collection.
7432
74332011-08-03 Pascal Obry <obry@adacore.com>
7434
7435 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7436 (Current_Session): Return a not null access to Session_Type.
7437 (Default_Session): Likewise.
7438
243cae0a
AC
74392011-08-03 Robert Dewar <dewar@adacore.com>
7440
7441 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7442 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7443
74442011-08-03 Pascal Obry <obry@adacore.com>
7445
7446 * g-awk.ads: Minor comment fix.
7447
74482011-08-03 Sergey Rybin <rybin@adacore.com>
7449
7450 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7451 the tree structure related to discriminant constraints.
7452 Original_Discriminant cannot be used any more for computing the
7453 defining name for the reference to a discriminant.
7454
74552011-08-03 Ed Schonberg <schonberg@adacore.com>
7456
7457 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7458 function is not visibly tagged, this is not a dispatching call and
7459 therfore is not Tag_Indeterminate, even if the function is marked as
7460 dispatching on result.
7461
f553e7bc
AC
74622011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7463
7464 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7465 (Expand_N_Free_Statement): Add a guard to protect against run-times
7466 which do not support controlled types.
7467 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7468 against run-times which do not support controlled types.
7469 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7470 against run-times which do not support controlled types.
7471 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7472 against run-times which do not support controlled types.
7473 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7474 protect against run-times which do not support controlled types.
7475
74762011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7477
7478 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7479 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7480
e4982b64
AC
74812011-08-03 Ed Schonberg <schonberg@adacore.com>
7482
7483 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7484 modified in the source, to prevent spurious warnings when compiling
7485 with -gnatg.
7486
74872011-08-03 Thomas Quinot <quinot@adacore.com>
7488
7489 * a-except-2005.adb: Minor reformatting.
7490
74912011-08-03 Ed Schonberg <schonberg@adacore.com>
7492
7493 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7494 is a renaming declaration in the private part of a package, do not emit
7495 a warning that the with_clause could be moved because the renaming may
7496 be used in the body or in a child unit.
7497
74982011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7499
7500 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7501 Propagate the Comes_From_Source attribute from the original return
7502 object to the renaming.
7503
75042011-08-03 Jose Ruiz <ruiz@adacore.com>
7505
7506 * exp_ch7.adb (Build_Raise_Statement): Do not call
7507 Raise_From_Controlled_Operation when this routine is not present in
7508 the run-time library.
7509 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7510 libraries (Ravenscar), tasks are non-terminating, and protected objects
7511 and tasks can only appear at library level, so we do not want
7512 finalization of protected objects nor tasks.
7513 * exp_intr.adb: Minor clarification in comment.
7514 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7515 Gen_Output_File_C): Remove references to finalization of library-level
7516 objects when using restricted run-time libraries.
7517
75182011-08-03 Ed Schonberg <schonberg@adacore.com>
7519
7520 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7521 Original_Discriminant only if the parent type is a generic formal.
7522
deb8dacc
HK
75232011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7524
7525 * exp_ch13.adb: Add with and use clause for Targparm;
7526 (Expand_N_Free_Statement): Prevent the generation of a custom
7527 Deallocate on .NET/JVM targets since this requires pools and address
7528 arithmetic.
7529 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7530 .NET/JVM targets, attach the newly allocated object to the access
7531 type's finalization collection. Do not generate a call to
7532 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7533 exist in the runtime.
7534 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7535 create a custom Allocate for object that do not require initialization.
7536 Attach a newly allocated object to the access type's finalization
7537 collection on .NET/JVM.
7538 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7539 assignment of controlled types on .NET/JVM. The two hidden pointers
7540 Prev and Next and stored and later restored after the assignment takes
7541 place.
7542 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7543 kludge for .NET/JVM to recognize a particular piece of code coming from
7544 Heap_Management and change the call to Finalize into Deep_Finalize.
7545 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7546 finalization collections on .NET/JVM only for types derived from
7547 Controlled. Separate the association of storage pools with a collection
7548 and only allow it on non-.NET/JVM targets.
7549 (Make_Attach_Call): New routine.
7550 (Make_Detach_Call): New routine.
7551 (Process_Object_Declarations): Suppress the generation of
7552 build-in-place return object clean up code on .NET/JVM since it uses
7553 pools.
7554 * exp_ch7.ads (Make_Attach_Call): New routine.
7555 (Make_Detach_Call): New routine.
7556 * exp_intr.adb Add with and use clause for Targparm.
7557 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7558 on .NET/JVM targets.
7559 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7560 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7561 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7562 names used in finalization.
7563
75642011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7565
7566 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7567 (Attach, Detach): Lock the current task when chaining an object onto a
7568 collection.
7569
df3e68b1
HK
75702011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7571
7572 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7573 Rewritten to create the message strings when the exception is not
7574 raised by an abort during finalization.
7575 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7576 Raise_From_Controlled_Operation and update its associated comment.
7577 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7578 Ada.Finalization.Heap_Management provides key functionality
7579 associated with controlled objects on the heap, their creation,
7580 finalization and reclamation. Type Finalization_Collection is
7581 effectively a wrapper which sits ontop of a storage pool and performs
7582 all necessary bookkeeping for all the objects it contains. Each
7583 access-to-controlled or access-to-class-wide type receives a collection
7584 as part of its expansion. The compiler generates buffer code and
7585 invokes Allocate / Deallocate to create and destroy allocated
7586 controlled objects.
7587 * a-finali.adb ("="): Removed.
7588 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7589 fields Prev and Next.
7590 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7591 A library unit with at least one controlled object on the library level
7592 has a special finalizer which is invoked by the binder. To signal this,
7593 ali files carry field PF.
7594 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7595 associated comment on field usage.
7596 * a-tags.adb (Get_RC_Offset): Removed.
7597 (Needs_Finalization): New routine.
7598 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7599 Dispatch tables now carry field Needs_Finalization which provides
7600 runtime indication whether a type is controlled or has controlled
7601 components or both. Remove field RC_Offset.
7602 (Get_RC_Offset): Removed along with its associated pragma Export.
7603 Since tagged types with controlled components no longer carry hidden
7604 field _controller, the special mechanism to retrieve its location is no
7605 longer needed.
7606 (Needs_Finalization): New routine.
7607 * atree.ads, atree.adb (Elist24): New routine.
7608 (Set_Elist24): New routine.
7609 * atree.h: Add a define clause for Elist24.
7610 * bindgen.adb New library-level variable Lib_Final_Built.
7611 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7612 presence of a VM target, the routine generates calls to the proper
7613 library finalization routine.
7614 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7615 targets. Set the correct library finalization routine depending on
7616 whether the library has controlled objects or this is a VM compilation.
7617 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7618 to library-level finalizers of compiled units in reverse order of
7619 elaboration. It also produces exception management code and reraises a
7620 potential exception after all units have been finalized.
7621 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7622 library-level finalizers of compiled units in reverse order of
7623 elaboration.
7624 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7625 definitions of all library-level finalizers available to the compilation
7626 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7627 dependent code.
7628 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7629 System.Standard_Library.Adafinal directly. If the library needs
7630 finalization actions, create the sequence of finalization calls.
7631 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7632 Generate a with clause for System.Soft_Links when compiling for a VM.
7633 Remove the code which imports System.Standard_Library.Adafinal as
7634 Do_Finalize. Generate the library finalization routine.
7635 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7636 If the library needs finalization actions, create all the definitions
7637 of library- level finalizers.
7638 (Has_Finalizer): New routine. Determines whether at least one compiled
7639 unit has a library-level finalizer.
7640 Add type Qualification_Mode.
7641 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7642 * einfo.adb: New usage of field 15 as Return_Flag.
7643 Remove Finalization_Chain_Entity from the usages of field 19.
7644 Remove Associated_Final_Chain from the usages of field 23.
7645 New usage of field 23 as Associated_Collection.
7646 New usage of field 24 as Finalizer.
7647 New usage of flag 252 as Is_Processed_Transient.
7648 (Associated_Final_Chain): Removed.
7649 (Associated_Collection): New routine.
7650 (Finalization_Chain_Entity): Removed.
7651 (Finalizer): New routine.
7652 (Is_Finalizer): New routine.
7653 (Is_Processed_Transient): New routine.
7654 (Return_Flag): New routine.
7655 (Set_Associated_Final_Chain): Removed.
7656 (Set_Associated_Collection): New routine.
7657 (Set_Finalization_Chain_Entity): Removed.
7658 (Set_Finalizer): New routine.
7659 (Set_Is_Processed_Transient): New routine.
7660 (Set_Return_Flag): New routine.
7661 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
7662 displayed flags.
7663 (Write_Field8_Name): Alphabetize the output.
7664 (Write_Field11_Name): Alphabetize the output.
7665 (Write_Field12_Name): Alphabetize the output.
7666 (Write_Field13_Name): Alphabetize the output.
7667 (Write_Field14_Name): Alphabetize the output.
7668 (Write_Field15_Name): Alphabetize the output.
7669 (Write_Field16_Name): Alphabetize the output.
7670 (Write_Field17_Name): Alphabetize the output.
7671 (Write_Field18_Name): Alphabetize the output.
7672 (Write_Field19_Name): Alphabetize the output. Remove the output of
7673 Finalization_Chain_Entity.
7674 (Write_Field20_Name): Alphabetize the output.
7675 (Write_Field21_Name): Alphabetize the output.
7676 (Write_Field22_Name): Alphabetize the output.
7677 (Write_Field23_Name): Alphabetize the output. Remove the output of
7678 Associated_Final_Chain. Add output for Associated_Collection.
7679 (Write_Field24_Name): Alphabetize the output.
7680 (Write_Field25_Name): Add output for Finalizer.
7681 (Write_Field26_Name): Alphabetize the output.
7682 (Write_Field27_Name): Alphabetize the output.
7683 (Write_Field28_Name): Alphabetize the output.
7684 * einfo.ads: Add new field description for Associated_Collection and
7685 its uses in nodes.
7686 Remove Associated_Final_Chain and its uses in nodes.
7687 Remove Finalization_Chain_Entity and its uses in nodes.
7688 Add new field description for Finalizer and its uses in nodes.
7689 Add new synthesized attribute Is_Finalizer.
7690 Add new flag description for Is_Processed_Transient and its uses in
7691 nodes.
7692 Add new field description for Return_Flag and its uses in nodes.
7693 (Associated_Final_Chain): Removed along with its pragma Inline.
7694 (Associated_Collection): New routine and pragma Inline.
7695 (Finalization_Chain_Entity): Removed along with its pragma Inline.
7696 (Finalizer): New routine and pragma Inline.
7697 (Is_Finalizer): New routine and pragma Inline.
7698 (Is_Processed_Transient): New routine and pragma Inline.
7699 (Return_Flag): New routine and pragma Inline.
7700 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
7701 (Set_Associated_Collection): New routine and pragma Inline.
7702 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
7703 (Set_Finalizer): New routine and pragma Inline.
7704 (Set_Is_Processed_Transient): New routine and pragma Inline.
7705 (Set_Return_Flag): New routine and pragma Inline.
7706 * exp_aggr.adb: Alphabetize subprograms.
7707 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
7708 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
7709 associated comments. Remove local variables External_Final_List and
7710 Attach.
7711 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
7712 Ancestor. Remove the retrieval of finalization lists. Update the call to
7713 Make_Adjust_Call.
7714 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
7715 lists. Update the call to Late_Expansion.
7716 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
7717 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
7718 (Gen_Assign): Remove the retrieval of the finalization list used to
7719 build the assignment. Update the calls to Make_Init_Call and
7720 Make_Adjust_Call.
7721 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
7722 Remove the mechanism to determine attachment levels and finalization
7723 list retrieval. Remove the processing for coextensions.
7724 (Init_Controller): Removed. Controllers no longer exist.
7725 (Late_Expansion): Remove formals Flist and Obj along with their
7726 associated comments. Update the calls to Build_Record_Aggr_Code and
7727 Build_Array_Aggr_Code.
7728 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
7729 (Expand_N_Freeze_Entity): Add special processing for finalizers which
7730 appear in entry bodies, protected subprograms and task bodies.
7731 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
7732 * exp_ch3.adb (Add_Final_Chain): Removed.
7733 (Build_Array_Init_Proc): Alphabetize local variables.
7734 (Build_Assignment): Alphabetize local variables. Update the call to
7735 Maked_Adjust_Call.
7736 (Build_Class_Wide_Master): Rename local variables to better reflect
7737 their role.
7738 (Build_Discriminant_Assignments): Code reformatting.
7739 (Build_Init_Call_Thru): Code reformatting.
7740 (Build_Init_Procedure): Code reformatting. Generate a special version
7741 of Deep_Finalize which is capable of finalizing all initialized
7742 components and ignore the rest.
7743 (Build_Init_Statements): Rename local variables to better reflect their
7744 role.
7745 Reimplement the mechanism to include the creation and update of an index
7746 variable called a "counter". It is used as a bookmark for tracing
7747 initialized and non-initialized components.
7748 (Build_Initialization_Call): Remove local variable Controller_Typ.
7749 Alphabetize all local variables. Remove the initialization of the
7750 record controller and update the call to Make_Init_Call.
7751 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
7752 New local variable Counter.
7753 (Constrain_Array): Alphabetize.
7754 (Expand_Freeze_Array_Type): Create a collection instead of a
7755 finalization list.
7756 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
7757 Finalize_Address which is used in conjunction with allocated controlled
7758 objects.
7759 (Expand_N_Object_Declaration): Remove the creation of a finalization
7760 list for anonymous access types. Update the calls to Make_Init_Call and
7761 Make_Adjust_Call.
7762 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
7763 retrieval of finalization lists. Remove the expansion of the record
7764 controller. Create TSS primitive Finalize_Address used in conjunction
7765 with controlled objects on the heap. Create finalization collections
7766 for access-to-controlled record components.
7767 (Expand_Record_Controller): Removed.
7768 (Freeze_Type): Remove the freezing of record controllers. Freezing of
7769 class-wide types now requires additional processing. Create
7770 finalization collections for access-to-controlled types.
7771 (Increment_Counter): New routine.
7772 (Make_Counter): New routine.
7773 (Make_Eq_If): Remove the mention of Name_uController.
7774 (Make_Predefined_Primitive_Specs): There is no longer need to skip
7775 types coming from System.Finalization_Root.
7776 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
7777 (Predefined_Primitive_Bodies): There is no longer need to skip types
7778 coming from System.Finalization_Root.
7779 (Stream_Operation_OK): Do not generate stream routines for
7780 type Ada.Finalization.Heap_Management.Finalization_Collection.
7781 * exp_ch3.ads: Alphabetize subprograms.
7782 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
7783 Add with and use clause for Lib.
7784 (Complete_Coextension_Finalization): Removed.
7785 (Complete_Controlled_Allocation): New routine. Create a finalization
7786 collection for anonymous access-to-controlled types. Create a custom
7787 Allocate which interfaces with the back end and the machinery in
7788 Heap_Management.
7789 (Expand_Allocator_Expression): Add necessary calls to
7790 Complete_Controlled_Allocation. Remove the retrieval of finalization
7791 lists. Update the calls to Make_Adjust_Call. Generate a call to
7792 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7793 the associated collection.
7794 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
7795 Code clean up. Remove the retrieval of finalization lists and
7796 attachment levels.
7797 Update the call to Make_Init_Call. Generate a call to
7798 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7799 the associated collection.
7800 (Get_Allocator_Final_List): Removed. Finalization lists are not
7801 available.
7802 (Suitable_Element): Remove the mention of Name_uController.
7803 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
7804 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
7805 the left hand side, carry out the assignment and adjust the left hand
7806 side.
7807 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
7808 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
7809 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
7810 BIP_Collection and BIPcollection.
7811 (Build_Heap_Allocator): New routine used to allocate the return object
7812 of a build-in-place function onto a collection.
7813 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
7814 (Expand_Call): Do not replace direct calls to Deep routines with their
7815 aliases.
7816 (Expand_N_Extended_Return_Statement): Give all variables shorter names
7817 and update their occurrences. Add a special return flag to monitor the
7818 [ab]normal execution of the function. The flag is set right before the
7819 return statement.
7820 Rewrite the mechanism used to allocate a build-in-place return object
7821 on the heap or on a storage pool.
7822 (Is_Direct_Deep_Call): New routine.
7823 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
7824 build-in-place function call instead of a final list. Build a call to
7825 Set_Finalize_Address_Ptr to decorate the associated collection.
7826 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
7827 order to name the build-in-place function call's result for later
7828 finalization. Add a collection to a build-in-place function call
7829 instead of a final list.
7830 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
7831 build-in-place function call instead of a final list. Remove the code
7832 which moves one final list and transforms it into the actual in a
7833 nested build-in-place call.
7834 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
7835 build-in-place function call instead of a final list.
7836 (Move_Final_List): Removed.
7837 (Needs_BIP_Collection): New routine.
7838 (Needs_BIP_Final_List): Removed.
7839 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
7840 enumeration type BIP_Formal_Kind.
7841 Update the related comment.
7842 (Needs_BIP_Collection): New routine.
7843 (Needs_BIP_Final_List): Removed.
7844 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
7845 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
7846 majority of subprograms in this unit. Add Name_Finalize_Address to
7847 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
7848 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
7849 statements for an array type.
7850 (Build_Adjust_Statements): Create the adjust statements for a record
7851 type.
7852 (Build_Cleanup_Statements): New routine. A procedure which given any
7853 construct containing asynchronous calls, references to _master, or is a
7854 task body, a task allocation or a protected body produces the necessary
7855 runtime calls to clean up these constructs.
7856 (Build_Exception_Handler): New routine.
7857 (Build_Final_List): Removed.
7858 (Build_Finalization_Collection): New routine. A core procedure which
7859 creates a collection to service heap allocated controlled objects
7860 associated with an access-to-controlled type.
7861 (Build_Finalize_Statements): Create the finalization statements for a
7862 record types.
7863 (Build_Finalizer): New routine. A core procedure which given any
7864 construct with declarations and/or statements detects all objects which
7865 need any type of clean up (controlled objects, protected objects) and
7866 generates all necessary code to clean up the said objects in the proper
7867 order.
7868 (Build_Finalizer_Call): New routine.
7869 (Build_Initialize_Statements): Create the initialization statements for
7870 an array type. The generated routine contains code to finalize partially
7871 initialized arrays.
7872 (Build_Object_Declarations): New routine.
7873 (Build_Raise_Statement): New routine.
7874 (Clean_Simple_Protected_Objects): Removed.
7875 (Controller_Component): Removed.
7876 (Enclosing_Function): New routine.
7877 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
7878 either declarations or statements or both.
7879 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
7880 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
7881 package.
7882 (Find_Final_List): Removed.
7883 (Global_Flist_Ref): Removed.
7884 (In_Finalization_Root): Removed.
7885 (Insert_Actions_In_Scope_Around): Determine the range of the transient
7886 scope in terms of tree nodes. Process all transient variables within
7887 that range.
7888 (Make_Adjust_Call): Rewritten. There is no longer an attach call
7889 generated after the adjust.
7890 (Make_Attach_Call): Removed.
7891 (Make_Call): New routine.
7892 (Make_Clean): Removed.
7893 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
7894 build routines.
7895 (Make_Deep_Proc): Rewritten to generate the new profile signature used
7896 in Deep routines.
7897 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
7898 build routines.
7899 (Make_Final_Call): Modified to simply create a call to either
7900 Deep_Finalize or Finalize.
7901 (Make_Finalize_Address_Body): New routine.
7902 (Make_Finalize_Address_Stmts): New routine. A function which produces
7903 TSS primitive Finalize_Address used in conjunction with heap allocated
7904 controlled objects.
7905 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
7906 (Make_Init_Call): Rewritten. There is no longer an attach call
7907 generated after initialization.
7908 (Make_Local_Deep_Finalize): New routine.
7909 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7910 (Make_Transient_Block): Remove the finalization list retrieval and
7911 manipulation.
7912 (Needs_Finalization): Moved to Exp_Util.
7913 (Parent_Field_Type): New routine.
7914 (Preprocess_Components): New routine.
7915 (Process_Transient_Objects): New routine.
7916 (Wrap_HSS_In_Block): New routine.
7917 (Wrap_Transient_Declaration): Remove finalization list management and
7918 controller insertion.
7919 (Wrap_Transient_Expression): Code reformatting.
7920 (Wrap_Transient_Statement): Code reformatting.
7921 * exp_ch7.ads (Build_Final_List): Removed.
7922 (Build_Finalization_Collection): New routine.
7923 (Build_Raise_Statement): New routine.
7924 (Controller_Component): Removed.
7925 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
7926 (Find_Final_List): Removed.
7927 (In_Finalization_Root): Removed.
7928 (Is_Simple_Protected_Type): Update related comment.
7929 (Make_Adjust_Call): New parameter profile and associated comments.
7930 (Make_Attach_Call): Removed.
7931 (Make_Final_Call): New parameter profile and associated comments.
7932 (Make_Finalize_Address_Body): New routine.
7933 (Make_Init_Call): New parameter profile and associated comments.
7934 (Make_Local_Deep_Finalize): New routine.
7935 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7936 (Needs_Finalization): Moved to Exp_Util.
7937 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
7938 (Expand_N_Protected_Body): Remove the handling of finalization lists.
7939 (Find_Protection_Type): Moved to Exp_Util.
7940 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
7941 (Make_DT): Update sequence of dispatch table initialization. Remove the
7942 initialization of field RC_Offset. Add initialization of field Needs_
7943 Finalization.
7944 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
7945 Reimplement how an object is first finalized, then deallocated.
7946 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
7947 Code reformatting.
7948 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
7949 Register TSS_Finalize_Address with type TSS_Names.
7950 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
7951 procedure provides the interface between an allocation / deallocation
7952 and the support machinery in Ada.Finalization.Heap_Management.
7953 (Find_Init_Call): Code reformatting.
7954 (Find_Init_Call_In_List): Code reformatting.
7955 (Find_Protection_Type): Moved from Exp_Ch9.
7956 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
7957 (Has_Controlled_Coextensions): Removed.
7958 (Has_Controlled_Objects): New routine.
7959 (In_Library_Level_Package_Body): New routine.
7960 (Insert_Action_After): New routine.
7961 (Is_Finalizable_Transient): New routine. This predicate determines
7962 whether an object declaration is one of the many variants of controlled
7963 transients.
7964 (Is_Null_Access_BIP_Func_Call): New routine.
7965 (Is_Non_BIP_Func_Call): New routine.
7966 (Is_Related_To_Func_Return): New routine.
7967 (Needs_Finalization): Moved from Exp_Ch7.
7968 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
7969 (Find_Protection_Type): Moved from Exp_Ch9.
7970 (Has_Controlled_Coextensions): Removed.
7971 (Has_Controlled_Objects): New routine.
7972 (In_Library_Level_Package_Body): New routine.
7973 (Insert_Action_After): New routine.
7974 (Is_Finalizable_Transient): New routine.
7975 (Is_Null_Access_BIP_Func_Call): New routine.
7976 (Is_Non_BIP_Func_Call): New routine.
7977 (Is_Related_To_Func_Return): New routine.
7978 (Needs_Finalization): Moved from Exp_ch7.
7979 * expander.adb (Expand): Add a case for N_Free_Statement.
7980 * freeze.adb (Freeze_All): Replace the generation of a finalization
7981 list with a collection for access-to-controlled types.
7982 (Freeze_Entity): Code reformatting.
7983 (Freeze_Record_Type): Remove the freezing of a record controller
7984 component.
7985 (Freeze_Subprogram): Code reformatting.
7986 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
7987 finalization list.
7988 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
7989 has a library-level finalizer.
7990 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
7991 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
7992 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
7993 files. Add a-fihema to the list of object files.
7994 * par-ch4.adb:
7995 Alphabetize the associations in type Is_Parameterless_Attribute.
7996 * rtsfind.ads: Ada.Finalization_List.Controller and
7997 System.Finalization_Implementation are no longer a GNAT unit.
7998 Update the range of type Ada_Finalization_Child. Remove the following
7999 recoverable entities:
2c7f9cc0 8000
df3e68b1
HK
8001 RE_Attach_To_Final_List
8002 RE_Deep_Tag_Attach
8003 RE_Finalize_List
8004 RE_Finalize_One
8005 RE_Finalizable_Ptr_Ptr
8006 RE_Global_Final_List
8007 RE_Limited_Record_Controller
8008 RE_List_Controller
8009 RE_Move_Final_List
8010 RE_Record_Controller
8011 RE_Simple_List_Controller
2c7f9cc0 8012
df3e68b1 8013 Add the following recoverable entities:
2c7f9cc0 8014
df3e68b1
HK
8015 RE_Add_Offset_To_Address
8016 RE_Allocate
8017 RE_Base_Pool
8018 RE_Deallocate
8019 RE_Exception_Identity
8020 RE_Finalization_Collection
8021 RE_Finalization_Collection_Ptr
8022 RE_Needs_Finalization
8023 RE_Save_Library_Occurrence
8024 RE_Set_Finalize_Address_Ptr
8025 RE_Set_Storage_Pool_Ptr
8026 RE_Storage_Count
8027 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8028 Name_uController.
8029 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8030 (First_Stored_Discriminant): Remove the mention of Name_uController.
8031 * sem_aux.ads: Comment reformatting.
8032 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8033 to redecorate an already existing class-wide type.
8034 (Decorate_Tagged_Type): New parameter profile and associated comment.
8035 Create a "shadow class-wide type" for a shadow entity.
8036 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8037 of the final chain along with the associated comment.
8038 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8039 Full_Desig and set it to the full view of the designated type.
8040 Initialize the finalization collection to empty.
8041 (Build_Derived_Record_Type): Alphabetize local variables. Code
8042 reformatting.
8043 (Collect_Fixed_Components): Remove the mention of Name_uController.
8044 (Create_Constrained_Components): Remove the mention of Name_uController.
8045 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8046 class-wide type of a shadow entity.
8047 (Process_Full_View): Update the machinery which marks type
8048 Limited_Controlled's entity as limited.
8049 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8050 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8051 list, instead make a collection build-in-place formal.
8052 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8053 a designated type in order to establish a match between the renaming
8054 and the renamed entity.
8055 (Find_Selected_Component): Add guard to prevent spurious exceptions
8056 from being raised on .NET/JVM.
8057 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8058 to the list of primitive that need special processing. Update arrays
8059 C_Names and D_Names.
8060 (Replace_Types): Handle class-wide types.
8061 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8062 different parameter profile, look at the first formal.
8063 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8064 use clauses for Exp_Util.
8065 * sem_res.adb: Remove with and use clauses for Elists.
8066 (Propagate_Coextensions): Removed.
8067 (Resolve_Allocator): Do not propagate the list of coextensions from one
8068 allocator to another.
8069 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8070 Deaccessed_T to Desig_Typ.
8071 (Enter_Name): Remove the mention of Name_uController.
8072 (Gather_Components): Remove the mention of Name_uController.
8073 (Incomplete_Or_Private_View): New routine.
8074 (Is_Coextension_Root): Removed.
8075 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8076 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8077 (Is_Coextension_Root): Removed.
8078 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8079 Controlled types are now derived from a null tagged record. Remove
8080 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8081 * sinfo.adb (Coextensions): Removed.
8082 (Set_Coextensions): Removed.
8083 * sinfo.ads: Remove Coextensions from the explanation of node fields
8084 and its uses in nodes.
8085 Update the field usage of N_Allocator.
8086 (Coextensions): Removed along with its pragma Inline.
8087 (Set_Coextensions): Removed along with its pragma Inline.
8088 * snames.ads-tmpl: Remove names
2c7f9cc0 8089
df3e68b1
HK
8090 Name_uClean
8091 Name_uController
8092 Name_uFinal_List
8093 Name_uLocal_Final_List
8094 Name_Finalization_Root
8095 Name_Next
8096 Name_Prev
2c7f9cc0 8097
df3e68b1 8098 Add names
2c7f9cc0 8099
df3e68b1
HK
8100 Name_uFinalizer
8101 Name_Finalize_Address
8102 * s-pooglo.adb (Allocate): Add overriding indicator.
8103 (Deallocate): Add overriding indicator.
8104 (Storage_Size): Add overriding indicator.
8105 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8106 than Finalize_Global_List.
8107 (Null_Finalize_Global_List): Removed.
8108 (Save_Library_Occurrence): New routine.
8109 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8110 initialization. Add variable Finalize_Library_Objects along with its
8111 pragma Export. Add variables Library_Exception and
8112 Library_Exception_Set along with their pragma Export.
8113 (Null_Finalize_Global_List): Removed.
8114 (Save_Library_Occurrence): New routine.
8115 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8116 rather than Finalize_Global_List.
8117 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8118 of the constructed node.
8119
2ee06322
RO
81202011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8121
8122 * link.c: Include "auto-host.h" before system headers.
8123
f77b022b
VC
81242011-08-03 Vincent Celier <celier@adacore.com>
8125
8126 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8127 that are not extended. Do not check if a library project that is
8128 extended should be regenerated. Do not add to table Library_Paths the
8129 libraries that are in extended projects. Link only with libraries that
8130 are in libray projects that are not extended.
8131 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8132 for a library project that is extended.
8133
0187b60e
AC
81342011-08-03 Gary Dismukes <dismukes@adacore.com>
8135
8136 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8137 conforming subprogram renamings that appear to be completions if they
8138 are not fully conformant.
8139 Such renamings are homographs but not completions.
8140 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8141 names in a subprogram renaming that appears in an instance.
8142
81432011-08-03 Ed Schonberg <schonberg@adacore.com>
8144
8145 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8146 not immutably limited, build actual subtype from expression to provide
8147 proper bounds to caller.
8148
81492011-08-03 Gary Dismukes <dismukes@adacore.com>
8150
8151 * sem_ch8.adb: Minor comment correction.
8152
81532011-08-03 Thomas Quinot <quinot@adacore.com>
8154
8155 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8156 returning a limited array, use an extended return statement.
8157
81582011-08-03 Vincent Celier <celier@adacore.com>
8159
8160 * make.adb (Initialize): If --subdirs= is used, but no project file is
8161 specified, attempt to create the specify subdir if it does not already
8162 exist and use it as the object directory as if -D had been specified.
8163
81642011-08-03 Arnaud Charlet <charlet@adacore.com>
8165
8166 * s-tpopsp-vms.adb: New file.
8167 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8168 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8169
e280f981
AC
81702011-08-03 Emmanuel Briot <briot@adacore.com>
8171
8172 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8173 package.
8174
81752011-08-03 Yannick Moy <moy@adacore.com>
8176
8177 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8178 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8179 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8180 detect that an array has static bounds.
8181
98c99a5a
AC
81822011-08-03 Thomas Quinot <quinot@adacore.com>
8183
8184 * exp_dist.adb: Minor reformatting.
8185
81862011-08-03 Arnaud Charlet <charlet@adacore.com>
8187
8188 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8189 (ATCB_Key): Removed, not always used.
8190
81912011-08-03 Emmanuel Briot <briot@adacore.com>
8192
8193 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8194 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8195 most remaining global variables.
8196
686d0984
AC
81972011-08-03 Robert Dewar <dewar@adacore.com>
8198
8199 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8200 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8201 reformatting.
8202
82032011-08-03 Javier Miranda <miranda@adacore.com>
8204
8205 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8206 that must be passed by copy in VM targets.
8207
82082011-08-03 Emmanuel Briot <briot@adacore.com>
8209
8210 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8211 duplicates a similar htable now in the project tree.
8212
82132011-08-03 Claire Dross <dross@adacore.com>
8214
8215 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8216 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8217 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8218 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8219 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8220 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8221 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8222 update.
8223
82242011-08-03 Arnaud Charlet <charlet@adacore.com>
8225
8226 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8227 (ATCB_Key): Removed, not always used.
8228 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8229 s-taprop-posix.adb.
8230 * s-tpopsp-tls.adb: New file.
8231 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8232 x86/x64/ia64/powerpc/sparc Linux.
8233
82342011-08-03 Arnaud Charlet <charlet@adacore.com>
8235
8236 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8237 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8238
82392011-08-03 Thomas Quinot <quinot@adacore.com>
8240
8241 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8242 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8243 Fix type selection for mapping integer types to PolyORB types.
8244
82452011-08-03 Bob Duff <duff@adacore.com>
8246
8247 * sem_ch7.adb: Minor comment clarification.
8248
82492011-08-03 Bob Duff <duff@adacore.com>
8250
8251 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8252 an error analyzing a choice, skip further processing. Further
8253 processing could cause a crash or cascade errors.
8254
40ecf2f5
EB
82552011-08-03 Emmanuel Briot <briot@adacore.com>
8256
8257 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8258 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8259 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8260 prj-env.ads (Shared_Project_Tree_Data): new type
8261 An aggregate project and its aggregated trees need to share the common
8262 data structures used for lists of strings, packages,... This makes the
8263 code simpler since otherwise we have to pass the root tree (also used
8264 for the configuration file data) in addition to the current project
8265 tree. This also avoids ambiguities as to which tree should be used.
8266 And finally this saves a bit of memory.
8267 (For_Every_Project_Imported): new parameter Tree.
8268 Since aggregated projects are using a different tree, we need to let
8269 the caller know which tree to use to manipulate the returned project.
8270
9fde638d
RD
82712011-08-03 Robert Dewar <dewar@adacore.com>
8272
8273 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8274 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8275 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8276 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8277
95eb8b69
AC
82782011-08-03 Javier Miranda <miranda@adacore.com>
8279
8280 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8281 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8282
82832011-08-03 Bob Duff <duff@adacore.com>
8284
8285 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8286 the Base_Type.
8287
82882011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8289
8290 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8291 g-sehash.ads: Fix typo. Update header.
8292
82932011-08-03 Thomas Quinot <quinot@adacore.com>
8294
8295 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8296 expansion.
8297
82982011-08-03 Gary Dismukes <dismukes@adacore.com>
8299
8300 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8301 prefixes of private types along with records, since the selector may be
8302 a discriminant.
8303 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8304 private types along with records, since the selector may be a
8305 discriminant.
8306
92e77027
AC
83072011-08-03 Emmanuel Briot <briot@adacore.com>
8308
b2f7ebc1 8309 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
8310
83112011-08-03 Javier Miranda <miranda@adacore.com>
8312
8313 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8314 Tagged_Type_Expansion.
8315
83162011-08-03 Yannick Moy <moy@adacore.com>
8317
b2f7ebc1
GP
8318 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8319 violation when the argument of concatenation is the name of a
8320 constant.
92e77027 8321
ab29a348
EB
83222011-08-03 Emmanuel Briot <briot@adacore.com>
8323
8324 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8325 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8326 (Process_Declarative_Items): new parameter Child_Env.
8327
9466892f
AC
83282011-08-03 Yannick Moy <moy@adacore.com>
8329
589ef536
GP
8330 * alfa.ads: Update format of ALFA section in ALI file in order to
8331 add a mapping from bodies to specs when both are present.
8332 (ALFA_Scope_Record): Add components for spec file/scope.
8333 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8334 present.
8335 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8336 collected, fill in the spec information when relevant.
8337 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
8338 present.
8339
83402011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8341
8342 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8343 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 8344
9466892f
AC
83452011-08-03 Javier Miranda <miranda@adacore.com>
8346
8347 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
8348 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8349 be handled by copy in VM targets.
9466892f
AC
8350
83512011-08-03 Emmanuel Briot <briot@adacore.com>
8352
589ef536 8353 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
8354 code with Makeutl.Get_Switches.
8355 * prj-tree.adb: Update comment.
8356
b5ea9143
AC
83572011-08-03 Thomas Quinot <quinot@adacore.com>
8358
8359 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8360 subprogram with a limited formal that does not support external
8361 streaming.
8362
83632011-08-03 Yannick Moy <moy@adacore.com>
8364
8365 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8366 continuation line
8367 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8368 not from current unit in two phases, because it is not possible to
8369 change the table while iterating over its content.
8370 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8371
83722011-08-03 Sergey Rybin <rybin@adacore.com>
8373
8374 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8375 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8376
668a19bc
ES
83772011-08-03 Ed Schonberg <schonberg@adacore.com>
8378
8379 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8380 and the component type is composite, this is ambiguous for predefined
8381 concatenation, but if the node is not overloaded and the entity is a use
8382 -defined function its profile can be used to resolve that aggregate.
8383
170b2989
AC
83842011-08-03 Robert Dewar <dewar@adacore.com>
8385
8386 * exp_ch4.adb: Minor code cleanup.
8387
83882011-08-03 Thomas Quinot <quinot@adacore.com>
8389
8390 * exp_dist.adb: Do not generate distribution stubs if serious errors
8391 have been diagnosed.
8392
83932011-08-03 Ed Schonberg <schonberg@adacore.com>
8394
8395 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8396 the first formal of a primitive operation, go to the base type to
8397 handle properly an access to a derived type with constrained
8398 discriminants.
8399 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8400 user-defined function that is only use-visible.
170b2989 8401
e917aec2
RD
84022011-08-03 Robert Dewar <dewar@adacore.com>
8403
8404 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8405 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8406 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8407 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8408 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8409 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8410 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8411 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8412
84132011-08-03 Robert Dewar <dewar@adacore.com>
8414
8415 * repinfo.adb (List_Mechanism): Add handling of
8416 Convention_Ada_Pass_By_XXX.
8417 * sem_mech.adb (Set_Mechanism): Ditto.
8418 * sem_prag.adb (Process_Convention): Add entries for
8419 Convention_Ada_Pass_By_XXX.
8420 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8421
49bfcf43
AC
84222011-08-03 Pascal Obry <obry@adacore.com>
8423
8424 * makeutl.adb: Minor reformatting.
8425
84262011-08-03 Vincent Celier <celier@adacore.com>
8427
8428 * fname-uf.adb
8429 (Get_File_Name) If the file cannot be found when there are no config
8430 pragmas file and May_Fail is True, return No_File instead of the file
8431 name, to be consistent.
8432
84332011-08-03 Pascal Obry <obry@adacore.com>
8434
8435 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8436 to null pointer.
8437
84382011-08-03 Javier Miranda <miranda@adacore.com>
8439
8440 * sem_ch13.adb
8441 (Same_Representation): In VM targets the representation of arrays with
8442 aliased components differs from arrays with non-aliased components.
8443
34798441
EB
84442011-08-03 Emmanuel Briot <briot@adacore.com>
8445
8446 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8447 not systematically lower case attribute indexes that contain no "."
8448 Fix definition of several Naming attributes, which take
8449 a unit name as index and therefore should be case insensitive.
8450 Minor refactoring (reduce length of variable names).
8451
84522011-08-03 Emmanuel Briot <briot@adacore.com>
8453
8454 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8455
4437a530
EB
84562011-08-03 Emmanuel Briot <briot@adacore.com>
8457
8458 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8459 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8460 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8461 prj-tree.ads (Prj.Tree.Environment): new type.
8462
804fe3c4
EB
84632011-08-03 Emmanuel Briot <briot@adacore.com>
8464
8465 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8466 prj-tree.adb, prj-tree.ads (Environment): new type.
8467
c565bc66
AC
84682011-08-03 Emmanuel Briot <briot@adacore.com>
8469
8470 * prj-tree.ads: Remove unused variable.
8471
84722011-08-03 Yannick Moy <moy@adacore.com>
8473
8474 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8475 issuing messages related to SPARK restriction violation.
8476
4ee646da
AC
84772011-08-03 Ed Schonberg <schonberg@adacore.com>
8478
8479 * sem_ch6.adb: guard against error nodes in return statements.
8480
84812011-08-03 Arnaud Charlet <charlet@adacore.com>
8482
8483 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8484 a warning can only appear on a configuration file, so emit warning
8485 without further checks.
8486
84872011-08-03 Arnaud Charlet <charlet@adacore.com>
8488
8489 * s-interr.ads: add overriding keyword.
8490
84912011-08-03 Geert Bosch <bosch@adacore.com>
8492
8493 * exp_attr.adb: Fix minor typo.
8494
84952011-08-03 Ed Schonberg <schonberg@adacore.com>
8496
8497 * par-ch4.adb: improve error recovery.
8498
c0e538ad
AC
84992011-08-03 Emmanuel Briot <briot@adacore.com>
8500
8501 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8502 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8503 to Errout_Handling.
8504
85052011-08-03 Emmanuel Briot <briot@adacore.com>
8506
8507 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8508 "external" as an attribute name in aggregate projects.
8509
85102011-08-03 Jose Ruiz <ruiz@adacore.com>
8511
8512 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8513 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8514 from 0, so we need to adjust.
8515
85162011-08-03 Emmanuel Briot <briot@adacore.com>
8517
8518 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8519 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8520
c4d67e2d
AC
85212011-08-03 Yannick Moy <moy@adacore.com>
8522
8523 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8524 restriction on overloaded entity if the entity is not an operator.
8525
85262011-08-03 Yannick Moy <moy@adacore.com>
8527
8528 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8529 restrict.ads: Rename remaining Check_Formal_Restriction* into
8530 Check_SPARK_Restriction*.
8531
85322011-08-03 Emmanuel Briot <briot@adacore.com>
8533
8534 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8535 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8536 qualifier.
8537 (Project_Empty): removed
8538 (Empty_Project): new parameter Qualifier
8539 This is used to have fields specific to aggregate projects, cleaner
8540 New field to store the list of aggregated projects.
8541 (Check_Aggregate_Project): removed
8542 (Process_Aggregated_Projects, Free): new subprograms.
8543
3f5a8fee
AC
85442011-08-03 Olivier Hainque <hainque@adacore.com>
8545
8546 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8547
85482011-08-03 Ed Schonberg <schonberg@adacore.com>
8549
8550 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8551 explicit dereference of an unconstrained type, create a constrained
8552 subtype for it, as is done for function calls that return an
8553 unconstrained type.
8554
85552011-08-03 Thomas Quinot <quinot@adacore.com>
8556
8557 * g-pehage.adb (Finalize): Avoid possible double-free.
8558
85592011-08-03 Steve Baird <baird@adacore.com>
8560
8561 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8562 Elab_Spec/Body attrs in CodePeer_Mode.
8563
85642011-08-03 Javier Miranda <miranda@adacore.com>
8565
8566 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8567 low bound is not known at compile time but they have no others choice.
8568 Done because in this case the bounds can be obtained directly from the
8569 aggregate.
8570
85712011-08-03 Ed Falis <falis@adacore.com>
8572
8573 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8574 on VxWorks SMP. Remove unusable constant ANY_CPU.
8575
a96ca600
EB
85762011-08-03 Emmanuel Briot <briot@adacore.com>
8577
8578 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8579 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8580 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8581 Prj.Env.Initialize_Empty): new subprograms
8582 (Get_Env, Find_Project): remove parameter Target_Name.
8583
3e582869
AC
85842011-08-03 Gary Dismukes <dismukes@adacore.com>
8585
8586 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8587 as a condition for the delayed call to Derived_Subprograms done for the
8588 case of the rewriting of a derived type that constrains the
8589 discriminants of its parent type.
8590 Avoids redundant subprogram derivations for private subtype derivations.
8591
85922011-08-03 Javier Miranda <miranda@adacore.com>
8593
8594 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8595 Build_Record_Aggr_Code.
8596 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8597 discriminants in extension aggregates.
8598
85992011-08-03 Emmanuel Briot <briot@adacore.com>
8600
8601 * prj-pp.adb (Print): also output project qualifiers, since in
8602 particular "aggregate" is mandatory in an aggregate project.
8603
86042011-08-03 Emmanuel Briot <briot@adacore.com>
8605
8606 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8607 (Debug_Output): new function.
8608
56e94186
AC
86092011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8610
8611 * gnat_ugn.texi: Document -Wstack-usage.
8612 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8613
86142011-08-03 Thomas Quinot <quinot@adacore.com>
8615
8616 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8617 have keyword LIMITED.
8618
86192011-08-03 Yannick Moy <moy@adacore.com>
8620
8621 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8622 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8623 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8624 section (does not happen in compiler, only if code directly calls
8625 Scan_ALI).
8626 * get_alfa.adb, get_alfa.ads: New files.
8627 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8628 needed.
8629 * lib-xref-alfa.adb: New file.
8630 * lib-xref.adb, lib-xref.ads
8631 (Xref_Entry): redefine information needed in cross-references for ALFA.
8632 Push ALFA treatments in separated local package.
8633 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8634 identifiers. Return entity of package body instead of spec. Return
8635 Empty for a scope with no location.
8636 (Generate_Reference): adapt to new components for ALFA information.
8637 Remove the need for D references on definitions.
8638 (Is_Local_Reference): moved to ALFA local package
8639 (Output_References): extract subfunction as Extract_Source_Name
8640 (Output_Local_References): remove procedure, replaced by filtering of
8641 cross-references in package ALFA and printing in Put_ALFA.
8642 (Write_Entity_Name): remove procedure
8643 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
8644 print exact name of entity as it appears in source file
8645 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
8646 * put_alfa.adb, put_alfa.ads: New files.
8647 * xref_lib.adb (Search_Xref): protect read of cross-references against
8648 reading other sections of the ALI file, in gnatxref
8649 (Search): protect read of cross-references against reading other
8650 sections of the ALI file, in gnatfind.
8651 * gcc-interface/Make-lang.in: Update dependencies.
8652
86532011-08-03 Thomas Quinot <quinot@adacore.com>
8654
8655 * sem_ch3.adb: Minor reformatting.
8656
86572011-08-03 Jose Ruiz <ruiz@adacore.com>
8658
8659 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
8660 raising an exception.
8661
86622011-08-03 Ed Schonberg <schonberg@adacore.com>
8663
8664 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
8665 type, always use 1 as the lower bound or string, even if lower bound of
8666 context is not static, to handle properly null strings in a non-static
8667 context.
8668
86692011-08-03 Bob Duff <duff@adacore.com>
8670
8671 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
8672 always legal on the right-hand side of an assignment statement; there
8673 is always an applicable index constraint in this case. Therefore, the
8674 check for Pkind = N_Assignment_Statement is now unconditional -- it
8675 doesn't depend on whether Is_Constrained (Typ).
8676
4317e442
AC
86772011-08-03 Robert Dewar <dewar@adacore.com>
8678
8679 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
8680
86812011-08-03 Ed Schonberg <schonberg@adacore.com>
8682
8683 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
8684 for an itype created within a generic unit.
8685
86862011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8687
8688 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
8689 suppresses all inlining.
8690
53f29d4f
AC
86912011-08-03 Robert Dewar <dewar@adacore.com>
8692
8693 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
8694 exp_aggr.adb: Minor reformatting.
8695
86962011-08-03 Thomas Quinot <quinot@adacore.com>
8697
8698 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
8699 tagged assignment when discriminant checks are suppressed. This is
8700 useless and extremely costly in terms of static stack usage.
8701
87022011-08-03 Bob Duff <duff@adacore.com>
8703
8704 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
8705 of generics, because this leads to the wrong entity in the wrong scope,
8706 causing (e.g.) pragma Export_Procedure to get an error if the entity is
8707 an instance.
8708 (Process_Interface_Name): Follow Alias for instances of generics, to
8709 correct for the above change.
8710
87112011-08-03 Ed Schonberg <schonberg@adacore.com>
8712
8713 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
8714 is an integer literal it is always safe to replace the reference. In
8715 addition, if the reference appears in the generated code for an object
8716 declaration it is necessary to copy because otherwise the reference
8717 might be to the uninitilized value of the discriminant of the object
8718 itself.
8719
87202011-08-03 Pascal Obry <obry@adacore.com>
8721
8722 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
8723 ACL used, in this case we want to check for ending .exe, not .exe
8724 anywhere in the path.
8725
87262011-08-03 Sergey Rybin <rybin@adacore.com>
8727
8728 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8729 the tree structure (semantic decoration of references to record
8730 discriminants).
8731
c0b11850
AC
87322011-08-03 Gary Dismukes <dismukes@adacore.com>
8733
8734 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
8735 choices of a named array aggregate, bail out when any choices are
8736 marked as Errors_Posted.
8737
87382011-08-03 Ed Schonberg <schonberg@adacore.com>
8739
8740 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
8741 in which entity is frozen, to handle properly loop variables in
8742 iterators.
8743
87442011-08-03 Ed Schonberg <schonberg@adacore.com>
8745
8746 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
8747 subtype is not static, compute the upper bound using attributes, to
8748 handle properly index types that are not integer types.
8749
87502011-08-03 Bob Duff <duff@adacore.com>
8751
8752 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
8753 Update copyright notice.
8754
87552011-08-03 Ed Schonberg <schonberg@adacore.com>
8756
8757 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
8758 Original_Discriminant if within an instance.
8759 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
8760
87612011-08-03 Thomas Quinot <quinot@adacore.com>
8762
8763 * einfo.ads: Minor reformatting.
8764
87652011-08-03 Ed Schonberg <schonberg@adacore.com>
8766
8767 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
8768 composite type with an unfrozen subcomponent, in the profile of a
8769 primitive operation.
8770
5c34e9cd
AC
87712011-08-03 Robert Dewar <dewar@adacore.com>
8772
8773 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
8774
87752011-08-03 Ed Schonberg <schonberg@adacore.com>
8776
8777 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
8778 unconstrained type with discriminants is initialized with an aggregate,
8779 use the constrained subtype of the aggregate as the type of the object,
8780 because it is immutable, and this allows the back-end to generate no
8781 code for the object declaration.
8782
abcd9db2
AC
87832011-08-03 Robert Dewar <dewar@adacore.com>
8784
8785 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
8786 comparison operand is variable, and turns out to be zero or negative.
8787
87882011-08-03 Javier Miranda <miranda@adacore.com>
8789
8790 * exp_intr.adb
8791 (Expand_Dispatching_Constructor_Call): Disable expansion of
8792 code required for native targets. Done to avoid generating
8793 references to unavailable runtime entities in VM targets.
8794 * exp_ch3.adb
8795 (Expand_N_Object_Declaration): Add missing support to handle
8796 the explicit initialization of class-wide interface objects.
8797 Fix documentation.
8798
87992011-08-03 Matthew Heaney <heaney@adacore.com>
8800
7089ef0f
GP
8801 * a-cobove.adb (Merge): Move source onto target, instead of using
8802 Assign.
abcd9db2
AC
8803
88042011-08-03 Matthew Heaney <heaney@adacore.com>
8805
7089ef0f 8806 * a-cbdlli.adb (Splice): Move source items from first to last.
abcd9db2
AC
8807
88082011-08-03 Yannick Moy <moy@adacore.com>
8809
7089ef0f 8810 * sem_util.ads: Add comment.
abcd9db2
AC
8811
88122011-08-03 Javier Miranda <miranda@adacore.com>
8813
8814 * exp_aggr.adb
8815 (Expand_Record_Aggregate): In VM targets disable the expansion into
8816 assignments of aggregates whose type is not known at compile time.
8817
b474d6c3
ES
88182011-08-03 Ed Schonberg <schonberg@adacore.com>
8819
8820 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
8821 protected entries and task entries, to build the proper renaming
8822 declaration for entry formals, used in debugging.
8823 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
8824 parameters in the same way.
8825
0580d807
AC
88262011-08-02 Robert Dewar <dewar@adacore.com>
8827
8828 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
8829 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
8830 code reorganization.
8831
88322011-08-02 Robert Dewar <dewar@adacore.com>
8833
8834 * debug.adb: Debug flag d.P to suppress length comparison optimization
8835 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
8836 comparison of Length by comparing First/Last instead.
8837
88382011-08-02 Matthew Heaney <heaney@adacore.com>
8839
8840 * a-cobove.ads: Code clean up.
8841
b191a125
AC
88422011-08-02 Vincent Celier <celier@adacore.com>
8843
8844 * adaint.c (file_names_case_sensitive_cache): New static int.
8845 (__gnat_get_file_names_case_sensitive): Cache the return value in
8846 file_names_case_sensitive_cache at the first invocation, to avoid
8847 multiple calls to getenv.
8848
88492011-08-02 Bob Duff <duff@adacore.com>
8850
8851 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
8852
316a0661
AC
88532011-08-02 Yannick Moy <moy@adacore.com>
8854
8855 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
8856 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
8857 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
8858 indicate that we are in a precondition or postcondition. This is used in
8859 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
8860 decide whether to flag the spec or body of the current subprogram as
8861 not in ALFA.
8862
88632011-08-02 Fabien Chouteau <chouteau@adacore.com>
8864
8865 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
8866 list.
8867 * a-extiin.ads: New file.
8868
88692011-08-02 Bob Duff <duff@adacore.com>
8870
8871 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
8872 now raises Name_Error instead of Use_Error in certain cases. The other
8873 parts of this AI were already implemented properly.
8874
f9adb9d4
AC
88752011-08-02 Vincent Celier <celier@adacore.com>
8876
8877 * link.c: Only import "auto-host.h" when building the gnattools.
8878
88792011-08-02 Yannick Moy <moy@adacore.com>
8880
8881 * sem_util.adb: Inter-unit inlining does not work for a subprogram
8882 which calls a local subprogram, so extract subprogram
8883 from Mark_Non_ALFA_Subprogram_Body.
8884
88852011-08-02 Javier Miranda <miranda@adacore.com>
8886
8887 * exp_ch9.adb
8888 (Extract_Dispatching_Call): If the type of the dispatching object is an
8889 access type then return an explicit dereference in the Object out-mode
8890 parameter.
8891
88922011-08-02 Gary Dismukes <dismukes@adacore.com>
8893
8894 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
8895 compatibility checks for all indexes of an array subtype, not just the
8896 first. Reset Has_Dynamic_Range_Check on the subtype before each
8897 potential check to ensure that Insert_Range_Checks will not elide any
8898 of the dynamic checks.
8899
89002011-08-02 Yannick Moy <moy@adacore.com>
8901
8902 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
8903 SPARK restriction at parsing time.
8904 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
8905 directive only if the SPARK restriction is set for this unit.
8906
83f33150
YM
89072011-08-02 Yannick Moy <moy@adacore.com>
8908
8909 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
8910 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
8911 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
8912 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
8913 Mark_Non_ALFA_Subprogram_Body.
8914 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
8915 inlined.
8916
7b98672f
YM
89172011-08-02 Yannick Moy <moy@adacore.com>
8918
8919 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
8920 might be costly.
8921
052e0603
AC
89222011-08-02 Robert Dewar <dewar@adacore.com>
8923
8924 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
8925 exp_ch3.adb: Minor reformatting.
8926
89272011-08-02 Emmanuel Briot <briot@adacore.com>
8928
8929 * adaint.c (__gnat_locate_exec_on_path): only returns executable
8930 files, not any regular file.
8931 (__gnat_locate_file_with_predicate): new subprogram.
8932
89332011-08-02 Yannick Moy <moy@adacore.com>
8934
8935 * sinfo.adb, sinfo.ads: Restrict the use of flags
8936 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
8937 nodes, plus N_Subtype_Declaration for the 2nd one.
8938
4fbad0ba
AC
89392011-08-02 Sergey Rybin <rybin@adacore.com>
8940
8941 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8942 - fix bugs in the description of Source_Trace;
8943 - get rid of UNIT_NAME;
8944
052e0603
AC
89452011-08-02 Javier Miranda <miranda@adacore.com>
8946
8947 * exp_ch9.adb
8948 (Build_Dispatching_Requeue): Adding support for VM targets
8949 since we cannot directly reference the Tag entity.
8950 * exp_sel.adb (Build_K): Adding support for VM targets.
8951 (Build_S_Assignment): Adding support for VM targets.
8952 * exp_disp.adb
8953 (Default_Prim_Op_Position): In VM targets do not restrict availability
8954 of predefined interface primitives to compiling in Ada 2005 mode.
8955 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8956 restricted to compiling in Ada 2005 mode.
8957 (Make_VM_TSD): Generate code that declares and initializes the OSD
8958 record. Needed to support dispatching calls through synchronized
8959 interfaces.
8960 * exp_ch3.adb
8961 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8962 primitives associated with synchronized interfaces.
8963 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8964 primitives associated with synchronized interfaces.
8965
89662011-08-02 Yannick Moy <moy@adacore.com>
8967
8968 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8969 statements hidden in SPARK if preceded by the HIDE directive
8970 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8971 exception handlers as hidden in SPARK if preceded by the HIDE directive
8972 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8973 if starting with the HIDE directive
8974 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8975 starting with the HIDE directive; mark the declarations in a private
8976 part as hidden in SPARK if the private part starts with the HIDE
8977 directive
8978 * restrict.adb, restrict.ads
8979 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8980 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8981 argument node belongs to a part which is hidden in SPARK
8982 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8983 parts in SPARK; protect the possibly costly call to
8984 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8985 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8986 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8987 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8988 Tok_SPARK_Hide.
8989 (Scan): recognize special comment starting with '#' and followed by
8990 SPARK keyword "hide" as a HIDE directive.
8991
89922011-08-02 Yannick Moy <moy@adacore.com>
8993
8994 * types.ads, erroutc.ads: Minor reformatting.
8995
89962011-08-02 Vincent Celier <celier@adacore.com>
8997
8998 * link.c: Add response file support for cross platforms.
8999
90002011-08-02 Ed Schonberg <schonberg@adacore.com>
9001
9002 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9003 in an association, set parent field of copy before partial analysis.
9004 * sem_res.adb (Resolve_Slice): create reference to itype only when
9005 expansion is enabled.
9006
90072011-08-02 Yannick Moy <moy@adacore.com>
9008
9009 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9010 for new flag denoting which subprogram bodies are in ALFA
9011 * restrict.adb, sem_ch7.adb: Update comment
9012 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9013 sem_ch9.adb, sem_res.adb: Add calls to
9014 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9015 * sem_ch6.adb (Analyze_Function_Return): add calls to
9016 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9017 middle of the body, and extended return.
9018 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9019 False when missing return.
9020 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9021 to True for subprograms whose spec is in ALFA. Remove later on the flag
9022 on the entity used for a subprogram body when there exists a separate
9023 declaration.
9024 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9025 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9026 False, otherwise do nothing.
9027
90282011-08-02 Robert Dewar <dewar@adacore.com>
9029
9030 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9031
90322011-08-02 Yannick Moy <moy@adacore.com>
9033
9034 * sem_ch4.ads: minor formatting.
9035
90362011-08-02 Yannick Moy <moy@adacore.com>
9037
9038 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9039 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9040 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9041 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9042 opt.ads: cleanup of SPARK mode
9043
90442011-08-02 Yannick Moy <moy@adacore.com>
9045
9046 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9047 types.
9048 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9049 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9050 * sem_ch3.adb
9051 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9052 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9053 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9054 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9055 types.
9056 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9057 non-static range.
9058 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9059 functions whose return type is not in ALFA.
9060 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9061 specifications.
9062 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9063 parameter's type is not in ALFA.
9064 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9065 types are in ALFA.
9066
90672011-08-02 Ed Schonberg <schonberg@adacore.com>
9068
9069 * sem_ch6 (Analyze_Expression_Function): treat the function as
9070 Inline_Always, and introduce a subprogram declaration for it when it is
9071 not a completion.
9072 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9073 expression functions, so that the back-end can determine whether they
9074 can in fact be inlined.
9075 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9076 a function body comes from an expression function.
9077
90782011-08-02 Gary Dismukes <dismukes@adacore.com>
9079
9080 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9081 null exclusions to test Can_Never_Be_Null on the anonymous access types
9082 of the formals rather than testing the formals themselves. Exclude this
9083 check in cases where the Old_Formal is marked as a controlling formal,
9084 to avoid issuing spurious errors for bodies completing dispatching
9085 operations (due to the flag not getting set on controlling access
9086 formals in body specs).
9087 (Find_Corresponding_Spec): When checking full and subtype conformance of
9088 subprogram bodies in instances, pass Designated and E in that order, for
9089 consistency with the expected order of the formals (New_Id followed by
9090 Old_Id).
9091
90922011-08-02 Robert Dewar <dewar@adacore.com>
9093
9094 * sem_ch8.adb: Minor reformatting.
9095
90962011-08-02 Ed Schonberg <schonberg@adacore.com>
9097
9098 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9099 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9100 primitive operations of class-wide actuals.
9101
91022011-08-02 Javier Miranda <miranda@adacore.com>
9103
9104 * exp_atag.ads, exp_atag.adb
9105 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9106 since its value is implicitly passed in argument Typ.
9107 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9108 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9109 Build_Common_Dispatching_Select_Statements.
9110
91112011-08-02 Robert Dewar <dewar@adacore.com>
9112
9113 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9114 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9115 Minor reformatting.
9116
91172011-08-02 Robert Dewar <dewar@adacore.com>
9118
9119 * sem_res.adb: Minor reformatting.
9120 * sem_prag.adb: Minor reformatting.
9121
91222011-08-02 Javier Miranda <miranda@adacore.com>
9123
9124 * exp_atag.adb, exp_atags.ads
9125 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9126 by the tagged type Entity. Required to use this routine in the VM
9127 targets since we do not have available the Tag entity in the VM
9128 platforms.
9129 * exp_ch6.adb
9130 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9131 Ada.Tags has not been previously loaded.
9132 * exp_ch7.adb
9133 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9134 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9135 * sem_aux.adb
9136 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9137 view of enclosing scopes. Required to handle enclosing scopes that
9138 are synchronized types whose full view is a task type.
9139 * exp_disp.adb
9140 (Build_VM_TSDs): Minor code improvement to avoid generating and
9141 analyzing lists with empty nodes.
9142 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9143 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9144 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9145 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9146 (Make_Select_Specific_Data_Table): Add support for VM targets.
9147 (Make_VM_TSD): Generate code to initialize the SSD structure of
9148 the TSD.
9149
91502011-08-02 Yannick Moy <moy@adacore.com>
9151
9152 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9153 cross-references section in ALI.
9154 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9155 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9156 Sub).
9157 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9158 subprogram or package entity of a node
9159 (Is_Local_Reference_Type): new function returns True for references
9160 selected in local cross-references.
9161 (Lt): function extracted from Lt in Output_References
9162 (Write_Entity_Name): function extracted from Output_References
9163 (Generate_Definition): generate reference with type 'D' for definition
9164 of objects (object declaration and parameter specification), with
9165 appropriate locations and units, for use in local cross-references.
9166 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9167 references of type 'I' for initialization in object definition.
9168 (Output_References): move part of function Lt and procedure
9169 Write_Entity_Name outside of the body. Ignore references of types 'D'
9170 and 'I' introduced for local cross-references.
9171 (Output_Local_References): new procedure to output the local
9172 cross-references sections.
9173 (Lref_Entity_Status): new array defining whether an entity is a local
9174 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9175 with 'I' type when initialization expression is present.
9176 * get_scos.adb, get_scos.ads: Correct comments and typos
9177
91782011-08-02 Javier Miranda <miranda@adacore.com>
9179
9180 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9181 the JVM target.
9182 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9183 the JVM target.
9184 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9185 TSD support.
9186
91872011-08-02 Vincent Celier <celier@adacore.com>
9188
9189 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9190 (No_Space_Img): New function
9191 (Find_Excluded_Sources): When reading from a file, record the file name
9192 and the line number for each excluded source.
9193 (Mark_Excluded_Sources): When reporting an error, if the excluded
9194 sources were read from a file, include file name and line number in
9195 the error message.
9196
91972011-08-02 Ed Schonberg <schonberg@adacore.com>
9198
9199 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9200
92012011-08-02 Robert Dewar <dewar@adacore.com>
9202
9203 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9204
92052011-08-02 Javier Miranda <miranda@adacore.com>
9206
9207 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9208 generation of TSDs to the DOTNET compiler.
9209 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9210 generation of TSDs to the DOTNET compiler.
9211
92122011-08-02 Javier Miranda <miranda@adacore.com>
9213
9214 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9215 record of all the tagged types declared inside library level package
9216 declarations, library level package bodies or library level subprograms.
9217 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9218 associated with a given tagged type.
9219 (Build_VM_TSDs): New subprogram.
9220 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9221 compilation units that are subprograms.
9222 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9223 compilation units that are package bodies.
9224 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9225 units that are a package declaration or a package instantiation.
9226 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9227 reorganization to improve the error generated by the frontend when the
9228 function Ada.Tags.Secondary_Tag is not available.
9229 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9230 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9231
92322011-08-02 Javier Miranda <miranda@adacore.com>
9233
9234 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9235
92362011-08-02 Robert Dewar <dewar@adacore.com>
9237
9238 * s-imenne.ads: Minor reformatting.
9239
92402011-08-02 Robert Dewar <dewar@adacore.com>
9241
9242 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9243 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9244 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9245
92462011-08-02 Robert Dewar <dewar@adacore.com>
9247
9248 * einfo.ads (Materialize_Entity): Document this is only for renamings
9249 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9250 required debug information in the case where we transform the object
9251 declaration into a renaming declaration.
9252 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9253 object
9254 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9255 Materialize_Entity.
9256
92572011-08-02 Robert Dewar <dewar@adacore.com>
9258
9259 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9260 Suppress_Init_Procs.
9261 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9262 Suppress_Initialization/Initialization_Suppressed.
9263 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9264 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9265 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9266 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9267
92682011-08-02 Robert Dewar <dewar@adacore.com>
9269
9270 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9271 Minor reformatting.
9272
92732011-08-02 Ed Schonberg <schonberg@adacore.com>
9274
9275 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9276 only have inheritable classwide pre/postconditions.
9277
92782011-08-02 Javier Miranda <miranda@adacore.com>
9279
9280 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9281 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9282 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9283 checks if the external tag of a type is the same as the external tag
9284 of some other declaration.
9285
92862011-08-02 Thomas Quinot <quinot@adacore.com>
9287
9288 * s-taskin.ads: Minor reformatting.
9289
92902011-08-02 Emmanuel Briot <briot@adacore.com>
9291
9292 * g-comlin.adb (Display_Help): swap the order in which it prints the
9293 short help and the general usage.
9294
92952011-08-02 Ed Schonberg <schonberg@adacore.com>
9296
9297 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9298 the aspect declarations and attach them to the generic copy for
9299 subsequent analysis.
9300 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9301 declarations of the generic tree to the new subprogram declarations.
9302 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9303 conditions that apply to a subprogram instance.
9304
93052011-08-02 Robert Dewar <dewar@adacore.com>
9306
9307 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9308
93092011-08-02 Ed Schonberg <schonberg@adacore.com>
9310
9311 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9312 private type with a tagged full view is not derived in the immediate
9313 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9314
93152011-08-02 Robert Dewar <dewar@adacore.com>
9316
9317 * exp_ch4.adb: Minor reformatting.
9318
93192011-08-02 Ed Schonberg <schonberg@adacore.com>
9320
9321 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9322 Ada2012 iterator, the loop will be rewritten during expansion into a
9323 while loop with a cursor and an element declaration. Do not analyze the
9324 body in this case, because if the container is for indefinite types the
9325 actual subtype of the elements will only be determined when the cursor
9326 declaration is analyzed.
9327
93282011-08-02 Arnaud Charlet <charlet@adacore.com>
9329
9330 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9331 size/alignment related attributes in CodePeer_Mode.
9332
93332011-08-02 Gary Dismukes <dismukes@adacore.com>
9334
9335 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9336 Prepend_Element, since this can result in the operation getting the
9337 wrong slot in the full type's dispatch table if the full type has
9338 inherited operations. The incomplete type's operation will get added
9339 to the proper position in the full type's primitives
9340 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9341 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9342 dispatching operations, since there are cases where nonprimitive
9343 subprograms can get added to the list of incomplete dependents (such
9344 as subprograms in nested packages).
9345 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9346 private part when determining whether to add a primitive with a
9347 parameter of a tagged incomplete type to the Private_Dependents list.
9348 Such primitives can also occur in the visible part, and should not have
9349 been excluded from being private dependents.
9350 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9351 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9352 list of a Taft-amendment incomplete type is a primitive before issuing
9353 an error that the full type must appear in the same unit. There are
9354 cases where nonprimitives can be in the list (such as subprograms in
9355 nested packages).
9356 * sem_disp.adb (Derives_From): Use correct condition for checking that
9357 a formal's type is derived from the type of the corresponding formal in
9358 the parent subprogram (the condition was completely wrong). Add
9359 checking that was missing for controlling result types being derived
9360 from the result type of the parent operation.
9361
93622011-08-02 Yannick Moy <moy@adacore.com>
9363
9364 * errout.adb (First_Node): minor renaming
9365 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9366 first node.
9367
93682011-08-02 Yannick Moy <moy@adacore.com>
9369
9370 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9371 before accessing operands.
9372 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9373 decide whether an initialization expression respects SPARK rules, as
9374 the plain node is the expanded one. This allows for more valid warnings
9375 to be issued.
9376 * gnat_rm.texi: Minor update.
9377
93782011-08-02 Arnaud Charlet <charlet@adacore.com>
9379
9380 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9381 previous change.
9382
93832011-08-02 Robert Dewar <dewar@adacore.com>
9384
9385 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9386
93872011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9388
9389 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9390 loop statements and the element renaming declaration with a block when
9391 the element type is controlled.
9392
93932011-08-02 Yannick Moy <moy@adacore.com>
9394
9395 * sinfo.ads: Minor formatting.
9396
93972011-08-02 Ed Schonberg <schonberg@adacore.com>
9398
9399 * sem_aggr.adb (Add_Association): if the association has a box and no
9400 expression, use the Sloc of the aggregate itself for the new
9401 association.
9402 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9403 the Original_Node.
9404
94052011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9406
9407 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9408 When a container is provided via a function call, generate a renaming
9409 of the function result. This avoids the creation of a transient scope
9410 and the premature finalization of the container.
9411 * exp_ch7.adb (Is_Container_Cursor): Removed.
9412 (Wrap_Transient_Declaration): Remove the supression of the finalization
9413 of the list controller when the declaration denotes a container cursor,
9414 it is not needed.
9415
94162011-08-02 Yannick Moy <moy@adacore.com>
9417
9418 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9419 node is from source, instead of the original node being from source.
9420 * sem_aggr.adb
9421 (Resolve_Array_Aggregate): refine the check for a static expression, to
9422 recognize also static ranges
9423 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9424 Array_Type_Declaration): postpone the test for the type being a subtype
9425 mark after the type has been resolved, so that component-selection and
9426 expanded-name are discriminated.
9427 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9428 to distinguish the case of an iteration scheme, so that an error is
9429 issed on a non-static range in SPARK except in an iteration scheme.
9430 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9431 In_Iter_Schm = True.
9432 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9433 user-defined operators so that they are allowed in renaming
9434 * sem_ch8.adb
9435 (Find_Selected_Component): refine the check for prefixing of operators
9436 so that they are allowed in renaming. Move the checks for restrictions
9437 on selector name after analysis discriminated between
9438 component-selection and expanded-name.
9439 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9440 concatenation argument of string type if it is static.
9441 * sem_util.adb, sem_util.ads
9442 (Check_Later_Vs_Basic_Declarations): add a new function
9443 Is_Later_Declarative_Item to decice which declarations are allowed as
9444 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9445 mode, add that renamings are considered as later items.
9446 (Enclosing_Package): new function to return the enclosing package
9447 (Enter_Name): correct the rule for homonyms in SPARK
9448 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9449 from source (result of expansion) to avoid issuing wrong warnings.
9450
94512011-08-02 Ed Schonberg <schonberg@adacore.com>
9452
9453 * errout.adb: On anything but an expression First_Node returns its
9454 argument.
9455
94562011-08-02 Pascal Obry <obry@adacore.com>
9457
9458 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9459
94602011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9461
9462 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9463 Set the associated loop as the related expression of internally
9464 generated cursors.
9465 * exp_ch7.adb (Is_Container_Cursor): New routine.
9466 (Wrap_Transient_Declaration): Supress the finalization of the list
9467 controller when the declaration denotes a container cursor.
9468
94692011-08-02 Yannick Moy <moy@adacore.com>
9470
9471 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9472 command line now.
9473 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9474 expression is a simple expression. This check cannot be performed in
9475 the semantics, so just drop it.
9476 (P_Index_Or_Discriminant_Constraint): move check that the index or
9477 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9478 semantics. Other cases were previously checked in the semantics.
9479 * par-ch4.adb (P_Name): move checks that a selector name is not
9480 character literal or an operator symbol to Find_Selected_Component in
9481 the semantics
9482 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9483 declarations are not placed after later declarations in a separate
9484 procedure in Sem_Util (possibly not the best choice?), to be used both
9485 during parsing, for Ada 83 mode, and during semantic analysis, for
9486 SPARK mode.
9487 * par-endh.adb (Check_End): move check that end label is not missing
9488 to Process_End_Label in the semantics
9489 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9490 the special case for SPARK restriction
9491 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9492 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9493 parameter Force to issue the error message even on internal node (used
9494 for generated end label). Call Check_Restriction to check when an error
9495 must be issued. In SPARK mode, issue an error message even if the
9496 restriction is not set.
9497 (Check_Restriction): new procedure with an additional out parameter to
9498 inform the caller that a message has been issued
9499 * sem_aggr.adb: Minor modification of message
9500 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9501 instead of issuing an error message directly
9502 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9503 declarations are not placed after later declarations, by calling
9504 Check_Later_Vs_Basic_Declarations
9505 (Analyze_Subtype_Declaration): move here the check that an index or
9506 discriminant constraint must be a subtype mark. Change the check that
9507 a subtype of String must start at one so that it works on subtype marks.
9508 * sem_ch4.adb (Analyze_Call): move here the check that a named
9509 association cannot follow a positional one in a call
9510 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9511 instead of issuing an error message directly
9512 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9513 selector name is not a character literal or an operator symbol. Move
9514 here the check that the prefix of an expanded name cannot be a
9515 subprogram or a loop statement.
9516 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9517 procedure called from parsing and semantics to check that basic
9518 declarations are not placed after later declarations
9519 (Process_End_Label): move here the check that end label is not missing
9520
95212011-08-02 Arnaud Charlet <charlet@adacore.com>
9522
9523 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9524 representation clause in codepeer mode, since it confuses CodePeer and
9525 does not bring useful info.
9526
95272011-08-02 Ed Falis <falis@adacore.com>
9528
9529 * init.c: initialize fp hw on MILS.
9530
95312011-08-02 Ed Schonberg <schonberg@adacore.com>
9532
9533 * errout.adb (First_Node): for bodies, return the node itself (small
9534 optimization). For other nodes, do not check source_unit if the node
9535 comes from Standard.
9536
95372011-08-02 Robert Dewar <dewar@adacore.com>
9538
9539 * exp_ch3.adb: Minor comment additions.
9540 * sem_ch13.adb: Minor reformatting.
9541
95422011-08-02 Pascal Obry <obry@adacore.com>
9543
9544 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9545
95462011-08-02 Robert Dewar <dewar@adacore.com>
9547
9548 * sem_attr.adb: Minor reformatting.
9549
95502011-08-02 Robert Dewar <dewar@adacore.com>
9551
9552 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9553 (Has_Default_Component_Value): Removed
9554 * einfo.ads Comment updates
9555 (Has_Default_Aspect): Replaces Has_Default_Value
9556 (Has_Default_Component_Value): Removed
9557 * exp_ch13.adb
9558 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9559 * exp_ch3.adb
9560 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9561 (Get_Simple_Init_Val): Handle Default_Value aspect
9562 (Needs_Simple_Initialization): Handle Default_Value aspect
9563 * exp_ch3.ads: Needs_Simple_Initialization
9564 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9565 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9566 * sem_ch13.adb
9567 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9568 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9569 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9570
95712011-08-02 Ed Schonberg <schonberg@adacore.com>
9572
9573 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9574 package containing iteration primitives.
9575 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9576
95772011-08-02 Ed Schonberg <schonberg@adacore.com>
9578
9579 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9580 "of", pre-analyze expression in case it is a function call with
9581 finalization actions that must be placed ahead of the loop.
9582 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9583 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9584
95852011-08-02 Geert Bosch <bosch@adacore.com>
9586
9587 * cstand.adb (Create_Float_Types): Only consider C's long double for
9588 Long_Long_Float, in addition to double.
9589
95902011-08-02 Robert Dewar <dewar@adacore.com>
9591
9592 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9593 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9594 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9595 Minor reformatting.
9596
95972011-08-02 Ed Schonberg <schonberg@adacore.com>
9598
9599 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9600 indexed component.
9601
96022011-08-02 Javier Miranda <miranda@adacore.com>
9603
9604 * einfo.ads, einfo.adb
9605 (Original_Access_Type): Move this attribute to Node26 since there was
9606 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9607 which causes conflicts and breaks the generation of the .NET compiler.
9608 (Interface_Name): Add missing documentation on JGNAT only uses of
9609 this attribute.
9610
96112011-08-02 Geert Bosch <bosch@adacore.com>
9612
9613 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9614 (Find_Back_End_Float_Type): Likewise
9615 (Create_Back_End_Float_Types): Likewise
9616 (Create_Float_Types): Likewise
9617 (Register_Float_Type): Likewise
9618 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9619 Nlist and split out type selection in new local Find_Base_Type function.
9620 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9621 Nlist
9622 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9623
96242011-08-02 Robert Dewar <dewar@adacore.com>
9625
9626 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9627 alpha order).
9628 * opt.ads: Minor comment change.
9629 * sem_ch12.adb: Minor code reorganization.
9630
96312011-08-02 Gary Dismukes <dismukes@adacore.com>
9632
9633 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9634 subtype's list of rep items to the list on the full subtype in the case
9635 where the lists are the same.
9636
96372011-08-02 Geert Bosch <bosch@adacore.com>
9638
9639 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9640 using the one from System.Strings, which also deallocates all strings.
9641
96422011-08-02 Geert Bosch <bosch@adacore.com>
9643
9644 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9645 function.
9646 * gcc-interface/Make-lang.in: Update dependencies.
9647
96482011-08-02 Olivier Hainque <hainque@adacore.com>
9649
9650 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9651 end_locus.
9652
96532011-08-02 Javier Miranda <miranda@adacore.com>
9654
9655 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9656 associated with anonymous access to subprograms.
9657
96582011-08-02 Geert Bosch <bosch@adacore.com>
9659
9660 * opt.ads
9661 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9662 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9663 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9664 (Add_Symbol_Definition): Move to switch-c.adb
9665 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9666 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9667 (Add_Symbol_Definition): Move to switch-c.adb.
9668 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9669 * sem_warn.adb
9670 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9671 Move to warnsw.adb.
9672 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9673 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9674 Move to warnsw.adb.
9675 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9676 (Add_Symbol_Definition): Moved from Prepcomp.
9677 * switch-c.ads: Update copyright notice. Use String_List instead of
9678 Argument_List, removing dependency on System.OS_Lib.
9679
96802011-08-02 Yannick Moy <moy@adacore.com>
9681
9682 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9683 mode on initialization expression which does not respect SPARK
9684 restrictions.
9685 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9686 if the tree referenced by its argument represents an initialization
9687 expression in SPARK, suitable for initializing an object in an object
9688 declaration.
9689
96902011-08-02 Javier Miranda <miranda@adacore.com>
9691
9692 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9693 internally generated access to subprogram with its associated protected
9694 subprogram type.
9695 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9696
96972011-08-02 Geert Bosch <bosch@adacore.com>
9698
9699 * cstand.adb (Register_Float_Type): Print information about type to
9700 register, if the Debug_Flag_Dot_B is set.
9701 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9702 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9703 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9704 with a requested precision of more than Max_Digits digits and no more
9705 than Max_Base_Digits digits, if a range specification is present and the
9706 Predefined_Float_Types list has a suitable type to derive from.
9707 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9708 case of type completion with pragma Import
9709 * sem_prag.adb
9710 (Process_Import_Predefined_Type): Processing to complete a type
9711 with pragma Import. Currently supports floating point types only.
9712 (Set_Convention_From_Pragma): Do nothing without underlying type.
9713 (Process_Convention): Guard against absence of underlying type,
9714 which may happen when importing incomplete types.
9715 (Process_Import_Or_Interface): Handle case of importing predefined
9716 types. Tweak error message.
9717
97182011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9719
9720 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9721 functions to previous change. Reorganize code slightly.
9722
97232011-08-02 Geert Bosch <bosch@adacore.com>
9724
9725 * back_end.ads (Register_Type_Proc): New call back procedure type for
9726 allowing the back end to provide information about available types.
9727 (Register_Back_End_Types): New procedure to register back end types.
9728 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9729 available types.
9730 * cstand.adb (Back_End_Float_Types): New list for floating point types
9731 supported by the back end.
9732 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9733 (Copy_Float_Type): New procedure to make new copies of predefined types.
9734 (Register_Float_Type): New call back procedure to populate the BEFT list
9735 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9736 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9737 (Create_Float_Types): New procedure to create entities for floating
9738 point types predefined in Standard, and put these and any remaining
9739 BEFTs on the Predefined_Float_Types list.
9740 * stand.ads (Predefined_Float_Types): New list for predefined floating
9741 point types that do not have declarations in package Standard.
9742
97432011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9744
9745 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9746 entity node for the unit containing the parameter.
9747 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9748 (Add_Inlined_Subprogram): Likewise.
9749 * gcc-interface/Make-lang.in: Update dependencies.
9750
97512011-08-02 Thomas Quinot <quinot@adacore.com>
9752
9753 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9754 suitable value.
9755
97562011-08-02 Geert Bosch <bosch@adacore.com>
9757
9758 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9759
97602011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9761
9762 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9763 computed value of Base_Type.
9764
97652011-08-02 Yannick Moy <moy@adacore.com>
9766
9767 * restrict.adb (Check_Restriction): issue an error for any use of
9768 class-wide, even if the No_Dispatch restriction is not set.
9769 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9770 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9771 when completing a private extension, the type named in the private part
9772 is not the same as that named in the visible part.
9773 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9774 of an inherited primitive operations of a tagged type or type extension
9775 that returns the tagged type.
9776 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9777 function which returns True for an implicit operation inherited by the
9778 derived type declaration for the argument type.
9779 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9780 order.
9781
97822011-08-02 Ed Schonberg <schonberg@adacore.com>
9783
9784 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9785 Process_Bounds, to perform analysis with expansion of a range or an
9786 expression that is the iteration scheme for a loop.
9787 (Analyze_Iterator_Specification): If domain of iteration is given by a
9788 function call with a controlled result, as is the case if call returns
9789 a predefined container, ensure that finalization actions are properly
9790 generated.
9791 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9792
97932011-08-02 Javier Miranda <miranda@adacore.com>
9794
9795 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9796 * gcc-interface/Make-lang.in: Update dependencies.
9797
97982011-08-02 Javier Miranda <miranda@adacore.com>
9799
9800 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9801 determine if the analysis is performed using N or Original_Node (N).
9802 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9803 functionality of routine Is_Variable avoids code duplication.
9804 * checks.adb (Determine_Range): Handle temporaries generated by
9805 Remove_Side_Effects.
9806
98072011-08-02 Javier Miranda <miranda@adacore.com>
9808
9809 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9810 expansion of the condition. Required since the previous analysis was
9811 done with expansion disabled (see Resolve_Quantified_Expression) and
9812 hence checks were not inserted and record comparisons have not been
9813 expanded.
9814
98152011-08-02 Ed Falis <falis@adacore.com>
9816
9817 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9818 Update header.
9819
98202011-08-02 Bob Duff <duff@adacore.com>
9821
9822 * opt.ads: Minor comment fix.
9823
98242011-08-02 Bob Duff <duff@adacore.com>
9825
9826 * sem_ch12.adb (Analyze_Package_Instantiation,
9827 Analyze_Subprogram_Instantiation): Turn off style checking while
9828 analyzing an instance. Whatever style checks that apply to the generic
9829 unit should apply, so it makes no sense to apply them in an instance.
9830 This was causing trouble when compiling an instance of a runtime
9831 unit that violates the -gnatyO switch.
9832 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9833 one of the two case statements, causing spurious errors.
9834
98352011-08-02 Robert Dewar <dewar@adacore.com>
9836
9837 * uname.adb: Minor reformatting.
9838 * gnatcmd.adb: Minor reformatting.
9839 * exp_attr.adb: Minor reformatting.
9840
98412011-08-02 Ed Schonberg <schonberg@adacore.com>
9842
9843 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9844 No_Dispatching_Calls, do not look for the Assign primitive, because
9845 predefined primitives are not created in this case.
9846
98472011-08-02 Bob Duff <duff@adacore.com>
9848
9849 * stylesw.ads: Minor comment fixes.
9850
98512011-08-02 Robert Dewar <dewar@adacore.com>
9852
9853 * freeze.adb (Add_To_Result): New procedure.
9854
98552011-08-02 Jose Ruiz <ruiz@adacore.com>
9856
9857 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9858 time, if the specific run-time routines for handling streams of strings
9859 are not available, use the default mechanism.
9860
98612011-08-02 Arnaud Charlet <charlet@adacore.com>
9862
9863 * s-regpat.ads: Fix typo.
9864
98652011-08-02 Vincent Celier <celier@adacore.com>
9866
9867 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9868 not null, call it to create the in memory config project file without
9869 parsing an existing default config project file.
9870
98712011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9872
9873 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9874
98752011-08-02 Ed Schonberg <schonberg@adacore.com>
9876
9877 * sem_elim.adb: an abstract subprogram does not need an eliminate
9878 pragma for its descendant to be eliminable.
9879
98802011-08-02 Ed Falis <falis@adacore.com>
9881
9882 * init.c: revert to handling before previous checkin for VxWorks
9883 * s-intman-vxworks.adb: delete unnecessary declarations related to
9884 using Ada interrupt facilities for handling signals.
9885 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9886 * s-intman-vxworks.ads: Import __gnat_install_handler as
9887 Initialize_Interrupts.
9888 * s-taprop-vxworks.adb: Delete Signal_Mask.
9889 (Abort_Handler): change construction of mask to unblock exception
9890 signals.
9891
98922011-08-02 Jerome Guitton <guitton@adacore.com>
9893
9894 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9895 Debug_Raise_Exception before propagation starts.
9896
98972011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9898
9899 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9900 to Restriction_Check_Required.
9901 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9902 * sem_res.adb (Resolve_Call): Likewise.
9903 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9904
99052011-08-02 Bob Duff <duff@adacore.com>
9906
9907 * stylesw.ads: Update comment.
9908 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9909 * errout.ads: Remove obsolete comment.
9910
99112011-08-02 Javier Miranda <miranda@adacore.com>
9912
9913 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9914 (Set_Is_Safe_To_Reevaluate): new procedure.
9915 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9916 assignment is allowed on safe-to-reevaluate variables.
9917 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9918 temporary created to remove side effects in expressions that use
9919 the secondary stack as safe-to-reevaluate.
9920 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9921 variables that are not true constants.
9922
99232011-08-02 Robert Dewar <dewar@adacore.com>
9924
9925 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9926 sem_res.adb, sem_ch6.adb: Minor reformatting.
9927
99282011-08-02 Jerome Guitton <guitton@adacore.com>
9929
9930 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9931
99322011-08-02 Ed Schonberg <schonberg@adacore.com>
9933
9934 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9935 not set Overridden_Operation if subprogram is an initialization
9936 procedure.
9937
99382011-08-02 Yannick Moy <moy@adacore.com>
9939
9940 * par-ch6.adb: Correct obsolete name in comments
9941 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9942 which takes two message arguments (existing function takes one), with
9943 second message used for continuation.
9944 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9945 block statements that originate from a source block statement, not
9946 generated block statements
9947 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9948 symmetry with procedure case
9949 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9950 function to issue an error in formal mode if a package specification
9951 contains more than one tagged type or type extension.
9952 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9953 parameters matching formals of tagged types are objects (or ancestor
9954 type conversions of objects), not general expressions. Issue an error
9955 on view conversions that are not involving ancestor conversion of an
9956 extended type.
9957 (Resolve_Type_Conversion): in formal mode, issue an error on the
9958 operand of an ancestor type conversion which is not an object
9959 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9960 procedure so that it works also for actuals of function calls
9961 (Is_Actual_Tagged_Parameter): new function which determines if its
9962 argument is an actual parameter of a formal of tagged type in a
9963 subprogram call
9964 (Is_SPARK_Object_Reference): new function which determines if the tree
9965 referenced by its argument represents an object in SPARK
9966
99672011-08-02 Robert Dewar <dewar@adacore.com>
9968
9969 * sem_ch3.adb: Minor reformatting
9970 Minor comment addition
9971 Minor error msg text change
9972
99732011-08-02 Javier Miranda <miranda@adacore.com>
9974
9975 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9976 function. Used to be more precise when we generate a variable plus one
9977 assignment to remove side effects in the evaluation of the Bound
9978 expressions.
9979 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9980 of the bound expression to force its re-analysis and thus expand the
9981 associated transient scope (if required). Code cleanup replacing the
9982 previous code that declared the constant entity by an invocation to
9983 routine Force_Evaluation which centralizes this work in the frontend.
9984
99852011-08-02 Robert Dewar <dewar@adacore.com>
9986
9987 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9988 (Base_Type): Now uses improved Is_Base_Type function
9989 * einfo.ads (Base_Type): Inline this function
9990
99912011-08-02 Robert Dewar <dewar@adacore.com>
9992
9993 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9994 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9995
99962011-08-02 Arnaud Charlet <charlet@adacore.com>
9997
9998 * gcc-interface/Make-lang.in: Update dependencies.
9999 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10000 targets.
10001
100022011-08-02 Yannick Moy <moy@adacore.com>
10003
10004 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10005 non-simple expression used in delta constraint
10006 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10007 index constraint which is not a subtype mark
10008 * par.adb: With and use Restrict
10009 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10010 mode on component type which is not a subtype mark and default
10011 expression on component
10012 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10013 of string which does not have a lower index bound equal to 1
10014 (Array_Type_Declaration): issue an error in formal mode on index or
10015 component type which is not a subtype mark, and on aliased keyword on
10016 component
10017 (Derived_Type_Declaration): issue an error in formal mode on interface,
10018 limited or abstract type
10019 (Record_Type_Declaration): issue an error in formal mode on interface
10020 (Record_Type_Definition): issue an error in formal mode on tagged types
10021 and type extensions not declared in the specification of a library unit
10022 package; on null non-tagged record; on variant part
10023
100242011-08-02 Vincent Celier <celier@adacore.com>
10025
10026 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10027 not declared for qualified library project when Library_Name is not
10028 declared, but Library_Dir is.
10029
100302011-08-02 Robert Dewar <dewar@adacore.com>
10031
10032 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10033 pragmas (affects aspects [Component_]Default_Value
10034 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10035 component type for the resolution
10036
100372011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10038
10039 * einfo.adb (Base_Type): Tune implementation for speed.
10040
100412011-08-02 Robert Dewar <dewar@adacore.com>
10042
10043 * freeze.adb: Minor reformatting.
10044
100452011-08-02 Thomas Quinot <quinot@adacore.com>
10046
10047 * scos.ads: Update comments.
10048
100492011-08-02 Ed Schonberg <schonberg@adacore.com>
10050
10051 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10052 base type, because the parent may be a subtype of a private type whose
10053 convention is established in a private part.
10054
100552011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10056
10057 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10058 statement in a block when the expansion of the return expression has
10059 created a finalization chain.
10060 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10061 with the parent node.
10062 Add N_Extended_Return_Statement to handle the case where a transient
10063 object declaration appears in the Return_Object_Declarations list of
10064 an extended return statement.
10065
100662011-08-02 Matthew Gingell <gingell@adacore.com>
10067
10068 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10069 unused parameter 'name'.
10070
100712011-08-02 Ed Schonberg <schonberg@adacore.com>
10072
10073 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10074 inherited operation, check whether its alias, which is the source
10075 operastion that it renames, has been marked eliminated.
10076
100772011-08-02 Javier Miranda <miranda@adacore.com>
10078
10079 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10080 in-mode parameter whose type is an access type since it can be used to
10081 modify its designated object. Enforce code that handles as safe an
10082 access type that is not access-to-constant but it is the result of a
10083 previous removal of side-effects.
10084 (Remove_Side_Effects): Minor code reorganization of cases which require
10085 no action. Done to incorporate documentation on new cases uncovered
10086 working in this ticket: no action needed if this routine was invoked
10087 too early and the nodes are not yet decorated.
10088 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10089 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10090 were issued with actuals that are implicitly provided by
10091 Force_Evaluation.
10092
100932011-08-02 Robert Dewar <dewar@adacore.com>
10094
10095 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10096
100972011-08-02 Yannick Moy <moy@adacore.com>
10098
10099 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10100 to issue an error in formal mode on attribute not supported in this mode
10101 (Analyze_Attribute): issue errors on standard attributes not supported
10102 in formal mode.
10103 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10104 comment, and issue error in formal mode on modulus which is not a power
10105 of 2.
10106 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10107 range.
10108 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10109 subtype mark.
10110 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10111 operator on modular type (except 'not').
10112
101132011-08-02 Robert Dewar <dewar@adacore.com>
10114
10115 * gnat_rm.texi: Minor reformatting.
10116
101172011-08-02 Arnaud Charlet <charlet@adacore.com>
10118
10119 * s-osinte-linux.ads: Minor comment update and reformatting.
10120 * i-cexten.ads: Make this unit pure, as for its parent.
10121 Will allow its usage in more contexts if needed.
10122
101232011-08-02 Robert Dewar <dewar@adacore.com>
10124
10125 * s-utf_32.ads: Minor comment fix.
10126
101272011-08-02 Ed Schonberg <schonberg@adacore.com>
10128
10129 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10130 operation of a tagged synchronized type, handle the case where the
10131 controlling argument is overloaded.
10132
101332011-08-02 Yannick Moy <moy@adacore.com>
10134
10135 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10136 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10137 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10138 SPARK mode and formal verification mode on processing SPARK restriction
10139 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10140 requiring consistency checking.
10141
101422011-08-02 Robert Dewar <dewar@adacore.com>
10143
10144 * sem_res.adb: Minor reformatting.
10145
101462011-08-02 Robert Dewar <dewar@adacore.com>
10147
10148 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10149 a-cforse.ads: Remove unneeded with of Ada.Containers
10150 Remove commented out pragma Inline's
10151 Move specifications of new subprograms to the actual specs
10152
101532011-08-02 Yannick Moy <moy@adacore.com>
10154
10155 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10156 a-cforse.ads: Update comments.
10157
101582011-08-02 Ed Schonberg <schonberg@adacore.com>
10159
10160 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10161
101622011-08-02 Robert Dewar <dewar@adacore.com>
10163
10164 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10165 a-cforse.ads, a-cofove.ads: Minor reformatting.
10166
101672011-08-02 Claire Dross <dross@adacore.com>
10168
10169 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10170 a-cofove.ads: Add comments.
10171
101722011-08-02 Yannick Moy <moy@adacore.com>
10173
10174 * gnat_rm.texi: Document formal containers.
10175
101762011-08-02 Emmanuel Briot <briot@adacore.com>
10177
10178 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10179 are empty sections.
10180
101812011-08-02 Robert Dewar <dewar@adacore.com>
10182
10183 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10184 reformatting.
10185
101862011-08-02 Robert Dewar <dewar@adacore.com>
10187
10188 * aspects.adb: New aspects Default_Value and Default_Component_Value
10189 New format of Aspect_Names table checks for omitted entries
10190 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10191 handling of boolean aspects for derived types.
10192 New aspects Default_Value and Default_Component_Value
10193 New format of Aspect_Names table checks for omitted entries
10194 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10195 (Has_Default_Value): New flag
10196 (Has_Default_Component_Value): New flag
10197 (Has_Default_Value): New flag
10198 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10199 table.
10200 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10201 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10202 Default_Value and Default_Component_Value
10203 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10204 New aspects Default_Value and Default_Component_Value
10205 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10206 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10207
102082011-08-02 Vincent Celier <celier@adacore.com>
10209
10210 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10211 inherit library kind.
10212
102132011-08-02 Ed Schonberg <schonberg@adacore.com>
10214
10215 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10216 Minor reformatting.
10217
102182011-08-02 Robert Dewar <dewar@adacore.com>
10219
10220 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10221
102222011-08-02 Yannick Moy <moy@adacore.com>
10223
10224 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10225
102262011-08-02 Robert Dewar <dewar@adacore.com>
10227
10228 * impunit.adb: Add comment.
10229
102302011-08-02 Yannick Moy <moy@adacore.com>
10231
10232 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10233 qualification of aggregates in formal mode
10234 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10235 another aggregate
10236 (Resolve_Aggregate): complete the test that an aggregate is adequately
10237 qualified in formal mode
10238
102392011-08-02 Pascal Obry <obry@adacore.com>
10240
10241 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10242 * mlib-prj.adb: Supress warning when compiling binder generated file.
10243 (Build_Library): Supress all warnings when compiling the binder
10244 generated file.
10245
102462011-08-02 Yannick Moy <moy@adacore.com>
10247
10248 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10249 from here...
10250 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10251 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10252 Add with/use clauses to make Check_Formal_Restriction visible
10253
102542011-08-02 Ed Schonberg <schonberg@adacore.com>
10255
10256 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10257 in-parameters when type of the generic formal is private in the generic
10258 spec and non-private in the body.
10259
102602011-08-02 Claire Dross <dross@adacore.com>
10261
10262 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10263 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10264 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10265 * impunit.adb, Makefile.rtl: Take new files into account.
10266
102672011-08-02 Robert Dewar <dewar@adacore.com>
10268
10269 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10270 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10271
102722011-08-02 Yannick Moy <moy@adacore.com>
10273
10274 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10275 formal mode
10276 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10277 matching static array bounds, taking into account the special case of
10278 string literals
10279 * sem_ch3.adb: Typo in comment.
10280
102812011-08-02 Yannick Moy <moy@adacore.com>
10282
10283 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10284 which issues an error in formal mode if its argument node is originally
10285 from source
10286 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10287 has a discriminant specification so that it does not include the case
10288 of derived types
10289 (Derived_Type_Declaration): move here the test that a derived type has a
10290 discriminant specification
10291 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10292 first element of a component association before accessing its choices
10293 (presence of component association is not enough)
10294 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10295 declaration is a library item before accessing the next element in a
10296 list, as library items are not member of lists
10297 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10298 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10299 Check_Formal_Restriction whenever possible.
10300
103012011-08-02 Ed Schonberg <schonberg@adacore.com>
10302
10303 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10304 reference when needed.
10305
103062011-08-02 Bob Duff <duff@adacore.com>
10307
10308 * gnat_ugn.texi: Fix typo.
10309
103102011-08-02 Vincent Celier <celier@adacore.com>
10311
10312 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10313 archive file name. Do not use the full path name of archives for Open
10314 VMS.
10315
103162011-08-02 Robert Dewar <dewar@adacore.com>
10317
10318 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10319 Analyze_Aspect_Specifications
10320 * sem_ch13.adb
10321 (Analyze_Aspect_Specifications): New handling for boolean aspects
10322 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10323 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10324 sequence for Analyze_Aspect_Specifications
10325 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10326 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10327
103282011-08-02 Robert Dewar <dewar@adacore.com>
10329
10330 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10331 aspects, since these no longer exist.
10332
103332011-08-02 Robert Dewar <dewar@adacore.com>
10334
10335 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10336 semicolon, do not try to see if there are aspects following it.
10337 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10338 aspect spec.
10339
103402011-08-02 Robert Dewar <dewar@adacore.com>
10341
10342 * sem_ch8.adb, aspects.ads: Minor reformatting.
10343
103442011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10345
10346 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10347 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10348 extracted from...
10349 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10350
103512011-08-02 Yannick Moy <moy@adacore.com>
10352
10353 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10354 mode on subprogram declaration outside of package specification, unless
10355 it is followed by a pragma Import
10356 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10357 Access_Type_Declaration): issue error in formal mode on access type
10358 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10359 incomplete type
10360 (Analyze_Object_Declaration): issue error in formal mode on object
10361 declaration which does not respect SPARK restrictions
10362 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10363 declaration which does not respect SPARK restrictions
10364 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10365 error in formal mode on digits or delta constraint
10366 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10367 decimal fixed point type
10368 (Derived_Type_Declaration): issue error in formal mode on derived type
10369 other than type extensions of tagged record types
10370 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10371 with check on access definition
10372 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10373 mode on protected definition.
10374 (Analyze_Task_Definition): issue error in formal mode on task definition
10375
103762011-08-02 Robert Dewar <dewar@adacore.com>
10377
10378 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10379
103802011-08-02 Javier Miranda <miranda@adacore.com>
10381
10382 * sem_ch6.adb (Can_Override_Operator): New function.
10383 (Verify_Overriding_Indicator): Add missing code to check overriding
10384 indicator in operators. Fixes regression.
10385 (Check_Overriding_Indicator): Minor reformating after replacing the
10386 code that evaluates if the subprogram can override an operator by
10387 invocations to the above new function.
10388 * einfo.adb
10389 (Write_Field26_Name): Add missing code to ensure that, following
10390 the documentation in einfo.ads, this field is not shown as attribute
10391 "Static_Initialization" on non-dispatching functions.
10392
103932011-08-02 Jose Ruiz <ruiz@adacore.com>
10394
10395 * sem_res.adb (Resolve_Call): A call to
10396 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10397 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10398 i.e., when the second parameter is of type Time_Span.
10399
104002011-08-02 Vincent Celier <celier@adacore.com>
10401
10402 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10403 with an archive instead of -L<library dir> -l<library name>.
10404
104052011-08-02 Ed Schonberg <schonberg@adacore.com>
10406
10407 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10408 mark the base types In_Use in addition to making the operations
10409 use_visible.
10410
104112011-08-02 Ed Falis <falis@adacore.com>
10412
10413 * init.c: add and setup __gnat_signal_mask for the exception signals
10414 * s-inmaop-vxworks.adb: new file.
10415 * s-intman-vxworks.adb: remove unnecessary initializations and
10416 simplify remaining
10417 * s-intman-vxworks.ads: remove unnecessary variable
10418 * s-taprop-vxworks.adb: simplify signal initialization
10419
104202011-08-02 Robert Dewar <dewar@adacore.com>
10421
10422 * sem_ch8.adb: Minor code reorganization, comment updates.
10423
104242011-08-02 Robert Dewar <dewar@adacore.com>
10425
10426 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10427 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10428 here from Sem_Res.
10429 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10430 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10431
104322011-08-02 Ed Schonberg <schonberg@adacore.com>
10433
10434 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10435 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10436 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10437 use_type_clauses, to handle more efficiently use_type and use_all_type
10438 constructs.
10439 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10440 Ada2012 Use_All_Type clause.
10441 (Use_Class_Wide_Operations): new procedure.
10442
104432011-08-02 Robert Dewar <dewar@adacore.com>
10444
10445 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10446 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10447 expression to expression function.
10448
104492011-08-02 Ed Schonberg <schonberg@adacore.com>
10450
10451 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10452 if types are compatible.
10453
104542011-08-02 Yannick Moy <moy@adacore.com>
10455
10456 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10457 returns True if its argument array types have same dimension and same
10458 static bounds at each index.
10459 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10460 OUT or IN OUT paramaters which are not view conversions in SPARK.
10461 (Resolve_Arithmetic_Op): issue an error in formal mode on
10462 multiplication or division with operands of fixed point types which are
10463 not qualified or explicitly converted.
10464 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10465 Boolean or array type (except String) operands.
10466 (Resolve_Equality_Op): issue an error in formal mode on equality
10467 operators for array types other than String with non-matching static
10468 bounds.
10469 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10470 for array types with non-matching static bounds. Factorize the code in
10471 Matching_Static_Array_Bounds.
10472 (Resolve_Qualified_Expression): issue an error in formal mode on
10473 qualified expressions for array types with non-matching static bounds.
10474 (Resolve_Type_Conversion): issue an error in formal mode on type
10475 conversion for array types with non-matching static bounds
10476
104772011-08-02 Robert Dewar <dewar@adacore.com>
10478
10479 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10480
104812011-08-02 Ed Schonberg <schonberg@adacore.com>
10482
10483 * par-ch9.adb: save location of entry for proper error message.
10484
104852011-08-02 Javier Miranda <miranda@adacore.com>
10486
10487 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10488 (Use_Full_View) which permits this routine to climb through the
10489 ancestors using the full-view of private parents.
10490 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10491 Use_Full_View to true in calls to Is_Ancestor.
10492 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10493 true in call to Is_Ancestor.
10494 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10495 Use_Full_View to true in call to Is_Ancestor.
10496 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10497 call to Is_Ancestor.
10498 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10499 Use_Full_View to true in calls to Is_Ancestor.
10500 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10501 Make_Select_Specific_Data_Table, Register_Primitive,
10502 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10503 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10504 to true in call to Is_Ancestor.
10505 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10506 Use_Full_View to true in calls to Is_Ancestor.
10507 * exp_cg.adb
10508 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10509 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10510
105112011-08-02 Robert Dewar <dewar@adacore.com>
10512
10513 * gnat_rm.texi: Minor reformatting.
10514 * sem_prag.adb: Minor reformatting.
10515
105162011-08-02 Tristan Gingold <gingold@adacore.com>
10517
10518 * vms_data.ads: Add VMS qualifier for -gnateP.
10519
105202011-08-02 Robert Dewar <dewar@adacore.com>
10521
10522 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10523 * par-ch7.adb (P_Package): Proper placement of aspects for package
10524 decl/instantiation.
10525 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10526 (End_Statements): Add Is_Sloc parameterr
10527 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10528 (Check_End): Ad Is_Sloc parameter
10529 (End_Statements): Add Is_Sloc parameterr
10530
105312011-08-02 Vincent Celier <celier@adacore.com>
10532
10533 * ug_words: Add VMS qualifier equivalent to -gnateP:
10534 /SYMBOL_PREPROCESSING.
10535
105362011-08-02 Jose Ruiz <ruiz@adacore.com>
10537
10538 * gnat-style.texi: For hexadecimal numeric literals the typical
10539 grouping of digits is 4 to represent 2 bytes.
10540 A procedure spec which is split into several lines is indented two
10541 characters.
10542
105432011-08-02 Yannick Moy <moy@adacore.com>
10544
10545 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10546 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10547 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10548 properly qualified
10549 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10550 choice in array aggregate
10551 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10552 mark as ancestor
10553 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10554 positional and named aggregate for record, or others in record
10555 aggregate, or multiple choice in record aggregate
10556 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10557 array operands to logical operations AND, OR and XOR do not have the
10558 same static lower and higher bounds
10559 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10560
105612011-08-01 Robert Dewar <dewar@adacore.com>
10562
10563 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10564 Replaces Last_Source_Node_In_Sequence.
10565 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10566 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10567 parens and blank in string (this was inconsistently implemented).
10568 * errout.ads
10569 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10570 blank in string (this was inconsistently implemented).
10571 * gnat1drv.adb
10572 (Set_Global_Switches): Set formal mode switches appropriately
10573 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10574 * par-prag.adb
10575 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10576 call Set_Error_Msg_Lang to set "spark" as language name.
10577 * par.adb: Remove unnecessary call to set formal language for errout
10578 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10579 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10580 name.
10581 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10582 calls to it, moved after resolution so that types are known
10583 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10584 result of concatenation is not of type String
10585 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10586 concatenation is not properly restricted
10587 * gnat_rm.texi: Add doc on pragma Spark_95.
10588 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10589 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10590 * gcc-interface/Make-lang.in: Update dependencies.
10591
105922011-08-01 Javier Miranda <miranda@adacore.com>
10593
10594 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10595 condition that detects if the overridden operation must replace an
10596 existing entity.
10597
105982011-08-01 Javier Miranda <miranda@adacore.com>
10599
10600 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10601 code declarations inserted by Insert_Actions in each alternative of the
10602 N_Case_Expression node.
10603
106042011-08-01 Robert Dewar <dewar@adacore.com>
10605
10606 * sem_ch6.adb: Minor code reorganization.
10607 * sem_util.adb: Minor reformatting.
10608
106092011-08-01 Pascal Obry <obry@adacore.com>
10610
10611 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10612 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10613
106142011-08-01 Yannick Moy <moy@adacore.com>
10615
10616 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10617 literal or operator symbol which is prefixed
10618 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10619 mode on access attributes.
10620 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10621 that concatenation operands are properly restricted in formal mode
10622 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10623 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10624 result of the concatenation has a type different from String.
10625 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10626 Analyze_Quantified_Expression, Analyze_Slice,
10627 Analyze_Null): issue an error in formal mode on unsupported constructs
10628 * sem_ch5.adb
10629 (Analyze_Block_Statement): only issue error on source block statement
10630 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10631 function which returns the last node in a list of nodes for which
10632 Comes_From_Source returns True, if any
10633 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10634 Last_Source_Node_In_Sequence
10635 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10636 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10637 mode on unsupported constructs
10638 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10639 rest of the actions may be needed later on since the error is marked as
10640 not serious.
10641 * sinfo.ads: Typos in comments.
10642
106432011-08-01 Pascal Obry <obry@adacore.com>
10644
10645 * projects.texi: Minor editing.
10646
106472011-08-01 Yannick Moy <moy@adacore.com>
10648
10649 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10650 insertion character ~~
10651 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10652 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10653 with insertion character ~~
10654 (Set_Msg_Text): treat insertion character ~~
10655 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10656 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10657 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10658 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10659 errors related to the formal language restriction not serious
10660 (insertion character |).
10661 * par.adb (Par): set formal language for error messages if needed
10662 * sem_ch6.adb (Check_Missing_Return): take into account possible
10663 generated statements at the end of the function
10664 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10665 enumeration value to define a new pragma SPARK_95
10666 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10667 SPARK_Version): new type and variables to store the SPARK version
10668 (none by default).
10669 (SPARK_Mode): return True when SPARK_Version is set
10670 * par-prag.adb: Correct indentation
10671 (Prag): take Pragma_SPARK_95 into account
10672 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10673 into account.
10674
106752011-08-01 Robert Dewar <dewar@adacore.com>
10676
10677 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10678 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10679 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10680
106812011-08-01 Pascal Obry <obry@adacore.com>
10682
10683 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10684 Target_Name to Get_Path call.
10685 (Parse_Single_Project): Likewise.
10686 (Post_Parse_Context_Clause): Likewise.
10687 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10688 Call Initialise_Project_Path with the proper Target_Name.
10689 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10690 search path.
10691 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10692 with the proper Target_Name.
10693 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10694 Part.Parse routine.
10695 (Parse_Project_And_Apply_Config): Likewise.
10696 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10697 This is fine as this part of the code is supporting only native
10698 compilation.
10699 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10700 is fine as this part of the code is supporting only native compilation.
10701
107022011-08-01 Yannick Moy <moy@adacore.com>
10703
10704 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10705 of homonym, unless the homonym is one of the cases allowed in SPARK
10706 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10707 package declaration occurring after a body.
10708
107092011-08-01 Robert Dewar <dewar@adacore.com>
10710
10711 * checks.adb, exp_ch4.adb: Minor reformatting.
10712
107132011-08-01 Javier Miranda <miranda@adacore.com>
10714
10715 * einfo.ads (Access_Disp_Table): Fix documentation.
10716 (Dispatch_Table_Wrappers): Fix documentation.
10717
107182011-08-01 Pascal Obry <obry@adacore.com>
10719
10720 * prj-env.adb, prj-env.ads: Minor reformatting.
10721
107222011-08-01 Yannick Moy <moy@adacore.com>
10723
10724 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10725 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10726 procedures out of these packages.
2c7f9cc0 10727 * errout.ads, errout.adb
052e0603
AC
10728 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10729 procedures in of this package
10730 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10731 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10732 on misplaced later vs initial declarations, like in Ada 83
10733 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10734 formal mode on attribute of private type whose full type declaration
10735 is not visible
10736 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10737 package declaration inside a package specification
10738 (Analyze_Full_Type_Declaration): issue error in formal mode on
10739 controlled type or discriminant type
10740 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10741 user-defined operator means that it should come from the source
10742 (New_Overloaded_Entity): issue error in formal mode on overloaded
10743 entity.
10744 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10745
107462011-08-01 Thomas Quinot <quinot@adacore.com>
10747
10748 * atree.adb: Minor reformatting.
10749 * checks.adb: Minor reformatting.
10750
107512011-08-01 Vincent Celier <celier@adacore.com>
10752
10753 * s-parame-vms-ia64.ads: Fix typo in comment
10754 Minor reformatting
10755 * s-parame-vms-restrict.ads: Removed, unused.
10756
107572011-08-01 Javier Miranda <miranda@adacore.com>
10758
10759 * exp_ch3.adb
10760 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10761 * sem_ch3.adb
10762 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10763 * sem_ch3.ads, sem_ch3.adb
10764 (Is_Constant_Bound): New extended version of the subprogram that was
10765 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10766 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10767 * sem_aux.ads (Constant_Value): Fix typo in comment.
10768 * checks.adb (Generate_Index_Checks): New implementation which, for
10769 array objects with constant bounds, generates the runtime check
10770 referencing the bounds of the array type. For other cases this routine
10771 provides its previous behavior obtaining such values from the array
10772 object.
10773 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10774 parent type.
10775 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10776 we cannot have semantic interpretations of the new node.
10777
107782011-08-01 Ed Schonberg <schonberg@adacore.com>
10779
10780 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10781 expressions.
10782
107832011-08-01 Arnaud Charlet <charlet@adacore.com>
10784
10785 * sem_ch8.adb: Minor code editing.
10786 * s-vxwext.adb: Remove trailing space.
10787 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10788 consistency with other files.
10789
107902011-08-01 Thomas Quinot <quinot@adacore.com>
10791
10792 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10793
107942011-08-01 Ed Schonberg <schonberg@adacore.com>
10795
10796 * par-ch10.adb: reject parameterized expressions as compilation unit.
10797 * sem_ch4.adb: handle properly conditional expression with overloaded
10798 then_clause and no else_clause.
10799
108002011-08-01 Tristan Gingold <gingold@adacore.com>
10801
10802 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10803 like done by System.Aux_DEC.
10804 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10805
108062011-08-01 Yannick Moy <moy@adacore.com>
10807
10808 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10809 missing label at end of declaration (subprogram or package)
10810 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10811 of positional and named parameter association
10812 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10813 Error_Msg_SP which adds a prefix to the error message giving the name
10814 of the formal language analyzed
10815 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10816 access result type in subprogram, unconstrained array as result type,.
10817 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10818 procedure
10819 * sem_ch8.adb: Code clean up.
10820
108212011-08-01 Javier Miranda <miranda@adacore.com>
10822
10823 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10824 * einfo.ads (Access_Disp_Table): Fix documentation.
10825 (Dispatch_Table_Wrappers): Fix documentation.
10826 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10827 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10828 to enforce the documentation of this attribute.
10829 (Set_Is_Interface): Cleanup the assertion.
10830 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10831 the Underlying_Type entity before reading attribute Access_Disp_Table.
10832 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10833 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10834 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10835 the Underlying_Type entity before reading attribute Access_Disp_Table.
10836 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10837 Locate the Underlying_Type entity before reading attribute
10838 Access_Disp_Table.
10839
108402011-08-01 Ed Schonberg <schonberg@adacore.com>
10841
10842 * s-poosiz.ads: Additional overriding indicators.
10843
108442011-08-01 Yannick Moy <moy@adacore.com>
10845
10846 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10847 formal mode.
10848 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10849 parameter specification does not include a subtype mark.
10850 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10851 formal mode on abstract subprogram.
10852 (Analyze_Subprogram_Specification): issue error in formal mode on
10853 user-defined operator.
10854 (Process_Formals): issue error in formal mode on access parameter and
10855 default expression.
10856 * sem_ch9.adb (Analyze_Abort_Statement,
10857 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10858 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10859 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10860 Analyze_Requeue, Analyze_Selective_Accept,
10861 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10862 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10863 issue error in formal mode on user-defined raise statement.
10864
108652011-08-01 Thomas Quinot <quinot@adacore.com>
10866
10867 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10868 declaration being hidden when overriding an implicit inherited
10869 subprogram.
10870 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10871 (-gnats), do not complain about a source file that contains only a
10872 pragma No_Body.
10873
108742011-08-01 Ed Schonberg <schonberg@adacore.com>
10875
10876 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10877 variable if already set.
10878
108792011-08-01 Arnaud Charlet <charlet@adacore.com>
10880
10881 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10882 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10883 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10884 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10885 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10886 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10887 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10888 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10889 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10890 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10891 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10892 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10893 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10894 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10895 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10896 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10897 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10898 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10899 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10900 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10901 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10902 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10903 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10904 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10905 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10906 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10907 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10908 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10909 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10910 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10911 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10912 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10913 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10914 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10915 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10916 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10917 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10918 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10919 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10920 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10921 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10922 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10923 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10924 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10925 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10926 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10927 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10928 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10929 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10930 Use GNAT instead of GNARL.
10931
109322011-08-01 Bob Duff <duff@adacore.com>
10933
10934 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10935 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10936 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10937 reformatting.
10938
109392011-08-01 Yannick Moy <moy@adacore.com>
10940
10941 * debug.adb (d.D) reverve flag for the SPARK mode
10942 (d.E) reverve flag for SPARK generation mode
10943 (d.F) reverve flag for Why generation mode
2c7f9cc0 10944 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
10945 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10946 functions which return True when the corresponding modes are set
10947 (Formal_Language): return "spark" or "alfa" when in formal verification
10948 mode.
10949 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10950 Error_Msg to prefix the error message with a tag giving the formal
10951 language
10952 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10953 message with a tag giving the formal language
10954 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10955 block statement
10956 (Analyze_Case_Statement): issue error in formal mode on case statement
10957 with a single "others" case alternative
10958 (Analyze_Exit_Statement): issue errors in formal mode on exit
10959 statements which do not respect SPARK restrictions
10960 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10961 (Check_Unreachable_Code): always issue an error (not a warning) in
10962 formal mode on unreachable code (concerns both code after an infinite
10963 loop and after an unconditional jump, both not allowed in SPARK)
10964 * sem_ch6.adb (Analyze_Return_Statement): add call to
10965 Set_Return_Present for a procedure containing a return statement
10966 (already done for functions in Analyze_Function_Return)
10967 (Analyze_Function_Return): issue error in formal mode on extended
10968 return or if return is not last statement in function
10969 (Check_Missing_Return): issue error in formal mode if function does
10970 not end with return or if procedure contains a return
10971 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10972 function to detect if there is an inner scope of its parameter S which
10973 is a loop.
10974
109752011-08-01 Thomas Quinot <quinot@adacore.com>
10976
10977 * sem_ch6.ads: Minor reformatting.
10978
109792011-08-01 Javier Miranda <miranda@adacore.com>
10980
10981 * sem_util.adb (Abstract_Interface_List): Complete condition when
10982 processing private type declarations to avoid reading unavailable
10983 attribute.
10984 (Is_Synchronized_Tagged_Type): Complete condition when processing
10985 private extension declaration nodes to avoid reading unavailable
10986 attribute.
10987
109882011-08-01 Thomas Quinot <quinot@adacore.com>
10989
10990 * sem_ch3.adb: Minor reformatting.
10991
109922011-08-01 Thomas Quinot <quinot@adacore.com>
10993
10994 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10995 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10996 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10997 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10998 for VMS, instead parametrize the common implementation with
10999 System.Parameters declarations.
11000
110012011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11002
11003 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11004
110052011-08-01 Tristan Gingold <gingold@adacore.com>
11006
11007 * seh_init.c: Fix SEH handler installation on win64.
11008
110092011-08-01 Ed Schonberg <schonberg@adacore.com>
11010
11011 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11012 double analysis of an anonymous access to subprogram, because it can
11013 lead to improper sharing of profiles and a back-end crash.
11014
110152011-08-01 Robert Dewar <dewar@adacore.com>
11016
11017 * make.adb, sem_ch4.adb: Minor reformatting.
11018 * gcc-interface/Make-lang.in: Update dependencies.
11019 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11020
110212011-08-01 Arnaud Charlet <charlet@adacore.com>
11022
11023 * gnat_rm.texi: Fix definition of Long_Integer.
11024
110252011-08-01 Ed Schonberg <schonberg@adacore.com>
11026
11027 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11028 to prevent storage exhaustion.
11029 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11030 finalized is a function body, insert the cleanup code before the final
11031 return statement, to prevent spurious warnings.
11032 * s-pooglo.ads: add overriding indicator.
11033
110342011-08-01 Ed Schonberg <schonberg@adacore.com>
11035
11036 * sem_ch4.adb (Operator_Check): improve error message when both a
11037 with_clause and a use_clause are needed to make operator usage legal.
11038 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11039 determine whether a compilation unit is visible within an other,
11040 either through a with_clause in the current unit, or a with_clause in
11041 its library unit or one one of its parents.
11042
110432011-08-01 Ed Schonberg <schonberg@adacore.com>
11044
11045 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11046 over an arbitrary expression of an array or container type.
11047 * lib-xref.adb: clarify comment.
11048
110492011-08-01 Bob Duff <duff@adacore.com>
11050
11051 * einfo.ads: Minor reformatting.
11052 * debug.adb: Minor comment improvement.
11053
110542011-08-01 Javier Miranda <miranda@adacore.com>
11055
11056 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11057 consider hidden subprograms as valid candidates.
11058
110592011-08-01 Arnaud Charlet <charlet@adacore.com>
11060
11061 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11062
110632011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11064
11065 * gnat_ugn.texi: Fix typo.
11066
110672011-08-01 Robert Dewar <dewar@adacore.com>
11068
11069 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11070 lib-xref.adb: Minor reformatting
11071
110722011-08-01 Gary Dismukes <dismukes@adacore.com>
11073
11074 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11075 when to generate a call to Move_Final_List.
11076 (Has_Controlled_Parts): Remove this function.
11077
110782011-08-01 Geert Bosch <bosch@adacore.com>
11079
11080 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11081 "," in choice list.
11082
110832011-08-01 Thomas Quinot <quinot@adacore.com>
11084
11085 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11086 explicit raise of a predefined exception as Comes_From_Source if the
11087 original N_Raise_Statement comes from source.
11088
110892011-08-01 Robert Dewar <dewar@adacore.com>
11090
11091 * sinfo.ads: Add comment.
11092 * sem_ch6.adb: Minor reformatting.
11093
110942011-08-01 Robert Dewar <dewar@adacore.com>
11095
11096 * freeze.adb (Freeze_Entity): Refine check for bad component size
11097 clause to avoid rejecting confirming clause when atomic/aliased present.
11098
110992011-08-01 Ed Schonberg <schonberg@adacore.com>
11100
11101 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11102 better determine whether an entity reference is a write.
11103 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11104 subcomponent.
11105 * lib-xref.adb (Output_References): Do no suppress a read reference at
11106 the same location as an immediately preceeding modify-reference, to
11107 handle properly in-out actuals.
11108
111092011-08-01 Tristan Gingold <gingold@adacore.com>
11110
11111 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11112
111132011-08-01 Quentin Ochem <ochem@adacore.com>
11114
11115 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11116 heap to compute the result.
11117
111182011-08-01 Robert Dewar <dewar@adacore.com>
11119
11120 * atree.ads: Minor reformatting.
11121
111222011-08-01 Emmanuel Briot <briot@adacore.com>
11123
11124 * g-expect.adb (Get_Command_Output): Fix memory leak.
11125
111262011-08-01 Geert Bosch <bosch@adacore.com>
11127
11128 * cstand.adb (P_Float_Type): New procedure to print the definition of
11129 predefined fpt types.
11130 (P_Mixed_Name): New procedure to print a name using mixed case
11131 (Print_Standard): Use P_Float_Type for printing floating point types
11132 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11133 precision IEEE float.
11134
111352011-08-01 Thomas Quinot <quinot@adacore.com>
11136
11137 * sem_ch3.adb: Minor reformatting.
11138
111392011-08-01 Ed Schonberg <schonberg@adacore.com>
11140
11141 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11142 the completion of a generic function, insert the new body rather than
11143 rewriting the original.
11144
111452011-08-01 Yannick Moy <moy@adacore.com>
11146
11147 * sinfo.ads, errout.ads: Typos in comments.
11148
111492011-08-01 Robert Dewar <dewar@adacore.com>
11150
11151 * par-endh.adb: Minor reformatting.
11152
111532011-08-01 Robert Dewar <dewar@adacore.com>
11154
11155 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11156 (Pre_Post_Aspects): New subtype.
11157 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11158 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11159 * par-ch7.adb (P_Package): Remove Decl parameter
11160 (P_Package): Handle new syntax for aspects (before IS)
11161 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11162 new aspect syntax
11163 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11164 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11165 (P_Package): Remove Decl parameter
11166 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11167 aspects
11168 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11169 specs
11170 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11171 * sinfo.ads: Document new syntax for aspects in packages etc.
11172 * sprint.adb: Handle new syntax of aspects before IS in package
11173
111742011-08-01 Thomas Quinot <quinot@adacore.com>
11175
11176 * atree.ads: Minor reformatting.
11177 * sem_prag.adb: Minor reformatting.
11178
111792011-08-01 Robert Dewar <dewar@adacore.com>
11180
11181 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11182 case expr alternative.
11183
111842011-08-01 Ed Schonberg <schonberg@adacore.com>
11185
11186 * sem_ch12.adb: Fix typo.
11187
111882011-08-01 Geert Bosch <bosch@adacore.com>
11189
11190 * sem_prag.adb (Check_No_Link_Name): New procedure.
11191 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11192 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11193 instead of Standard_Long_Long_Float_Size global. Preparation for
11194 eventual removal of per type constants.
11195 * exp_util.ads (Get_Stream_Size): New function returning the stream
11196 size value of subtype E.
11197 * exp_util.adb (Get_Stream_Size): Implement new function.
11198 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11199 function.
11200 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11201 * einfo.adb:
11202 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11203
112042011-08-01 Geert Bosch <bosch@adacore.com>
11205
11206 * cstand.adb: Fix comments.
11207 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11208 count of arguments.
11209
112102011-08-01 Robert Dewar <dewar@adacore.com>
11211
11212 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11213
112142011-08-01 Geert Bosch <bosch@adacore.com>
11215
11216 * atree.ads: Fix comment.
11217
112182011-08-01 Robert Dewar <dewar@adacore.com>
11219
11220 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11221 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11222 * par.adb: Add with for Namet.Sp.
11223 * par-tchk.adb: Minor reformatting.
11224
112252011-08-01 Vincent Celier <celier@adacore.com>
11226
11227 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11228 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11229 of the init procedure of a SAL.
11230 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11231 New procedure.
11232
112332011-08-01 Thomas Quinot <quinot@adacore.com>
11234
11235 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11236 reformatting.
11237
112382011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11239
11240 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11241
112422011-08-01 Thomas Quinot <quinot@adacore.com>
11243
11244 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11245 conformant with its spec (return True only for types that have
11246 an overriding Initialize primitive operation that prevents them from
11247 having preelaborable initialization).
11248 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11249 initialization for controlled types in Ada 2005 or later mode.
11250
112512011-08-01 Robert Dewar <dewar@adacore.com>
11252
11253 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11254 Postcondition.
11255 (Same_Aspect): New function.
11256 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11257 Type_Invariant, Precondition, Postcondition.
11258 * snames.ads-tmpl: Add Name_Type_Invariant.
11259
112602011-08-01 Robert Dewar <dewar@adacore.com>
11261
11262 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11263 here.
11264 (Freeze_All_Ent): Fix error in handling inherited aspects.
11265 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11266 already analyzed, but don't skip entire processing of a declaration,
11267 that's wrong in some cases of declarations being rewritten.
11268 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11269 Don't delay for integer, string literals
11270 Treat predicates in usual manner for delay, remove special case code,
11271 not needed.
11272 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11273 (Build_Predicate_Function): Update saved expression in aspect
11274 (Build_Invariant_Procedure): Update saved expression in aspect
11275 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11276 of replacement of discriminant references if the reference is simple.
11277
112782011-08-01 Robert Dewar <dewar@adacore.com>
11279
11280 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11281 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11282 Static_Predicate and Dynamic_Predicate.
11283 (Build_Predicate_Function): Add processing for Static_Predicate
11284 and Dynamic_Predicate.
11285 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11286 (From_Static_Predicate): New flag
11287 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11288
112892011-08-01 Robert Dewar <dewar@adacore.com>
11290
11291 * usage.adb: Documentation cleanup for Ada version modes in usage.
11292 * expander.adb: Minor reformatting.
11293
112942011-08-01 Robert Dewar <dewar@adacore.com>
11295
11296 * atree.ads: Minor comment fix.
11297 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11298 a-witeio.ads, sem_prag.adb: Minor reformatting.
11299
113002011-08-01 Doug Rupp <rupp@adacore.com>
11301
11302 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11303 pointers. Use descrip.h header file for convenience. Add some
11304 comments.
11305
113062011-08-01 Robert Dewar <dewar@adacore.com>
11307
11308 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11309 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11310 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11311 New procedure.
11312 (Check_Aspect_At_End_Of_Declarations): New procedure
11313 (Analye_Aspect_Specification): Minor changes for above procedures
11314 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11315 specification node as well.
11316
113172011-08-01 Pascal Obry <obry@adacore.com>
11318
11319 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11320 Windows files. Use GetFilesAttributes() in this case to check for file
11321 existence instead of returning with an error code.
11322
113232011-08-01 Vincent Celier <celier@adacore.com>
11324
11325 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11326 High is above Source length.
11327
113282011-08-01 Robert Dewar <dewar@adacore.com>
11329
11330 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11331
113322011-08-01 Robert Dewar <dewar@adacore.com>
11333
11334 * aspects.ads (Boolean_Aspects): New subtype.
11335 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11336 for derived types in cases where the parent type and derived type have
11337 aspects.
11338 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11339 with aspects when parent type also has aspects.
11340 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11341 boolean expression at this point).
11342 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11343 accordance with final decision on the Ada 2012 feature.
11344 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11345
113462011-08-01 Matthew Heaney <heaney@adacore.com>
11347
11348 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11349
113502011-08-01 Pascal Obry <obry@adacore.com>
11351
11352 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11353 Fix Replace_Slice when High is above current string size.
11354 (Replace_Slice): Fix DL computation when High is above current
11355 string length.
11356
113572011-08-01 Gary Dismukes <dismukes@adacore.com>
11358
11359 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11360
113612011-08-01 Matthew Heaney <heaney@adacore.com>
11362
11363 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11364 of node.
11365
113662011-08-01 Pascal Obry <obry@adacore.com>
11367
11368 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11369 reformatting.
11370
113712011-08-01 Ed Schonberg <schonberg@adacore.com>
11372
11373 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11374 access to protected subprograms in generic bodies.
11375 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11376 protected type, indicate that the convention of the subprogram is
11377 Convention_Protected, because it may be used in subsequent declarations
11378 within the protected declaration.
11379
113802011-08-01 Vincent Celier <celier@adacore.com>
11381
11382 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11383 and "final" procedures when the name of the library is "ada", to avoid
11384 duplicate symbols "adainit" and "adafinal" in executables.
11385
113862011-08-01 Ed Schonberg <schonberg@adacore.com>
11387
11388 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11389 quantified expression that appears within a postcondition and uses the
11390 Ada2012 'Result attribute.
11391
113922011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11393
11394 * init.c (__gnat_error_handler): Cast reason to int.
11395 (__gnat_install_handler): Explain sa_sigaction use.
11396
113972011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11398
11399 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11400 subprogram has copy-in copy-out parameters, try to promote the mode of
11401 the return type if it is passed in registers.
11402
114032011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11404
11405 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11406 left operand as addressable.
11407
114082011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11409
11410 * gcc-interface/gigi.h (build_function_stub): Remove.
11411 (build_return_expr): Likewise.
11412 (convert_vms_descriptor): Declare.
11413 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11414 (build_function_stub): Move to...
11415 * gcc-interface/utils2.c (build_return_expr): Move to...
11416 * gcc-interface/trans.c (build_function_stub): ...here.
11417 (build_return_expr): ...here.
11418 (Subprogram_Body_to_gnu): Add local variable for language_function.
11419 Disconnect the parameter attributes cache, if any, once done with it.
11420 Call end_subprog_body only after setting the end_locus.
11421 Build the stub associated with the function, if any, at the very end.
11422 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11423 variables and streamline control flow.
11424
114252011-07-23 Arnaud Charlet <charlet@adacore.com>
11426
11427 PR ada/49819
11428 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11429 g-trasym-dwarf.adb.
11430
114312011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11432
11433 PR bootstrap/49794
11434 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11435 Assign to act.sa_sigaction.
11436 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11437 current->return_address to char * before arithmetic.
11438
114392011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11440
11441 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11442 Correct argument types.
11443 Extract code from reason.
11444 (__gnat_install_handler): Assign to act.sa_sigaction.
11445
114462011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11447
11448 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11449 (GNAT1_OBJS): ...here.
11450
114512011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11452
11453 PR ada/48711
11454 * g-socthi-mingw.adb (Fill): Fix formatting.
11455
11456 * gcc-interface/gigi.h: Move around comment.
11457
114582011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11459
11460 PR ada/46350
11461 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11462
114632011-07-14 Florian Weimer <fw@deneb.enyo.de>
11464
11465 PR ada/48711
11466 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11467
114682011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11469
11470 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11471 range comparison if Pmode is SImode.
11472
114732011-07-12 Laurent GUERBY <laurent@guerby.net>
11474 Eric Botcazou <ebotcazou@adacore.com>
11475
11476 * adadecode.c: Wrap up in extern "C" block.
11477 * adadecode.h: Likewise.
11478 * adaint.c: Likewise. Remove 'const' keyword.
11479 * adaint.h: Likewise.
11480 * argv.c: Likewise.
11481 * atree.h: Likewise.
11482 * cio.c: Likewise.
11483 * cstreams.c: Likewise.
11484 * env.c: Likewise.
11485 * exit.c: Likewise.
11486 * fe.h: Likewise.
11487 * final.c: Likewise.
11488 * init.c: Likewise.
11489 * initialize.c: Likewise.
11490 * link.c: Likewise.
11491 * namet.h: Likewise.
11492 * nlists.h: Likewise.
11493 * raise.c: Likewise.
11494 * raise.h: Likewise.
11495 * repinfo.h: Likewise.
11496 * seh_init.c: Likewise.
11497 * targext.c: Likewise.
11498 * tracebak.c: Likewise.
11499 * uintp.h: Likewise.
11500 * urealp.h: Likewise.
11501 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11502 * xsinfo.adb: Likewise.
11503 * xsnamest.adb: Likewise.
11504 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11505 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11506 * gcc-interface/misc.c: Likewise.
11507 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11508 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11509 ada/targext.o here...
11510 (GNAT_ADA_OBJS): ...and not here.
11511 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11512 (GNATBIND_OBJS): Reorder.
11513
115142011-07-07 Richard Henderson <rth@redhat.com>
11515
11516 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11517 dwarf2out_frame_init.
11518
115192011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11520
11521 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11522
115232011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11524
11525 PR target/39150
11526 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11527
115282011-07-06 Richard Guenther <rguenther@suse.de>
11529
11530 * gcc-interface/misc.c (gnat_init): Merge calls to
11531 build_common_tree_nodes and build_common_tree_nodes_2.
11532 Re-initialize boolean_false_node.
11533
115342011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11535 Olivier Hainque <hainque@adacore.com>
11536 Nicolas Setton <setton@adacore.com>
11537
11538 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11539 the type according to the ARTIFICIAL_P parameter.
11540 (create_type_decl): Likewise.
11541 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11542
115432011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11544
11545 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11546 (gnatbind): Likewise.
11547
115482011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11549
11550 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11551
115522011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11553
11554 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11555 local variable throughout. Remove useless call to Base_Type.
11556 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11557 Take it also into account for the volatileness of the field. Set the
11558 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11559
115602011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11561
11562 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11563 on a dereference built for a by-ref object if it has an address clause.
11564
115652011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11566
11567 * einfo.ads (Address_Taken): Document use for the second argument of
11568 Asm_Input and Asm_Output attributes.
11569 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11570 argument is an entity name, then set Address_Taken on it.
11571 <Attribute_Asm_Output>: Likewise.
11572 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11573 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11574 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11575 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11576
115772011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11578
11579 PR middle-end/46500
11580 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11581
115822011-06-14 Joseph Myers <joseph@codesourcery.com>
11583
11584 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11585 (ada/utils.o): Update dependencies.
11586 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11587 ../../../libcpp/libcpp.a.
11588 * gcc-interface/utils.c: Include common/common-target.h.
11589 (process_attributes): Use targetm_common.have_named_sections.
11590
115912011-06-07 Richard Guenther <rguenther@suse.de>
11592
11593 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11594 set_sizetype.
11595
115962011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11597
11598 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11599 TREE_THIS_NOTRAP flag.
11600
116012011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11602
11603 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11604 Fix thinko.
11605
116062011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11607
11608 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11609 constants whose full view has discriminants specially.
11610
116112011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11612
11613 * gcc-interface/utils.c: Include diagnostic.h.
11614 (gnat_write_global_declarations): Output debug information for all
11615 global type declarations before finalizing the compilation unit.
11616 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11617
116182011-05-25 Jakub Jelinek <jakub@redhat.com>
11619
11620 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11621
116222011-05-25 Kai Tietz <ktietz@redhat.com>
11623
11624 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11625 initialization instead of const/none-const pointer assignment.
11626
116272011-05-24 Joseph Myers <joseph@codesourcery.com>
11628
11629 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11630 $(EXTRA_GNAT1_OBJS).
11631 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11632 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11633 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11634 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11635 libcommon-target.a instead of prefix.o.
11636
116372011-05-21 Joseph Myers <joseph@codesourcery.com>
11638
11639 PR ada/49097
11640 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11641
116422011-05-20 Joseph Myers <joseph@codesourcery.com>
11643
11644 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11645 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11646 instead of version.o.
11647
2d0dd51a 116482011-05-18 Kai Tietz <ktietz@redhat.com>
052e0603
AC
11649
11650 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11651 boolean_false_node instead of integer_zero_node.
11652 (convert_with_check): Likewise.
11653 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11654
116552011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11656
11657 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11658 type of the parameter is an unconstrained array, convert the actual to
11659 the type of the formal in the In Out and Out cases as well.
11660
116612011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11662
11663 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11664 call build_function_type_array or build_varargs_function_type_array
11665 instead.
11666 (create_subprog_type): Don't call build_function_type; call
11667 build_function_type_vec instead.
11668
116692011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11670
11671 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11672 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11673 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11674
116752011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11676
11677 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11678
11679 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11680 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11681
116822011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11683
11684 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11685
116862011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11687
11688 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11689 instead of accessing TYPE_ARG_TYPES directly.
11690 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11691
116922011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11693
11694 PR ada/48844
11695 * gcc-interface/gigi.h (get_variant_part): Declare.
11696 * gcc-interface/decl.c (get_variant_part): Make global.
11697 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11698 types have the same constant size, are record types and T1 has a
11699 variant part while T2 doesn't.
11700
117012011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11702
11703 * gcc-interface/utils.c (begin_subprog_body): Do not call
11704 get_pending_sizes.
11705 (end_subprog_body): Likewise.
11706
117072011-05-04 Richard Guenther <rguenther@suse.de>
11708
11709 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11710 int_const_binop.
11711 (pos_to_constructor): Likewise.
11712
117132011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 11714 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
11715
11716 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11717 of build_function_type. Adjust calls to...
11718 (build_raise_check): ...this. Do not take a void_tree parameter.
11719 Call build_function_type_list instead of build_function_type.
11720 Fix head comment and swap couple of conditional blocks.
11721
117222011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11723
11724 * gnatvsn.ads (Library_Version): Bump to 4.7.
11725 (Current_Year): Bump to 2011.
11726
117272011-04-29 Michael Matz <matz@suse.de>
11728
11729 * gcc-interface/misc.c (gnat_handle_option): Set
11730 warn_maybe_uninitialized.
11731
117322011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11733
11734 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11735 the Watson/McCabe paper.
11736
117372011-04-23 Jim Meyering <meyering@redhat.com>
11738
11739 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11740
117412011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11742
11743 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11744 onto the new type.
11745
117462011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11747
11748 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11749 parameter.
11750 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11751 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11752 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11753 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11754 <all>: Do not set flags on the reused DECL node coming from an alias.
11755 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11756 don't need debug info here...
11757 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11758 (gigi): Adjust calls to create_subprog_decl.
11759 (build_raise_check): Likewise.
11760 (establish_gnat_vms_condition_handler): Likewise.
11761 (Compilation_Unit_to_gnu): Likewise.
11762 (gnat_to_gnu): Likewise.
11763
117642011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11765
11766 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11767 (NO_REORDER_ADAFLAGS): New variable.
11768 (EXTRA_GNATTOOLS): Always define.
11769 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11770 Clean up and adjust list of files compiled with special options.
11771 * gcc-interface/Make-lang.in: Likewise.
11772 (ada/decl.o): Cosmetical change.
11773 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11774
117752011-04-20 Jim Meyering <meyering@redhat.com>
11776
11777 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11778
117792011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11780
11781 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11782 $(CFLAGS) on the link line.
11783
117842011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11785
11786 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11787 padded type built for the return type if it is unconstrained.
11788
117892011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11790
11791 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11792
117932011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11794
11795 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11796 before calling TREE_CHAIN.
11797 * gcc-interface/misc.c (gnat_init_ts): New function.
11798 (LANG_HOOKS_INIT_TS): Define.
11799
118002011-04-12 Martin Jambor <mjambor@suse.cz>
11801
11802 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11803 instead of cgraph_node.
11804
118052011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11806
11807 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11808 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11809 mechanism.
11810
118112011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11812
11813 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11814 of aggregate types that contain a placeholder.
11815
118162011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11817
11818 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11819 TYPE_ARG_TYPES.
11820 (handle_type_generic_attribute): Likewise.
11821
118222011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11823
11824 PR ada/47163
11825 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11826
118272011-04-04 Kai Tietz <ktietz@redhat.com>
11828
11829 PR ada/47163
11830 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11831 to flag value.
11832
118332011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11834
11835 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11836 type case, do not strip a padding type around the array type.
11837
118382011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11839
11840 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11841 types.
11842
118432011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11844
11845 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11846 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11847 code for -feliminate-unused-debug-types.
11848 (gnat_post_options): Likewise.
11849
118502011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11851
11852 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11853 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11854 distinct copy.
11855
118562011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11857
11858 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11859 DECL_ARTIFICIAL flag on enumeration types.
11860
118612011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11862
11863 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11864 fat pointer types artificial unconditionally.
11865 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11866 isn't artificial.
11867
118682011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11869
11870 * gcc-interface/gigi.h (get_dummy_type): Declare.
11871 (build_dummy_unc_pointer_types): Likewise.
11872 (finish_fat_pointer_type): Likewise.
11873 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11874 fat pointer type has been built, complete it in place.
11875 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11876 and thin pointers. Remove useless variable.
11877 (finish_fat_pointer_type): Make global and move to...
11878 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11879 (get_dummy_type): New function.
11880 (build_dummy_unc_pointer_types): Likewise.
11881 (gnat_pushdecl): Propage the name to the anonymous variants only.
11882 (update_pointer_to): Only adjust the pointer types in the unconstrained
11883 array case.
11884
118852011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11886
11887 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11888 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11889 if this is a Taft amendment type and the full declaration is available.
11890 * gcc-interface/trans.c (process_type): Likewise.
11891 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11892 (process_freeze_entity): Likewise.
11893 * gcc-interface/utils.c (dummy_global): New static variable.
11894 (gnat_write_global_declarations): If there are types declared as used
11895 at the global level, insert them in the global hash table.
11896
118972011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11898
11899 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11900 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11901 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11902 copy.
11903 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11904 flag of the type accordingly.
11905 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11906
119072011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11908
11909 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11910 finalizing types when updating the pointers to the designated type.
11911 <all>: Finalize the deferred types even if we didn't defer processing
11912 of incomplete types in this invocation.
11913
119142011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
11915 Nicolas Setton <setton@adacore.com>
11916 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
11917
11918 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11919 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11920
119212011-03-28 Kai Tietz <ktietz@redhat.com>
11922
11923 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11924 Windows targets.
11925 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11926 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11927
11928 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11929
119302011-03-28 Tristan Gingold <gingold@adacore.com>
11931
11932 PR ada/44431
11933 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11934 Use ada output of gnatbind.
11935 (ada/b_gnatb.adb): Ditto.
11936 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11937 (ada.mostlyclean, ada.stage1)
11938 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11939 (ada.stagefeedback): Adjust.
11940 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11941 Use ada output of gnatbind.
11942 (b_gnatm.adb): Ditto.
11943 (b_gnatl.o, b_gnatm.o): New rules.
11944
119452011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11946
11947 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11948 for the padded type built to support a specified size or alignment.
11949
119502011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11951
11952 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11953 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11954 unconditionally to the end of the unit when the designated type is
11955 limited_with'ed.
11956 <all>: Rename local variable. Attempt to un-defer types only and do it
11957 for limited_with'ed types as well.
11958 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11959 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11960 consistently and remove redundant call to finalize_from_with_types.
11961
119622011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11963
11964 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11965 subprograms without a previous spec declared in the same unit.
11966 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11967 subprograms at the end of the unit instead of at the beginning.
11968 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11969 isn't public for the special handling of non-inline functions nested
11970 inside inline external functions.
11971
119722011-03-25 Jeff Law <law@redhat.com>
11973
11974 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11975
119762011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11977
11978 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11979 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11980 to compute Set_Size_Depends_On_Discriminant.
11981 (Layout_Type): Call it on array types in back-end layout mode.
11982 * sem_util.adb (Requires_Transient_Scope): Return true for array
11983 types only if the size depends on the value of discriminants.
11984 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11985 type if the RHS is a call to a function that returns an unconstrained
11986 type with default discriminant.
11987
119882011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11989
11990 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11991 non-conversion to the nominal result type at the end.
11992
119932011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11994
11995 * gcc-interface/trans.c (create_temporary): New function taken from...
11996 (create_init_temporary): ...here. Call it.
11997 (call_to_gnu): Create the temporary for the return value early, if any.
11998 Create it for a function with copy-in/copy-out parameters if there is
11999 no target; in other cases of copy-in/copy-out, use another temporary.
12000 Push the new binding level lazily. Add and rename local variables.
12001
120022011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12003
12004 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12005 error message.
12006 (set_rm_size): Likewise.
12007
120082011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12009
12010 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12011 for the padded type built in order to support a specified alignment.
12012 Fix incorrect formatting.
12013
120142011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12015
12016 PR bootstrap/48216
12017 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12018
120192011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12020
12021 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12022 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12023 to the end of the list. Adjust recursive call. Rename local variable.
12024 If REORDER is true, reorder components of the record type.
12025 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12026 components_to_record and adjust the parameter list.
12027
120282011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12029
12030 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12031 disabled, use the variable for bounds of loop iteration scheme.
12032
120332011-03-21 Kai Tietz <ktietz@redhat.com>
12034
12035 PR target/12171
12036 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12037
120382011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12039
12040 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12041 out whether the expression is read-only. Short-circuit placeholder
12042 case and rename a couple of local variables.
12043
120442011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12045
12046 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12047 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12048 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12049 (convert): Deal with conversions from a smaller form type specially.
12050
120512011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12052
12053 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12054 its argument, except for the special -I- switch.
12055
120562011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12057
12058 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12059 "Ada Issues".
12060
120612011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12062
12063 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12064
120652011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12066
12067 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12068 GNAT_FORMAL.
12069 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12070 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12071 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12072 Do not generate the check directly, instead instantiate the template
12073 check present in the descriptor.
12074 (make_descriptor_field): Move around.
12075 (build_vms_descriptor32): Build a template check in the POINTER field.
12076 (build_vms_descriptor): Remove useless suffixes.
12077 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12078
120792011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12080
12081 PR bootstrap/47467
12082 * targext.c: Include target files if IN_RTS is defined.
12083
120842011-01-26 Richard Guenther <rguenther@suse.de>
12085
12086 PR bootstrap/47467
12087 * targext.c: Include config.h.
12088 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12089 dependency.
12090
120912011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 12092 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
12093
12094 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12095
120962011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12097
12098 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12099 end-of-case on the end label and its associated gotos, if any.
12100
121012011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12102
12103 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12104 expressions of the parameter cache within the statement group of
12105 the CICO mechanism.
12106
121072011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 12108 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
12109
12110 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12111 (set_end_locus_from_node): New function.
12112 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12113 make and the function end_locus.
12114 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12115 for the elaboration subprogram.
12116 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12117 set the end_locus of the expression as well.
12118
121192011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12120
12121 PR ada/47131
12122 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12123 variables that are referenced in exception handlers volatile.
12124
12125
12126\f
12127Copyright (C) 2011 Free Software Foundation, Inc.
12128
12129Copying and distribution of this file, with or without modification,
12130are permitted in any medium without royalty provided the copyright
12131notice and this notice are preserved.
12132
12133 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12134 - fix bugs in the description of Source_Trace;
12135 - get rid of UNIT_NAME;
12136
4fbad0ba
AC
121372011-08-02 Javier Miranda <miranda@adacore.com>
12138
12139 * exp_ch9.adb
12140 (Build_Dispatching_Requeue): Adding support for VM targets
12141 since we cannot directly reference the Tag entity.
12142 * exp_sel.adb (Build_K): Adding support for VM targets.
12143 (Build_S_Assignment): Adding support for VM targets.
12144 * exp_disp.adb
12145 (Default_Prim_Op_Position): In VM targets do not restrict availability
12146 of predefined interface primitives to compiling in Ada 2005 mode.
12147 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12148 restricted to compiling in Ada 2005 mode.
12149 (Make_VM_TSD): Generate code that declares and initializes the OSD
12150 record. Needed to support dispatching calls through synchronized
12151 interfaces.
12152 * exp_ch3.adb
12153 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12154 primitives associated with synchronized interfaces.
12155 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12156 primitives associated with synchronized interfaces.
12157
121582011-08-02 Yannick Moy <moy@adacore.com>
12159
12160 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12161 statements hidden in SPARK if preceded by the HIDE directive
12162 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12163 exception handlers as hidden in SPARK if preceded by the HIDE directive
12164 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12165 if starting with the HIDE directive
12166 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12167 starting with the HIDE directive; mark the declarations in a private
12168 part as hidden in SPARK if the private part starts with the HIDE
12169 directive
12170 * restrict.adb, restrict.ads
12171 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12172 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12173 argument node belongs to a part which is hidden in SPARK
12174 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12175 parts in SPARK; protect the possibly costly call to
12176 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12177 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12178 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12179 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12180 Tok_SPARK_Hide.
12181 (Scan): recognize special comment starting with '#' and followed by
12182 SPARK keyword "hide" as a HIDE directive.
12183
121842011-08-02 Yannick Moy <moy@adacore.com>
12185
12186 * types.ads, erroutc.ads: Minor reformatting.
12187
121882011-08-02 Vincent Celier <celier@adacore.com>
12189
12190 * link.c: Add response file support for cross platforms.
12191
6ff6152d
ES
121922011-08-02 Ed Schonberg <schonberg@adacore.com>
12193
12194 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12195 in an association, set parent field of copy before partial analysis.
12196 * sem_res.adb (Resolve_Slice): create reference to itype only when
12197 expansion is enabled.
12198
975c6896
YM
121992011-08-02 Yannick Moy <moy@adacore.com>
12200
12201 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12202 for new flag denoting which subprogram bodies are in ALFA
12203 * restrict.adb, sem_ch7.adb: Update comment
12204 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12205 sem_ch9.adb, sem_res.adb: Add calls to
12206 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12207 * sem_ch6.adb (Analyze_Function_Return): add calls to
12208 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12209 middle of the body, and extended return.
12210 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12211 False when missing return.
12212 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12213 to True for subprograms whose spec is in ALFA. Remove later on the flag
12214 on the entity used for a subprogram body when there exists a separate
12215 declaration.
12216 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12217 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12218 False, otherwise do nothing.
12219
afc8324d
AC
122202011-08-02 Robert Dewar <dewar@adacore.com>
12221
12222 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12223
122242011-08-02 Yannick Moy <moy@adacore.com>
12225
12226 * sem_ch4.ads: minor formatting.
12227
2ba431e5
YM
122282011-08-02 Yannick Moy <moy@adacore.com>
12229
12230 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12231 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12232 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12233 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12234 opt.ads: cleanup of SPARK mode
12235
0f853035
YM
122362011-08-02 Yannick Moy <moy@adacore.com>
12237
12238 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12239 types.
12240 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12241 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12242 * sem_ch3.adb
12243 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12244 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12245 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12246 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12247 types.
12248 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12249 non-static range.
12250 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12251 functions whose return type is not in ALFA.
12252 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12253 specifications.
12254 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12255 parameter's type is not in ALFA.
12256 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12257 types are in ALFA.
12258
d2b10647
ES
122592011-08-02 Ed Schonberg <schonberg@adacore.com>
12260
12261 * sem_ch6 (Analyze_Expression_Function): treat the function as
12262 Inline_Always, and introduce a subprogram declaration for it when it is
12263 not a completion.
12264 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12265 expression functions, so that the back-end can determine whether they
12266 can in fact be inlined.
12267 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12268 a function body comes from an expression function.
12269
c7b9d548
AC
122702011-08-02 Gary Dismukes <dismukes@adacore.com>
12271
12272 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12273 null exclusions to test Can_Never_Be_Null on the anonymous access types
12274 of the formals rather than testing the formals themselves. Exclude this
12275 check in cases where the Old_Formal is marked as a controlling formal,
12276 to avoid issuing spurious errors for bodies completing dispatching
12277 operations (due to the flag not getting set on controlling access
12278 formals in body specs).
12279 (Find_Corresponding_Spec): When checking full and subtype conformance of
12280 subprogram bodies in instances, pass Designated and E in that order, for
12281 consistency with the expected order of the formals (New_Id followed by
12282 Old_Id).
12283
122842011-08-02 Robert Dewar <dewar@adacore.com>
12285
12286 * sem_ch8.adb: Minor reformatting.
12287
1138cf59
AC
122882011-08-02 Ed Schonberg <schonberg@adacore.com>
12289
12290 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12291 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12292 primitive operations of class-wide actuals.
12293
122942011-08-02 Javier Miranda <miranda@adacore.com>
12295
12296 * exp_atag.ads, exp_atag.adb
12297 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12298 since its value is implicitly passed in argument Typ.
12299 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12300 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12301 Build_Common_Dispatching_Select_Statements.
12302
7b9db926
RD
123032011-08-02 Robert Dewar <dewar@adacore.com>
12304
12305 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12306 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12307 Minor reformatting.
12308
e8374e7a
AC
123092011-08-02 Robert Dewar <dewar@adacore.com>
12310
12311 * sem_res.adb: Minor reformatting.
12312 * sem_prag.adb: Minor reformatting.
12313
123142011-08-02 Javier Miranda <miranda@adacore.com>
12315
12316 * exp_atag.adb, exp_atags.ads
12317 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12318 by the tagged type Entity. Required to use this routine in the VM
12319 targets since we do not have available the Tag entity in the VM
12320 platforms.
12321 * exp_ch6.adb
12322 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12323 Ada.Tags has not been previously loaded.
12324 * exp_ch7.adb
12325 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12326 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12327 * sem_aux.adb
12328 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12329 view of enclosing scopes. Required to handle enclosing scopes that
12330 are synchronized types whose full view is a task type.
12331 * exp_disp.adb
12332 (Build_VM_TSDs): Minor code improvement to avoid generating and
12333 analyzing lists with empty nodes.
12334 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12335 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12336 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12337 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12338 (Make_Select_Specific_Data_Table): Add support for VM targets.
12339 (Make_VM_TSD): Generate code to initialize the SSD structure of
12340 the TSD.
12341
123422011-08-02 Yannick Moy <moy@adacore.com>
12343
12344 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12345 cross-references section in ALI.
12346 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12347 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12348 Sub).
12349 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12350 subprogram or package entity of a node
12351 (Is_Local_Reference_Type): new function returns True for references
12352 selected in local cross-references.
12353 (Lt): function extracted from Lt in Output_References
12354 (Write_Entity_Name): function extracted from Output_References
12355 (Generate_Definition): generate reference with type 'D' for definition
12356 of objects (object declaration and parameter specification), with
12357 appropriate locations and units, for use in local cross-references.
12358 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12359 references of type 'I' for initialization in object definition.
12360 (Output_References): move part of function Lt and procedure
12361 Write_Entity_Name outside of the body. Ignore references of types 'D'
12362 and 'I' introduced for local cross-references.
12363 (Output_Local_References): new procedure to output the local
12364 cross-references sections.
12365 (Lref_Entity_Status): new array defining whether an entity is a local
12366 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12367 with 'I' type when initialization expression is present.
12368 * get_scos.adb, get_scos.ads: Correct comments and typos
12369
1f6439e3
AC
123702011-08-02 Javier Miranda <miranda@adacore.com>
12371
12372 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12373 the JVM target.
12374 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12375 the JVM target.
12376 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12377 TSD support.
12378
123792011-08-02 Vincent Celier <celier@adacore.com>
12380
12381 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12382 (No_Space_Img): New function
12383 (Find_Excluded_Sources): When reading from a file, record the file name
12384 and the line number for each excluded source.
12385 (Mark_Excluded_Sources): When reporting an error, if the excluded
12386 sources were read from a file, include file name and line number in
12387 the error message.
12388
123892011-08-02 Ed Schonberg <schonberg@adacore.com>
12390
12391 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12392
ab027d28
RD
123932011-08-02 Robert Dewar <dewar@adacore.com>
12394
12395 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12396
b3b28b0c
JM
123972011-08-02 Javier Miranda <miranda@adacore.com>
12398
12399 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12400 generation of TSDs to the DOTNET compiler.
12401 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12402 generation of TSDs to the DOTNET compiler.
12403
9732e886
JM
124042011-08-02 Javier Miranda <miranda@adacore.com>
12405
12406 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12407 record of all the tagged types declared inside library level package
12408 declarations, library level package bodies or library level subprograms.
12409 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12410 associated with a given tagged type.
12411 (Build_VM_TSDs): New subprogram.
12412 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12413 compilation units that are subprograms.
12414 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12415 compilation units that are package bodies.
12416 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12417 units that are a package declaration or a package instantiation.
12418 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12419 reorganization to improve the error generated by the frontend when the
12420 function Ada.Tags.Secondary_Tag is not available.
12421 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12422 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12423
e526d0c7
AC
124242011-08-02 Javier Miranda <miranda@adacore.com>
12425
12426 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12427
124282011-08-02 Robert Dewar <dewar@adacore.com>
12429
12430 * s-imenne.ads: Minor reformatting.
12431
124322011-08-02 Robert Dewar <dewar@adacore.com>
12433
12434 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12435 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12436 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12437
124382011-08-02 Robert Dewar <dewar@adacore.com>
12439
12440 * einfo.ads (Materialize_Entity): Document this is only for renamings
12441 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12442 required debug information in the case where we transform the object
12443 declaration into a renaming declaration.
12444 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12445 object
12446 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12447 Materialize_Entity.
12448
5b1e6aca
RD
124492011-08-02 Robert Dewar <dewar@adacore.com>
12450
12451 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12452 Suppress_Init_Procs.
12453 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12454 Suppress_Initialization/Initialization_Suppressed.
12455 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12456 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12457 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12458 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12459
5ad4969d
RD
124602011-08-02 Robert Dewar <dewar@adacore.com>
12461
12462 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12463 Minor reformatting.
12464
8c4ee6f5
AC
124652011-08-02 Ed Schonberg <schonberg@adacore.com>
12466
12467 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12468 only have inheritable classwide pre/postconditions.
12469
124702011-08-02 Javier Miranda <miranda@adacore.com>
12471
12472 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12473 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12474 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12475 checks if the external tag of a type is the same as the external tag
12476 of some other declaration.
12477
0b3d16c0
AC
124782011-08-02 Thomas Quinot <quinot@adacore.com>
12479
12480 * s-taskin.ads: Minor reformatting.
12481
124822011-08-02 Emmanuel Briot <briot@adacore.com>
12483
12484 * g-comlin.adb (Display_Help): swap the order in which it prints the
12485 short help and the general usage.
12486
124872011-08-02 Ed Schonberg <schonberg@adacore.com>
12488
12489 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12490 the aspect declarations and attach them to the generic copy for
12491 subsequent analysis.
12492 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12493 declarations of the generic tree to the new subprogram declarations.
12494 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12495 conditions that apply to a subprogram instance.
12496
124972011-08-02 Robert Dewar <dewar@adacore.com>
12498
12499 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12500
125012011-08-02 Ed Schonberg <schonberg@adacore.com>
12502
12503 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12504 private type with a tagged full view is not derived in the immediate
12505 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12506
4637729f
AC
125072011-08-02 Robert Dewar <dewar@adacore.com>
12508
12509 * exp_ch4.adb: Minor reformatting.
12510
125112011-08-02 Ed Schonberg <schonberg@adacore.com>
12512
12513 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12514 Ada2012 iterator, the loop will be rewritten during expansion into a
12515 while loop with a cursor and an element declaration. Do not analyze the
12516 body in this case, because if the container is for indefinite types the
12517 actual subtype of the elements will only be determined when the cursor
12518 declaration is analyzed.
12519
125202011-08-02 Arnaud Charlet <charlet@adacore.com>
12521
12522 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12523 size/alignment related attributes in CodePeer_Mode.
12524
125252011-08-02 Gary Dismukes <dismukes@adacore.com>
12526
12527 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12528 Prepend_Element, since this can result in the operation getting the
12529 wrong slot in the full type's dispatch table if the full type has
12530 inherited operations. The incomplete type's operation will get added
12531 to the proper position in the full type's primitives
12532 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12533 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12534 dispatching operations, since there are cases where nonprimitive
12535 subprograms can get added to the list of incomplete dependents (such
12536 as subprograms in nested packages).
12537 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12538 private part when determining whether to add a primitive with a
12539 parameter of a tagged incomplete type to the Private_Dependents list.
12540 Such primitives can also occur in the visible part, and should not have
12541 been excluded from being private dependents.
12542 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12543 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12544 list of a Taft-amendment incomplete type is a primitive before issuing
12545 an error that the full type must appear in the same unit. There are
12546 cases where nonprimitives can be in the list (such as subprograms in
12547 nested packages).
12548 * sem_disp.adb (Derives_From): Use correct condition for checking that
12549 a formal's type is derived from the type of the corresponding formal in
12550 the parent subprogram (the condition was completely wrong). Add
12551 checking that was missing for controlling result types being derived
12552 from the result type of the parent operation.
12553
4c60de0c
YM
125542011-08-02 Yannick Moy <moy@adacore.com>
12555
12556 * errout.adb (First_Node): minor renaming
12557 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12558 first node.
12559
f5afb270
AC
125602011-08-02 Yannick Moy <moy@adacore.com>
12561
12562 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12563 before accessing operands.
12564 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12565 decide whether an initialization expression respects SPARK rules, as
12566 the plain node is the expanded one. This allows for more valid warnings
12567 to be issued.
12568 * gnat_rm.texi: Minor update.
12569
125702011-08-02 Arnaud Charlet <charlet@adacore.com>
12571
12572 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12573 previous change.
12574
125752011-08-02 Robert Dewar <dewar@adacore.com>
12576
12577 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12578
125792011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12580
12581 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12582 loop statements and the element renaming declaration with a block when
12583 the element type is controlled.
12584
125852011-08-02 Yannick Moy <moy@adacore.com>
12586
12587 * sinfo.ads: Minor formatting.
12588
125892011-08-02 Ed Schonberg <schonberg@adacore.com>
12590
12591 * sem_aggr.adb (Add_Association): if the association has a box and no
12592 expression, use the Sloc of the aggregate itself for the new
12593 association.
12594 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12595 the Original_Node.
12596
db72f10a
AC
125972011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12598
12599 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12600 When a container is provided via a function call, generate a renaming
12601 of the function result. This avoids the creation of a transient scope
12602 and the premature finalization of the container.
12603 * exp_ch7.adb (Is_Container_Cursor): Removed.
12604 (Wrap_Transient_Declaration): Remove the supression of the finalization
12605 of the list controller when the declaration denotes a container cursor,
12606 it is not needed.
12607
126082011-08-02 Yannick Moy <moy@adacore.com>
12609
12610 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12611 node is from source, instead of the original node being from source.
12612 * sem_aggr.adb
12613 (Resolve_Array_Aggregate): refine the check for a static expression, to
12614 recognize also static ranges
12615 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12616 Array_Type_Declaration): postpone the test for the type being a subtype
12617 mark after the type has been resolved, so that component-selection and
12618 expanded-name are discriminated.
12619 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12620 to distinguish the case of an iteration scheme, so that an error is
12621 issed on a non-static range in SPARK except in an iteration scheme.
12622 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12623 In_Iter_Schm = True.
12624 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12625 user-defined operators so that they are allowed in renaming
12626 * sem_ch8.adb
12627 (Find_Selected_Component): refine the check for prefixing of operators
12628 so that they are allowed in renaming. Move the checks for restrictions
12629 on selector name after analysis discriminated between
12630 component-selection and expanded-name.
12631 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12632 concatenation argument of string type if it is static.
12633 * sem_util.adb, sem_util.ads
12634 (Check_Later_Vs_Basic_Declarations): add a new function
12635 Is_Later_Declarative_Item to decice which declarations are allowed as
12636 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12637 mode, add that renamings are considered as later items.
12638 (Enclosing_Package): new function to return the enclosing package
12639 (Enter_Name): correct the rule for homonyms in SPARK
12640 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12641 from source (result of expansion) to avoid issuing wrong warnings.
12642
126432011-08-02 Ed Schonberg <schonberg@adacore.com>
12644
12645 * errout.adb: On anything but an expression First_Node returns its
12646 argument.
12647
23685ae6
AC
126482011-08-02 Pascal Obry <obry@adacore.com>
12649
12650 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12651
126522011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12653
12654 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12655 Set the associated loop as the related expression of internally
12656 generated cursors.
12657 * exp_ch7.adb (Is_Container_Cursor): New routine.
12658 (Wrap_Transient_Declaration): Supress the finalization of the list
12659 controller when the declaration denotes a container cursor.
12660
126612011-08-02 Yannick Moy <moy@adacore.com>
12662
12663 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12664 command line now.
12665 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12666 expression is a simple expression. This check cannot be performed in
12667 the semantics, so just drop it.
12668 (P_Index_Or_Discriminant_Constraint): move check that the index or
12669 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12670 semantics. Other cases were previously checked in the semantics.
12671 * par-ch4.adb (P_Name): move checks that a selector name is not
12672 character literal or an operator symbol to Find_Selected_Component in
12673 the semantics
12674 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12675 declarations are not placed after later declarations in a separate
12676 procedure in Sem_Util (possibly not the best choice?), to be used both
12677 during parsing, for Ada 83 mode, and during semantic analysis, for
12678 SPARK mode.
12679 * par-endh.adb (Check_End): move check that end label is not missing
12680 to Process_End_Label in the semantics
12681 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12682 the special case for SPARK restriction
12683 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12684 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12685 parameter Force to issue the error message even on internal node (used
12686 for generated end label). Call Check_Restriction to check when an error
12687 must be issued. In SPARK mode, issue an error message even if the
12688 restriction is not set.
12689 (Check_Restriction): new procedure with an additional out parameter to
12690 inform the caller that a message has been issued
12691 * sem_aggr.adb: Minor modification of message
12692 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12693 instead of issuing an error message directly
12694 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12695 declarations are not placed after later declarations, by calling
12696 Check_Later_Vs_Basic_Declarations
12697 (Analyze_Subtype_Declaration): move here the check that an index or
12698 discriminant constraint must be a subtype mark. Change the check that
12699 a subtype of String must start at one so that it works on subtype marks.
12700 * sem_ch4.adb (Analyze_Call): move here the check that a named
12701 association cannot follow a positional one in a call
12702 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12703 instead of issuing an error message directly
12704 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12705 selector name is not a character literal or an operator symbol. Move
12706 here the check that the prefix of an expanded name cannot be a
12707 subprogram or a loop statement.
12708 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12709 procedure called from parsing and semantics to check that basic
12710 declarations are not placed after later declarations
12711 (Process_End_Label): move here the check that end label is not missing
12712
127132011-08-02 Arnaud Charlet <charlet@adacore.com>
12714
12715 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12716 representation clause in codepeer mode, since it confuses CodePeer and
12717 does not bring useful info.
12718
127192011-08-02 Ed Falis <falis@adacore.com>
12720
12721 * init.c: initialize fp hw on MILS.
12722
127232011-08-02 Ed Schonberg <schonberg@adacore.com>
12724
12725 * errout.adb (First_Node): for bodies, return the node itself (small
12726 optimization). For other nodes, do not check source_unit if the node
12727 comes from Standard.
12728
d2d9cc22
AC
127292011-08-02 Robert Dewar <dewar@adacore.com>
12730
12731 * exp_ch3.adb: Minor comment additions.
12732 * sem_ch13.adb: Minor reformatting.
12733
127342011-08-02 Pascal Obry <obry@adacore.com>
12735
12736 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12737
a01b9df6
AC
127382011-08-02 Robert Dewar <dewar@adacore.com>
12739
12740 * sem_attr.adb: Minor reformatting.
12741
127422011-08-02 Robert Dewar <dewar@adacore.com>
12743
12744 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12745 (Has_Default_Component_Value): Removed
12746 * einfo.ads Comment updates
12747 (Has_Default_Aspect): Replaces Has_Default_Value
12748 (Has_Default_Component_Value): Removed
12749 * exp_ch13.adb
12750 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12751 * exp_ch3.adb
12752 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12753 (Get_Simple_Init_Val): Handle Default_Value aspect
12754 (Needs_Simple_Initialization): Handle Default_Value aspect
12755 * exp_ch3.ads: Needs_Simple_Initialization
12756 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12757 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12758 * sem_ch13.adb
12759 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12760 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12761 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12762
127632011-08-02 Ed Schonberg <schonberg@adacore.com>
12764
12765 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12766 package containing iteration primitives.
12767 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12768
75c90775
AC
127692011-08-02 Ed Schonberg <schonberg@adacore.com>
12770
12771 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12772 "of", pre-analyze expression in case it is a function call with
12773 finalization actions that must be placed ahead of the loop.
12774 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12775 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12776
127772011-08-02 Geert Bosch <bosch@adacore.com>
12778
12779 * cstand.adb (Create_Float_Types): Only consider C's long double for
12780 Long_Long_Float, in addition to double.
12781
ded8909b
AC
127822011-08-02 Robert Dewar <dewar@adacore.com>
12783
12784 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12785 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12786 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12787 Minor reformatting.
12788
127892011-08-02 Ed Schonberg <schonberg@adacore.com>
12790
12791 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12792 indexed component.
12793
127942011-08-02 Javier Miranda <miranda@adacore.com>
12795
12796 * einfo.ads, einfo.adb
12797 (Original_Access_Type): Move this attribute to Node26 since there was
12798 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12799 which causes conflicts and breaks the generation of the .NET compiler.
12800 (Interface_Name): Add missing documentation on JGNAT only uses of
12801 this attribute.
12802
70c34e1c
AC
128032011-08-02 Geert Bosch <bosch@adacore.com>
12804
12805 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12806 (Find_Back_End_Float_Type): Likewise
12807 (Create_Back_End_Float_Types): Likewise
12808 (Create_Float_Types): Likewise
12809 (Register_Float_Type): Likewise
12810 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12811 Nlist and split out type selection in new local Find_Base_Type function.
12812 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12813 Nlist
12814 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12815
128162011-08-02 Robert Dewar <dewar@adacore.com>
12817
12818 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12819 alpha order).
12820 * opt.ads: Minor comment change.
12821 * sem_ch12.adb: Minor code reorganization.
12822
b715bc59
AC
128232011-08-02 Gary Dismukes <dismukes@adacore.com>
12824
12825 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12826 subtype's list of rep items to the list on the full subtype in the case
12827 where the lists are the same.
12828
128292011-08-02 Geert Bosch <bosch@adacore.com>
12830
12831 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12832 using the one from System.Strings, which also deallocates all strings.
12833
002bdd68
AC
128342011-08-02 Geert Bosch <bosch@adacore.com>
12835
12836 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12837 function.
12838 * gcc-interface/Make-lang.in: Update dependencies.
12839
128402011-08-02 Olivier Hainque <hainque@adacore.com>
12841
12842 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12843 end_locus.
12844
499769ec
AC
128452011-08-02 Javier Miranda <miranda@adacore.com>
12846
12847 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12848 associated with anonymous access to subprograms.
12849
128502011-08-02 Geert Bosch <bosch@adacore.com>
12851
12852 * opt.ads
12853 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12854 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12855 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12856 (Add_Symbol_Definition): Move to switch-c.adb
12857 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12858 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12859 (Add_Symbol_Definition): Move to switch-c.adb.
12860 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12861 * sem_warn.adb
12862 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12863 Move to warnsw.adb.
12864 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12865 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12866 Move to warnsw.adb.
12867 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12868 (Add_Symbol_Definition): Moved from Prepcomp.
12869 * switch-c.ads: Update copyright notice. Use String_List instead of
12870 Argument_List, removing dependency on System.OS_Lib.
12871
aa1e353a
AC
128722011-08-02 Yannick Moy <moy@adacore.com>
12873
12874 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12875 mode on initialization expression which does not respect SPARK
12876 restrictions.
12877 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12878 if the tree referenced by its argument represents an initialization
12879 expression in SPARK, suitable for initializing an object in an object
12880 declaration.
12881
128822011-08-02 Javier Miranda <miranda@adacore.com>
12883
12884 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12885 internally generated access to subprogram with its associated protected
12886 subprogram type.
12887 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12888
15b682ca
GB
128892011-08-02 Geert Bosch <bosch@adacore.com>
12890
12891 * cstand.adb (Register_Float_Type): Print information about type to
12892 register, if the Debug_Flag_Dot_B is set.
12893 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12894 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12895 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12896 with a requested precision of more than Max_Digits digits and no more
12897 than Max_Base_Digits digits, if a range specification is present and the
12898 Predefined_Float_Types list has a suitable type to derive from.
12899 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12900 case of type completion with pragma Import
12901 * sem_prag.adb
12902 (Process_Import_Predefined_Type): Processing to complete a type
12903 with pragma Import. Currently supports floating point types only.
12904 (Set_Convention_From_Pragma): Do nothing without underlying type.
12905 (Process_Convention): Guard against absence of underlying type,
12906 which may happen when importing incomplete types.
12907 (Process_Import_Or_Interface): Handle case of importing predefined
12908 types. Tweak error message.
12909
f8726f2b
AC
129102011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12911
12912 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12913 functions to previous change. Reorganize code slightly.
12914
129152011-08-02 Geert Bosch <bosch@adacore.com>
12916
12917 * back_end.ads (Register_Type_Proc): New call back procedure type for
12918 allowing the back end to provide information about available types.
12919 (Register_Back_End_Types): New procedure to register back end types.
12920 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12921 available types.
12922 * cstand.adb (Back_End_Float_Types): New list for floating point types
12923 supported by the back end.
12924 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12925 (Copy_Float_Type): New procedure to make new copies of predefined types.
12926 (Register_Float_Type): New call back procedure to populate the BEFT list
12927 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12928 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12929 (Create_Float_Types): New procedure to create entities for floating
12930 point types predefined in Standard, and put these and any remaining
12931 BEFTs on the Predefined_Float_Types list.
12932 * stand.ads (Predefined_Float_Types): New list for predefined floating
12933 point types that do not have declarations in package Standard.
12934
feecad68
AC
129352011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12936
12937 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12938 entity node for the unit containing the parameter.
12939 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12940 (Add_Inlined_Subprogram): Likewise.
12941 * gcc-interface/Make-lang.in: Update dependencies.
12942
129432011-08-02 Thomas Quinot <quinot@adacore.com>
12944
12945 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12946 suitable value.
12947
12f0c50c
AC
129482011-08-02 Geert Bosch <bosch@adacore.com>
12949
12950 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12951
129522011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12953
12954 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12955 computed value of Base_Type.
12956
129572011-08-02 Yannick Moy <moy@adacore.com>
12958
12959 * restrict.adb (Check_Restriction): issue an error for any use of
12960 class-wide, even if the No_Dispatch restriction is not set.
12961 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12962 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12963 when completing a private extension, the type named in the private part
12964 is not the same as that named in the visible part.
12965 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12966 of an inherited primitive operations of a tagged type or type extension
12967 that returns the tagged type.
12968 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12969 function which returns True for an implicit operation inherited by the
12970 derived type declaration for the argument type.
12971 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12972 order.
12973
fb86fe11
ES
129742011-08-02 Ed Schonberg <schonberg@adacore.com>
12975
12976 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12977 Process_Bounds, to perform analysis with expansion of a range or an
12978 expression that is the iteration scheme for a loop.
12979 (Analyze_Iterator_Specification): If domain of iteration is given by a
12980 function call with a controlled result, as is the case if call returns
12981 a predefined container, ensure that finalization actions are properly
12982 generated.
12983 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12984
62be5d0a
JM
129852011-08-02 Javier Miranda <miranda@adacore.com>
12986
12987 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12988 * gcc-interface/Make-lang.in: Update dependencies.
12989
129902011-08-02 Javier Miranda <miranda@adacore.com>
12991
12992 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12993 determine if the analysis is performed using N or Original_Node (N).
12994 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12995 functionality of routine Is_Variable avoids code duplication.
12996 * checks.adb (Determine_Range): Handle temporaries generated by
12997 Remove_Side_Effects.
12998
129992011-08-02 Javier Miranda <miranda@adacore.com>
13000
13001 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13002 expansion of the condition. Required since the previous analysis was
13003 done with expansion disabled (see Resolve_Quantified_Expression) and
13004 hence checks were not inserted and record comparisons have not been
13005 expanded.
13006
a20f4389
AC
130072011-08-02 Ed Falis <falis@adacore.com>
13008
13009 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13010 Update header.
13011
130122011-08-02 Bob Duff <duff@adacore.com>
13013
13014 * opt.ads: Minor comment fix.
13015
130162011-08-02 Bob Duff <duff@adacore.com>
13017
13018 * sem_ch12.adb (Analyze_Package_Instantiation,
13019 Analyze_Subprogram_Instantiation): Turn off style checking while
13020 analyzing an instance. Whatever style checks that apply to the generic
13021 unit should apply, so it makes no sense to apply them in an instance.
13022 This was causing trouble when compiling an instance of a runtime
13023 unit that violates the -gnatyO switch.
13024 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13025 one of the two case statements, causing spurious errors.
13026
130272011-08-02 Robert Dewar <dewar@adacore.com>
13028
13029 * uname.adb: Minor reformatting.
13030 * gnatcmd.adb: Minor reformatting.
13031 * exp_attr.adb: Minor reformatting.
13032
90878b12
AC
130332011-08-02 Ed Schonberg <schonberg@adacore.com>
13034
13035 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13036 No_Dispatching_Calls, do not look for the Assign primitive, because
13037 predefined primitives are not created in this case.
13038
130392011-08-02 Bob Duff <duff@adacore.com>
13040
13041 * stylesw.ads: Minor comment fixes.
13042
130432011-08-02 Robert Dewar <dewar@adacore.com>
13044
13045 * freeze.adb (Add_To_Result): New procedure.
13046
130472011-08-02 Jose Ruiz <ruiz@adacore.com>
13048
13049 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13050 time, if the specific run-time routines for handling streams of strings
13051 are not available, use the default mechanism.
13052
130532011-08-02 Arnaud Charlet <charlet@adacore.com>
13054
13055 * s-regpat.ads: Fix typo.
13056
130572011-08-02 Vincent Celier <celier@adacore.com>
13058
13059 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13060 not null, call it to create the in memory config project file without
13061 parsing an existing default config project file.
13062
130632011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13064
13065 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13066
130672011-08-02 Ed Schonberg <schonberg@adacore.com>
13068
13069 * sem_elim.adb: an abstract subprogram does not need an eliminate
13070 pragma for its descendant to be eliminable.
13071
130722011-08-02 Ed Falis <falis@adacore.com>
13073
13074 * init.c: revert to handling before previous checkin for VxWorks
13075 * s-intman-vxworks.adb: delete unnecessary declarations related to
13076 using Ada interrupt facilities for handling signals.
13077 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13078 * s-intman-vxworks.ads: Import __gnat_install_handler as
13079 Initialize_Interrupts.
13080 * s-taprop-vxworks.adb: Delete Signal_Mask.
13081 (Abort_Handler): change construction of mask to unblock exception
13082 signals.
13083
273adcdf
AC
130842011-08-02 Jerome Guitton <guitton@adacore.com>
13085
13086 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13087 Debug_Raise_Exception before propagation starts.
13088
130892011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13090
13091 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13092 to Restriction_Check_Required.
13093 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13094 * sem_res.adb (Resolve_Call): Likewise.
13095 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13096
130972011-08-02 Bob Duff <duff@adacore.com>
13098
13099 * stylesw.ads: Update comment.
13100 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13101 * errout.ads: Remove obsolete comment.
13102
131032011-08-02 Javier Miranda <miranda@adacore.com>
13104
13105 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13106 (Set_Is_Safe_To_Reevaluate): new procedure.
13107 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13108 assignment is allowed on safe-to-reevaluate variables.
13109 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13110 temporary created to remove side effects in expressions that use
13111 the secondary stack as safe-to-reevaluate.
13112 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13113 variables that are not true constants.
13114
6320f5e1
AC
131152011-08-02 Robert Dewar <dewar@adacore.com>
13116
13117 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13118 sem_res.adb, sem_ch6.adb: Minor reformatting.
13119
131202011-08-02 Jerome Guitton <guitton@adacore.com>
13121
13122 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13123
2fe829ae
ES
131242011-08-02 Ed Schonberg <schonberg@adacore.com>
13125
13126 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13127 not set Overridden_Operation if subprogram is an initialization
13128 procedure.
13129
e24329cd
YM
131302011-08-02 Yannick Moy <moy@adacore.com>
13131
13132 * par-ch6.adb: Correct obsolete name in comments
13133 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13134 which takes two message arguments (existing function takes one), with
13135 second message used for continuation.
13136 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13137 block statements that originate from a source block statement, not
13138 generated block statements
13139 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13140 symmetry with procedure case
13141 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13142 function to issue an error in formal mode if a package specification
13143 contains more than one tagged type or type extension.
13144 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13145 parameters matching formals of tagged types are objects (or ancestor
13146 type conversions of objects), not general expressions. Issue an error
13147 on view conversions that are not involving ancestor conversion of an
13148 extended type.
13149 (Resolve_Type_Conversion): in formal mode, issue an error on the
13150 operand of an ancestor type conversion which is not an object
13151 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13152 procedure so that it works also for actuals of function calls
13153 (Is_Actual_Tagged_Parameter): new function which determines if its
13154 argument is an actual parameter of a formal of tagged type in a
13155 subprogram call
13156 (Is_SPARK_Object_Reference): new function which determines if the tree
13157 referenced by its argument represents an object in SPARK
13158
176dadf6
AC
131592011-08-02 Robert Dewar <dewar@adacore.com>
13160
13161 * sem_ch3.adb: Minor reformatting
13162 Minor comment addition
13163 Minor error msg text change
13164
131652011-08-02 Javier Miranda <miranda@adacore.com>
13166
13167 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13168 function. Used to be more precise when we generate a variable plus one
13169 assignment to remove side effects in the evaluation of the Bound
13170 expressions.
13171 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13172 of the bound expression to force its re-analysis and thus expand the
13173 associated transient scope (if required). Code cleanup replacing the
13174 previous code that declared the constant entity by an invocation to
13175 routine Force_Evaluation which centralizes this work in the frontend.
13176
d8b962d8
AC
131772011-08-02 Robert Dewar <dewar@adacore.com>
13178
13179 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13180 (Base_Type): Now uses improved Is_Base_Type function
13181 * einfo.ads (Base_Type): Inline this function
13182
131832011-08-02 Robert Dewar <dewar@adacore.com>
13184
13185 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13186 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13187
131882011-08-02 Arnaud Charlet <charlet@adacore.com>
13189
13190 * gcc-interface/Make-lang.in: Update dependencies.
13191 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13192 targets.
13193
131942011-08-02 Yannick Moy <moy@adacore.com>
13195
13196 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13197 non-simple expression used in delta constraint
13198 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13199 index constraint which is not a subtype mark
13200 * par.adb: With and use Restrict
13201 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13202 mode on component type which is not a subtype mark and default
13203 expression on component
13204 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13205 of string which does not have a lower index bound equal to 1
13206 (Array_Type_Declaration): issue an error in formal mode on index or
13207 component type which is not a subtype mark, and on aliased keyword on
13208 component
13209 (Derived_Type_Declaration): issue an error in formal mode on interface,
13210 limited or abstract type
13211 (Record_Type_Declaration): issue an error in formal mode on interface
13212 (Record_Type_Definition): issue an error in formal mode on tagged types
13213 and type extensions not declared in the specification of a library unit
13214 package; on null non-tagged record; on variant part
13215
132162011-08-02 Vincent Celier <celier@adacore.com>
13217
13218 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13219 not declared for qualified library project when Library_Name is not
13220 declared, but Library_Dir is.
13221
132222011-08-02 Robert Dewar <dewar@adacore.com>
13223
13224 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13225 pragmas (affects aspects [Component_]Default_Value
13226 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13227 component type for the resolution
13228
f96b2d85
AC
132292011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13230
13231 * einfo.adb (Base_Type): Tune implementation for speed.
13232
132332011-08-02 Robert Dewar <dewar@adacore.com>
13234
13235 * freeze.adb: Minor reformatting.
13236
8b3c6430
AC
132372011-08-02 Thomas Quinot <quinot@adacore.com>
13238
13239 * scos.ads: Update comments.
13240
132412011-08-02 Ed Schonberg <schonberg@adacore.com>
13242
13243 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13244 base type, because the parent may be a subtype of a private type whose
13245 convention is established in a private part.
13246
132472011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13248
13249 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13250 statement in a block when the expansion of the return expression has
13251 created a finalization chain.
13252 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13253 with the parent node.
13254 Add N_Extended_Return_Statement to handle the case where a transient
13255 object declaration appears in the Return_Object_Declarations list of
13256 an extended return statement.
13257
132582011-08-02 Matthew Gingell <gingell@adacore.com>
13259
13260 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13261 unused parameter 'name'.
13262
132632011-08-02 Ed Schonberg <schonberg@adacore.com>
13264
13265 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13266 inherited operation, check whether its alias, which is the source
13267 operastion that it renames, has been marked eliminated.
13268
cae81f17
JM
132692011-08-02 Javier Miranda <miranda@adacore.com>
13270
13271 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13272 in-mode parameter whose type is an access type since it can be used to
13273 modify its designated object. Enforce code that handles as safe an
13274 access type that is not access-to-constant but it is the result of a
13275 previous removal of side-effects.
13276 (Remove_Side_Effects): Minor code reorganization of cases which require
13277 no action. Done to incorporate documentation on new cases uncovered
13278 working in this ticket: no action needed if this routine was invoked
13279 too early and the nodes are not yet decorated.
13280 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13281 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13282 were issued with actuals that are implicitly provided by
13283 Force_Evaluation.
13284
218e6dee
RD
132852011-08-02 Robert Dewar <dewar@adacore.com>
13286
13287 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13288
7a489a2b
AC
132892011-08-02 Yannick Moy <moy@adacore.com>
13290
13291 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13292 to issue an error in formal mode on attribute not supported in this mode
13293 (Analyze_Attribute): issue errors on standard attributes not supported
13294 in formal mode.
13295 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13296 comment, and issue error in formal mode on modulus which is not a power
13297 of 2.
13298 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13299 range.
13300 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13301 subtype mark.
13302 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13303 operator on modular type (except 'not').
13304
133052011-08-02 Robert Dewar <dewar@adacore.com>
13306
13307 * gnat_rm.texi: Minor reformatting.
13308
cb7fa356
AC
133092011-08-02 Arnaud Charlet <charlet@adacore.com>
13310
13311 * s-osinte-linux.ads: Minor comment update and reformatting.
13312 * i-cexten.ads: Make this unit pure, as for its parent.
13313 Will allow its usage in more contexts if needed.
13314
133152011-08-02 Robert Dewar <dewar@adacore.com>
13316
13317 * s-utf_32.ads: Minor comment fix.
13318
133192011-08-02 Ed Schonberg <schonberg@adacore.com>
13320
13321 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13322 operation of a tagged synchronized type, handle the case where the
13323 controlling argument is overloaded.
13324
133252011-08-02 Yannick Moy <moy@adacore.com>
13326
13327 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13328 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13329 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13330 SPARK mode and formal verification mode on processing SPARK restriction
13331 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13332 requiring consistency checking.
13333
5cc9353d
RD
133342011-08-02 Robert Dewar <dewar@adacore.com>
13335
13336 * sem_res.adb: Minor reformatting.
13337
e51537ff
RD
133382011-08-02 Robert Dewar <dewar@adacore.com>
13339
13340 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13341 a-cforse.ads: Remove unneeded with of Ada.Containers
13342 Remove commented out pragma Inline's
13343 Move specifications of new subprograms to the actual specs
13344
83fa09c5
AC
133452011-08-02 Yannick Moy <moy@adacore.com>
13346
13347 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13348 a-cforse.ads: Update comments.
13349
133502011-08-02 Ed Schonberg <schonberg@adacore.com>
13351
13352 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13353
d11cfaf8
RD
133542011-08-02 Robert Dewar <dewar@adacore.com>
13355
13356 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13357 a-cforse.ads, a-cofove.ads: Minor reformatting.
13358
300b98bb
AC
133592011-08-02 Claire Dross <dross@adacore.com>
13360
13361 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13362 a-cofove.ads: Add comments.
13363
133642011-08-02 Yannick Moy <moy@adacore.com>
13365
13366 * gnat_rm.texi: Document formal containers.
13367
133682011-08-02 Emmanuel Briot <briot@adacore.com>
13369
13370 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13371 are empty sections.
13372
19fb051c
AC
133732011-08-02 Robert Dewar <dewar@adacore.com>
13374
13375 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13376 reformatting.
13377
133782011-08-02 Robert Dewar <dewar@adacore.com>
13379
13380 * aspects.adb: New aspects Default_Value and Default_Component_Value
13381 New format of Aspect_Names table checks for omitted entries
13382 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13383 handling of boolean aspects for derived types.
13384 New aspects Default_Value and Default_Component_Value
13385 New format of Aspect_Names table checks for omitted entries
13386 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13387 (Has_Default_Value): New flag
13388 (Has_Default_Component_Value): New flag
13389 (Has_Default_Value): New flag
13390 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13391 table.
13392 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13393 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13394 Default_Value and Default_Component_Value
13395 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13396 New aspects Default_Value and Default_Component_Value
13397 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13398 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13399
134002011-08-02 Vincent Celier <celier@adacore.com>
13401
13402 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13403 inherit library kind.
13404
134052011-08-02 Ed Schonberg <schonberg@adacore.com>
13406
13407 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13408 Minor reformatting.
13409
134102011-08-02 Robert Dewar <dewar@adacore.com>
13411
13412 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13413
5f7747af
AC
134142011-08-02 Yannick Moy <moy@adacore.com>
13415
13416 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13417
134182011-08-02 Robert Dewar <dewar@adacore.com>
13419
13420 * impunit.adb: Add comment.
13421
a5fe697b
AC
134222011-08-02 Yannick Moy <moy@adacore.com>
13423
13424 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13425 qualification of aggregates in formal mode
13426 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13427 another aggregate
13428 (Resolve_Aggregate): complete the test that an aggregate is adequately
13429 qualified in formal mode
13430
134312011-08-02 Pascal Obry <obry@adacore.com>
13432
13433 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13434 * mlib-prj.adb: Supress warning when compiling binder generated file.
13435 (Build_Library): Supress all warnings when compiling the binder
13436 generated file.
13437
bd65a2d7 134382011-08-02 Yannick Moy <moy@adacore.com>
d4487611 13439
bd65a2d7
AC
13440 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13441 from here...
13442 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13443 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13444 Add with/use clauses to make Check_Formal_Restriction visible
13445
134462011-08-02 Ed Schonberg <schonberg@adacore.com>
13447
13448 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13449 in-parameters when type of the generic formal is private in the generic
13450 spec and non-private in the body.
13451
134522011-08-02 Claire Dross <dross@adacore.com>
13453
13454 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13455 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13456 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13457 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
13458
134592011-08-02 Robert Dewar <dewar@adacore.com>
13460
13461 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13462 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13463
bd434b3f
YM
134642011-08-02 Yannick Moy <moy@adacore.com>
13465
13466 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13467 formal mode
13468 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13469 matching static array bounds, taking into account the special case of
13470 string literals
13471 * sem_ch3.adb: Typo in comment.
13472
fe5d3068
YM
134732011-08-02 Yannick Moy <moy@adacore.com>
13474
13475 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13476 which issues an error in formal mode if its argument node is originally
13477 from source
13478 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13479 has a discriminant specification so that it does not include the case
13480 of derived types
13481 (Derived_Type_Declaration): move here the test that a derived type has a
13482 discriminant specification
13483 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13484 first element of a component association before accessing its choices
13485 (presence of component association is not enough)
13486 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13487 declaration is a library item before accessing the next element in a
13488 list, as library items are not member of lists
13489 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13490 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13491 Check_Formal_Restriction whenever possible.
13492
b60a3f26
AC
134932011-08-02 Ed Schonberg <schonberg@adacore.com>
13494
13495 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13496 reference when needed.
13497
134982011-08-02 Bob Duff <duff@adacore.com>
13499
13500 * gnat_ugn.texi: Fix typo.
13501
135022011-08-02 Vincent Celier <celier@adacore.com>
13503
13504 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13505 archive file name. Do not use the full path name of archives for Open
13506 VMS.
13507
eaba57fb
RD
135082011-08-02 Robert Dewar <dewar@adacore.com>
13509
13510 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13511 Analyze_Aspect_Specifications
13512 * sem_ch13.adb
13513 (Analyze_Aspect_Specifications): New handling for boolean aspects
13514 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13515 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13516 sequence for Analyze_Aspect_Specifications
13517 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13518 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13519
135202011-08-02 Robert Dewar <dewar@adacore.com>
13521
13522 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13523 aspects, since these no longer exist.
13524
135252011-08-02 Robert Dewar <dewar@adacore.com>
13526
13527 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13528 semicolon, do not try to see if there are aspects following it.
13529 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13530 aspect spec.
13531
8830d1d2
AC
135322011-08-02 Robert Dewar <dewar@adacore.com>
13533
13534 * sem_ch8.adb, aspects.ads: Minor reformatting.
13535
135362011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13537
13538 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13539 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13540 extracted from...
13541 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13542
7ff2d234
AC
135432011-08-02 Yannick Moy <moy@adacore.com>
13544
13545 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13546 mode on subprogram declaration outside of package specification, unless
13547 it is followed by a pragma Import
13548 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13549 Access_Type_Declaration): issue error in formal mode on access type
13550 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13551 incomplete type
13552 (Analyze_Object_Declaration): issue error in formal mode on object
13553 declaration which does not respect SPARK restrictions
13554 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13555 declaration which does not respect SPARK restrictions
13556 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13557 error in formal mode on digits or delta constraint
13558 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13559 decimal fixed point type
13560 (Derived_Type_Declaration): issue error in formal mode on derived type
13561 other than type extensions of tagged record types
13562 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13563 with check on access definition
13564 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13565 mode on protected definition.
13566 (Analyze_Task_Definition): issue error in formal mode on task definition
13567
135682011-08-02 Robert Dewar <dewar@adacore.com>
13569
13570 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13571
806f6d37
AC
135722011-08-02 Javier Miranda <miranda@adacore.com>
13573
13574 * sem_ch6.adb (Can_Override_Operator): New function.
13575 (Verify_Overriding_Indicator): Add missing code to check overriding
13576 indicator in operators. Fixes regression.
13577 (Check_Overriding_Indicator): Minor reformating after replacing the
13578 code that evaluates if the subprogram can override an operator by
13579 invocations to the above new function.
13580 * einfo.adb
13581 (Write_Field26_Name): Add missing code to ensure that, following
13582 the documentation in einfo.ads, this field is not shown as attribute
13583 "Static_Initialization" on non-dispatching functions.
13584
135852011-08-02 Jose Ruiz <ruiz@adacore.com>
13586
13587 * sem_res.adb (Resolve_Call): A call to
13588 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13589 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13590 i.e., when the second parameter is of type Time_Span.
13591
135922011-08-02 Vincent Celier <celier@adacore.com>
13593
13594 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13595 with an archive instead of -L<library dir> -l<library name>.
13596
135972011-08-02 Ed Schonberg <schonberg@adacore.com>
13598
13599 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13600 mark the base types In_Use in addition to making the operations
13601 use_visible.
13602
136032011-08-02 Ed Falis <falis@adacore.com>
13604
13605 * init.c: add and setup __gnat_signal_mask for the exception signals
13606 * s-inmaop-vxworks.adb: new file.
13607 * s-intman-vxworks.adb: remove unnecessary initializations and
13608 simplify remaining
13609 * s-intman-vxworks.ads: remove unnecessary variable
13610 * s-taprop-vxworks.adb: simplify signal initialization
13611
780d052e
RD
136122011-08-02 Robert Dewar <dewar@adacore.com>
13613
13614 * sem_ch8.adb: Minor code reorganization, comment updates.
13615
136162011-08-02 Robert Dewar <dewar@adacore.com>
13617
13618 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13619 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13620 here from Sem_Res.
13621 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13622 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13623
29efbb8c
ES
136242011-08-02 Ed Schonberg <schonberg@adacore.com>
13625
13626 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13627 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13628 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13629 use_type_clauses, to handle more efficiently use_type and use_all_type
13630 constructs.
13631 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13632 Ada2012 Use_All_Type clause.
13633 (Use_Class_Wide_Operations): new procedure.
13634
b0186f71
AC
136352011-08-02 Robert Dewar <dewar@adacore.com>
13636
13637 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13638 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13639 expression to expression function.
13640
136412011-08-02 Ed Schonberg <schonberg@adacore.com>
13642
13643 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13644 if types are compatible.
13645
136462011-08-02 Yannick Moy <moy@adacore.com>
13647
13648 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13649 returns True if its argument array types have same dimension and same
13650 static bounds at each index.
13651 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13652 OUT or IN OUT paramaters which are not view conversions in SPARK.
13653 (Resolve_Arithmetic_Op): issue an error in formal mode on
13654 multiplication or division with operands of fixed point types which are
13655 not qualified or explicitly converted.
13656 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13657 Boolean or array type (except String) operands.
13658 (Resolve_Equality_Op): issue an error in formal mode on equality
13659 operators for array types other than String with non-matching static
13660 bounds.
13661 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13662 for array types with non-matching static bounds. Factorize the code in
13663 Matching_Static_Array_Bounds.
13664 (Resolve_Qualified_Expression): issue an error in formal mode on
13665 qualified expressions for array types with non-matching static bounds.
13666 (Resolve_Type_Conversion): issue an error in formal mode on type
13667 conversion for array types with non-matching static bounds
13668
767bb4e8
AC
136692011-08-02 Robert Dewar <dewar@adacore.com>
13670
13671 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13672
136732011-08-02 Ed Schonberg <schonberg@adacore.com>
13674
13675 * par-ch9.adb: save location of entry for proper error message.
13676
4ac2477e
JM
136772011-08-02 Javier Miranda <miranda@adacore.com>
13678
13679 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13680 (Use_Full_View) which permits this routine to climb through the
13681 ancestors using the full-view of private parents.
13682 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13683 Use_Full_View to true in calls to Is_Ancestor.
13684 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13685 true in call to Is_Ancestor.
13686 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13687 Use_Full_View to true in call to Is_Ancestor.
13688 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13689 call to Is_Ancestor.
13690 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13691 Use_Full_View to true in calls to Is_Ancestor.
13692 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13693 Make_Select_Specific_Data_Table, Register_Primitive,
13694 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13695 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13696 to true in call to Is_Ancestor.
13697 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13698 Use_Full_View to true in calls to Is_Ancestor.
13699 * exp_cg.adb
13700 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13701 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13702
9f90d123
AC
137032011-08-02 Robert Dewar <dewar@adacore.com>
13704
13705 * gnat_rm.texi: Minor reformatting.
13706 * sem_prag.adb: Minor reformatting.
13707
137082011-08-02 Tristan Gingold <gingold@adacore.com>
13709
13710 * vms_data.ads: Add VMS qualifier for -gnateP.
13711
137122011-08-02 Robert Dewar <dewar@adacore.com>
13713
13714 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13715 * par-ch7.adb (P_Package): Proper placement of aspects for package
13716 decl/instantiation.
13717 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13718 (End_Statements): Add Is_Sloc parameterr
13719 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13720 (Check_End): Ad Is_Sloc parameter
13721 (End_Statements): Add Is_Sloc parameterr
13722
137232011-08-02 Vincent Celier <celier@adacore.com>
13724
13725 * ug_words: Add VMS qualifier equivalent to -gnateP:
13726 /SYMBOL_PREPROCESSING.
13727
137282011-08-02 Jose Ruiz <ruiz@adacore.com>
13729
13730 * gnat-style.texi: For hexadecimal numeric literals the typical
13731 grouping of digits is 4 to represent 2 bytes.
13732 A procedure spec which is split into several lines is indented two
13733 characters.
13734
137352011-08-02 Yannick Moy <moy@adacore.com>
13736
13737 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13738 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13739 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13740 properly qualified
13741 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13742 choice in array aggregate
13743 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13744 mark as ancestor
13745 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13746 positional and named aggregate for record, or others in record
13747 aggregate, or multiple choice in record aggregate
13748 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13749 array operands to logical operations AND, OR and XOR do not have the
13750 same static lower and higher bounds
13751 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13752
2933b16c
RD
137532011-08-01 Robert Dewar <dewar@adacore.com>
13754
13755 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13756 Replaces Last_Source_Node_In_Sequence.
13757 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13758 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13759 parens and blank in string (this was inconsistently implemented).
13760 * errout.ads
13761 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13762 blank in string (this was inconsistently implemented).
13763 * gnat1drv.adb
13764 (Set_Global_Switches): Set formal mode switches appropriately
13765 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13766 * par-prag.adb
13767 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13768 call Set_Error_Msg_Lang to set "spark" as language name.
13769 * par.adb: Remove unnecessary call to set formal language for errout
13770 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13771 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13772 name.
13773 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13774 calls to it, moved after resolution so that types are known
13775 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13776 result of concatenation is not of type String
13777 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13778 concatenation is not properly restricted
13779 * gnat_rm.texi: Add doc on pragma Spark_95.
13780 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13781 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13782 * gcc-interface/Make-lang.in: Update dependencies.
13783
05dbd302
AC
137842011-08-01 Javier Miranda <miranda@adacore.com>
13785
13786 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13787 condition that detects if the overridden operation must replace an
13788 existing entity.
13789
137902011-08-01 Javier Miranda <miranda@adacore.com>
13791
13792 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13793 code declarations inserted by Insert_Actions in each alternative of the
13794 N_Case_Expression node.
13795
137962011-08-01 Robert Dewar <dewar@adacore.com>
13797
13798 * sem_ch6.adb: Minor code reorganization.
13799 * sem_util.adb: Minor reformatting.
13800
af9e051f
PO
138012011-08-01 Pascal Obry <obry@adacore.com>
13802
13803 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13804 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13805
1d801f21
AC
138062011-08-01 Yannick Moy <moy@adacore.com>
13807
13808 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13809 literal or operator symbol which is prefixed
13810 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13811 mode on access attributes.
13812 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13813 that concatenation operands are properly restricted in formal mode
13814 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13815 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13816 result of the concatenation has a type different from String.
13817 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13818 Analyze_Quantified_Expression, Analyze_Slice,
13819 Analyze_Null): issue an error in formal mode on unsupported constructs
13820 * sem_ch5.adb
13821 (Analyze_Block_Statement): only issue error on source block statement
13822 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13823 function which returns the last node in a list of nodes for which
13824 Comes_From_Source returns True, if any
13825 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13826 Last_Source_Node_In_Sequence
13827 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13828 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13829 mode on unsupported constructs
13830 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13831 rest of the actions may be needed later on since the error is marked as
13832 not serious.
13833 * sinfo.ads: Typos in comments.
13834
138352011-08-01 Pascal Obry <obry@adacore.com>
13836
13837 * projects.texi: Minor editing.
13838
53beff22
YM
138392011-08-01 Yannick Moy <moy@adacore.com>
13840
13841 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13842 insertion character ~~
13843 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13844 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13845 with insertion character ~~
13846 (Set_Msg_Text): treat insertion character ~~
13847 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13848 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13849 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13850 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13851 errors related to the formal language restriction not serious
13852 (insertion character |).
13853 * par.adb (Par): set formal language for error messages if needed
13854 * sem_ch6.adb (Check_Missing_Return): take into account possible
13855 generated statements at the end of the function
13856 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13857 enumeration value to define a new pragma SPARK_95
13858 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13859 SPARK_Version): new type and variables to store the SPARK version
13860 (none by default).
13861 (SPARK_Mode): return True when SPARK_Version is set
13862 * par-prag.adb: Correct indentation
13863 (Prag): take Pragma_SPARK_95 into account
13864 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13865 into account.
13866
8d606a78
RD
138672011-08-01 Robert Dewar <dewar@adacore.com>
13868
13869 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13870 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13871 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13872
1982d5a8
PO
138732011-08-01 Pascal Obry <obry@adacore.com>
13874
13875 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13876 Target_Name to Get_Path call.
13877 (Parse_Single_Project): Likewise.
13878 (Post_Parse_Context_Clause): Likewise.
13879 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13880 Call Initialise_Project_Path with the proper Target_Name.
13881 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13882 search path.
13883 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13884 with the proper Target_Name.
13885 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13886 Part.Parse routine.
13887 (Parse_Project_And_Apply_Config): Likewise.
13888 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13889 This is fine as this part of the code is supporting only native
13890 compilation.
13891 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13892 is fine as this part of the code is supporting only native compilation.
13893
0d53d36b
AC
138942011-08-01 Yannick Moy <moy@adacore.com>
13895
13896 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13897 of homonym, unless the homonym is one of the cases allowed in SPARK
13898 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13899 package declaration occurring after a body.
13900
139012011-08-01 Robert Dewar <dewar@adacore.com>
13902
13903 * checks.adb, exp_ch4.adb: Minor reformatting.
13904
139052011-08-01 Javier Miranda <miranda@adacore.com>
13906
13907 * einfo.ads (Access_Disp_Table): Fix documentation.
13908 (Dispatch_Table_Wrappers): Fix documentation.
13909
139102011-08-01 Pascal Obry <obry@adacore.com>
13911
13912 * prj-env.adb, prj-env.ads: Minor reformatting.
13913
8ed68165
AC
139142011-08-01 Yannick Moy <moy@adacore.com>
13915
13916 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13917 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13918 procedures out of these packages.
2c7f9cc0 13919 * errout.ads, errout.adb
8ed68165
AC
13920 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13921 procedures in of this package
13922 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13923 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13924 on misplaced later vs initial declarations, like in Ada 83
13925 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13926 formal mode on attribute of private type whose full type declaration
13927 is not visible
13928 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13929 package declaration inside a package specification
13930 (Analyze_Full_Type_Declaration): issue error in formal mode on
13931 controlled type or discriminant type
13932 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13933 user-defined operator means that it should come from the source
13934 (New_Overloaded_Entity): issue error in formal mode on overloaded
13935 entity.
13936 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13937
139382011-08-01 Thomas Quinot <quinot@adacore.com>
13939
13940 * atree.adb: Minor reformatting.
13941 * checks.adb: Minor reformatting.
13942
4230bdb7
AC
139432011-08-01 Vincent Celier <celier@adacore.com>
13944
13945 * s-parame-vms-ia64.ads: Fix typo in comment
13946 Minor reformatting
13947 * s-parame-vms-restrict.ads: Removed, unused.
13948
139492011-08-01 Javier Miranda <miranda@adacore.com>
13950
13951 * exp_ch3.adb
13952 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13953 * sem_ch3.adb
13954 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13955 * sem_ch3.ads, sem_ch3.adb
13956 (Is_Constant_Bound): New extended version of the subprogram that was
13957 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13958 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13959 * sem_aux.ads (Constant_Value): Fix typo in comment.
13960 * checks.adb (Generate_Index_Checks): New implementation which, for
13961 array objects with constant bounds, generates the runtime check
13962 referencing the bounds of the array type. For other cases this routine
13963 provides its previous behavior obtaining such values from the array
13964 object.
13965 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13966 parent type.
13967 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13968 we cannot have semantic interpretations of the new node.
13969
2010d078
AC
139702011-08-01 Ed Schonberg <schonberg@adacore.com>
13971
13972 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13973 expressions.
13974
139752011-08-01 Arnaud Charlet <charlet@adacore.com>
13976
13977 * sem_ch8.adb: Minor code editing.
13978 * s-vxwext.adb: Remove trailing space.
13979 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13980 consistency with other files.
13981
139822011-08-01 Thomas Quinot <quinot@adacore.com>
13983
13984 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13985
139862011-08-01 Ed Schonberg <schonberg@adacore.com>
13987
13988 * par-ch10.adb: reject parameterized expressions as compilation unit.
13989 * sem_ch4.adb: handle properly conditional expression with overloaded
13990 then_clause and no else_clause.
13991
139922011-08-01 Tristan Gingold <gingold@adacore.com>
13993
13994 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13995 like done by System.Aux_DEC.
13996 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13997
daec8eeb
YM
139982011-08-01 Yannick Moy <moy@adacore.com>
13999
14000 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14001 missing label at end of declaration (subprogram or package)
14002 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14003 of positional and named parameter association
14004 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14005 Error_Msg_SP which adds a prefix to the error message giving the name
14006 of the formal language analyzed
14007 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14008 access result type in subprogram, unconstrained array as result type,.
14009 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14010 procedure
14011 * sem_ch8.adb: Code clean up.
14012
38171f43
AC
140132011-08-01 Javier Miranda <miranda@adacore.com>
14014
14015 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14016 * einfo.ads (Access_Disp_Table): Fix documentation.
14017 (Dispatch_Table_Wrappers): Fix documentation.
14018 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14019 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14020 to enforce the documentation of this attribute.
14021 (Set_Is_Interface): Cleanup the assertion.
14022 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14023 the Underlying_Type entity before reading attribute Access_Disp_Table.
14024 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14025 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14026 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14027 the Underlying_Type entity before reading attribute Access_Disp_Table.
14028 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14029 Locate the Underlying_Type entity before reading attribute
14030 Access_Disp_Table.
14031
140322011-08-01 Ed Schonberg <schonberg@adacore.com>
14033
14034 * s-poosiz.ads: Additional overriding indicators.
14035
140362011-08-01 Yannick Moy <moy@adacore.com>
14037
14038 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14039 formal mode.
14040 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14041 parameter specification does not include a subtype mark.
14042 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14043 formal mode on abstract subprogram.
14044 (Analyze_Subprogram_Specification): issue error in formal mode on
14045 user-defined operator.
14046 (Process_Formals): issue error in formal mode on access parameter and
14047 default expression.
14048 * sem_ch9.adb (Analyze_Abort_Statement,
14049 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14050 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14051 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14052 Analyze_Requeue, Analyze_Selective_Accept,
14053 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14054 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14055 issue error in formal mode on user-defined raise statement.
14056
1f250383
AC
140572011-08-01 Thomas Quinot <quinot@adacore.com>
14058
14059 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14060 declaration being hidden when overriding an implicit inherited
14061 subprogram.
14062 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14063 (-gnats), do not complain about a source file that contains only a
14064 pragma No_Body.
14065
140662011-08-01 Ed Schonberg <schonberg@adacore.com>
14067
14068 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14069 variable if already set.
14070
607d0635
AC
140712011-08-01 Arnaud Charlet <charlet@adacore.com>
14072
14073 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14074 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14075 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14076 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14077 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14078 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14079 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14080 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14081 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14082 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14083 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14084 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14085 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14086 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14087 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14088 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14089 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14090 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14091 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14092 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14093 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14094 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14095 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14096 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14097 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14098 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14099 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14100 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14101 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14102 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14103 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14104 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14105 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14106 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14107 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14108 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14109 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14110 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14111 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14112 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14113 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14114 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14115 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14116 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14117 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14118 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14119 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14120 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14121 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14122 Use GNAT instead of GNARL.
14123
141242011-08-01 Bob Duff <duff@adacore.com>
14125
14126 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14127 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14128 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14129 reformatting.
14130
141312011-08-01 Yannick Moy <moy@adacore.com>
14132
14133 * debug.adb (d.D) reverve flag for the SPARK mode
14134 (d.E) reverve flag for SPARK generation mode
14135 (d.F) reverve flag for Why generation mode
2c7f9cc0 14136 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
14137 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14138 functions which return True when the corresponding modes are set
14139 (Formal_Language): return "spark" or "alfa" when in formal verification
14140 mode.
14141 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14142 Error_Msg to prefix the error message with a tag giving the formal
14143 language
14144 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14145 message with a tag giving the formal language
14146 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14147 block statement
14148 (Analyze_Case_Statement): issue error in formal mode on case statement
14149 with a single "others" case alternative
14150 (Analyze_Exit_Statement): issue errors in formal mode on exit
14151 statements which do not respect SPARK restrictions
14152 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14153 (Check_Unreachable_Code): always issue an error (not a warning) in
14154 formal mode on unreachable code (concerns both code after an infinite
14155 loop and after an unconditional jump, both not allowed in SPARK)
14156 * sem_ch6.adb (Analyze_Return_Statement): add call to
14157 Set_Return_Present for a procedure containing a return statement
14158 (already done for functions in Analyze_Function_Return)
14159 (Analyze_Function_Return): issue error in formal mode on extended
14160 return or if return is not last statement in function
14161 (Check_Missing_Return): issue error in formal mode if function does
14162 not end with return or if procedure contains a return
14163 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14164 function to detect if there is an inner scope of its parameter S which
14165 is a loop.
14166
141672011-08-01 Thomas Quinot <quinot@adacore.com>
14168
14169 * sem_ch6.ads: Minor reformatting.
14170
d8b3ccb9
AC
141712011-08-01 Javier Miranda <miranda@adacore.com>
14172
14173 * sem_util.adb (Abstract_Interface_List): Complete condition when
14174 processing private type declarations to avoid reading unavailable
14175 attribute.
14176 (Is_Synchronized_Tagged_Type): Complete condition when processing
14177 private extension declaration nodes to avoid reading unavailable
14178 attribute.
14179
141802011-08-01 Thomas Quinot <quinot@adacore.com>
14181
14182 * sem_ch3.adb: Minor reformatting.
14183
141842011-08-01 Thomas Quinot <quinot@adacore.com>
14185
14186 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14187 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14188 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14189 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14190 for VMS, instead parametrize the common implementation with
14191 System.Parameters declarations.
14192
0bb9276c
AC
141932011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14194
14195 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14196
141972011-08-01 Tristan Gingold <gingold@adacore.com>
14198
14199 * seh_init.c: Fix SEH handler installation on win64.
14200
142012011-08-01 Ed Schonberg <schonberg@adacore.com>
14202
14203 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14204 double analysis of an anonymous access to subprogram, because it can
14205 lead to improper sharing of profiles and a back-end crash.
14206
6a2e4f0b
AC
142072011-08-01 Robert Dewar <dewar@adacore.com>
14208
14209 * make.adb, sem_ch4.adb: Minor reformatting.
14210 * gcc-interface/Make-lang.in: Update dependencies.
14211 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14212
142132011-08-01 Arnaud Charlet <charlet@adacore.com>
14214
14215 * gnat_rm.texi: Fix definition of Long_Integer.
14216
142172011-08-01 Ed Schonberg <schonberg@adacore.com>
14218
14219 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14220 to prevent storage exhaustion.
14221 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14222 finalized is a function body, insert the cleanup code before the final
14223 return statement, to prevent spurious warnings.
14224 * s-pooglo.ads: add overriding indicator.
14225
4561baf7
ES
142262011-08-01 Ed Schonberg <schonberg@adacore.com>
14227
14228 * sem_ch4.adb (Operator_Check): improve error message when both a
14229 with_clause and a use_clause are needed to make operator usage legal.
14230 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14231 determine whether a compilation unit is visible within an other,
14232 either through a with_clause in the current unit, or a with_clause in
14233 its library unit or one one of its parents.
14234
383e179e
AC
142352011-08-01 Ed Schonberg <schonberg@adacore.com>
14236
14237 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14238 over an arbitrary expression of an array or container type.
14239 * lib-xref.adb: clarify comment.
14240
142412011-08-01 Bob Duff <duff@adacore.com>
14242
14243 * einfo.ads: Minor reformatting.
14244 * debug.adb: Minor comment improvement.
14245
142462011-08-01 Javier Miranda <miranda@adacore.com>
14247
14248 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14249 consider hidden subprograms as valid candidates.
14250
142512011-08-01 Arnaud Charlet <charlet@adacore.com>
14252
14253 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14254
142552011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14256
14257 * gnat_ugn.texi: Fix typo.
14258
61c161b2
AC
142592011-08-01 Robert Dewar <dewar@adacore.com>
14260
14261 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14262 lib-xref.adb: Minor reformatting
14263
142642011-08-01 Gary Dismukes <dismukes@adacore.com>
14265
14266 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14267 when to generate a call to Move_Final_List.
14268 (Has_Controlled_Parts): Remove this function.
14269
84df40f7
AC
142702011-08-01 Geert Bosch <bosch@adacore.com>
14271
14272 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14273 "," in choice list.
14274
142752011-08-01 Thomas Quinot <quinot@adacore.com>
14276
14277 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14278 explicit raise of a predefined exception as Comes_From_Source if the
14279 original N_Raise_Statement comes from source.
14280
142812011-08-01 Robert Dewar <dewar@adacore.com>
14282
14283 * sinfo.ads: Add comment.
14284 * sem_ch6.adb: Minor reformatting.
14285
142862011-08-01 Robert Dewar <dewar@adacore.com>
14287
14288 * freeze.adb (Freeze_Entity): Refine check for bad component size
14289 clause to avoid rejecting confirming clause when atomic/aliased present.
14290
142912011-08-01 Ed Schonberg <schonberg@adacore.com>
14292
14293 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14294 better determine whether an entity reference is a write.
14295 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14296 subcomponent.
14297 * lib-xref.adb (Output_References): Do no suppress a read reference at
14298 the same location as an immediately preceeding modify-reference, to
14299 handle properly in-out actuals.
14300
143012011-08-01 Tristan Gingold <gingold@adacore.com>
14302
14303 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14304
143052011-08-01 Quentin Ochem <ochem@adacore.com>
14306
14307 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14308 heap to compute the result.
14309
c7f0d2c0
AC
143102011-08-01 Robert Dewar <dewar@adacore.com>
14311
14312 * atree.ads: Minor reformatting.
14313
143142011-08-01 Emmanuel Briot <briot@adacore.com>
14315
14316 * g-expect.adb (Get_Command_Output): Fix memory leak.
14317
143182011-08-01 Geert Bosch <bosch@adacore.com>
14319
14320 * cstand.adb (P_Float_Type): New procedure to print the definition of
14321 predefined fpt types.
14322 (P_Mixed_Name): New procedure to print a name using mixed case
14323 (Print_Standard): Use P_Float_Type for printing floating point types
14324 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14325 precision IEEE float.
14326
143272011-08-01 Thomas Quinot <quinot@adacore.com>
14328
14329 * sem_ch3.adb: Minor reformatting.
14330
143312011-08-01 Ed Schonberg <schonberg@adacore.com>
14332
14333 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14334 the completion of a generic function, insert the new body rather than
14335 rewriting the original.
14336
143372011-08-01 Yannick Moy <moy@adacore.com>
14338
14339 * sinfo.ads, errout.ads: Typos in comments.
14340
1c54829e
AC
143412011-08-01 Robert Dewar <dewar@adacore.com>
14342
14343 * par-endh.adb: Minor reformatting.
14344
143452011-08-01 Robert Dewar <dewar@adacore.com>
14346
14347 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14348 (Pre_Post_Aspects): New subtype.
14349 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14350 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14351 * par-ch7.adb (P_Package): Remove Decl parameter
14352 (P_Package): Handle new syntax for aspects (before IS)
14353 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14354 new aspect syntax
14355 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14356 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14357 (P_Package): Remove Decl parameter
14358 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14359 aspects
14360 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14361 specs
14362 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14363 * sinfo.ads: Document new syntax for aspects in packages etc.
14364 * sprint.adb: Handle new syntax of aspects before IS in package
14365
143662011-08-01 Thomas Quinot <quinot@adacore.com>
14367
14368 * atree.ads: Minor reformatting.
14369 * sem_prag.adb: Minor reformatting.
14370
143712011-08-01 Robert Dewar <dewar@adacore.com>
14372
14373 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14374 case expr alternative.
14375
143762011-08-01 Ed Schonberg <schonberg@adacore.com>
14377
14378 * sem_ch12.adb: Fix typo.
14379
9eea4346
GB
143802011-08-01 Geert Bosch <bosch@adacore.com>
14381
14382 * sem_prag.adb (Check_No_Link_Name): New procedure.
14383 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14384 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14385 instead of Standard_Long_Long_Float_Size global. Preparation for
14386 eventual removal of per type constants.
14387 * exp_util.ads (Get_Stream_Size): New function returning the stream
14388 size value of subtype E.
14389 * exp_util.adb (Get_Stream_Size): Implement new function.
14390 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14391 function.
14392 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14393 * einfo.adb:
14394 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14395
3d6c3bd7
GB
143962011-08-01 Geert Bosch <bosch@adacore.com>
14397
14398 * cstand.adb: Fix comments.
14399 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14400 count of arguments.
14401
e7d897b8
AC
144022011-08-01 Robert Dewar <dewar@adacore.com>
14403
14404 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14405
144062011-08-01 Geert Bosch <bosch@adacore.com>
14407
14408 * atree.ads: Fix comment.
14409
c228a069
AC
144102011-08-01 Robert Dewar <dewar@adacore.com>
14411
14412 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14413 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14414 * par.adb: Add with for Namet.Sp.
14415 * par-tchk.adb: Minor reformatting.
14416
144172011-08-01 Vincent Celier <celier@adacore.com>
14418
14419 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14420 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14421 of the init procedure of a SAL.
14422 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14423 New procedure.
14424
144252011-08-01 Thomas Quinot <quinot@adacore.com>
14426
14427 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14428 reformatting.
14429
144302011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14431
14432 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14433
144342011-08-01 Thomas Quinot <quinot@adacore.com>
14435
14436 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14437 conformant with its spec (return True only for types that have
14438 an overriding Initialize primitive operation that prevents them from
14439 having preelaborable initialization).
14440 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14441 initialization for controlled types in Ada 2005 or later mode.
14442
857ade1b
RD
144432011-08-01 Robert Dewar <dewar@adacore.com>
14444
14445 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14446 Postcondition.
14447 (Same_Aspect): New function.
14448 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14449 Type_Invariant, Precondition, Postcondition.
14450 * snames.ads-tmpl: Add Name_Type_Invariant.
14451
bd949ee2
RD
144522011-08-01 Robert Dewar <dewar@adacore.com>
14453
14454 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14455 here.
14456 (Freeze_All_Ent): Fix error in handling inherited aspects.
14457 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14458 already analyzed, but don't skip entire processing of a declaration,
14459 that's wrong in some cases of declarations being rewritten.
14460 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14461 Don't delay for integer, string literals
14462 Treat predicates in usual manner for delay, remove special case code,
14463 not needed.
14464 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14465 (Build_Predicate_Function): Update saved expression in aspect
14466 (Build_Invariant_Procedure): Update saved expression in aspect
14467 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14468 of replacement of discriminant references if the reference is simple.
14469
f1c952af
RD
144702011-08-01 Robert Dewar <dewar@adacore.com>
14471
14472 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14473 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14474 Static_Predicate and Dynamic_Predicate.
14475 (Build_Predicate_Function): Add processing for Static_Predicate
14476 and Dynamic_Predicate.
14477 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14478 (From_Static_Predicate): New flag
14479 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14480
144812011-08-01 Robert Dewar <dewar@adacore.com>
14482
14483 * usage.adb: Documentation cleanup for Ada version modes in usage.
14484 * expander.adb: Minor reformatting.
14485
47e11d08
AC
144862011-08-01 Robert Dewar <dewar@adacore.com>
14487
14488 * atree.ads: Minor comment fix.
14489 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14490 a-witeio.ads, sem_prag.adb: Minor reformatting.
14491
144922011-08-01 Doug Rupp <rupp@adacore.com>
14493
14494 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14495 pointers. Use descrip.h header file for convenience. Add some
14496 comments.
14497
144982011-08-01 Robert Dewar <dewar@adacore.com>
14499
14500 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14501 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14502 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14503 New procedure.
14504 (Check_Aspect_At_End_Of_Declarations): New procedure
14505 (Analye_Aspect_Specification): Minor changes for above procedures
14506 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14507 specification node as well.
14508
145092011-08-01 Pascal Obry <obry@adacore.com>
14510
14511 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14512 Windows files. Use GetFilesAttributes() in this case to check for file
14513 existence instead of returning with an error code.
14514
a3a16b21
VC
145152011-08-01 Vincent Celier <celier@adacore.com>
14516
14517 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14518 High is above Source length.
14519
ff58cc69
RD
145202011-08-01 Robert Dewar <dewar@adacore.com>
14521
14522 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14523
6bb88533
AC
145242011-08-01 Robert Dewar <dewar@adacore.com>
14525
14526 * aspects.ads (Boolean_Aspects): New subtype.
14527 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14528 for derived types in cases where the parent type and derived type have
14529 aspects.
14530 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14531 with aspects when parent type also has aspects.
14532 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14533 boolean expression at this point).
14534 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14535 accordance with final decision on the Ada 2012 feature.
14536 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14537
145382011-08-01 Matthew Heaney <heaney@adacore.com>
14539
14540 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14541
060a3f28
AC
145422011-08-01 Pascal Obry <obry@adacore.com>
14543
14544 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14545 Fix Replace_Slice when High is above current string size.
14546 (Replace_Slice): Fix DL computation when High is above current
14547 string length.
14548
145492011-08-01 Gary Dismukes <dismukes@adacore.com>
14550
14551 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14552
e7f567a3
AC
145532011-08-01 Matthew Heaney <heaney@adacore.com>
14554
14555 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14556 of node.
14557
145582011-08-01 Pascal Obry <obry@adacore.com>
14559
14560 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14561 reformatting.
14562
1a265e78
AC
145632011-08-01 Ed Schonberg <schonberg@adacore.com>
14564
14565 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14566 access to protected subprograms in generic bodies.
14567 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14568 protected type, indicate that the convention of the subprogram is
14569 Convention_Protected, because it may be used in subsequent declarations
14570 within the protected declaration.
14571
145722011-08-01 Vincent Celier <celier@adacore.com>
14573
14574 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14575 and "final" procedures when the name of the library is "ada", to avoid
14576 duplicate symbols "adainit" and "adafinal" in executables.
14577
67e28ef8
ES
145782011-08-01 Ed Schonberg <schonberg@adacore.com>
14579
14580 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14581 quantified expression that appears within a postcondition and uses the
14582 Ada2012 'Result attribute.
14583
6da2ca7d
RO
145842011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14585
14586 * init.c (__gnat_error_handler): Cast reason to int.
14587 (__gnat_install_handler): Explain sa_sigaction use.
14588
7d5997c6
EB
145892011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14590
14591 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14592 subprogram has copy-in copy-out parameters, try to promote the mode of
14593 the return type if it is passed in registers.
14594
4b4cfdd5
EB
145952011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14596
14597 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14598 left operand as addressable.
14599
f3d34576
EB
146002011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14601
14602 * gcc-interface/gigi.h (build_function_stub): Remove.
14603 (build_return_expr): Likewise.
14604 (convert_vms_descriptor): Declare.
14605 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14606 (build_function_stub): Move to...
14607 * gcc-interface/utils2.c (build_return_expr): Move to...
14608 * gcc-interface/trans.c (build_function_stub): ...here.
14609 (build_return_expr): ...here.
14610 (Subprogram_Body_to_gnu): Add local variable for language_function.
14611 Disconnect the parameter attributes cache, if any, once done with it.
14612 Call end_subprog_body only after setting the end_locus.
14613 Build the stub associated with the function, if any, at the very end.
14614 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14615 variables and streamline control flow.
14616
0a6ecc08
AC
146172011-07-23 Arnaud Charlet <charlet@adacore.com>
14618
14619 PR ada/49819
14620 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14621 g-trasym-dwarf.adb.
14622
5b6d595b
RO
146232011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14624
14625 PR bootstrap/49794
14626 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14627 Assign to act.sa_sigaction.
14628 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14629 current->return_address to char * before arithmetic.
14630
94017021
RO
146312011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14632
14633 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14634 Correct argument types.
14635 Extract code from reason.
14636 (__gnat_install_handler): Assign to act.sa_sigaction.
14637
52fd02bb
EB
146382011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14639
14640 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14641 (GNAT1_OBJS): ...here.
14642
f39a9ca2
EB
146432011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14644
14645 PR ada/48711
14646 * g-socthi-mingw.adb (Fill): Fix formatting.
14647
9e36aa23
EB
14648 * gcc-interface/gigi.h: Move around comment.
14649
e3aca522
JDA
146502011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14651
14652 PR ada/46350
14653 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14654
696b1960
FW
146552011-07-14 Florian Weimer <fw@deneb.enyo.de>
14656
14657 PR ada/48711
14658 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14659
f542c405
EB
146602011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14661
14662 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14663 range comparison if Pmode is SImode.
14664
9e9bd455
LG
146652011-07-12 Laurent GUERBY <laurent@guerby.net>
14666 Eric Botcazou <ebotcazou@adacore.com>
14667
14668 * adadecode.c: Wrap up in extern "C" block.
14669 * adadecode.h: Likewise.
14670 * adaint.c: Likewise. Remove 'const' keyword.
14671 * adaint.h: Likewise.
14672 * argv.c: Likewise.
14673 * atree.h: Likewise.
14674 * cio.c: Likewise.
14675 * cstreams.c: Likewise.
14676 * env.c: Likewise.
14677 * exit.c: Likewise.
14678 * fe.h: Likewise.
14679 * final.c: Likewise.
14680 * init.c: Likewise.
14681 * initialize.c: Likewise.
14682 * link.c: Likewise.
14683 * namet.h: Likewise.
14684 * nlists.h: Likewise.
14685 * raise.c: Likewise.
14686 * raise.h: Likewise.
14687 * repinfo.h: Likewise.
14688 * seh_init.c: Likewise.
14689 * targext.c: Likewise.
14690 * tracebak.c: Likewise.
14691 * uintp.h: Likewise.
14692 * urealp.h: Likewise.
14693 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14694 * xsinfo.adb: Likewise.
14695 * xsnamest.adb: Likewise.
14696 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14697 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14698 * gcc-interface/misc.c: Likewise.
14699 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14700 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14701 ada/targext.o here...
14702 (GNAT_ADA_OBJS): ...and not here.
14703 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14704 (GNATBIND_OBJS): Reorder.
14705
7644b3c7
RH
147062011-07-07 Richard Henderson <rth@redhat.com>
14707
14708 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14709 dwarf2out_frame_init.
14710
8384ac41
EB
147112011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14712
14713 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14714
fbdd5d87
RO
147152011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14716
14717 PR target/39150
14718 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14719
1a072294
RG
147202011-07-06 Richard Guenther <rguenther@suse.de>
14721
8384ac41
EB
14722 * gcc-interface/misc.c (gnat_init): Merge calls to
14723 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
14724 Re-initialize boolean_false_node.
14725
bc712852
EB
147262011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14727 Olivier Hainque <hainque@adacore.com>
14728 Nicolas Setton <setton@adacore.com>
14729
14730 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14731 the type according to the ARTIFICIAL_P parameter.
14732 (create_type_decl): Likewise.
14733 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14734
2eb22389
EB
147352011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14736
14737 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14738 (gnatbind): Likewise.
14739
4bdaaf2f
RO
147402011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14741
14742 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14743
c020c92b
EB
147442011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14745
14746 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14747 local variable throughout. Remove useless call to Base_Type.
14748 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14749 Take it also into account for the volatileness of the field. Set the
14750 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14751
96769d32
EB
147522011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14753
14754 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14755 on a dereference built for a by-ref object if it has an address clause.
14756
7e4680c1
EB
147572011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14758
14759 * einfo.ads (Address_Taken): Document use for the second argument of
14760 Asm_Input and Asm_Output attributes.
14761 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14762 argument is an entity name, then set Address_Taken on it.
14763 <Attribute_Asm_Output>: Likewise.
14764 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14765 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14766 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14767 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14768
147692011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
14770
14771 PR middle-end/46500
14772 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14773
677f3fa8
JM
147742011-06-14 Joseph Myers <joseph@codesourcery.com>
14775
14776 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14777 (ada/utils.o): Update dependencies.
14778 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14779 ../../../libcpp/libcpp.a.
14780 * gcc-interface/utils.c: Include common/common-target.h.
14781 (process_attributes): Use targetm_common.have_named_sections.
14782
009db074
RG
147832011-06-07 Richard Guenther <rguenther@suse.de>
14784
0bad0e23
EB
14785 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14786 set_sizetype.
009db074 14787
3bfc61cf
EB
147882011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14789
0bad0e23 14790 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
14791 TREE_THIS_NOTRAP flag.
14792
5c4a1c7b
EB
147932011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14794
14795 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14796 Fix thinko.
14797
e9f57686
EB
147982011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14799
14800 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14801 constants whose full view has discriminants specially.
14802
10e4d056
EB
148032011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14804
14805 * gcc-interface/utils.c: Include diagnostic.h.
14806 (gnat_write_global_declarations): Output debug information for all
14807 global type declarations before finalizing the compilation unit.
14808 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14809
0957c029
JJ
148102011-05-25 Jakub Jelinek <jakub@redhat.com>
14811
14812 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14813
52d0a7ac
KT
148142011-05-25 Kai Tietz <ktietz@redhat.com>
14815
14816 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14817 initialization instead of const/none-const pointer assignment.
14818
1ed1641d
JM
148192011-05-24 Joseph Myers <joseph@codesourcery.com>
14820
14821 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14822 $(EXTRA_GNAT1_OBJS).
14823 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14824 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14825 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14826 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14827 libcommon-target.a instead of prefix.o.
14828
9fe72ebd
JM
148292011-05-21 Joseph Myers <joseph@codesourcery.com>
14830
14831 PR ada/49097
0bad0e23 14832 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 14833
2691e6d7
JM
148342011-05-20 Joseph Myers <joseph@codesourcery.com>
14835
0bad0e23
EB
14836 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14837 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14838 instead of version.o.
2691e6d7 14839
2d0dd51a 148402011-05-18 Kai Tietz <ktietz@redhat.com>
bf6490b5
KT
14841
14842 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14843 boolean_false_node instead of integer_zero_node.
14844 (convert_with_check): Likewise.
14845 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14846
7bf9a5ac
EB
148472011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14848
14849 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14850 type of the parameter is an unconstrained array, convert the actual to
14851 the type of the formal in the In Out and Out cases as well.
14852
e5b00edf
NF
148532011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14854
14855 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14856 call build_function_type_array or build_varargs_function_type_array
14857 instead.
14858 (create_subprog_type): Don't call build_function_type; call
14859 build_function_type_vec instead.
14860
51545682
NF
148612011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14862
14863 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14864 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14865 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14866
c99c0026
EB
148672011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14868
f620bd21
EB
14869 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14870
c99c0026
EB
14871 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14872 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14873
3d528853
NF
148742011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14875
c99c0026 14876 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 14877
d7d058c5
NF
148782011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14879
14880 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14881 instead of accessing TYPE_ARG_TYPES directly.
14882 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14883
805e60a0
EB
148842011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14885
14886 PR ada/48844
14887 * gcc-interface/gigi.h (get_variant_part): Declare.
14888 * gcc-interface/decl.c (get_variant_part): Make global.
14889 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14890 types have the same constant size, are record types and T1 has a
14891 variant part while T2 doesn't.
14892
907a08d9
EB
148932011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14894
14895 * gcc-interface/utils.c (begin_subprog_body): Do not call
14896 get_pending_sizes.
14897 (end_subprog_body): Likewise.
14898
d35936ab
RG
148992011-05-04 Richard Guenther <rguenther@suse.de>
14900
14901 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14902 int_const_binop.
14903 (pos_to_constructor): Likewise.
14904
c1fd8753 149052011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 14906 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
14907
14908 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14909 of build_function_type. Adjust calls to...
14910 (build_raise_check): ...this. Do not take a void_tree parameter.
14911 Call build_function_type_list instead of build_function_type.
14912 Fix head comment and swap couple of conditional blocks.
14913
4fb87d2b
EB
149142011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14915
14916 * gnatvsn.ads (Library_Version): Bump to 4.7.
14917 (Current_Year): Bump to 2011.
14918
fa5e5a76
MM
149192011-04-29 Michael Matz <matz@suse.de>
14920
14921 * gcc-interface/misc.c (gnat_handle_option): Set
14922 warn_maybe_uninitialized.
14923
8d6a2f69
GP
149242011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14925
14926 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14927 the Watson/McCabe paper.
14928
770937fd
JM
149292011-04-23 Jim Meyering <meyering@redhat.com>
14930
14931 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14932
eb601ae1
EB
149332011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14934
14935 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14936 onto the new type.
14937
7d7fcb08
EB
149382011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14939
14940 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14941 parameter.
14942 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14943 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14944 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14945 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14946 <all>: Do not set flags on the reused DECL node coming from an alias.
14947 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14948 don't need debug info here...
14949 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14950 (gigi): Adjust calls to create_subprog_decl.
14951 (build_raise_check): Likewise.
14952 (establish_gnat_vms_condition_handler): Likewise.
14953 (Compilation_Unit_to_gnu): Likewise.
14954 (gnat_to_gnu): Likewise.
14955
e1876cac
EB
149562011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14957
14958 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14959 (NO_REORDER_ADAFLAGS): New variable.
14960 (EXTRA_GNATTOOLS): Always define.
14961 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14962 Clean up and adjust list of files compiled with special options.
14963 * gcc-interface/Make-lang.in: Likewise.
14964 (ada/decl.o): Cosmetical change.
14965 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14966
04695783
JM
149672011-04-20 Jim Meyering <meyering@redhat.com>
14968
14969 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14970
23399579
EB
149712011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14972
14973 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14974 $(CFLAGS) on the link line.
14975
51c5169c
EB
149762011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14977
14978 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14979 padded type built for the return type if it is unconstrained.
14980
61e46a7d
NF
149812011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14982
14983 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14984
81f653d6
NF
149852011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14986
b4867846
EB
14987 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14988 before calling TREE_CHAIN.
81f653d6
NF
14989 * gcc-interface/misc.c (gnat_init_ts): New function.
14990 (LANG_HOOKS_INIT_TS): Define.
14991
a358e188
MJ
149922011-04-12 Martin Jambor <mjambor@suse.cz>
14993
b4867846
EB
14994 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14995 instead of cgraph_node.
a358e188 14996
29b1c5a4
EB
149972011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14998
14999 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15000 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15001 mechanism.
15002
88872b00
EB
150032011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15004
15005 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15006 of aggregate types that contain a placeholder.
15007
dcf0c47e
NF
150082011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15009
15010 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 15011 TYPE_ARG_TYPES.
dcf0c47e
NF
15012 (handle_type_generic_attribute): Likewise.
15013
53e3000c
EB
150142011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15015
15016 PR ada/47163
15017 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15018
ab380bb4
KT
150192011-04-04 Kai Tietz <ktietz@redhat.com>
15020
15021 PR ada/47163
0bad0e23
EB
15022 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15023 to flag value.
ab380bb4 15024
8ffac116
EB
150252011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15026
15027 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15028 type case, do not strip a padding type around the array type.
15029
de9528f0
EB
150302011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15031
15032 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15033 types.
15034
d9d7a26c
EB
150352011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15036
15037 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15038 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 15039 code for -feliminate-unused-debug-types.
d9d7a26c
EB
15040 (gnat_post_options): Likewise.
15041
4cb12a90
EB
150422011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15043
15044 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15045 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15046 distinct copy.
15047
acccc61c
EB
150482011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15049
15050 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15051 DECL_ARTIFICIAL flag on enumeration types.
15052
583eb0c9
EB
150532011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15054
15055 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15056 fat pointer types artificial unconditionally.
15057 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15058 isn't artificial.
15059
e3edbd56
EB
150602011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15061
15062 * gcc-interface/gigi.h (get_dummy_type): Declare.
15063 (build_dummy_unc_pointer_types): Likewise.
15064 (finish_fat_pointer_type): Likewise.
15065 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15066 fat pointer type has been built, complete it in place.
15067 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15068 and thin pointers. Remove useless variable.
15069 (finish_fat_pointer_type): Make global and move to...
15070 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15071 (get_dummy_type): New function.
15072 (build_dummy_unc_pointer_types): Likewise.
15073 (gnat_pushdecl): Propage the name to the anonymous variants only.
15074 (update_pointer_to): Only adjust the pointer types in the unconstrained
15075 array case.
15076
65444786
EB
150772011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15078
15079 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15080 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15081 if this is a Taft amendment type and the full declaration is available.
15082 * gcc-interface/trans.c (process_type): Likewise.
15083 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15084 (process_freeze_entity): Likewise.
15085 * gcc-interface/utils.c (dummy_global): New static variable.
15086 (gnat_write_global_declarations): If there are types declared as used
15087 at the global level, insert them in the global hash table.
15088
1aeb40dd
EB
150892011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15090
15091 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15092 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15093 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15094 copy.
15095 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15096 flag of the type accordingly.
15097 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15098
80ec8b4c
EB
150992011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15100
15101 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15102 finalizing types when updating the pointers to the designated type.
15103 <all>: Finalize the deferred types even if we didn't defer processing
15104 of incomplete types in this invocation.
15105
2a9d769a 151062011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
15107 Nicolas Setton <setton@adacore.com>
15108 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
15109
15110 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15111 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15112
2438d7a6
KT
151132011-03-28 Kai Tietz <ktietz@redhat.com>
15114
333d8aff 15115 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
15116 Windows targets.
15117 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15118 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 15119
80ec8b4c 15120 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 15121
8ad150f6
TG
151222011-03-28 Tristan Gingold <gingold@adacore.com>
15123
15124 PR ada/44431
80ec8b4c
EB
15125 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15126 Use ada output of gnatbind.
8ad150f6
TG
15127 (ada/b_gnatb.adb): Ditto.
15128 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15129 (ada.mostlyclean, ada.stage1)
15130 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15131 (ada.stagefeedback): Adjust.
80ec8b4c 15132 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
15133 Use ada output of gnatbind.
15134 (b_gnatm.adb): Ditto.
15135 (b_gnatl.o, b_gnatm.o): New rules.
15136
51c7954d
EB
151372011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15138
15139 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15140 for the padded type built to support a specified size or alignment.
15141
6ddf9843
EB
151422011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15143
15144 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15145 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15146 unconditionally to the end of the unit when the designated type is
15147 limited_with'ed.
15148 <all>: Rename local variable. Attempt to un-defer types only and do it
15149 for limited_with'ed types as well.
15150 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15151 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15152 consistently and remove redundant call to finalize_from_with_types.
15153
5daed84a
EB
151542011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15155
15156 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15157 subprograms without a previous spec declared in the same unit.
15158 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15159 subprograms at the end of the unit instead of at the beginning.
15160 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15161 isn't public for the special handling of non-inline functions nested
15162 inside inline external functions.
15163
0edf1bb2
JL
151642011-03-25 Jeff Law <law@redhat.com>
15165
5daed84a 15166 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 15167
e3c4580e
EB
151682011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15169
15170 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15171 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15172 to compute Set_Size_Depends_On_Discriminant.
15173 (Layout_Type): Call it on array types in back-end layout mode.
15174 * sem_util.adb (Requires_Transient_Scope): Return true for array
15175 types only if the size depends on the value of discriminants.
15176 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15177 type if the RHS is a call to a function that returns an unconstrained
15178 type with default discriminant.
15179
abbc8c7b
EB
151802011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15181
15182 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15183 non-conversion to the nominal result type at the end.
15184
ddb5a105
EB
151852011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15186
15187 * gcc-interface/trans.c (create_temporary): New function taken from...
15188 (create_init_temporary): ...here. Call it.
15189 (call_to_gnu): Create the temporary for the return value early, if any.
15190 Create it for a function with copy-in/copy-out parameters if there is
15191 no target; in other cases of copy-in/copy-out, use another temporary.
15192 Push the new binding level lazily. Add and rename local variables.
15193
0d853156
EB
151942011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15195
15196 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15197 error message.
15198 (set_rm_size): Likewise.
15199
4184ef1b
EB
152002011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15201
15202 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15203 for the padded type built in order to support a specified alignment.
15204 Fix incorrect formatting.
15205
bf7eefab
EB
152062011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15207
15208 PR bootstrap/48216
15209 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15210
ef0feeb2
EB
152112011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15212
15213 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15214 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15215 to the end of the list. Adjust recursive call. Rename local variable.
15216 If REORDER is true, reorder components of the record type.
15217 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15218 components_to_record and adjust the parameter list.
15219
646f9414
EB
152202011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15221
15222 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15223 disabled, use the variable for bounds of loop iteration scheme.
15224
62d784f7
KT
152252011-03-21 Kai Tietz <ktietz@redhat.com>
15226
15227 PR target/12171
0bad0e23 15228 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 15229
f230d759
EB
152302011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15231
15232 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15233 out whether the expression is read-only. Short-circuit placeholder
15234 case and rename a couple of local variables.
15235
bb1f7929
EB
152362011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15237
15238 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15239 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15240 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15241 (convert): Deal with conversions from a smaller form type specially.
15242
400a2d24
EB
152432011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15244
15245 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15246 its argument, except for the special -I- switch.
15247
c26bc3ad
GP
152482011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15249
0bad0e23
EB
15250 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15251 "Ada Issues".
c26bc3ad 15252
07b8e910
EB
152532011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15254
15255 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15256
31a5a547
EB
152572011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15258
15259 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15260 GNAT_FORMAL.
15261 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15262 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15263 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15264 Do not generate the check directly, instead instantiate the template
15265 check present in the descriptor.
15266 (make_descriptor_field): Move around.
15267 (build_vms_descriptor32): Build a template check in the POINTER field.
15268 (build_vms_descriptor): Remove useless suffixes.
15269 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15270
dcf25f59
EB
152712011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15272
15273 PR bootstrap/47467
15274 * targext.c: Include target files if IN_RTS is defined.
15275
0418e131
RG
152762011-01-26 Richard Guenther <rguenther@suse.de>
15277
15278 PR bootstrap/47467
15279 * targext.c: Include config.h.
15280 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15281 dependency.
15282
c6eecbd8 152832011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 15284 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
15285
15286 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15287
2d3c7e4f
EB
152882011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15289
15290 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15291 end-of-case on the end label and its associated gotos, if any.
15292
0394741f
EB
152932011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15294
15295 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15296 expressions of the parameter cache within the statement group of
15297 the CICO mechanism.
15298
2a02d090 152992011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 15300 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
15301
15302 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15303 (set_end_locus_from_node): New function.
15304 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15305 make and the function end_locus.
15306 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15307 for the elaboration subprogram.
15308 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15309 set the end_locus of the expression as well.
15310
89f5e978
EB
153112011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15312
15313 PR ada/47131
15314 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15315 variables that are referenced in exception handlers volatile.
15316
15317
ad41bd84 15318\f
797103eb 15319Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
15320
15321Copying and distribution of this file, with or without modification,
15322are permitted in any medium without royalty provided the copyright
15323notice and this notice are preserved.