1 2011-10-06 Robert Dewar <dewar@adacore.com>
3 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
4 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
5 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
6 reorganization (use conditional expressions).
8 2011-10-06 Robert Dewar <dewar@adacore.com>
10 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
11 floating divide by zero.
13 2011-10-06 Ed Schonberg <schonberg@adacore.com>
15 * sem_ch6.adb: Limited interfaces that are not immutably limited
16 are OK in return statements.
18 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
20 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
21 change to powerpc section.
23 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
25 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
28 2011-09-27 Ed Schonberg <schonberg@adacore.com>
30 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
31 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
32 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
34 * a-coorma.ads: Minor reformmating.
35 * einfo.ads: Improve the comment describing the
36 Directly_Designated_Type function.
37 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
39 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
42 2011-09-27 Robert Dewar <dewar@adacore.com>
44 * a-comutr.ads: Minor reformatting.
46 2011-09-27 Ed Schonberg <schonberg@adacore.com>
48 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
49 iterators to multiway trees.
51 2011-09-27 Yannick Moy <moy@adacore.com>
53 * debug.adb (d.D): New option for strict Alfa mode.
54 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
55 permissions as strictly as possible.
56 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
57 Alfa mode, now, interpret ranges of base types like GNAT does; in
58 strict mode, simply change the range of the implicit base Itype.
59 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
61 2011-09-27 Robert Dewar <dewar@adacore.com>
63 * exp_ch9.adb: Minor comment fixes.
65 2011-09-27 Ed Schonberg <schonberg@adacore.com>
67 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
70 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
72 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
73 instead of Directly_Designated_Type in the indirect array case.
75 2011-09-27 Robert Dewar <dewar@adacore.com>
77 * exp_util.adb, exp_aggr.adb: Minor reformatting.
79 2011-09-27 Ed Schonberg <schonberg@adacore.com>
81 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
82 on subtype declarations.
83 * exp_aggr.adb: Minor comment update.
85 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
87 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
88 test in the N_Explicit_Dereference case. Fold double logical
89 negation in the special loop case and conditionalize it on
90 Variable_Ref being true.
92 2011-09-27 Ed Schonberg <schonberg@adacore.com>
94 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
95 single protected object and the selector is a discriminant or an
96 entry family, this is a non-overloaded candidate interpretation,
97 and possible primitive operations of the type must not be
100 2011-09-27 Arnaud Charlet <charlet@adacore.com>
102 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
104 2011-09-27 Pascal Obry <obry@adacore.com>
106 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
107 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
108 Add dummy definitions for pthread_rwlock_t
109 and pthread_rwlockattr_t on all POSIX platforms.
110 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
112 (Finalize_Lock): Likewise.
113 (Write_Lock): Likewise.
116 2011-09-27 Tristan Gingold <gingold@adacore.com>
118 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
121 2011-09-27 Pascal Obry <obry@adacore.com>
123 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
124 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
125 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
126 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
127 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
128 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
129 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
130 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
131 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
132 s-taprop-posix.adb: Revert previous changes.
133 (Lock): Now a record containing the two possible lock
134 (mutex and read/write) defined in OS_Interface.
135 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
137 (Initialize_Protection): Likewise.
139 (Lock_Read_Only): Likewise.
142 2011-09-27 Pascal Obry <obry@adacore.com>
144 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
145 OS_Interface.pthread_rwlock_t.
147 2011-09-27 Robert Dewar <dewar@adacore.com>
149 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
150 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
151 sem_ch5.adb, sem_util.adb: Minor reformatting.
153 2011-09-27 Pascal Obry <obry@adacore.com>
155 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
156 (Finalize_Lock)[RW_Lock]: Likewise.
157 (Write_Lock)[RW_Lock]: Likewise.
158 (Unlock)[RW_Lock]: Likewise.
159 (Read_Lock): Define L as RW_Lock (instead of Lock).
160 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
161 routine for r/w lock.
162 (Finalize_Lock)[RW_Lock]: Likewise.
163 (Write_Lock)[RW_Lock]: Likewise.
164 (Unlock)[RW_Lock]: Likewise.
165 (Read_Lock): Define L as RW_Lock (instead of Lock).
167 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
168 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
169 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
170 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
171 routine for standard lock.
172 (Finalize_Lock)[RW_Lock]: Likewise.
173 (Write_Lock)[RW_Lock]: Likewise.
174 (Unlock)[RW_Lock]: Likewise.
175 (Read_Lock): Define L as RW_Lock (instead of Lock).
176 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
177 in the record definition.
178 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
179 lock for 'R' locking policy.
180 (Initialize_Protection): Likewise.
182 (Lock_Read_Only): Likewise.
184 * s-taspri-posix.ads (RW_Lock): New type defined as
185 OS_Interface.pthread_rwlock_t.
187 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
188 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
189 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
190 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
192 2011-09-27 Pascal Obry <obry@adacore.com>
194 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
196 2011-09-27 Pascal Obry <obry@adacore.com>
198 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
199 s-osinte-hpux.ads, s-osinte-irix.ads,
200 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
202 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
203 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
204 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
205 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
206 pthread_rwlock_destroy, pthread_rwlock_rdlock,
207 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
209 2011-09-27 Pascal Obry <obry@adacore.com>
211 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
212 (RE_Id): Add RE_Lock_Read_Only.
213 (RE_Unit_Table): Likewise.
214 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
215 to lift restriction on first character. Handle now the
216 Name_Concurrent_Readers_Locking where policy character is set to
218 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
220 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
221 read only lock for function in protected object.
222 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
223 this routine is now used.
225 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
227 * s-atocou-x86.adb (Decrement): Use %;.
228 (Increment): Likewise.
230 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
232 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
233 dereference of the pointer to the storage area. Remove useless type
234 conversions and factor out common code.
236 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
238 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
239 variable and use it throughout.
240 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
241 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
242 first step. Also convert to the unpadded type as a last step.
244 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
246 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
247 DECL_CHAIN in comment.
248 * gcc-interface/trans.c (gigi): Likewise.
249 (Attribute_to_gnu): Likewise.
250 (build_function_stub): Likewise.
251 (gnat_to_gnu): Likewise.
252 * gcc-interface/utils.c (create_subprog_decl): Likewise.
253 (convert_vms_descriptor64): Likewise.
254 (convert_vms_descriptor32): Likewise.
256 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
258 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
259 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
260 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
261 the type of the record is TYPE_READONLY.
263 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
264 Robert Dewar <dewar@adacore.com>
266 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
267 OUT formal parameter which is of an null-exclusion access subtype.
269 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
271 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
272 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
273 (gnat_to_gnu_param): Likewise.
274 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
275 maybe_unconstrained_array instead of doing the work manually.
276 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
277 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
278 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
279 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
280 (gnat_stabilize_reference): Likewise.
282 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
284 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
285 (SET_TYPE_NULL_BOUNDS): Likewise.
286 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
287 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
288 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
290 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
291 check that the initializer is a valid constant expression for use in
292 initializing a static variable. Add missing guard.
293 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
294 (convert_to_fat_pointer): In the null fat pointer case, build a valid
295 pointer for the bounds.
296 * gcc-interface/utils2.c (compare_fat_pointers): New function.
297 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
299 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
301 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
302 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
303 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
304 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
305 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
306 to the indirect case.
307 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
308 the TREE_THIS_NOTRAP flag.
310 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
312 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
313 iteration scheme, always generate the do-while form if optimization
314 is enabled. Use more straightforward test at the end.
316 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
318 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
319 XNEW instead of xmalloc. Do not build useless pointer type.
320 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
321 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
322 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
324 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
326 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
327 the alignment if this doesn't prevent BLKmode access to the object.
329 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
331 * gcc-interface/Makefile.in (darwin): Do not issue the
332 '-flat_namespace' linker flag during Ada build.
333 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
334 default shared library options.
336 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
338 * gcc-interface/decl.c (annotate_value): Look up expression for
339 insertion in the cache at the end.
341 2011-09-19 Arnaud Charlet <charlet@adacore.com>
343 * gcc-interface/Make-lang.in: Update dependencies.
345 2011-09-19 Steve Baird <baird@adacore.com>
347 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
348 configuration pragma names so that Is_Configuration_Pragma_Name
349 will return True for Name_Annotate. Make corresponding change in
350 Pragma_Id enumeration type. This is needed to allow an Annotate
351 pragma to occur in a configuration pragma file (typically,
353 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
354 * gnat_rm.texi: Note that pragma Annotate may be used as a
355 configuration pragma.
357 2011-09-19 Ed Schonberg <schonberg@adacore.com>
359 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
360 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
362 2011-09-19 Yannick Moy <moy@adacore.com>
364 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
365 for expansion of set membership.
366 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
367 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
368 visible for use in Alfa expansion.
369 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
370 variable in Alfa mode.
372 2011-09-19 Thomas Quinot <quinot@adacore.com>
374 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
376 2011-09-19 Thomas Quinot <quinot@adacore.com>
378 * exp_ch9.adb: Minor reformatting.
380 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
382 * freeze.adb (Build_Renamed_Body): Generic subprograms
383 instantiations cannot be poperly inlined by the compiler, do
384 not set the Body_To_Inline attribute in such cases.
385 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
386 inlining-related flags from the generic subprogram declaration.
388 2011-09-19 Thomas Quinot <quinot@adacore.com>
390 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
391 (Build_Stub_Type): Remove, instead copy components from
392 System.Partition_Interface.RACW_Stub_Type.
393 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
394 (Copy_Component_List): New subprogram.
396 2011-09-19 Yannick Moy <moy@adacore.com>
398 * lib-xref.adb (Generate_Reference): Ignore references to
399 constants in Standard.
401 2011-09-19 Robert Dewar <dewar@adacore.com>
403 * err_vars.ads, errout.ads: Minor reformatting.
405 2011-09-19 Robert Dewar <dewar@adacore.com>
407 * aspects.ads (Impl_Defined_Aspects): New array
408 * lib-writ.adb (No_Dependences): New name for No_Dependence
409 * restrict.adb (No_Dependences): New name for No_Dependence
410 (Check_Restriction_No_Specification_Of_Aspect): New
412 (Set_Restriction_No_Specification_Of_Aspect): New procedure
413 (Restricted_Profile_Result): New variable
414 (No_Specification_Of_Aspects): New variable
415 (No_Specification_Of_Aspect_Warning): New variable
416 * restrict.ads (No_Dependences): New name for No_Dependence
417 (Check_Restriction_No_Specification_Of_Aspect): New procedure
418 (Set_Restriction_No_Specification_Of_Aspect): New procedure
419 * s-rident.ads: Add restriction
420 No_Implementation_Aspect_Specifications, this is also added to
421 the No_Implementation_Extensions profile.
422 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
423 No_Implementation_Defined_Aspects
424 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
425 * sem_prag.adb (Analyze_Aspect_Specifications): Check
426 No_Implementation_Aspects
427 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
428 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
430 2011-09-19 Yannick Moy <moy@adacore.com>
432 * lib-xref.adb (Generate_Reference): Take into account multiple
433 renamings for Alfa refs.
435 2011-09-19 Thomas Quinot <quinot@adacore.com>
437 * g-socthi-mingw.adb: Minor reformatting.
439 2011-09-19 Yannick Moy <moy@adacore.com>
441 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
442 expansion to False in mode Alfa
444 2011-09-19 Pascal Obry <obry@adacore.com>
446 * mingw32.h: Remove obsolete code needed for old versions
449 2011-09-19 Robert Dewar <dewar@adacore.com>
451 * errout.ads: Minor reformatting.
453 2011-09-19 Ed Schonberg <schonberg@adacore.com>
455 * sem_ch6.adb (Analyze_Expression_Function): When the expression
456 function is transformed into a declaration and a body, insert
457 body at the end of the declarative part, to prevent premature
458 freeze actions, and preserve original specification in the
459 subprogram declaration.
461 2011-09-19 Vincent Celier <celier@adacore.com>
463 * projects.texi: Minor editing.
465 2011-09-19 Robert Dewar <dewar@adacore.com>
467 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
468 exp_aggr.adb: Minor reformatting.
470 2011-09-19 Yannick Moy <moy@adacore.com>
472 * lib-xref.adb (Generate_Reference): Change entity referenced
473 to underlying object if any, or else reference to the HEAP.
475 2011-09-15 Arnaud Charlet <charlet@adacore.com>
477 * gcc-interface/Make-lang.in: Update dependencies.
479 2011-09-15 Robert Dewar <dewar@adacore.com>
481 * tree_io.ads: Minor reformatting.
482 * a-intnam.ads: Fix bad header.
484 2011-09-15 Thomas Quinot <quinot@adacore.com>
486 * a-exexpr-gcc.adb: Minor reformatting.
488 2011-09-15 Yannick Moy <moy@adacore.com>
490 * sem_ch6.adb: Propagate information that an expression function comes
491 from source (otherwise references to this entity are not stored).
493 2011-09-15 Robert Dewar <dewar@adacore.com>
495 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
496 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
497 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
499 2011-09-15 Ed Schonberg <schonberg@adacore.com>
501 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
502 if the expression function is not a completion, create a
503 new specification for the generated declaration, and keep the
504 original specification in the generated body. Shorter code also
505 ensures that proper warnings are generated for unused formals
508 2011-09-15 Sergey Rybin <rybin@adacore.com>
510 * tree_io.ads: Update ASIS_Version_Number because of the changes
511 in the tree structures for expression functions.
513 2011-09-15 Arnaud Charlet <charlet@adacore.com>
515 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
516 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
517 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
518 (CLOCK_REALTIME): Fix wrong value on some OSes.
519 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
521 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
523 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
524 to unconstrained array case, deal with each branch of a COND_EXPR.
525 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
526 a COND_EXPR in the initializer, if present.
528 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
530 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
531 of an addressable type.
532 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
533 Deal with those cases for which creating a temporary is mandatory.
535 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
537 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
538 this is a real formal parameter before testing whether it is by ref.
540 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
542 * gcc-interface/gigi.h (build_call_0_expr): Delete.
543 (build_call_1_expr): Likewise.
544 (build_call_2_expr): Likewise.
545 (build_call_n_expr): New prototype.
546 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
547 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
548 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
549 (Exception_Handler_to_gnu_zcx): Likewise.
550 (gnat_to_gnu): Likewise.
551 (build_binary_op_trapv): Likewise.
552 * gcc-interface/utils2.c (build_call_0_expr): Delete.
553 (build_call_1_expr): Likewise.
554 (build_call_2_expr): Likewise.
555 (build_call_n_expr): New function.
556 (build_call_raise): Use build_call_n_expr.
557 (build_call_raise_range): Likewise.
558 (build_call_raise_column): Likewise.
559 (build_call_alloc_dealloc_proc): Likewise.
560 (maybe_wrap_malloc): Likewise.
561 (maybe_wrap_free): Likewise.
563 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
565 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
567 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
568 the result type is null if ENABLE_CHECKING. Set operation_type at the
569 end unconditionally if not set in the previous cases.
570 Use build2 and void_type_node for MODIFY_EXPR.
571 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
573 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
575 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
576 precision when converting to or from an integral type whose precision
577 is not equal to its size.
579 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
581 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
583 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
585 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
587 * system-darwin-ppc64.ads: New file.
589 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
591 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
594 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
596 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
597 size switches to the link phase for shared libs.
599 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
601 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
602 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
604 2011-09-06 Arnaud Charlet <charlet@adacore.com>
606 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
607 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
608 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
610 (TOOLS_FLAGS_TO_PASS): New.
611 (../stamp-tools): Reintroduce, to avoid merge conflicts.
613 2011-09-06 Robert Dewar <dewar@adacore.com>
615 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
616 name for Is_RM_Defined_Unit. Also several fixes to this unit.
618 2011-09-06 Robert Dewar <dewar@adacore.com>
620 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
621 * s-rident.ads: New restriction No_Implementation_Units
622 (this restriction is also part of the profile
623 No_Implementation_Extensions)
624 * sem_ch10.adb (Analyze_With_Clause): Add check for
625 No_Implementation_Units restriction.
627 2011-09-06 Jerome Guitton <guitton@adacore.com>
629 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
632 2011-09-06 Thomas Quinot <quinot@adacore.com>
634 * s-solita.adb: Minor reformatting.
636 2011-09-06 Ed Schonberg <schonberg@adacore.com>
638 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
639 is a rewriting of an expression function does not freeze previous
642 2011-09-06 Robert Dewar <dewar@adacore.com>
644 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
646 2011-09-06 Tristan Gingold <gingold@adacore.com>
648 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
649 powerpc-wrs-vxworksae.
651 2011-09-06 Thomas Quinot <quinot@adacore.com>
653 * s-os_lib.ads (Spawn): Minor documentation clarification,
654 Success is True for a zero exit status.
656 2011-09-06 Ed Schonberg <schonberg@adacore.com>
658 * sem_ch5.adb: Add message for common iterator error.
660 2011-09-06 Ed Schonberg <schonberg@adacore.com>
662 * exp_ch3.adb (Build_Initialization_Call): If the target is a
663 selected component discriminated by a current instance, replace
664 the constraint with a reference to the target object, regardless
665 of whether the context is an init_proc.
667 2011-09-06 Robert Dewar <dewar@adacore.com>
669 * exp_attr.adb: Descriptor_Size is never static.
671 2011-09-06 Robert Dewar <dewar@adacore.com>
673 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
675 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
677 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
680 2011-09-06 Ed Schonberg <schonberg@adacore.com>
682 * sem_res.adb (Resolve): An expression that is the body of an
683 expression function does not freeze.
685 2011-09-06 Matthew Heaney <heaney@adacore.com>
687 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
688 a-cuprqu.adb: Changed copyright notice to indicate current
691 2011-09-06 Vincent Celier <celier@adacore.com>
693 * prj.adb: Minor spelling error fix in comment
694 * sem_res.adb: Minor reformatting
696 2011-09-06 Pascal Obry <obry@adacore.com>
698 * sysdep.c (winflush_nt): Removed as not needed anymore.
699 (winflush_95): Likewise.
700 (winflush_init): Likewise.
701 (winflush_function): Likewise.
702 (getc_immediate_common): Remove call to winflush_function.
704 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
706 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
707 processing for Descriptor_Size.
708 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
709 to account for its broader usage.
710 * sem_attr.adb (Analyze_Attribute): Change the error detection
711 circuitry for Descriptor_Size as the attribute is now applicable
714 2011-09-06 Robert Dewar <dewar@adacore.com>
716 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
718 2011-09-06 Ed Schonberg <schonberg@adacore.com>
720 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
721 in a parameter association must not set the Referenced flag on
723 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
725 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
727 * gnat_rm.texi: Add a section on attribute Descriptor_Size
729 2011-09-06 Arnaud Charlet <charlet@adacore.com>
731 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
732 gnatlink-re): Speed up by using -j0.
734 2011-09-06 Yannick Moy <moy@adacore.com>
736 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
737 Set_Corresponding_Aspect when creating pragma from aspect.
738 (Add_Predicates): Use new field Corresponding_Aspect.
739 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
740 name when present, for the purpose of issuing error messages;
741 remove local procedure Error_Pragma_Arg_Alternate_Name.
742 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
744 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
747 2011-09-06 Robert Dewar <dewar@adacore.com>
749 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
751 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
753 * exp_ch6.adb (Build_Heap_Allocator): Add new
754 local variable Desig_Typ. Code and comment reformatting. Add
755 machinery to ensure that the allocation uses a fat pointer when
756 the type of the return object is a constrained array and the
757 function return type is an unconstrained array.
759 2011-09-06 Vincent Celier <celier@adacore.com>
761 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
762 parameters in subprograms.
764 2011-09-06 Arnaud Charlet <charlet@adacore.com>
766 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
768 2011-09-06 Thomas Quinot <quinot@adacore.com>
770 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
771 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
773 (System.Tasking.Primitive_Operations.Specific.Set): If argument
774 is null, destroy task specific data, to make API consistent with
775 other platforms, and thus compatible with the shared version
777 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
778 Document the above assumption.
780 2011-09-06 Ed Schonberg <schonberg@adacore.com>
782 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
783 variable for type of return value when return type is
784 unconstrained and context is an assignment.
786 2011-09-06 Ed Schonberg <schonberg@adacore.com>
788 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
789 class-wide operation if expansion is not enabled.
791 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
793 * checks.adb (Apply_Scalar_Range_Check): Deal with access
796 2011-09-06 Yannick Moy <moy@adacore.com>
798 * sem_ch13.adb (Analyze_Aspect_Specifications, case
799 Aspect_Invariant): Do not issue error at this point on illegal
800 pragma placement, as this is checked later on when analyzing
801 the corresponding pragma.
802 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
803 similar to Error_Pragma_Arg, except the source name of the
804 aspect/pragma to use in warnings may be equal to parameter
805 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
806 message to distinguish source name of pragma/aspect, and whether
807 the illegality resides in the type being public, or being private
808 without a public declaration
810 2011-09-06 Thomas Quinot <quinot@adacore.com>
812 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
813 size check (fd_set is implemented differently on that platform).
815 2011-09-06 Thomas Quinot <quinot@adacore.com>
817 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
818 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
819 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
820 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
821 (ATCB_Allocation): New subpackage of
822 System.Tasking.Primitive_Operations, shared across all targets
823 with full tasking runtime.
824 (ATCB_Allocation.New_ATCB): Moved there (from target specific
826 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
827 taking care of establishing a local temporary ATCB if the one
828 being deallocated is Self, to avoid a reference to the freed
829 ATCB in Abort_Undefer.
831 2011-09-06 Thomas Quinot <quinot@adacore.com>
833 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
834 terminated, mark it for deallocation upon termination.
835 (Terminate_Task): Call Free_Task again if the task is marked
836 for automatic deallocation upon termination.
838 2011-09-06 Robert Dewar <dewar@adacore.com>
840 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
841 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
842 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
843 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
844 a-intnam-solaris.ads, a-intnam-tru64.ads,
845 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
846 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
847 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
848 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
849 * s-rident.ads: Add new restriction No_Implementation_Identifiers
850 Add new profile No_Implementation_Extensions
851 * sem_prag.adb: Implement pragma Implementation_Defined Implement
852 profile No_Implementation_Extensions
853 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
854 Check violation of restriction No_Implementation_Identifiers
855 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
856 Add entry for Name_No_Implementation_Extensions
858 2011-09-06 Robert Dewar <dewar@adacore.com>
860 * impunit.ads: Minor reformatting.
862 2011-09-06 Robert Dewar <dewar@adacore.com>
864 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
866 2011-09-06 Pascal Obry <obry@adacore.com>
868 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
871 2011-09-06 Robert Dewar <dewar@adacore.com>
873 * g-socket.adb: Minor reformatting
875 2011-09-06 Javier Miranda <miranda@adacore.com>
877 * ali.adb (Scan_ALI): Add missing support to load references of
878 entities imported from other languages.
879 * ali.ads (Xref_Record): Adding new fields to store the language and
880 name of an imported entity.
881 * lib-xref.adb (Output_Import_Export_Info): Fix typo
884 2011-09-06 Ed Schonberg <schonberg@adacore.com>
886 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
887 is allowed on a full type declaration if it is the completion of
888 a private declarations.
889 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
890 aspect is allowed on a full type declaration in the private part
893 2011-09-06 Robert Dewar <dewar@adacore.com>
895 * sem_ch8.ads: Minor reformatting
897 2011-09-06 Thomas Quinot <quinot@adacore.com>
899 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
900 Guard against socket values that are not in [0;FD_SETSIZE[
902 2011-09-06 Robert Dewar <dewar@adacore.com>
904 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
907 2011-09-06 Arnaud Charlet <charlet@adacore.com>
909 * s-linux-alpha.ads: Minor reformatting
910 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
911 Use sizeof instead of corresponding C defines in s-oscons template.
913 2011-09-06 Vadim Godunko <godunko@adacore.com>
915 * a-convec.ads, a-iteint.ads: Minor reformatting.
917 2011-09-06 Vincent Celier <celier@adacore.com>
919 * projects.texi: Add menus and @node lines.
921 2011-09-06 Ed Schonberg <schonberg@adacore.com>
923 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
924 where the return type is an unconstrained array and the context
925 is an assignment. Optimize the case when the target of the
926 assignment is a selected component.
928 2011-09-06 Arnaud Charlet <charlet@adacore.com>
930 * s-solita.adb: Update comments.
932 2011-09-06 Pascal Obry <obry@adacore.com>
934 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
935 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
936 * s-oscons-tmplt.c: Add support for generating pthread related
937 types size on GNU/Linux as done for Darwin.
938 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
940 2011-09-06 Robert Dewar <dewar@adacore.com>
942 * exp_ch6.adb: Fix minor typo.
944 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
946 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
947 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
948 (Double_Size_Of): Alphabetized. Update the comment on usage.
949 (Make_Finalize_Address_Stmts): Update comments and reformat code.
950 (Nearest_Multiple_Rounded_Up): New routine.
951 (Size_Of): Update comment on usage. The generated expression now
952 accounts for alignment gaps by rounding the size of the type to the
953 nearest multiple rounded up of the type's alignment.
955 2011-09-06 Robert Dewar <dewar@adacore.com>
957 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
959 2011-09-06 Steve Baird <baird@adacore.com>
961 * exp_ch4.adb (Expand_Allocator_Expression): Look through
962 derived subprograms in checking for presence of an
963 Extra_Accessibility_Of_Result formal parameter.
964 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
965 checking for presence of an Extra_Accessibility_Of_Result formal
967 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
968 case where the Parameter_Associatiations attribute is already set,
969 but set to an empty list.
970 (Needs_Result_Accessibility_Level):
971 Unconditionally return False. This is a temporary
972 change, disabling the Extra_Accessibility_Of_Result
974 (Expand_Simple_Function_Return): Check for
975 Extra_Accessibility_Of_Result parameter's presence instead of
976 testing Ada_Version when generating a runtime accessibility
977 check which makes use of the parameter.
979 2011-09-06 Ed Schonberg <schonberg@adacore.com>
981 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
982 expression in a given case alternative must be attached to the
983 statement list of the ccrresponding case statement alternative
984 They cannot be propagated ahead of the case statement, because
985 the validity of the expression that generated the action may
986 hold only for that alternative.
988 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
990 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
991 (Alignment_Of): Remove the code for strict alignment targets.
992 (Double_Alignment_Of): Removed.
993 (Double_Size_Of): New routine.
994 (Make_Finalize_Address_Stmts): Change the
995 calculation of the dope's size. Update relevant comments.
996 (Size_Of): New routine.
998 2011-09-06 Steve Baird <baird@adacore.com>
1000 * einfo.ads (Extra_Accessibility): Update associated comment to use
1001 the term "present" correctly ("present" just means that it is not
1002 an error to query the value of the attribute - it does not imply
1003 that the value must be non-null).
1004 (Extra_Constrained): Ditto.
1005 (Is_Visible_Formal): Ditto.
1006 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1007 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1008 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1009 * exp_ch6.adb (Expand_Call): The callee may require an
1010 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1011 < Ada_2012. This can occur if the callee is exported from a Gnat
1012 runtimes unit. Also improve a comment.
1014 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1016 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1017 (Alignment_Of): Rename formal parameter Some_Typ
1018 to Typ, update related comment. Use the allocator alignment on
1019 strict alignment targets such as SPARC.
1020 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1023 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1025 * sem_ch9.adb (Check_Interfaces): Test
1026 Is_Limited_Type rather than Is_Limited_Record when checking that
1027 the partial view of a synchronized full view must be limited.
1029 2011-09-06 Emmanuel Briot <briot@adacore.com>
1031 * g-comlin.adb (Free): Fix memory leak.
1033 2011-09-06 Robert Dewar <dewar@adacore.com>
1035 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1037 2011-09-06 Steve Baird <baird@adacore.com>
1039 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1040 (Ada2012) cases described in AI05-0234 where the accessibility
1041 level of a function result is "determined by the point of
1042 call", an implicit parameter representing that accessibility
1043 level is passed in. Extra_Accessibilty_Of_Result yields this
1044 additional formal parameter. Extra_Accessibility_Of_Result
1045 is analogous to the existing Extra_Accessibility
1046 function used in the implementation of access parameters.
1047 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1048 Extra_Accessibility_Of_Result attribute.
1049 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1050 (Set_Extra_Accessibility_Of_Result): New procedure.
1051 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1052 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1053 an accessibility level literal to Natural; introduce a nested
1054 function, Make_Level_Literal, to do this.
1055 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1056 determines whether a given function (or access-to-function
1057 type) needs to have an implicitly-declared accessibility-level
1058 parameter added to its profile.
1059 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1060 previously declared in the body of Exp_Ch6.
1061 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1063 (Has_Unconstrained_Access_Discriminants): New Function; a
1064 predicate on subtype entities which returns True if the given
1065 subtype is unconstrained and has one or more access discriminants.
1066 (Expand_Call): When expanding a call to a function which takes an
1067 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1068 actual parameter value. In the case of a function call which is
1069 used to initialize an allocator, this may not be possible because
1070 the Etype of the allocator may not have been set yet. In this
1071 case, we defer passing in the parameter and handle it later in
1072 Expand_Allocator_Expression.
1073 (Expand_Simple_Function_Return): When returning from a function which
1074 returns an unconstrained subtype having at least one access
1075 discriminant, generate the accessibility check needed to ensure that
1076 the function result will not outlive any objects designated by its
1078 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1080 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1081 is used to initialize an allocator, we may need to pass in "the
1082 accessibility level determined by the point of call" (AI05-0234)
1083 to the function. Expand_Call, where such actual parameters are
1084 usually generated, is too early in this case because the Etype of
1085 the allocator (which is used in determining the level to be passed
1086 in) may not have been set yet when Expand_Call executes. Instead,
1087 we generate code to pass in the appropriate actual parameter
1088 in Expand_Allocator_Expression.
1089 * sem_ch6.adb (Create_Extra_Formals): Create
1090 the new Extra_Accessibility_Of_Result formal if
1091 Needs_Result_Accessibility_Level returns True. This includes the
1092 introduction of a nested procedure, Check_Against_Result_Level.
1094 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1096 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1099 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1101 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1102 for the synchronization. Move the test for null from
1103 s-stposu.Allocate_Any_Controlled to this routine since the check
1104 needs to be protected too.
1105 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1106 synchronization code.
1107 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1108 explaining the context in which this routine is used.
1109 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1110 to s-finmas.Set_Finalize_Address.
1112 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1114 * einfo.ads: Document that itypes have no parent field.
1116 2011-09-05 Robert Dewar <dewar@adacore.com>
1118 * rtsfind.adb (Check_CRT): Check for overloaded entity
1119 * rtsfind.ads: Document that entities to be found by rtsfind
1120 cannot be overloaded
1121 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1122 (Lock_Entries_With_Status): New name for Lock_Entries with two
1123 arguments (changed to meet rtsfind no overloading rule).
1125 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1127 * s-finmas.adb (Set_Finalize_Address (Address,
1128 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1129 (Set_Finalize_Address (in out Finalization_Master,
1130 Finalize_Address_Ptr): Add synchronization code.
1131 * s-finmas.ads (Set_Finalize_Address (Address,
1132 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1133 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1134 Set_Finalize_Address for the heterogeneous case.
1136 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1138 * sem_ch3.adb: Undo previous change, not suitable after all.
1140 2011-09-05 Robert Dewar <dewar@adacore.com>
1142 * einfo.ads: Minor comment clarification.
1144 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1146 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1147 no longer needs to search through the entities of the return
1148 statement scope to find the _chain.
1149 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1150 (Analyze_Block_Statement): Add local variable
1151 Is_BIP_Return_Statement. Add machinery to install all entities
1152 produced by the expansion of the return object declaration.
1153 (Install_Return_Entities): New routine.
1154 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1156 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1158 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1159 of subunit is incomplete.
1160 (Analyze_Proper_Body): If parent spec is not available, do not
1163 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1165 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1166 interface type conversions, that are expanded into dereferences.
1168 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1170 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1171 Examine the parameter and return profile of a subprogram and swap
1172 any incomplete types coming from a limited context with their
1173 corresponding non-limited views.
1174 (Exchange_Limited_Views): New routine.
1176 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1178 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1179 of internal entity to the subtype declaration, so that when
1180 entities are subsequently exchanged in a package body, the tree
1181 remains properly formatted for ASIS.
1183 2011-09-05 Johannes Kanig <kanig@adacore.com>
1185 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1187 (Display_Help): display the user given help message, if available.
1189 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1191 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1192 is legal if the original node is an identifier that is a
1193 parameterless function call.
1195 2011-09-05 Pascal Obry <obry@adacore.com>
1197 * prj-nmsc.adb: Minor reformatting.
1198 Add support for standalone aggregate library.
1199 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1200 * projects.texi: Fix documentation for aggregate library projects.
1202 2011-09-05 Robert Dewar <dewar@adacore.com>
1204 * sem_ch6.adb: Minor reformatting.
1206 2011-09-05 Matthew Gingell <gingell@adacore.com>
1208 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1209 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1210 the bottom of the stack is not overwritten.
1212 2011-09-05 Thomas Quinot <quinot@adacore.com>
1214 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1216 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1218 * sem_ch3.adb (Access_Definition): If an access type declaration
1219 appears in a child unit, the scope of whatever anonymous type
1220 may be generated is the child unit itself.
1222 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1224 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1225 Comes_From_Source on rewritten body.
1226 (Analyze_Subprogram_Body_Helper): Check that the original node for
1227 the body comes from source, when determining whether expansion
1228 of a protected operation is needed.
1230 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1232 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1233 a selected component and the right-hand side is a self-referential
1234 access, the proper prefix of the rewritten attribute is a copy
1235 of the left-hand side, not of its prefix.
1237 2011-09-05 Robert Dewar <dewar@adacore.com>
1239 * sem_ch5.adb: Minor reformatting.
1240 * sem_ch3.adb: Minor code clean up.
1242 2011-09-05 Jose Ruiz <ruiz@adacore.com>
1244 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1245 restriction No_Dynamic_Attachment is in effect or not should
1246 not influence the default priority associated to a protected
1247 object. With this change, when the restriction is in effect (as
1248 is the case for the Ravenscar profile) the default priority of
1249 a protected object with an interrupt handler is in the range of
1250 interrupt priorities (Default_Interrupt_Priority) as required
1253 2011-09-05 Arnaud Charlet <charlet@adacore.com>
1255 * a-iteint.ads: Fix header.
1257 2011-09-05 Vincent Celier <celier@adacore.com>
1259 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1260 with a directory separator to avoid output such as:
1261 "/path/to/objauto.cgpr" has been deleted.
1263 2011-09-05 Robert Dewar <dewar@adacore.com>
1265 * sem_ch3.adb: Minor reformatting.
1267 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1269 * sem_ch5.adb: Better error message.
1271 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1273 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1274 (Expand_Array_Aggregate): Detect a special case of an aggregate
1275 which contains tasks in the context of an unexpanded return
1276 statement of a build-in-place function.
1277 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1278 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1279 which contains tasks and expand it now that the original simple
1280 return statement has been rewritten.
1281 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1282 reformatting. Do not create a chain for an extended return
1283 statement if one is already available.
1284 (Has_Activation_Chain): New routine.
1286 2011-09-05 Marc Sango <sango@adacore.com>
1288 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1289 the wrong test and add the correct test to detect the violation
1290 of illegal use of unconstrained string type in SPARK mode.
1292 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1294 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1295 message on an iterator over an array.
1297 2011-09-05 Robert Dewar <dewar@adacore.com>
1299 * lib-xref-alfa.adb: Minor reformatting.
1301 2011-09-05 Robert Dewar <dewar@adacore.com>
1303 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1304 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1306 2011-09-05 Gary Dismukes <dismukes@adacore.com>
1308 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1310 2011-09-05 Johannes Kanig <kanig@adacore.com>
1312 * lib-xref-alfa.adb: Update comments.
1314 2011-09-05 Thomas Quinot <quinot@adacore.com>
1316 * sem_res.adb: Minor reformatting
1318 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1320 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1321 present, create them now. Needed in case the return type was
1322 a limited view in the function declaration.
1323 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1324 tasks, build the activation chain for it. Pass a reference to
1325 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1326 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1327 with build_in_place calls.
1328 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1329 incomplete, inatialize its Corresponding_Record_Type component.
1330 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1333 2011-09-05 Johannes Kanig <kanig@adacore.com>
1335 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1338 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1340 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1341 appears within a package specification and the token after "IS"
1342 is not a parenthesis, assume that this is an unparenthesized
1343 expression function, even if the token appears in a line by
1345 * par.adb: Clarify use of Labl field of scope stack in error
1348 2011-09-05 Bob Duff <duff@adacore.com>
1350 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1351 conversions instead of normal type conversions in all cases where a
1352 type conversion would be illegal. In particular, use unchecked
1353 conversions when the operand types are private.
1355 2011-09-05 Johannes Kanig <kanig@adacore.com>
1357 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1358 objects of task type or protected type.
1360 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1362 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1363 function comes from source, indicate that so does its rewriting,
1364 so it is compatible with any subsequent expansion of the
1365 subprogram body (e.g. when it is a protected operation).
1366 * sem_ch4.adb: minor reformatting
1368 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1370 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1371 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1372 may lead to wrong ancestor package in the case of instantiated subunit
1373 bodies. If a subunit is instantiated, follow the chain of instantiations
1374 rather than the stub structure.
1376 2011-09-02 Robert Dewar <dewar@adacore.com>
1378 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1379 * gcc-interface/Make-lang.in: Update dependencies.
1381 2011-09-02 Marc Sango <sango@adacore.com>
1383 * sem_ch3.adb (Analyze_Object_Declaration): Change
1384 comment and add additional check to differentiate constant of
1385 type string from others unconstrained type.
1387 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1389 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1390 present in incomplete type declarations to refine the error
1391 message the full declaration is in the same unit.
1392 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1393 an incomplete type, set the Premature_Use for additional message.
1394 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1395 and Premature_Use is set, place additional information at the
1396 point of premature use.
1398 2011-09-02 Bob Duff <duff@adacore.com>
1400 * sem_ch6.adb: (Check_Post_State): Suppress warning
1401 "postcondition refers only to pre-state" when the expression has not
1402 yet been analyzed, because it causes false alarms. This can happen when
1403 the postcondition contains a quantified expression, because those are
1404 analyzed later. This is a temporary/partial fix.
1405 (Process_Post_Conditions): Minor: change wording of warning.
1407 2011-09-02 Marc Sango <sango@adacore.com>
1409 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1410 illegal use of unconstrained string type in SPARK mode.
1411 * sem_res.adb (Analyze_Operator_Symbol): Set the
1412 right place where the string operand of concatenation should be
1413 violate in SPARK mode.
1415 2011-09-02 Robert Dewar <dewar@adacore.com>
1417 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1418 exp_ch3.adb: Minor reformatting.
1420 2011-09-02 Vincent Celier <celier@adacore.com>
1422 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1423 as the compiler driver so Is_Compilable returns True for sources.
1424 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1427 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1429 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1430 condition, a reference to a controlling formal must be interpreted
1431 as having the class-wide type (or an access to such) so that the
1432 inherited condition can be properly applied to any overriding
1433 operation (see ARM12 6.6.1 (7)).
1435 2011-09-02 Tristan Gingold <gingold@adacore.com>
1437 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1440 2011-09-02 Javier Miranda <miranda@adacore.com>
1442 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1443 initializing expression of a class-wide interface object declaration
1444 if its type is limited.
1446 2011-09-02 Johannes Kanig <kanig@adacore.com>
1448 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1449 literals, take into account the type name; the type is *not*
1450 the scope for an enumeration literal.
1452 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1454 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1455 to reject an overriding indicator on a user-defined Adjust
1456 subprogram for a limited controlled type.
1458 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1460 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1461 for an actual that is a function call returning an unconstrained
1462 limited controlled type.
1464 2011-09-02 Tristan Gingold <gingold@adacore.com>
1466 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1468 2011-09-02 Johannes Kanig <kanig@adacore.com>
1470 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1471 from "HEAP" to __HEAP Change comment that refers to that variable
1472 * put_alfa.adb: Change comment that refers to that variable
1474 2011-09-02 Robert Dewar <dewar@adacore.com>
1476 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1478 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1480 * exp_util.adb (Extract_Renamed_Object): Renamed to
1481 Find_Renamed_Object. This routine has been reimplemented and now uses
1482 tree traversal to locate a renamed object.
1483 (Is_Aliased): Replace call to Extract_Renamed_Object with
1484 Find_Renamed_Object.
1486 2011-09-02 Tristan Gingold <gingold@adacore.com>
1488 * init.c: (__gnat_is_vms_v7): New function.
1490 2011-09-02 Olivier Hainque <hainque@adacore.com>
1492 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
1493 that have a misaligned backchain, necessarily bogus.
1495 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1497 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
1498 TSS routine Finalize_Address when compiling in Alfa mode.
1499 (Expand_Freeze_Record_Type): Do not create TSS routine
1500 Finalize_Address when compiling in Alfa mode.
1501 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
1502 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
1504 (Expand_N_Allocator): Do not produce a call to
1505 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
1506 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
1507 produce a call to primitive Set_Finalize_Address in Alfa mode because
1508 Finalize_Address is not built.
1509 * exp_ch7.adb (Build_Finalization_Master): Do not create
1510 finalization masters in Afa mode since they are not needed.
1511 (Build_Finalizer): Do not create scope and library-level
1512 finalizers in Alfa mode since they are not needed.
1513 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
1514 "new" and "free" when applied to controlled objects in Alfa mode since
1517 2011-09-02 Vincent Celier <celier@adacore.com>
1519 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
1520 only library names with the syntax of Ada identifiers, to avoid errors
1521 when compiling the binder generated files.
1522 * projects.texi: Document restriction on SAL library names
1524 2011-09-02 Thomas Quinot <quinot@adacore.com>
1526 * a-chtgbo.adb: Minor comment fix.
1528 2011-09-02 Robert Dewar <dewar@adacore.com>
1530 * lib-xref.adb: Minor reformatting
1532 2011-09-02 Vincent Celier <celier@adacore.com>
1534 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
1535 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
1536 --version and --help in usage.
1537 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
1539 2011-09-02 Bob Duff <duff@adacore.com>
1541 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
1542 compilers don't understand it.
1544 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1546 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
1547 underlying subtype rather than its base type on the call to
1548 Build_Record_Or_Elementary_Input_Function, so that any
1549 constraints on a discriminated subtype will be available for
1550 doing the check required by AI05-0192.
1551 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1552 If the prefix subtype of the 'Input attribute is a constrained
1553 discriminated subtype, then check each constrained discriminant value
1554 against the corresponding value read from the stream.
1556 2011-09-02 Yannick Moy <moy@adacore.com>
1558 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
1559 warnings on suspicious contracts, and enable them with -gnatwa.
1561 2011-09-02 Robert Dewar <dewar@adacore.com>
1563 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
1566 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1568 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
1569 which ensure that restriction No_Dynamic_Attachment has not been
1571 (Make_Initialize_Protection): Protected types with attach or
1572 interrupt handlers must not violate restriction No_Dynamic_Attachment.
1573 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
1574 which ensures that restriction No_Dynamic_Attachment has not been
1576 * sem_attr.adb: (Eval_Attribute): Transform
1577 VAX_Float_Type'First and 'Last into references to
1578 the temporaries which store the corresponding bounds. The
1579 transformation is needed since the back end cannot evaluate
1580 'First and 'Last on VAX.
1581 (Is_VAX_Float): New routine.
1583 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1585 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
1586 generic unit is not intrinsic and has an explicit convention,
1587 the instance inherits it.
1589 2011-09-02 Robert Dewar <dewar@adacore.com>
1591 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
1592 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
1594 2011-09-02 Thomas Quinot <quinot@adacore.com>
1596 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
1597 Guard against a prefix that is an N_Has_Entity but has no
1600 2011-09-02 Yannick Moy <moy@adacore.com>
1602 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
1605 2011-09-02 Yannick Moy <moy@adacore.com>
1607 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
1608 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
1610 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
1611 procedure looking for suspicious postconditions.
1612 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
1613 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
1614 options -gnatw.t and -gnatw.T.
1616 2011-09-02 Pascal Obry <obry@adacore.com>
1618 * prj.adb: Minor code refactoring. Move check for null project in
1620 * projects.texi: Fix minor typos.
1622 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1624 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1625 of iteration is an expression, its value must be captured in a
1626 renaming declaration, so that modification of the elements is
1627 propagated to the original container.
1629 2011-09-02 Pascal Obry <obry@adacore.com>
1631 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
1632 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
1633 prj-tree.adb: Minor reformatting and style fixes.
1635 2011-09-02 Robert Dewar <dewar@adacore.com>
1637 * s-rident.ads: Add new restriction No_Implicit_Aliasing
1638 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
1639 No_Implicit_Aliasing
1640 (Analyze_Attribute, case Address): ditto
1641 (Analyze_Attribute, case Unrestricted_Access): ditto
1642 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
1643 No_Implicit_Aliasing restriction.
1644 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
1646 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1648 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
1649 is an unchecked conversion, apply test to its expression.
1651 2011-09-02 Javier Miranda <miranda@adacore.com>
1653 * sem_ch3.adb (Check_Abstract_Overriding): When
1654 traversing the chain of aliased subprograms avoid reporting a
1655 redundant error on the current entity.
1657 2011-09-02 Sergey Rybin <rybin@adacore.com>
1659 * gnat_ugn.texi: Minor clean up.
1661 2011-09-02 Bob Duff <duff@adacore.com>
1663 * s-htable.adb (Set_If_Not_Present): Use renaming
1664 instead of ":=", because the type Key is limited in the generic (even
1665 if not in the instances).
1667 2011-09-02 Robert Dewar <dewar@adacore.com>
1669 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
1670 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
1673 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1675 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
1676 inherited component with the enclosing derived type. Code reformatting.
1678 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1680 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
1681 return done when overflow checks are enabled, since comparisons against
1682 Lor and Hir should not be done when OK1 is False.
1684 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1686 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1687 Add new formal Master_Exp. When present, add that expression to the
1688 call as an extra actual.
1689 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
1690 Fmaster_Actual and in the case of a BIP call initializing a return
1691 object of an enclosing BIP function set it to a
1692 new reference to the implicit finalization master
1693 formal of the enclosing function. Fmaster_Actual is
1694 then passed to the new formal Master_Exp on the call to
1695 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
1696 initializations of Enclosing_Func to its declaration.
1698 2011-09-02 Thomas Quinot <quinot@adacore.com>
1700 * csets.ads: Minor reformatting
1702 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1704 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
1705 the full view of a private type coming from an instantiation.
1706 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
1707 loop to iterate over the declarations rather than use the
1708 First_Entity / Next_Entity scheme.
1710 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1712 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
1713 X'range (N) into X'First (N) .. X'Last (N), do not share the
1714 dimension indicator N, if present. Even though it is a static
1715 constant, its source location may be modified when printing
1716 expanded code under -gnatDL, and node sharing will lead to chaos
1717 in Sprint on large files, by generating a sloc value that does
1718 not correspond to any source file.
1720 2011-09-02 Bob Duff <duff@adacore.com>
1722 * einfo.adb: (Has_Xref_Entry): Do not call
1723 Implementation_Base_Type. Lib.Xref has been
1724 rewritten to avoid the need for it, and it was costly.
1725 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
1726 functions in support of efficient xref.
1727 * lib-xref-alfa.adb: Misc changes related to Key component of
1729 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
1730 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
1731 no longer does. This is the one place where it is needed.
1733 2011-09-02 Johannes Kanig <kanig@adacore.com>
1735 * g-comlin.adb (Getopt): New optional argument Concatenate to have
1736 similar interface as the other Getopt function.
1738 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1740 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
1741 a call to Set_Finalize_Address if there is no allocator available.
1742 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
1743 a case of allocator expansion where the allocator is not expanded but
1744 needs a custom allocate routine. Code reformatting.
1745 (Is_Finalizable_Transient): Remove local variables Has_Rens and
1746 Ren_Obj. Code reformatting.
1747 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
1748 through the use of 'reference.
1749 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
1750 as part of build-in-place expansion. They are intentionally marked as
1751 coming from source, but their parents are not.
1753 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1755 * sem_ch10.adb (Analyze_With_Clause): If the library unit
1756 is the generated subprogram declaration for a child unit body
1757 that acts as spec, use the original body in the with_clause,
1758 to prevent binding errors.
1760 2011-09-02 Vincent Celier <celier@adacore.com>
1762 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
1763 qualifier /MULTI_UNIT_INDEX=
1765 2011-09-02 Johannes Kanig <kanig@adacore.com>
1767 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
1768 instead of calling the callback function
1770 2011-09-02 Robert Dewar <dewar@adacore.com>
1772 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
1773 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
1775 2011-09-02 Vincent Celier <celier@adacore.com>
1777 * prj-nmsc.adb: (Find_Sources): When the list of sources is
1778 explicitly declared in an extending project, do not warn if a source
1779 for an inherited naming exception is not found.
1781 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1783 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
1784 expansion is inactive.
1786 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1788 * sem_util.adb (Note_Possible_Modification): If the entity
1789 being modified is the renaming generated for an Ada2012 iterator
1790 element, the enclosing container or array is modified as well.
1792 2011-09-02 Jose Ruiz <ruiz@adacore.com>
1794 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
1795 Initialize): Define and initialize the
1796 mutex attributes and condition variable attributes locally.
1798 2011-09-02 Vincent Celier <celier@adacore.com>
1800 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
1801 exception replaced in an extending project.
1802 (Check_Object): No error when the other source is locally removed.
1804 2011-09-02 Yannick Moy <moy@adacore.com>
1806 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
1809 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1811 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
1813 * gcc-interface/Make-lang.in: Update dependencies.
1815 2011-09-01 Robert Dewar <dewar@adacore.com>
1817 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
1819 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1821 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
1822 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
1823 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
1824 specific for systems where their glibc version does not define the
1825 routines to handle dynamically allocated CPU sets.
1827 2011-09-01 Vincent Celier <celier@adacore.com>
1829 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
1830 prj-env.adb: Implement inheritance of naming exceptions in extending
1833 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
1835 * gnatls.adb: Display simple message instead of content of
1838 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1840 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
1841 access discriminant and anonymous access component scopes.
1842 (Inherit_Component): Reuse the itype of an access discriminant
1843 or anonymous access component by copying it in order to set the proper
1844 scope. This is done only when the parent and the derived type
1845 are in different scopes.
1846 (Set_Anonymous_Etype): New routine.
1848 2011-09-01 Robert Dewar <dewar@adacore.com>
1850 * a-convec.adb: Minor reformatting throughout.
1852 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1854 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
1855 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
1856 CPU_ALLOC_SIZE and CPU_FREE linux macros.
1857 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
1858 CPU_SET_S respectively because we are now using dynamically allocated
1859 CPU sets which are more portable across different glibc versions.
1860 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
1861 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
1862 masks dynamically according to the number of processors in the target
1864 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
1865 respectively, so we need to pass the size of the masks as
1867 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
1868 created cpu_set_t masks
1869 with the number of processors available in the target platform,
1870 instead of static bit arrays. It enhances portability because
1871 it uses the information from the target platform.
1872 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
1873 are using a restricted run-time library, use the flag
1874 Configurable_Run_Time_Mode instead of Restricted_Profile.
1876 2011-09-01 Vincent Celier <celier@adacore.com>
1878 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
1879 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
1881 2011-09-01 Nicolas Roche <roche@adacore.com>
1883 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
1884 on VxWorks in kernel mode.
1886 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1888 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
1889 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
1890 directly the bit array.
1891 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
1892 the linux macros with the same name.
1893 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
1894 wrappers around the CPU_ZERO and CPU_SET linux macros.
1896 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1898 * exp_ch7.adb (Find_Insertion_List): Removed.
1899 (Process_Transient_Objects): Insert the declarations of the hook
1900 access type and the hook object before the associated transient object.
1902 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1904 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
1905 package System.Aux_Dec when using restricted run-time libraries which
1906 do not have this package.
1908 2011-09-01 Tristan Gingold <gingold@adacore.com>
1910 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
1912 2011-09-01 Bob Duff <duff@adacore.com>
1914 * sem_attr.adb (Analyze_Access_Attribute): Do not call
1915 Kill_Current_Values for P'Unrestricted_Access, where P is library level
1917 2011-09-01 Thomas Quinot <quinot@adacore.com>
1919 * exp_ch5.adb: Minor reformatting
1920 * gnat_ugn.texi: Fix minor typos.
1921 * gcc-interface/Make-lang.in: Update dependencies.
1923 2011-09-01 Robert Dewar <dewar@adacore.com>
1925 * inline.adb, sem_aggr.adb: Minor reformatting.
1927 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1929 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
1931 2011-09-01 Robert Dewar <dewar@adacore.com>
1933 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
1935 2011-09-01 Bob Duff <duff@adacore.com>
1937 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
1938 body" the same as "in inlined body", because visibility shouldn't
1941 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
1943 * inline.adb (Add_Inlined_Body): Refine previous change.
1945 2011-09-01 Gary Dismukes <dismukes@adacore.com>
1947 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
1948 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1949 Test for case where call
1950 initializes an object of a return statement before testing for
1951 a constrained call, to ensure that all such cases get handled
1952 by simply passing on the caller's parameters. Also, in that
1953 case call Needs_BIP_Alloc_Form to determine whether to pass on
1954 the BIP_Alloc_Form parameter of the enclosing function rather
1955 than testing Is_Constrained. Add similar tests for the return
1956 of a BIP call to later processing to ensure consistent handling.
1957 (Needs_BIP_Alloc_Form): New utility function.
1958 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
1959 a BIP_Alloc_Form formal with call to new utility function
1960 Needs_BIP_Alloc_Form.
1962 2011-09-01 Pascal Obry <obry@adacore.com>
1964 * prj-part.adb: Minor reformatting.
1966 2011-09-01 Vincent Celier <celier@adacore.com>
1968 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
1969 half character in the unit name.
1971 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1973 * exp_ch4.adb: Minor code and comment reformatting.
1975 2011-09-01 Thomas Quinot <quinot@adacore.com>
1977 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
1978 for Is_Limited_Type and Is_Tagged_Type in condition checking
1979 for by-reference type.
1980 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
1981 subprograms may have a completion because of a previous
1982 Inline_Always clause, but the enclosing package must be marked
1983 inlined for the subprogram body to become visible to the backend.
1985 2011-09-01 Thomas Quinot <quinot@adacore.com>
1987 * sem_aux.adb, exp_ch4.adb: Minor reformatting
1989 2011-09-01 Pascal Obry <obry@adacore.com>
1991 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
1993 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1995 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
1996 the formals of a subprogram stub that acts as a spec.
1998 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2000 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2001 type, declare a renaming for it, not an object declaration.
2003 2011-09-01 Yannick Moy <moy@adacore.com>
2005 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2006 Ignore_Errors to ignore failures to read ALI files when True.
2008 2011-09-01 Javier Miranda <miranda@adacore.com>
2010 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2011 constructor calls associated with non-tagged record types.
2013 2011-09-01 Robert Dewar <dewar@adacore.com>
2015 * g-socthi-vms.adb: Minor reformatting.
2017 2011-09-01 Nicolas Roche <roche@adacore.com>
2019 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2020 in order to avoid impact of imcompatible changes.
2021 * cstreams.c: Likewise
2023 * aux-io.c: Likewise
2025 2011-09-01 Yannick Moy <moy@adacore.com>
2027 * lib-writ.adb (Write_With_Lines): Always output complete information
2028 on "with" line in Alfa mode, as this is required by formal verification
2031 2011-09-01 Tristan Gingold <gingold@adacore.com>
2033 * g-socthi-vms.adb: Add comments.
2035 2011-09-01 Pascal Obry <obry@adacore.com>
2037 * prj.ads: Minor reformatting.
2039 2011-09-01 Vincent Celier <celier@adacore.com>
2041 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2042 exceptions in the config pragmas file.
2044 2011-09-01 Tristan Gingold <gingold@adacore.com>
2046 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2048 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2050 * exp_ch7.adb (Find_Insertion_List): New routine.
2051 (Process_Transient_Objects): Add code to handle the abnormal
2052 finalization of a controlled transient associated with a subprogram
2053 call. Since transients are cleaned up right after the associated
2054 context, an exception raised during a subprogram call may bypass the
2057 2011-09-01 Robert Dewar <dewar@adacore.com>
2059 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2062 2011-09-01 Robert Dewar <dewar@adacore.com>
2064 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2066 2011-09-01 Robert Dewar <dewar@adacore.com>
2068 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2070 2011-09-01 Thomas Quinot <quinot@adacore.com>
2072 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2073 GNATRTL_NONTASKING_OBJS.
2075 2011-09-01 Robert Dewar <dewar@adacore.com>
2077 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2078 possibility of this flag being set for formals in Ada 2012 mode.
2079 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2081 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2083 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2085 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2088 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2090 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2091 insertion node in a tree of nested Expression_With_Actions nodes.
2092 (Process_Transient_Object): In the case where a complex if statement
2093 has been converted into nested Expression_With_Actions nodes, the
2094 "hook" object and the associated access type must be inserted before
2095 the top most Expression_With_Actions.
2097 2011-09-01 Robert Dewar <dewar@adacore.com>
2099 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2100 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2102 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2104 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2106 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2108 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2110 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2111 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2112 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2113 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2114 Dispatching_Domains_Frozen): Move this local data to package
2115 System.Tasking because with the CPU aspect we need to have access
2116 to this data when creating the task in System.Tasking.Stages.Create_Task
2117 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2118 Move these variables from the body of
2119 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2120 we need to have access to this data when creating the task in
2121 System.Tasking.Stages.Create_Task.
2122 * s-taskin.adb (Initialize): Signal the allocation of the environment
2123 task to a CPU, if any, so that we know whether the CPU can be
2124 transferred to a different dispatching domain.
2125 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2126 is being allocated belongs to the dispatching domain where the task
2127 lives. Signal the allocation of the task to a CPU, if any, so that we
2128 know whether the CPU can be transferred to a different dispatching
2131 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2133 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2134 attributes Same_Storage and Overlaps_Storage.
2136 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2138 * exp_strm.adb: Remove with and use clause for Opt.
2139 (Build_Array_Input_Function): Remove the version-dependent generation
2140 of the return statement. The Ada 2005 tree is now the default.
2142 2011-09-01 Yannick Moy <moy@adacore.com>
2144 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2145 it is never empty when compiling in Alfa mode.
2147 2011-09-01 Robert Dewar <dewar@adacore.com>
2149 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2150 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2151 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2152 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2154 2011-09-01 Matthew Heaney <heaney@adacore.com>
2156 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2157 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2158 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2159 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2160 unbounded queue container.
2161 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2162 bounded queue container.
2163 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2164 unbounded priority queue container.
2165 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2166 bounded priority queue container.
2168 2011-08-31 Pascal Obry <obry@adacore.com>
2170 * a-direct.adb: Do not try to create an UNC path on Windows.
2171 (Create_Path): Skip leading computer name in UNC path if any.
2173 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2175 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2176 version-dependent generation of the return statement. The Ada 2005 tree
2179 2011-08-31 Thomas Quinot <quinot@adacore.com>
2181 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2182 types Stream_Element_Offset and Storage_Offset have a different native
2183 type depending on whether the platform is 32 or 64 bits. When
2184 exchanging them, always convert to 64 bits.
2186 2011-08-31 Yannick Moy <moy@adacore.com>
2188 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2189 --force-alfa to gnat2why.
2191 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2193 * sem_ch12.adb (Save_References): If the node has aspects, save
2194 references within the corresponding expressions in a separate step,
2195 because the aspects are not directly in the tree for the declaration
2196 to which they belong.
2198 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2200 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2201 in CodePeer mode, since representation clauses are partially ignored.
2202 * gcc-interface/Make-lang.in: Update dependencies.
2204 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2206 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2207 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2208 to any dispatching domain.
2210 2011-08-31 Thomas Quinot <quinot@adacore.com>
2212 * exp_ch4.adb: Minor reformatting.
2214 2011-08-31 Bob Duff <duff@adacore.com>
2216 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2217 on nodes for which it is not defined.
2218 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2221 2011-08-31 Bob Duff <duff@adacore.com>
2223 * sem_ch3.adb (Process_Full_View): Disable legality check if
2224 In_Instance, to avoid spurious errors.
2225 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2226 if In_Instance, to avoid spurious errors.
2228 2011-08-31 Pascal Obry <obry@adacore.com>
2230 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2231 directory speparators.
2232 (Compose): Use Dir_Seps to handle both forms.
2233 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2235 (Extension): Use Dir_Seps to handle both forms.
2237 2011-08-31 Pascal Obry <obry@adacore.com>
2239 * prj-conf.adb: Minor reformatting.
2241 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2243 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2244 dispatching domain aspect.
2245 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2247 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2248 Dispatching_Domain aspect in a similar way as we do for the Priority
2250 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2251 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2253 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2254 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2255 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2256 Dispatching_Domain and add it to the task definition.
2257 (Sig_Flags): Add Pragma_Dispatching_Domain.
2258 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2259 support to find the types Dispatching_Domain and
2260 Dispatching_Domain_Access.
2261 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2262 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2263 query the availability of a pragma Dispatching_Domain.
2264 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2265 the expander to pass the Dispatching_Domain when creating a task.
2266 (Name_Dispatching_Domain): Add this new name for a pragma.
2267 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2268 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2269 task has been allocated at creation time.
2270 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2271 Ravenscar is always null.
2272 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2273 the task has been allocated at creation time.
2274 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2275 a specific dispatching domain.
2276 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2277 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2278 and CPU are specified for the task, and the CPU value is not contained
2279 within the range of processors for the domain.
2281 2011-08-31 Vincent Celier <celier@adacore.com>
2283 * make.adb (Original_Gcc) : New constant String_Access.
2284 (Gnatmake): For VM targets, do not use VM version of the compiler if
2285 --GCC= has been specified.
2287 2011-08-31 Thomas Quinot <quinot@adacore.com>
2289 * sem_ch5.adb: Minor reformatting.
2291 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2293 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2296 2011-08-31 Bob Duff <duff@adacore.com>
2298 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2299 the access type is private; we don't care about privacy in expansion.
2301 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2303 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2304 subcomponents tnat may be limited, because they originate in view
2305 conflicts. If the original aggregate is legal and the actuals are
2306 legal, the aggregate itself is legal.
2308 2011-08-31 Matthew Heaney <heaney@adacore.com>
2310 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2313 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2315 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2318 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2320 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2321 Interrupt_Priority aspects, force the analysis of the aspect expression
2322 (when building the equivalent pragma). Otherwise, its analysis is done
2323 too late, after the task or protected object has been created.
2324 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2325 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2326 to the object declaration because they are needed in the type
2329 2011-08-31 Robert Dewar <dewar@adacore.com>
2331 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2332 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2335 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2337 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2338 if the corresponding type is malformed due to restriction violations.
2340 2011-08-31 Robert Dewar <dewar@adacore.com>
2342 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2344 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2346 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2347 would cause the generation of Set_Finalize_Address if the target is a
2348 VM and the designated type is not derived from [Limited_]Controlled.
2350 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2352 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2354 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2355 case of a compilation error.
2357 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2359 * init.c (__gnat_error_handler): Standardize the stack overflow or
2360 erroneous memory access message.
2361 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2362 or erroneous memory access message.
2364 2011-08-31 Robert Dewar <dewar@adacore.com>
2366 * sem_ch4.adb: Minor reformatting.
2367 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2369 2011-08-31 Thomas Quinot <quinot@adacore.com>
2371 * scos.ads: Minor documentation clarification.
2372 * put_scos.adb: Do not generate SCO unit header line for a unit that
2375 2011-08-31 Robert Dewar <dewar@adacore.com>
2377 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2379 2011-08-31 Tristan Gingold <gingold@adacore.com>
2381 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2382 hold variables between these following subprograms.
2383 (Build_Exception_Handler, Build_Object_Declarations,
2384 Build_Raise_Statement): Use the above type as parameter.
2385 Make the above adjustments.
2386 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2388 2011-08-31 Pascal Obry <obry@adacore.com>
2390 * projects.texi: Minor reformatting.
2392 2011-08-31 Tristan Gingold <gingold@adacore.com>
2394 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2395 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2397 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2399 * exp_ch5.adb: Minor code cleanup.
2400 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2401 prevent cascaded errors.
2402 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2403 variable of an iterator specification in current scope.
2404 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2405 postconditions on the stack, as they contain no return statements.
2407 2011-08-31 Yannick Moy <moy@adacore.com>
2409 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2410 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2411 call Qualify_Entity_Names.
2412 (Expand_Alfa): call Qualify_Entity_Names in more cases
2413 * lib-xref-alfa.adb: Take into account system package.
2414 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2415 CodePeer mode in which we are interested in finding bugs even if
2416 compiler cannot compile source.
2417 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2420 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2422 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2423 denoted by the subtype mark to ensure getting the concurrent type in
2424 the case where the subtype mark denotes a private subtype of a
2425 concurrent type (needed when using -gnatc).
2426 (Process_Subtype): For the processing specific to type kinds, case on
2427 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2428 subtype denotes a private subtype whose base type is nonprivate (needed
2429 for subtypes of private fulfilled by task types when compiling with
2432 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2434 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2435 late primitives that override interface operations when the full
2436 expander is not active, to avoid blowups in Register_Primitive when
2437 types don't have associated secondary dispatch tables.
2439 2011-08-31 Yannick Moy <moy@adacore.com>
2441 * alfa_test.adb: Code clean up.
2443 2011-08-31 Marc Sango <sango@adacore.com>
2445 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2446 by Comes_From_Source (Original_Node (N)) in order to treat also the
2447 nodes which have been rewritten.
2448 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2449 explicit dereference and slice violation in spark mode on the nodes
2450 coming only from the source code.
2452 2011-08-31 Robert Dewar <dewar@adacore.com>
2454 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2455 lib-xref-alfa.adb: Minor reformatting.
2457 2011-08-31 Matthew Heaney <heaney@adacore.com>
2459 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2461 2011-08-31 Javier Miranda <miranda@adacore.com>
2463 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2464 only for class-wide subprograms conflicting with entities of concurrent
2467 2011-08-31 Matthew Heaney <heaney@adacore.com>
2469 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2472 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2474 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2475 general description of the routine.
2477 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2479 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2480 doubly-linked lists.
2482 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2484 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
2485 check is needed for a left-hand side that is a dereference, and the
2486 base type is private without discriminants (whereas the full type does
2487 have discriminants), an extra retrieval of the underlying type may be
2488 needed in the case where the subtype is a record subtype whose base
2489 type is private. Update comments.
2491 2011-08-31 Javier Miranda <miranda@adacore.com>
2493 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
2494 found check if there is a class-wide subprogram covering the primitive.
2496 2011-08-31 Yannick Moy <moy@adacore.com>
2498 * sem_res.adb: Further cases where full expansion test is needed,
2499 rather than expansion test.
2501 2011-08-31 Pascal Obry <obry@adacore.com>
2503 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
2505 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2507 * exp_ch5.adb: Handle iterators over derived container types.
2509 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2511 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
2512 (Has_Anonymous_Master): New routine.
2513 (Set_Has_Anonymous_Master): New routine.
2514 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
2515 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
2516 (Current_Anonymous_Master): New routine.
2517 (Current_Unit_First_Declaration): Removed.
2518 (Current_Unit_Scope): Removed.
2519 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
2520 their objects on a per-unit heterogeneous finalization master.
2522 2011-08-31 Matthew Heaney <heaney@adacore.com>
2524 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
2527 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2529 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
2532 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2534 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
2535 where the actual is an unexpanded call to 'Input.
2537 2011-08-31 Yannick Moy <moy@adacore.com>
2539 * sem_ch4.adb: Code clean up.
2541 2011-08-31 Yannick Moy <moy@adacore.com>
2543 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
2545 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2547 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
2548 and TSS primitive Finalize_Address if finalization is suppressed.
2549 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
2550 primitive Finalize_Address if finalization is suppressed.
2552 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2554 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
2555 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
2556 sure that the underlying task has already been created before trying
2557 to change its affinity.
2558 (Set_CPU): Use the term processor instead of CPU, as we do in
2561 2011-08-31 Vincent Celier <celier@adacore.com>
2563 * prj-attr.adb: New Compiler attribute Source_File_Switches.
2564 * prj-nmsc.adb (Process_Compiler): Process attribute
2565 Source_File_Switches.
2566 * prj.ads (Language_Config): New name list component
2567 Name_Source_File_Switches.
2568 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
2570 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2572 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
2573 discriminated component of an actual, expand at once to prevent
2574 ouf-of-order references with generated subtypes.
2576 2011-08-31 Yannick Moy <moy@adacore.com>
2578 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
2579 reference to operator in Alfa xrefs.
2581 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2583 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
2584 where the parent instance was frozen before the current instance due to
2585 the presence of a source body. Update calls to Insert_After_Last_Decl.
2586 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
2587 Update the comment which illustrates the purpose of the routine.
2588 Package instances are now frozen by source bodies which appear after
2589 the instance. This ensures that entities coming from within the
2590 instance are available for use in the said bodies.
2591 (Install_Body): Add code to handle the case where the parent instance
2592 was frozen before the current instance due to the presence of a source
2593 body. Update calls to Insert_After_Last_Decl.
2595 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2597 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
2599 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
2601 2011-08-31 Yannick Moy <moy@adacore.com>
2603 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
2605 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
2606 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
2607 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
2608 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
2609 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
2610 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
2611 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
2612 ALFA in Alfa (we dropped acronym).
2613 * einfo.adb (Primitive_Operations): Correctly return list of primitive
2614 operations in a case where it returned previously No_Elist.
2616 2011-08-31 Robert Dewar <dewar@adacore.com>
2618 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
2619 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
2620 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2621 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
2622 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
2623 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
2626 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2628 * sem_ch12 (Check_Private_View): Revert previous change.
2629 * sem_res.adb (Conversion_Check): Do not emit the error message if the
2630 conversion is in a generic instance.
2632 2011-08-31 Matthew Heaney <heaney@adacore.com>
2634 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
2635 * a-chtgbo.adb (Free): Allow 0 as index value.
2637 2011-08-31 Matthew Heaney <heaney@adacore.com>
2639 * a-cborma.adb (Insert): Add comment to explain why no element
2642 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2644 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
2645 spec discriminant is already a concurrent type, in which case just use
2646 it, otherwise fetch the Corresponding_Concurrent_Type as before.
2648 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2650 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
2651 system-linux-mips.ads, system-linux-mipsel.ads,
2652 system-linux-mips64el.ads, system-linux-ppc64.ads,
2653 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
2655 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2657 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
2658 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
2659 (build_unary_op): Likewise.
2661 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2663 * raise-gcc.c: Do not include coretypes.h and tm.h.
2664 (setup_to_install): Remove test for compiler macro.
2665 * targext.c: Document use for the library.
2666 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
2668 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2670 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
2671 the expression to the nominal type if the latter is a record type with
2672 a variant part and the type of the former is a record type without one.
2674 2011-08-30 Yannick Moy <moy@adacore.com>
2676 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2677 expansion in Alfa mode.
2678 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
2679 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
2681 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
2682 * sem_res.adb: Ditto.
2683 * gcc-interface/Make-lang.in: Update dependencies.
2685 2011-08-30 Thomas Quinot <quinot@adacore.com>
2687 * g-socket.ads: Minor documentation adjustment.
2689 2011-08-30 Robert Dewar <dewar@adacore.com>
2691 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
2693 2011-08-30 Yannick Moy <moy@adacore.com>
2695 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
2696 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
2697 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
2698 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
2699 Revert change which introduced files for "light"
2700 expansion, to be replaced by a single file for Alfa expansion.
2702 2011-08-30 Robert Dewar <dewar@adacore.com>
2704 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
2705 Minor code reorg/reformatting.
2707 2011-08-30 Yannick Moy <moy@adacore.com>
2709 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
2710 common shorthand for (Expander_Active and not ALFA_Mode) that can be
2711 used for testing full expansion, that is active expansion not in the
2712 reduced mode for Alfa
2713 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
2714 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
2715 of the verbose (Expander_Active and not ALFA_Mode)
2717 2011-08-30 Tristan Gingold <gingold@adacore.com>
2719 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
2720 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
2721 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
2722 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
2724 2011-08-30 Gary Dismukes <dismukes@adacore.com>
2726 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
2727 access conversions to check that the conversion is a rewritten node,
2728 rather than just having Comes_From_Source set to False, which wasn't
2731 2011-08-30 Robert Dewar <dewar@adacore.com>
2733 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
2734 g-socket.ads: Minor reformatting.
2736 2011-08-30 Thomas Quinot <quinot@adacore.com>
2738 * sem_util.adb: Minor reformatting.
2740 2011-08-30 Tristan Gingold <gingold@adacore.com>
2742 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
2743 to be compliant with the ABI.
2745 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2747 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
2748 of a designated type when the related access type is an actual in an
2749 instance. This ensures that the full view of designated type is
2750 available when inside the body of the instance.
2752 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2754 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
2755 in a position to be modified, a slice is treated like an indexed
2758 2011-08-30 Thomas Quinot <quinot@adacore.com>
2760 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
2761 field tv_sec in struct timeval.
2763 2011-08-30 Yannick Moy <moy@adacore.com>
2765 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
2766 blocks of code doing full expansion, previously only guarded by
2767 Expander_Active, by anding the test that ALFA_Mode is not set
2769 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2771 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
2772 add the function to the list of private dependents, for subsequent
2773 legality check on Taft amendment types.
2774 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
2775 Private_Dependents, as for other incomplete types.
2776 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
2777 Taft-amendment type is used as the return type of a function.
2779 2011-08-30 Javier Miranda <miranda@adacore.com>
2781 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
2782 which emits an error by a call to a new routine which report the error.
2783 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
2784 entity does not cover an existing interface.
2785 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
2787 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
2788 protected procedures or entries whose mode is not conformant.
2789 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
2790 an error by a call to a new routine which report the error.
2792 2011-08-30 Robert Dewar <dewar@adacore.com>
2794 * gnat_rm.texi: Minor change.
2795 * exp_attr_light.adb: Minor reformatting.
2797 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2799 * sem_ch3.adb: Patch inheritance of aspects in
2800 Complete_Private_Subtype, to avoid infinite loop.
2802 2011-08-30 Javier Miranda <miranda@adacore.com>
2804 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
2805 been reported and a subprogram covering an interface primitive is not
2806 found then skip generating the internal entity. Done to avoid crashing
2808 (Check_Abstract_Overriding): Change text of error of wrong formal of
2809 protected subprogram or entry. Done for consistency to emit exactly the
2810 same error reported by Check_Synchronized_Overriding. In addition, the
2811 error is restricted to protected types (bug found working on AI05-0090)
2813 2011-08-30 Yannick Moy <moy@adacore.com>
2815 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2816 expansion in Alfa mode.
2817 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
2818 * exp_light.adb, exp_light.ads: New package defining light expansion.
2819 * expander.adb (Expand): Call light expansion in Alfa mode
2820 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
2822 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
2824 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
2825 * gnat1drv.adb (Adjust_Global_Switches): Comment
2827 2011-08-30 Yannick Moy <moy@adacore.com>
2829 * lib-xref-alfa.adb: Minor refactoring.
2831 2011-08-30 Yannick Moy <moy@adacore.com>
2833 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
2835 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
2836 expansion in Alfa mode.
2837 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
2840 2011-08-30 Robert Dewar <dewar@adacore.com>
2842 * debug_a.adb: Update comment.
2844 2011-08-30 Robert Dewar <dewar@adacore.com>
2846 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
2847 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
2848 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
2849 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
2851 2011-08-30 Robert Dewar <dewar@adacore.com>
2853 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
2856 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2858 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
2859 Build_Finalization_Master by supplying an insertion node and enclosing
2860 scope. In its old version, the call did not generate a finalization
2862 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
2863 recognize anonymous access-to-controlled components. Rewrite the
2864 machinery which creates finalization masters to service anonymous
2865 access-to-controlled components of a record type. In its current state,
2866 only one heterogeneous master is necessary to handle multiple anonymous
2868 (Freeze_Type): Comment reformatting.
2869 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
2871 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
2872 associates TSS primitive Finalize_Address with either the master itself
2873 or with the internal hash table depending on the mode of operation of
2876 2011-08-30 Javier Miranda <miranda@adacore.com>
2878 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
2879 interface type then do not generate code to compare this component.
2880 Required since they have no components and their equality operator is
2883 2011-08-30 Steve Baird <baird@adacore.com>
2885 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
2886 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
2887 returns the (static) accessibility level of the object. Otherwise, the
2888 same as Type_Access_Level.
2889 (Dynamic_Accessibility_Level): New function; given an expression which
2890 could occur as the rhs of an assignment to a saooaaat (i.e., an
2891 expression of an access-to-object type), return the new value for the
2892 saooaaat's associated Extra_Accessibility object.
2893 (Effective_Extra_Accessibility): New function; same as
2894 Einfo.Extra_Accessibility except that object renames are looked through.
2896 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
2897 (Dynamic_Accessibility_Level): New function; see sem_util.ads
2899 (Effective_Extra_Accessibility): New function; see sem_util.ads
2901 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
2902 (Extra_Accessibility): Update comments.
2903 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
2904 except RM_Size field (which is only for types) is unaffected.
2906 (Extra_Accessibility): Expand domain to allow objects, not just formals.
2907 (Set_Extra_Accessibility): Expand domain to allow objects, not just
2909 (Init_Size): Add assertion that we are not trashing the
2910 Extra_Accessibility attribute of an object.
2911 (Init_Size_Align): Add assertion that we are not trashing the
2912 Extra_Accessibility attribute of an object.
2913 (Init_Object_Size_Align): New procedure; see einfo.ads description.
2914 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
2915 differently for the type of a (non-library-level) saooaaat depending
2916 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
2917 is queried in this set of changes - everything else (in particular,
2918 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
2919 driven off of the setting of the Is_Local_Anonymous_Access attribute.
2920 The special treatment of library-level saooaaats is an optimization,
2921 not required for correctnesss. This is based on the observation that the
2922 Ada2012 rules (static and dynamic) for saooaaats turn out to be
2923 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
2925 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
2926 false for the type of a saooaaat, declare and initialize its
2927 accessibility level object and set the Extra_Accessibility attribute
2928 of the saooaaat to refer to this object.
2929 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
2930 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
2931 calls to Effective_Extra_Accessibility in order to support
2932 renames of saooaaats.
2933 (Expand_N_Type_Conversion): Add new local function,
2934 Has_Extra_Accessibility, and call it when determining whether an
2935 accessibility check is needed.
2936 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
2937 evaluate to True (without raising an exception).
2939 (Expand_N_Assignment_Statement): When assigning to an Ada2012
2940 saooaaat, update its associated Extra_Accessibility object (if
2941 it has one). This includes an accessibility check.
2942 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
2943 a saooaaat, update its Extra_Accessibility object too (if it
2945 (Expand_Call): Replace a couple of calls to Type_Access_Level
2946 with calls to Dynamic_Access_Level to handle cases where
2947 passing a literal (any literal) is incorrect.
2948 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
2949 checks associated with "Saooaat := Some_Object'Access;"; this must
2950 be rejected if Some_Object is declared in a more nested scope
2952 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
2953 assignment to a saooaaat even if Is_Local_Anonymous_Access
2954 returns False for its type (indicating a 2012-style saooaaat).
2956 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
2957 (which is only appropriate for objects, not types) with a call
2958 of Init_Object_Size_Align in order to avoid trashing the
2959 Extra_Accessibility attribute of a rename (the two attributes
2962 (Valid_Conversion) Replace six calls to Type_Access_Level with
2963 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
2964 Ada2012 non-library-level saooaaat, the former returns library level
2965 while the latter returns the (static) accessibility level of the
2966 saooaaat. A type conversion to the anonymous type of a saooaaat
2967 can only occur as part of an assignment to the saooaaat, so we
2968 know that such a conversion must be in a lhs context, so Deepest
2969 yields the result that we need. If such a conversion could occur,
2970 say, as the operand of an equality operator, then this might not
2971 be right. Also add a test so that static accessibilty checks are
2972 performed for converting to a saooaaat's type even if
2973 Is_Local_Anonymous_Access yields False for the type.
2975 2011-08-30 Javier Miranda <miranda@adacore.com>
2977 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
2978 controls generation of a warning associated with late declaration of
2979 dispatching functions. Required to avoid generating spurious
2982 2011-08-30 Gary Dismukes <dismukes@adacore.com>
2984 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
2985 return object has an anonymous access type and the function's type is
2986 a named access type.
2987 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
2988 conversions on implicit conversions, since such conversions can occur
2989 for anonymous access cases due to expansion. Issue error for attempt
2990 to rename an anonymous expression as an object of a named access type.
2991 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
2992 to indicate whether this function should report errors on invalid
2994 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
2995 the expression is of an anonymous access type and the expected type is
2996 a named general access type, rewrite the expression as a type
2997 conversion, unless this is an expression of a membership test.
2998 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
2999 calling of Error_Msg_N on new formal Report_Errs.
3000 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3001 calling of Error_Msg_NE on new formal Report_Errs.
3002 (Valid_Conversion): Move declaration of this function to the package
3003 spec, to allow calls from membership test processing. For Ada 2012,
3004 enforce legality restrictions on implicit conversions of anonymous
3005 access values to general access types, disallowing such conversions in
3006 cases where the expression has a dynamic accessibility level (access
3007 parameters, stand-alone anonymous access objects, or a component of a
3008 dereference of one of the first two cases).
3009 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3010 in the context of a named general access expected type.
3011 * exp_ch4.adb Add with and use of Exp_Ch2.
3012 (Expand_N_In): Add processing for membership tests applied to
3013 expressions of an anonymous access type. First, Valid_Conversion is
3014 called to check whether the test is statically False, and then the
3015 conversion is expanded to test that the expression's accessibility
3016 level is no deeper than that of the tested type. In the case of
3017 anonymous access-to-tagged types, a tagged membership test is applied
3019 (Tagged_Membership): Extend to handle access type cases, applying the
3020 test to the designated types.
3021 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3022 accessibility level, and the actual is a 'Access applied to a current
3023 instance, pass the accessibility level of the type of the current
3024 instance rather than applying Object_Access_Level to the prefix. Add a
3025 ??? comment, since this level isn't quite right either (will eventually
3026 need to pass an implicit level parameter to init procs).
3028 2011-08-30 Bob Duff <duff@adacore.com>
3030 * s-taskin.ads: Minor comment fix.
3032 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3034 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3035 component and the selector is a dispatching operation, check if it is
3036 a prefixed call before rewriting as a parameterless function call.
3038 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3040 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3041 tsystem.h into $(RTSDIR) instead of rts.
3043 2011-08-29 Robert Dewar <dewar@adacore.com>
3045 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3047 * gcc-interface/Make-lang.in: Update dependencies.
3049 2011-08-29 Yannick Moy <moy@adacore.com>
3051 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3052 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3053 table to hold dereferences.
3054 (Add_ALFA_Xrefs): Take into account dereferences as special
3055 reads/writes to the variable "HEAP".
3056 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3057 (Generate_Dereference): New procedure to store a read/write dereferencew
3059 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3060 the special "HEAP" var.
3061 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3063 * sem_util.adb (Note_Possible_Modification): Store write dereference
3066 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3068 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3069 ensures that the level of the subpool access type is not deeper than
3070 that of the pool object.
3071 * sem_util.adb (Object_Access_Level): Expand to handle defining
3073 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3074 subpool handle name of a rewritten allocator.
3076 2011-08-29 Robert Dewar <dewar@adacore.com>
3078 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3080 2011-08-29 Thomas Quinot <quinot@adacore.com>
3082 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3083 values, we generate multiple triples of parameters in the TypeCode.
3084 Bump Choice_Index for each such triple so that a subsequent default
3085 choice is associated with the correct index in the typecode.
3087 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3089 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3091 (First, Last): Handle properly an iterator over a null container.
3093 2011-08-29 Bob Duff <duff@adacore.com>
3095 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3096 processing if we run across a node with no Scope. This can happen if
3097 we're with-ing an library-level instance, and that instance got errors
3098 that caused "instantiation abandoned".
3099 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3100 an exception instead of using Assert, so it won't go into an infinite
3101 loop, even when assertions are turned off.
3103 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3105 * a-coorse.adb: Proper handling of empty ordered sets.
3107 2011-08-29 Johannes Kanig <kanig@adacore.com>
3109 * debug.adb: Add comments.
3111 2011-08-29 Thomas Quinot <quinot@adacore.com>
3113 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3116 2011-08-29 Yannick Moy <moy@adacore.com>
3118 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3119 declaration for Itypes in Alfa mode.
3121 2011-08-29 Robert Dewar <dewar@adacore.com>
3123 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3124 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3125 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3128 2011-08-29 Tristan Gingold <gingold@adacore.com>
3130 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3132 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3133 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3136 2011-08-29 Robert Dewar <dewar@adacore.com>
3138 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3140 2011-08-29 Javier Miranda <miranda@adacore.com>
3142 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3143 renamings of formal subprograms when the actual for a formal type is
3146 2011-08-29 Matthew Heaney <heaney@adacore.com>
3148 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3151 2011-08-29 Matthew Heaney <heaney@adacore.com>
3153 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3154 components of record type.
3155 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3158 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3160 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3161 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3164 2011-08-29 Robert Dewar <dewar@adacore.com>
3166 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3169 2011-08-29 Matthew Heaney <heaney@adacore.com>
3171 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3172 components of record type.
3174 2011-08-29 Bob Duff <duff@adacore.com>
3176 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3177 by the termination handler.
3179 2011-08-29 Yannick Moy <moy@adacore.com>
3181 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3182 created in Alfa mode, instead of inserting artificial declarations of
3183 non-Itypes in the tree.
3184 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3185 know if an Itype has a corresponding declaration, as defined in
3188 2011-08-29 Yannick Moy <moy@adacore.com>
3190 * gnat1drv.adb: Minor rewrite.
3192 2011-08-29 Bob Duff <duff@adacore.com>
3194 * s-tasuti.adb (Make_Passive): Work around race condition in
3195 Make_Independent, which can cause Wait_Count to be zero. So instead of
3196 asserting that Wait_Count > 0, and then decrementing it, decrement it
3197 only if Wait_Count > 0.
3198 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3199 should be nonnegative, so declare them Natural instead of Integer.
3201 2011-08-29 Robert Dewar <dewar@adacore.com>
3203 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3204 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3205 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3206 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3207 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3209 2011-08-29 Tristan Gingold <gingold@adacore.com>
3211 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3213 2011-08-29 Vadim Godunko <godunko@adacore.com>
3215 * s-parint.ads: Minor comment clarification.
3217 2011-08-29 Vincent Celier <celier@adacore.com>
3219 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3220 may be used as identifiers.
3222 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3224 * a-coinho.ads: Minor reformating.
3226 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3228 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3229 container of a derived type.
3231 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3233 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3234 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3236 2011-08-29 Pascal Obry <obry@adacore.com>
3238 * exp_disp.adb: Minor comment fix.
3239 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3240 to avoid warnings when compiling with -Wall.
3241 (Make_Disp_Conditional_Select_Body): Likewise.
3242 (Make_Disp_Timed_Select_Body): Likewise.
3244 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3246 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3247 an entity name, generate reference for it.
3249 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3251 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3253 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3254 the class-wide type.
3255 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3257 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3259 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3260 subtype for an object whose type is an unconstrained union.
3262 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3264 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3265 is allowed in a component definition, by AI95-406.
3267 2011-08-29 Matthew Heaney <heaney@adacore.com>
3269 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3271 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3273 * a-except-2005.adb: Alphabetize all routines.
3274 (Triggered_By_Abort): New routine.
3275 * a-except-2005.ads (Triggered_By_Abort): New routine.
3276 * a-except.adb Alphabetize all routines.
3277 (Triggered_By_Abort): New routine.
3278 * a-except.ads (Triggered_By_Abort): New routine.
3279 * exp_ch7.adb: Update all comments involving the detection of aborts in
3281 (Build_Object_Declarations): Do not generate code to detect the
3282 presence of an abort at the start of finalization code, use a runtime
3284 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3286 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3287 allocate a task on a subpool.
3288 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3289 The flag disables all actions related to the maintenance of
3290 Finalize_Address_Table when subpools are not in use.
3291 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3293 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3294 performs costly task locking when subpools are not in use.
3296 2011-08-29 Yannick Moy <moy@adacore.com>
3298 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3299 types and dispatching calls in Alfa mode.
3300 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3301 correspondance between body and spec scopes, to reuse utility functions
3302 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3303 by testing the presence of the library unit for the body
3304 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3305 mode the expansion of accept statements is skipped
3306 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3307 the unique entity corresponding to the one returned by
3308 Unique_Defining_Entity applied to the enclosing declaration of the
3311 2011-08-29 Bob Duff <duff@adacore.com>
3313 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3314 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3315 an alias for pn. ppp is an alias for pt.
3317 2011-08-29 Javier Miranda <miranda@adacore.com>
3319 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3320 aggregate to take a consistent decision on the need to convert into
3321 assignments aggregates that initialize constant objects.
3323 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3325 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3326 Build_Allocate_Deallocate_Proc in order to handle allocation of
3327 non-controlled objects on subpools.
3328 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3329 to be end-user visible.
3330 * s-finmas.adb: Add with and use clause for System.HTable.
3331 Add an instantiation of Simple_HTable which provides a mapping between
3332 the address of a controlled object and the corresponding
3333 Finalize_Address used to clean up the object. The table is used when a
3334 master is operating in heterogeneous mode.
3335 (Attach): Explain why the input node is not verified on being already
3337 (Delete_Finalize_Address): New routine.
3338 (Detach): Add pragma Assert which ensures that a node is already
3340 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3341 since nodes are no longer removed on traversal. Explain why node
3342 detachment is undesirable in this case.
3343 (Get_Finalize_Address): New routine.
3344 (Hash): New routine.
3345 (Is_Empty_List): Removed.
3346 (pm): Renamed to Print_Master. Add output for discriminant
3348 Comment reformatting.
3349 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3350 * s-finmas.ads: Various comments additions / improvements.
3351 Type Finalization_Master has a discriminant which determines the mode of
3353 (Delete_Finalize_Address): New routine.
3354 (Get_Finalize_Address): New routine.
3355 (pm): Renamed to Print_Master.
3356 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3357 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3358 use clause for System.IO.
3359 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3360 Finalize_Address depending on the mode of allocation and the mode of
3362 (Deallocate_Any_Controlled): Remove the relation pair object -
3363 Finalize_Address regardless of the master mode. Add comment explaining
3365 (Detach): Ensure that fields Prev and Next are null after detachment.
3366 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3367 scheme to check whether the list of subpools is empty. There is no
3368 longer need to store the next subpool or advance the current pointer.
3369 (Is_Empty_List): New routine.
3370 (Print_Pool): New routine.
3371 (Print_Subpool): New routine.
3372 * s-stposu.ads: Various comments additions / improvements.
3373 Field Master of type Root_Subpool is now a heterogeneous collection.
3374 (Print_Pool): New routine.
3375 (Print_Subpool): New routine.
3377 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3379 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3380 forms, using aspects of container types.
3381 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3382 Has_Implicit_Dereference flags, that may be set on the partial view.
3383 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3384 container type with an indexing aspect.
3385 (Analyze_Quantified_Expression): Analyze construct with expansion
3386 disabled, because it will be rewritten as a loop during expansion.
3387 (Try_Container_Indexing): The prefix itself may be a container type
3388 with an indexing aspect, as with a vector of vectors.
3389 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3390 the original doamin of iteration, for name capture.
3391 (Analyze_Iterator_Specification): If the domain is an expression that
3392 needs finalization, create a separate declaration for it.
3393 For an iterator with "of" retrieve default iterator info from aspect of
3394 container type. For "in" iterator, retrieve type of Iterate function.
3395 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3396 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3397 analysis, to prevent spurious errors about late attributes.
3398 * sprint.adb: Handle quantified expression with either loop or iterator
3400 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3403 2011-08-29 Vincent Celier <celier@adacore.com>
3405 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3406 Binder or Linker of the main project file.
3408 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3410 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3413 2011-08-29 Yannick Moy <moy@adacore.com>
3415 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3417 2011-08-29 Yannick Moy <moy@adacore.com>
3419 * exp_ch11.adb: Minor expansion of comment.
3421 2011-08-29 Yannick Moy <moy@adacore.com>
3423 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3425 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3427 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3428 interpretation, set the type before resolving the operands, because
3429 legality checks on an exponention operand need to know the type of the
3432 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3434 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3435 cleanups on a master if the instance is within a generic unit.
3436 Complement to the corresponding fix to inline.adb for K520-030.
3438 2011-08-29 Tristan Gingold <gingold@adacore.com>
3440 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3442 * exp_intr.adb: Minor comment fix.
3444 2011-08-29 Bob Duff <duff@adacore.com>
3446 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3447 Delay_Required was used as an uninitialized variable.
3449 2011-08-29 Robert Dewar <dewar@adacore.com>
3451 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3452 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3453 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3455 2011-08-29 Thomas Quinot <quinot@adacore.com>
3457 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3458 Remove unused variables.
3460 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3462 * sem_res.adb: Remove Build_Explicit_Dereference.
3463 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3464 from sem_res.adb, used in analysis of additional constructs.
3465 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3466 expansion of iterators.
3467 (Is_Object_Reference): Recognize variables rewritten as explicit
3468 dereferences in Ada2012.
3469 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3470 Reversible_Iterator names, for expansion of Ada2012 iterators.
3471 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3472 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3473 linked list container.
3474 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3475 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3477 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3479 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3482 2011-08-29 Vincent Celier <celier@adacore.com>
3484 * make.adb (Gnatmake): Get the maximum number of simultaneous
3485 compilation processes after the Builder switches has been scanned, as
3486 there may include -jnn.
3488 2011-08-29 Matthew Heaney <heaney@adacore.com>
3490 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
3492 2011-08-29 Tristan Gingold <gingold@adacore.com>
3494 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
3495 GNAT_DRIVER_COMMAND_LINE to 255.
3497 2011-08-29 Pascal Obry <obry@adacore.com>
3499 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
3500 reformatting and style fix (class attribute casing).
3502 2011-08-29 Yannick Moy <moy@adacore.com>
3504 * exp_ch11.adb: Yet another case where expansion should be common
3505 between CodePeer and Alfa.
3507 2011-08-29 Yannick Moy <moy@adacore.com>
3509 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
3511 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3513 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
3514 incomplete type and its completion match.
3516 2011-08-29 Yannick Moy <moy@adacore.com>
3518 * exp_ch13.adb: Adjust previous change.
3520 2011-08-29 Robert Dewar <dewar@adacore.com>
3522 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
3523 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
3526 2011-08-29 Emmanuel Briot <briot@adacore.com>
3528 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
3529 initialize aggregated projects.
3531 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3533 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
3534 depth of candidates to resolve a potentially spurious ambiguity between
3535 two visible subprograms.
3537 2011-08-29 Yannick Moy <moy@adacore.com>
3539 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
3541 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
3542 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
3545 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3547 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
3550 2011-08-29 Thomas Quinot <quinot@adacore.com>
3552 * sem_res.adb: Minor reformatting.
3554 2011-08-29 Johannes Kanig <kanig@adacore.com>
3556 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
3558 * gnat1drv.adb (Adjust_Global_Switches): Set
3559 Use_Expressions_With_Actions to False in ALFA mode.
3560 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
3563 2011-08-29 Yannick Moy <moy@adacore.com>
3565 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
3566 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
3567 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
3568 tagged types and dispatching calls in Alfa mode.
3570 2011-08-29 Javier Miranda <miranda@adacore.com>
3572 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
3573 we do not report an error on an Empty node.
3575 2011-08-29 Geert Bosch <bosch@adacore.com>
3577 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
3578 a-nlrear.o and a-nurear.o.
3580 2011-08-29 Robert Dewar <dewar@adacore.com>
3582 * freeze.adb: Minor code reorganization.
3584 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
3585 sem_ch6.adb: Minor reformatting
3587 2011-08-29 Tristan Gingold <gingold@adacore.com>
3589 * s-except.ads, s-except.adb: Provide dummy body.
3591 2011-08-29 Yannick Moy <moy@adacore.com>
3593 * sem_warn.adb (Within_Postcondition): Take into account the case of
3594 an Ensures component in a Test_Case.
3596 2011-08-29 Tristan Gingold <gingold@adacore.com>
3598 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
3599 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
3600 System_Exceptions_Debug
3601 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
3602 * a-except.adb: With and use System.Exceptions_Debug instead of
3604 * a-except-2005.adb: Likewise.
3605 * s-assert.adb: Likewise.
3606 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
3607 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
3608 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
3609 s-excdeb. Update dependencies.
3610 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
3611 as these no longer need external libraries.
3613 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3615 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
3616 exponentiation operator on universal values in a context that requires
3619 2011-08-29 Tristan Gingold <gingold@adacore.com>
3621 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
3622 before calling notify_handled_exception.
3623 * a-exextr.adb: Fix comment.
3625 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3627 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
3628 Finalize_Address of the access type's finalization master.
3629 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
3630 access type's finalization master. Add a guard to prevent
3631 Associated_Storage_Pool from being set on .NET/JVM.
3632 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
3633 attribute Finalize_Address of the access type's finalization master.
3634 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
3635 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
3636 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
3638 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
3639 use clause for System.IO
3640 (Detach): Relax the assertion, to be reinstated later.
3641 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
3642 Relax the assertion on Finalize_Address, to be reinstated later.
3643 (Is_Empty_List): New routine.
3644 (pm): New debug routine.
3645 (Set_Finalize_Address): New routine.
3646 * s-finmas.ads (pm): New debug routine.
3647 (Set_Finalize_Address): New routine.
3648 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
3650 2011-08-29 Tristan Gingold <gingold@adacore.com>
3652 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
3653 Remove convention C.
3655 2011-08-29 Tristan Gingold <gingold@adacore.com>
3657 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
3658 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
3659 (Finalize_TCB): Remove its finalization.
3660 (Initialize): Remove assignment of GET_Exc_Stack_Addr
3661 * s-soflin.adb (NT_Exc_Stack): Remove
3662 (Get_Exc_Stack_Addr_NT): Likewise.
3663 (Get_Exc_Stack_Addr_Soft): Likewise.
3664 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
3665 (Get_Exc_Stack_Addr): Likewise.
3666 (Get_Exc_Stack_Addr_Soft): Likewise
3667 * s-taspri-vms.ads (Exc_Stack_T): Remove.
3668 (Exc_Stack_Ptr_T): Likewise.
3669 (Private_Data): Remove Exc_Stack_Ptr component.
3671 2011-08-29 Tristan Gingold <gingold@adacore.com>
3673 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
3675 2011-08-29 Tristan Gingold <gingold@adacore.com>
3677 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
3679 2011-08-29 Geert Bosch <bosch@adacore.com>
3681 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
3682 L2_Norm, Swap_Column): New generic subprograms
3683 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
3684 L2_Norm, Swap_Column): Implement new subprograms in order to
3685 eliminate dependency on BLAS and LAPACK libraries in
3686 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
3687 version. Forward_Eliminate/Back_Substitute can be used to put a
3688 matrix in row echelon or reduced row echelon form using partial
3690 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
3691 Swap_Column): Instantiate from System.Generic_Array_Operations.
3692 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
3693 (Sqrt): Local function for simple computation of square root without
3694 adding dependencies on Generic_Elementary_Functions.
3695 (Swap): New subprogram to exchange floating point numbers.
3696 (Inverse): Reimplement using Jordan-Gauss elimination.
3697 (Jacobi): New procedure implementing Jacobi's method for computation
3698 of eigensystems, based on Rutishauser's implementation.
3699 (L2_Norm): Implement directly using the inner product.
3700 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
3701 decreasing eigenvalue as required by the Ada RM.
3702 (Swap_Column): New helper procedure for Sort_Eigensystem.
3703 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
3704 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
3707 2011-08-29 Thomas Quinot <quinot@adacore.com>
3709 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
3712 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3714 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
3715 than the current node.
3716 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
3717 Finalization_Master. The list headers have two fields instead of three.
3718 This should fix alignment issue but subpool allocations are now
3719 unusable. Alphabetize subprograms.
3720 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
3721 the size of the header when converting the beginning of the object to
3722 a FM_Node. Set the master's Finalize_Address attribute if not already
3724 (Deallocate_Any_Controlled): Use the offset rather than the size of the
3725 header when converting the beginning of the object to a FM_Node.
3727 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3729 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
3730 reraise when compiling for CodePeer.
3732 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3734 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
3735 now needed by a-convec.adb. Fix warning.
3737 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3739 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
3740 processing of TSS routine Finalize_Address when compiling in
3743 2011-08-29 Thomas Quinot <quinot@adacore.com>
3745 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
3746 sem_warn.adb: Minor reformatting.
3748 2011-08-29 Emmanuel Briot <briot@adacore.com>
3750 * prj-conf.adb (Get_Config_Switches): Also collect the list of
3751 languages from aggregated projects.
3753 2011-08-29 Yannick Moy <moy@adacore.com>
3755 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
3756 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3757 Traverse_Package_Declaration, Traverse_Subprogram_Body,
3758 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
3759 for stubs are traversed too when parameter is set
3760 (Traverse_All_Compilation_Units): Traverse without going inside stubs
3761 (Traverse_Declarations_Or_Statements): Do the special traversing for
3762 stubs when required.
3763 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
3764 return subprogram or package body from stub.
3765 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
3766 stubs without prior subprogram decl.
3768 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3770 * gnat_ugn.texi: Fix typo.
3772 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3774 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
3775 which accounts for size vs alignment issues and calculates the size of
3777 (Deallocate_Any_Controlled): Ditto.
3778 (Nearest_Multiple_Rounded_Up): New routine.
3780 2011-08-29 Tristan Gingold <gingold@adacore.com>
3782 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
3783 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
3784 (Set_Exception_Msg): Ditto.
3785 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
3787 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
3788 Use Save_Occurrence instead of Save_Occurrence_No_Private.
3789 (Raise_With_Msg): Remove Cleanup_Flag.
3790 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
3791 Clean_Flag and Private_Data components.
3793 2011-08-29 Yannick Moy <moy@adacore.com>
3795 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
3797 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
3798 of an explicitly declared type, so that the base types of the original
3799 type and this generated type are the same, and a "type" (not a subtype
3801 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
3802 small" in Alfa mode, like in CodePeer mode.
3803 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
3804 clauses in Alfa mode.
3806 2011-08-29 Javier Miranda <miranda@adacore.com>
3808 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
3809 function to the package spec.
3810 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
3811 internally generated bodies of null procedures locate the internally
3812 generated spec enforcing mode conformance.
3813 (Is_Interface_Conformant): Ensure that the controlling formal of the
3816 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3818 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
3819 reject the pragma if it appears to apply to a formal subprogram.
3821 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3823 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
3824 inner expression, to prevent double evaluation.
3826 2011-08-29 Tristan Gingold <gingold@adacore.com>
3828 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
3830 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
3831 * a-except-2005.adb (Propagate_Exception): Adjust spec.
3832 (Raise_Current_Excep): Adjust call.
3833 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
3835 2011-08-29 Thomas Quinot <quinot@adacore.com>
3837 * exp_disp.adb: Minor reformatting.
3839 2011-08-29 Tristan Gingold <gingold@adacore.com>
3841 * a-exexpr.adb (Setup_Exception): Removed.
3842 * a-exexpr-gcc.adb (Setup_Exception): Removed.
3843 * a-except.adb (Exception_Propagation): Removed.
3844 * a-except-2005.adb (Setup_Exception): Removed.
3845 (Reraise): Remove call to Setup_Exception.
3846 (Reraise_Occurrence): Ditto.
3847 (Reraise_Occurrence_Always): Ditto.
3848 (Reraise_Occurrence_No_Defer): Ditto.
3849 (Transfer_Occurrence): Ditto.
3850 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
3851 (Set_Exception_Msg): Ditto.
3853 2011-08-29 Robert Dewar <dewar@adacore.com>
3855 * a-convec.adb, exp_disp.adb: Minor reformatting.
3857 2011-08-29 Tristan Gingold <gingold@adacore.com>
3859 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
3861 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3863 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
3864 Exception_Handlers to No_List instead of Empty_List in the case where
3865 there are no handlers.
3867 2011-08-29 Tristan Gingold <gingold@adacore.com>
3869 * gcc-interface/gigi.h (enum standard_datatypes): Add
3870 ADT_reraise_zcx_decl
3871 (reraise_zcx_decl): New macro.
3872 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
3873 (gigi): Set reraise_zcx_decl.
3874 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
3875 (gnat_to_gnu): Handle N_Raise_Statement.
3877 2011-08-29 Robert Dewar <dewar@adacore.com>
3879 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
3880 a-undesu.adb: Minor reformatting.
3882 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3884 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
3885 table, accept an unfrozen untagged component if it is an actual for a
3886 formal incomplete type.
3887 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
3888 provide new iterator forms over vectors.
3889 Introduce type Iterator in package body to implement operations of
3890 Reversible_Iterator interface.
3891 * a-iteint.ads: Make package pure so it is usable with new container
3892 packages, that are categorized Remote_Types.
3894 2011-08-29 Robert Dewar <dewar@adacore.com>
3896 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
3898 2011-08-29 Bob Duff <duff@adacore.com>
3900 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
3901 of <>, because this is the routine that checks for dimensionality
3902 errors (for example, for a two-dimensional array, (others => <>) should
3903 be (others => (others => <>)).
3905 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3907 * impunit.adb: Add new run-time units.
3908 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
3909 s-stposu.ads, s-stposu.adb: Code clean up.
3910 Handle protected class-wide or task class-wide types
3911 Handle C/C++/CIL/Java types.
3912 * s-spsufi.adb, s-spsufi.ads: New files.
3914 2011-08-29 Yannick Moy <moy@adacore.com>
3916 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
3917 library-level subprogram.
3918 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
3920 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
3922 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
3924 * gnat_rm.texi: Update doc for Test_Case pragma.
3926 2011-08-29 Tristan Gingold <gingold@adacore.com>
3928 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
3930 (GCC_Exception_Access): New type.
3931 (Unwind_DeleteException): New imported procedure
3932 (Foreign_Exception): Import it.
3933 (GNAT_GCC_Exception): Simply have the occurrence inside.
3934 (To_GCC_Exception): New function.
3935 (To_GNAT_GCC_Exception): New function.
3936 (GNAT_GCC_Exception_Cleanup): New procedure..
3937 (Propagate_GCC_Exception): New procedure.
3938 (Reraise_GCC_Exception): New procedure.
3939 (Setup_Current_Excep): New procedure.
3940 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
3941 (Unwind_RaiseException): Ditto.
3942 (Unwind_ForcedUnwind): Ditto.
3944 (Begin_Handler): Change type of parameter.
3945 (End_Handler): Ditto. Now delete the exception if still present.
3946 (Setup_Key): Removed.
3947 (Is_Setup_And_Not_Propagated): Removed.
3948 (Set_Setup_And_Not_Propagated): Ditto.
3949 (Clear_Setup_And_Not_Propagated): Ditto.
3950 (Save_Occurrence_And_Private): Ditto.
3951 (EID_For): Add 'not null' constraint on parameter.
3952 (Setup_Exception): Does nothing.
3953 (Propagate_Exception): Simplified.
3954 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
3955 re-raise is not expanded anymore.
3956 * s-except.ads (Foreign_Exception): New exception - placeholder for
3958 * raise-gcc.c (__gnat_setup_current_excep): Declare
3959 (CXX_EXCEPTION_CLASS): Define (not yet used)
3960 (GNAT_EXCEPTION_CLASS): Define.
3961 (is_handled_by): Handle foreign exceptions.
3962 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
3964 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3966 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
3968 2011-08-29 Thomas Quinot <quinot@adacore.com>
3970 * a-synbar-posix.adb: Minor reformatting.
3972 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3974 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
3975 a-exetim-default.ads (Interrupt_Clocks_Supported,
3976 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3977 definitions to be compliant with AI-0171. The target systems do not
3978 support separate account for the execution time of interrupt handlers.
3980 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3982 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
3983 in the barrier to put first the easiest to evaluate (and the one which
3984 will be True more often). More efficient.
3986 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3988 * s-atocou-x86.adb: Fix constraint in machine code insertion.
3990 2011-08-29 Bob Duff <duff@adacore.com>
3992 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
3993 attributes that are now aspects, as specified by AI05-0229-1.
3994 * sem_ch13.adb (Analyze_Aspect_Specifications,
3995 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
3996 pragmas or attribute references, as appropriate.
3998 2011-08-29 Robert Dewar <dewar@adacore.com>
4000 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4001 a-synbar-posix.ads: Minor reformatting.
4003 2011-08-29 Yannick Moy <moy@adacore.com>
4005 * snames.ads-tmpl: Add name Force.
4007 2011-08-29 Pascal Obry <obry@adacore.com>
4009 * prj-nmsc.adb: Minor reformatting.
4011 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4013 * a-exetim.ads (Interrupt_Clocks_Supported,
4014 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4015 definitions to be compliant with AI-0171.
4017 2011-08-29 Robert Dewar <dewar@adacore.com>
4019 * a-ngelfu.adb: Add comments.
4021 2011-08-29 Geert Bosch <bosch@adacore.com>
4023 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4024 the closest machine number to Pi / 2.0.
4026 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4028 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4029 package Ada.Synchronous_Barriers.
4030 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4031 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4032 default implementation using protected objects and another one
4033 a-synbar-posix using POSIX barriers as the underlying support.
4034 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4035 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4036 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4037 Clean up dependencies.
4038 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4040 2011-08-29 Robert Dewar <dewar@adacore.com>
4042 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4043 exp_dist.adb: Minor code reorganization.
4046 2011-08-29 Thomas Quinot <quinot@adacore.com>
4048 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4049 primitive operation must support external streaming if it is not a
4050 controlling access result.
4052 2011-08-29 Thomas Quinot <quinot@adacore.com>
4054 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4056 2011-08-29 Bob Duff <duff@adacore.com>
4058 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4059 restriction on allocators, as required by AI05-0013-1.
4060 * restrict.ads: Minor comment fix.
4062 2011-08-29 Tristan Gingold <gingold@adacore.com>
4064 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4065 (To_Jmpbuf_Address): Ditto
4066 (builtin_longjmp): Ditto
4068 2011-08-29 Thomas Quinot <quinot@adacore.com>
4070 * sem_res.adb: Minor reformatting.
4072 2011-08-29 Vincent Celier <celier@adacore.com>
4074 * make.adb (Gnatmake): Move special processing for VM targets after the
4075 call to Get_Target_Parameters.
4077 2011-08-29 Thomas Quinot <quinot@adacore.com>
4079 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4081 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4083 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4084 where an anonymous access discriminant of a limited designated type
4085 appears in a non-immutably limited discriminated type and issue an
4086 error message. Add local variable Desig_T and replace all occurrences
4089 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4091 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4092 implementation is compliant to RM D.15(15/2) after the modification
4093 imposed by AI05-0094-1 (binding interpretation).
4095 2011-08-29 Robert Dewar <dewar@adacore.com>
4097 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4098 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4100 2011-08-29 Thomas Quinot <quinot@adacore.com>
4102 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4103 the scope name, do not report a missing label as a style violation (it
4104 will be diagnosed as an illegality).
4105 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4106 variant records: Get_Enum_Lit_From_Pos already returns a usage
4107 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4108 on Expr in Integer_Literal case so that it can be used by
4111 2011-08-29 Tristan Gingold <gingold@adacore.com>
4113 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4115 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4116 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4118 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4119 Build_Abort_Block_Handler to build the exception handler. Do not
4120 undefer aborts for the Abort_Signal exception handler if back-end
4121 exception mechanism.
4122 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4123 back_end exceptions for all others and abort_signal.
4124 * s-except.ads (ZCX_By_Default): New constant.
4125 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4126 (Raise_Exception_Always): Ditto.
4127 (Raise_From_Signal_Handler): Ditto.
4128 (Raise_With_Location_And_Msg): Ditto.
4129 (Raise_With_Msg): Ditto.
4131 (Reraise_Occurence): Ditto.
4132 (Reraise_Occurrence_Always): Ditto.
4133 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4134 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
4136 2011-08-29 Thomas Quinot <quinot@adacore.com>
4138 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4140 2011-08-29 Robert Dewar <dewar@adacore.com>
4142 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4143 Minor code reorganization.
4145 2011-08-29 Bob Duff <duff@adacore.com>
4147 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4148 2012, not just Ada 2005.
4150 2011-08-29 Vincent Celier <celier@adacore.com>
4152 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4153 with a project file or with gprbuid, if -gnatep= is specified, the
4154 builder may need to be invoked with -x.
4156 2011-08-29 Tristan Gingold <gingold@adacore.com>
4158 * a-exexpr-gcc.adb: Minor comment fix.
4160 2011-08-29 Robert Dewar <dewar@adacore.com>
4162 * sem_ch8.adb: Minor reformatting.
4164 2011-08-29 Bob Duff <duff@adacore.com>
4166 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4167 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4168 treating "some" as unreserved in earlier Ada versions. This is now
4169 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4170 rather than Name_Some, since Tok_Some is now recognized as reserved.
4171 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4173 * scans.ads: Minor comment fixes.
4174 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4175 for other language versions.
4176 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4177 treating "some" as unreserved in earlier Ada versions. This is now
4178 handled in Snames.Is_Keyword_Name.
4179 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4181 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4182 unreserved in earlier Ada versions. This is now handled in
4183 Snames.Is_Keyword_Name.
4184 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4185 words as for other language versions.
4186 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4187 Ada 2012, not just Ada 2005.
4189 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4191 * sem_ch13.adb: Additional semantic checks for aspects involved in
4194 2011-08-29 Matthew Heaney <heaney@adacore.com>
4196 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4197 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4198 Container parameter.
4199 (Ancestor_Find): ditto.
4201 2011-08-29 Thomas Quinot <quinot@adacore.com>
4203 * par-endh.adb: Minor reformatting.
4205 2011-08-29 Tristan Gingold <gingold@adacore.com>
4207 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4208 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4209 (Adjust_N_CLeanups_For): Remove.
4210 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4212 (Propgate_Exception): Adjust.
4213 * raise-gcc.c: Add a few static/const.
4214 (Adjust_N_Cleanups_For): Remove declaration.
4215 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4217 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4219 * sem_ch8.adb: Use type of function return when rewriting as object
4222 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4224 * sem_type.adb: Minor reformatting.
4226 2011-08-29 Robert Dewar <dewar@adacore.com>
4228 * makeutl.adb: Minor reformatting.
4230 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4232 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4233 function call of a limited type, the expansion of the renaming is
4234 complicated by the presence of various temporaries and subtypes that
4235 capture constraints of the renamed object.
4236 Rewrite node as an object declaration, whose expansion is simpler.
4237 Given that the object is limited there is no copy involved and no
4240 2011-08-29 Robert Dewar <dewar@adacore.com>
4242 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4243 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4245 2011-08-29 Tristan Gingold <gingold@adacore.com>
4247 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4248 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4249 system-linux-hppa.ads, system-linux-s390.ads,
4250 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4251 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4252 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4253 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4254 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4255 system-solaris-sparc.ads, system-lynxos-x86.ads,
4256 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4257 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4258 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4259 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
4260 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
4261 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4262 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4263 * opt.ads: Adjust comment.
4264 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4265 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4266 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4268 2011-08-29 Emmanuel Briot <briot@adacore.com>
4270 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4271 file name is specified on the gnatmake or gprbuild command line, and
4272 before we search for that file in the project.
4274 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4276 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4277 used to determine whether a possible interpretation for an overloadable
4278 entity is declared within the current instantiation and should be
4279 included in the candidate set.
4281 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4283 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4285 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4287 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4288 access subtype is access_to_subprogram, when applying checks for
4291 2011-08-29 Matthew Heaney <heaney@adacore.com>
4293 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4294 for sibling when common parent.
4296 2011-08-29 Thomas Quinot <quinot@adacore.com>
4298 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4301 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4303 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4304 for the return type when in ASIS mode.
4306 2011-08-29 Vincent Celier <celier@adacore.com>
4308 * make.adb (Gnatmake): Get the default search dirs, then the target
4309 parameters after getting the Builder switches, as the Builder switches
4310 may include --RTS= and that could change the default search dirs.
4312 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4314 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4315 Make_Final_Call. Move the processing for class-wide types before the
4316 processing for derivations from [Limited_]Controlled.
4317 (Make_Final_Call): Move the processing for class-wide types before the
4318 processing for derivations from [Limited_]Controlled.
4319 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4320 Add code to account for alignments larger than the list header. Add a
4321 comment illustrating the structure of the allocated object + padding +
4323 (Deallocate_Any_Controlled): Add code to account for alignments larger
4324 than the list header.
4326 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4328 * sinfo.ads, sinfo.adb: New node kind
4329 N_Formal_Incomplete_Type_Definition, related flags.
4330 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4331 Parse formal incomplete types.
4332 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4334 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4335 Formal incomplete types do not need completion.
4336 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4337 Validate_Incomplete_Type_Instance): New procedures to handle formal
4339 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4340 that corresponds to a formal incomplete type.
4341 * sprint.adb: Handle formal incomplete type declarations.
4342 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4345 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4347 * a-fihema.ads, a-fihema.adb: Unit removed.
4348 * a-undesu.ads, a-undesu.adb: New unit implementing
4349 Ada.Unchecked_Deallocate_Subpool.
4350 * einfo.adb: Remove Associated_Collection from the node usage.
4351 Add Finalization_Master to the node usage.
4352 (Associated_Collection): Removed.
4353 (Finalization_Master): New routine.
4354 (Set_Associated_Collection): Removed.
4355 (Set_Finalization_Master): New routine.
4356 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4357 Finalization_Master to the output.
4358 * einfo.ads: Remove attribute Associated_Collection and its uses in
4360 Add new attribute Finalization_Master along with its uses in entitites.
4361 (Associated_Collection): Removed along with its pragma import.
4362 (Finalization_Master): New routine along with a pragma import.
4363 (Set_Associated_Collection): Removed along with its pragma import.
4364 (Set_Finalization_Master): New routine along with a pragma import.
4365 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4366 Build_Finalization_Collection with Build_Finalization_Master.
4367 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4368 before the bodies of the predefined routines. Add comment explaining
4369 this. Replace call to Build_Finalization_Collection with
4370 Build_Finalization_Master.
4371 (Freeze_Type): Replace call to Build_Finalization_Collection with
4372 Build_Finalization_Master.
4373 (Make_Finalize_Address_Body): Comment reformatting.
4374 (Make_Predefined_Primitive_Specs): Code reformatting.
4375 (Stream_Operation_OK): Update comment mentioning finalization
4376 collections. Replace RE_Finalization_Collection with
4377 RE_Finalization_Master.
4378 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4379 Associated_Collection with Finalization_Master. Replace call to
4380 Build_Finalization_Collection with Build_Finalization_Master.
4381 (Expand_Allocator_Expression): Replace call to Associated_Collection
4382 with Finalization_Master. Replace call to Set_Associated_Collection with
4383 Set_Finalization_Master. Remove the generation of
4384 Set_Finalize_Address_Ptr.
4385 (Expand_N_Allocator): Replace call to Associated_Collection with
4386 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4387 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4388 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4389 comment on usage. Replace call to Needs_BIP_Collection with
4390 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4391 BIP_Finalization_Master. Update all comments which mention finalization
4392 collections. Replace Associated_Collection with
4393 Finalization_Master. Replace Build_Finalization_Collection with
4394 Build_Finalization_Master.
4395 (BIP_Formal_Suffix): Update BIP_Collection's case.
4396 (Build_Heap_Allocator): Update the related comment. Rename local
4397 variable Collect to Fin_Mas_Id and update its occurrences. Update
4398 comments which mention finalization collections. Replace
4399 Set_Associated_Collection with Set_Finalization_Master.
4400 (Expand_Call): Update the code which detects a special piece of library
4402 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4403 Add_Collection_Actual_To_Build_In_Place_Call with
4404 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4405 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4406 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4407 Add_Collection_Actual_To_Build_In_Place_Call with
4408 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4409 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4410 Add_Collection_Actual_To_Build_In_Place_Call with
4411 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4412 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4413 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4414 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4415 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4416 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4417 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4418 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4419 Replace the call to Associated_Collection with Finalization_Master.
4420 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4421 Update the way finalization master names are generated. Update the
4422 retrieval of the correct access type which will carry the pool and
4424 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4425 (Make_Finalize_Address_Body): Abstract types do not need
4426 Finalize_Address. Code reformatting.
4427 (Make_Finalize_Address_Stmts): Update comment on usage.
4428 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4429 (Process_Declarations): Update comments.
4430 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4431 Build_Finalization_Master. Update associated comment.
4432 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4433 * exp_ch13.adb: Update comments which mention finalization collections.
4434 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4435 with Finalization_Master.
4436 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4437 create calls to routines Allocate_Any_Controlled and
4438 Deallocate_Any_Controlled.
4439 (Find_Finalize_Address): New routine.
4440 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4442 (Requires_Cleanup_Actions): Update the comment on freeze node
4444 * exp_util.ads: Remove comment on generated code for
4445 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4446 is better to simply look in the body.
4447 * freeze.adb (Freeze_All): Update the comment of finalization
4448 collections. Replace the call to Associated_Collection with
4449 Finalization_Master. Replace the call to Build_Finalization_Collection
4450 with Build_Finalization_Master.
4451 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4452 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4454 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4455 Ada.Finalization. Add processing for children of System.Storage_Pools.
4456 * rtsfind.ads: Remove the naming of second level children of
4458 Remove Ada_Finalization_Heap_Management from the list of units.
4459 Remove subtype Ada_Finalization_Child.
4460 Remove the following subprogram entities:
4464 RE_Finalization_Collection
4465 RE_Finalization_Collection_Ptr
4466 RE_Set_Finalize_Address_Ptr
4468 Add the naming of second level children of System.Storage_Pools.
4469 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4471 Add subtype System_Storage_Pools_Child.
4472 Add the following subprogram entities to System.Finalization_Masters:
4474 RE_Finalization_Master
4475 RE_Finalization_Master_Ptr
4477 Add the following subprogram entities to System.Storage_Pools.Subpools:
4479 RE_Allocate_Any_Controlled
4480 RE_Deallocate_Any_Controlled
4481 RE_Root_Storage_Pool_With_Subpools
4485 Move the following subprogram entities from
4486 Ada.Finalization.Heap_Management to System.Finalization_Masters:
4488 RE_Add_Offset_To_Address
4493 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
4494 Set_Associated_Collection with Set_Finalization_Master.
4495 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
4496 BIP_Finalization_Master is created.
4497 * s-finmas.adb: New unit System.Finalization_Masters.
4498 * s-finmas.ads: New unit System.Finalization_Masters.
4499 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
4500 * s-stposu.ads, s-stposu.adb: New unit implementing
4501 System.Storage_Pools.Subpools.
4503 2011-08-29 Bob Duff <duff@adacore.com>
4505 * tbuild.adb: Add assertion.
4507 2011-08-29 Thomas Quinot <quinot@adacore.com>
4509 * s-pooglo.adb: Minor reformatting.
4511 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4513 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
4514 an indexed component of a packed array whose element type is a record
4515 with a representation clause different from that of the right-hand
4516 side, generate a temporary to minimuze the number of bit-field
4517 operations generated.
4519 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4521 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
4522 declarations, and thus are likely insertion points for actions.
4524 2011-08-29 Bob Duff <duff@adacore.com>
4526 * einfo.ads: Minor comment fix.
4528 2011-08-29 Robert Dewar <dewar@adacore.com>
4530 * frontend.adb, gnat1drv.adb: Minor reformatting.
4532 2011-08-29 Tristan Gingold <gingold@adacore.com>
4534 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
4535 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
4536 space in front of the header.
4538 2011-08-29 Johannes Kanig <kanig@adacore.com>
4540 * frontend.adb (Frontend): Exit after creating Standard package when
4541 -gnatd.H is present.
4542 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
4545 2011-08-29 Robert Dewar <dewar@adacore.com>
4547 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
4548 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
4549 snames.ads-tmpl: Minor reformatting.
4551 2011-08-29 Philippe Gil <gil@adacore.com>
4553 * prj.adb (Reset_Units_In_Table): New procedure.
4554 Reset units to avoid access to freed memory.
4556 2011-08-29 Thomas Quinot <quinot@adacore.com>
4558 * get_scos.adb: When reading a P statement SCO without a pragma name
4559 (from an older ALI file), ensure that the Pragma_Name component is set
4560 to Unknown_Pragma (not left uninitialized).
4562 2011-08-29 Vincent Celier <celier@adacore.com>
4564 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
4565 modified to compute correctly the object path of a SAL project that is
4566 extending another library project.
4567 (Write_Path_File): New procedure.
4568 * makeutl.ads (Directories): New table moved from Buildgpr
4569 (Get_Directories): New procedure moved from Buildgpr
4570 (Write_Path_File): New procedure
4571 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
4572 paths before binding SALs, instead of Set_Ada_Paths.
4573 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
4575 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
4576 (Current_Source_Path_File_Of): New function
4577 (Set_Current_Object_Path_File_Of): New procedure
4578 (Current_Source_Object_File_Of): New function
4579 (Set_Current_Object_Path_File_Of): New procedure
4580 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
4581 (Current_Source_Path_File_Of): New function
4582 (Set_Current_Object_Path_File_Of): New procedure
4583 (Current_Source_Object_File_Of): New function
4584 (Set_Current_Object_Path_File_Of): New procedure
4586 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4588 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
4589 packed entity, use a bit-field assignment only if there is no change of
4592 2011-08-29 Thomas Quinot <quinot@adacore.com>
4594 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
4595 Is_RTU instead of using Chars comparisons.
4597 2011-08-29 Thomas Quinot <quinot@adacore.com>
4599 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
4600 temporary object if the actual is constrained, and the discriminants
4601 read from the stream don't match.
4603 2011-08-29 Tristan Gingold <gingold@adacore.com>
4605 * sem_attr.adb, exp_attr.adb: Add handling of
4606 Attribute_System_Allocator_Alignment
4607 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
4608 Attribute_System_Allocator_Alignment.
4609 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
4610 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
4611 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
4612 get_target_system_allocator_alignment.
4614 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4616 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
4619 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4621 * exp_ch3.adb (In_Runtime): Fix typo.
4623 2011-08-29 Bob Duff <duff@adacore.com>
4625 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
4627 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4629 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
4630 and a separate tag assignment is generated, ensure that the tag
4631 assignment is analyzed.
4633 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4635 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
4636 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
4637 of statement lists that may contain local declarations.
4638 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
4639 duplicate the triggering statements needed for the expansion of this
4640 construct, when the trigger is a dispatching call to a synchronized
4643 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4645 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
4646 * bindgen.adb: Add comments.
4647 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
4650 2011-08-29 Robert Dewar <dewar@adacore.com>
4652 * exp_attr.adb: Minor reformatting.
4653 Minor code reorganization and commenting.
4654 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
4657 2011-08-29 Thomas Quinot <quinot@adacore.com>
4659 * get_scos.adb: Ignore chaining indicators not currently supported
4662 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4664 * system.ads: Minor editing.
4666 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4668 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
4670 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
4671 Attribute_Elab_Subp_Body.
4672 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
4673 * sem_util.adb: Update comments.
4675 2011-08-29 Thomas Quinot <quinot@adacore.com>
4677 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
4678 pragma name for each SCO statement corresponding to a pragma.
4680 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4682 * opt.ads: Minor editing.
4684 2011-08-29 Yannick Moy <moy@adacore.com>
4686 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
4687 that only made sense for CodePeer mode.
4689 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4691 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
4692 which is no longer used.
4693 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
4694 handling of the 64-bit division check.
4695 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
4697 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
4700 2011-08-29 Thomas Quinot <quinot@adacore.com>
4702 * get_scos.adb: Minor reformatting.
4704 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4706 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
4707 statement list is wrapped in a block, the block is explicitly analyzed
4708 in order to properly redecorate the entities and create a servicing
4711 2011-08-29 Tristan Gingold <gingold@adacore.com>
4713 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
4714 (Set_Zero_Cost_Handling): Remove.
4716 2011-08-29 Thomas Quinot <quinot@adacore.com>
4718 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
4720 2011-08-29 Geert Bosch <bosch@adacore.com>
4722 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
4723 instruction, as the latter may produce -0.0, which is not a valid VAX
4725 (Neg_G): Likewise for VAX F float.
4727 2011-08-29 Robert Dewar <dewar@adacore.com>
4729 * exp_util.adb: Minor reformatting.
4731 2011-08-29 Yannick Moy <moy@adacore.com>
4733 * sem_ch3.adb: Minor comment update.
4735 2011-08-29 Thomas Quinot <quinot@adacore.com>
4737 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
4740 2011-08-29 Thomas Quinot <quinot@adacore.com>
4742 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
4743 current statement sequence on a generic instantiation or a subprogram
4746 2011-08-29 Robert Dewar <dewar@adacore.com>
4748 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
4751 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4753 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4754 Correct the check which involves the freeze node of a controlled or
4755 access-to-controlled type.
4757 2011-08-29 Geert Bosch <bosch@adacore.com>
4759 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
4761 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
4764 2011-08-29 Yannick Moy <moy@adacore.com>
4766 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
4767 for every index type and component type that is not a subtype_mark.
4768 (Process_Subtype): Set Etype of subtype.
4770 2011-08-29 Robert Dewar <dewar@adacore.com>
4772 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
4773 reorganization. Minor reformatting.
4775 2011-08-29 Steve Baird <baird@adacore.com>
4777 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
4778 for CodePeer and ALFA modes.
4780 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4782 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
4783 that comes from an enclosing scope if it is not the renaming of an
4784 actual, to handle properly a spurious ambiguity in an instance.
4786 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4788 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
4789 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
4790 use it instead of the Esize of the first parameter.
4791 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
4793 <Size>: Likewise. Call it for composite types on the RM size.
4795 2011-08-29 Yannick Moy <moy@adacore.com>
4797 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
4798 * sem_util.adb (Unique_Name): Correct behaviour for names of
4801 2011-08-29 Yannick Moy <moy@adacore.com>
4803 * sem_prag.adb (Check_Precondition_Postcondition): In formal
4804 verification mode, analyze pragma expression for correctness, for
4805 pre/post on library-level subprogram, as it is not expanded later.
4807 2011-08-29 Yannick Moy <moy@adacore.com>
4809 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
4810 in formal verification.
4812 2011-08-29 Thomas Quinot <quinot@adacore.com>
4814 * sem_util.adb: Minor reformatting.
4815 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
4817 * par_sco.ads, par_sco.adb: Update comments.
4819 2011-08-29 Yannick Moy <moy@adacore.com>
4821 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
4822 associated getter/setter.
4823 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
4825 2011-08-29 Vincent Celier <celier@adacore.com>
4827 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
4828 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
4829 with declarations for Language_Kind and Dependency_Kind for Ada.
4830 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
4831 (Process_Compiler): Take into account the new attributes Dependency_Kind
4833 (Check_Configuration): Check if language kind is unit based, not if the
4834 language name is Ada.
4835 (Process_Exceptions_Unit_Based): Ditto
4836 (Add_Language): Remove default additions of language and dependency kind
4837 * prj.ads: Minor comment change
4838 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
4840 2011-08-29 Johannes Kanig <kanig@adacore.com>
4842 * debug.adb: Update comments.
4844 2011-08-24 Joseph Myers <joseph@codesourcery.com>
4846 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
4847 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
4848 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
4849 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
4850 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
4852 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4854 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
4855 (GNATLIBCFLAGS_FOR_C): Replace
4856 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
4857 (gnatlib-shared-default, gnatlib-shared-dual-win32)
4858 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
4859 (gnatlib-sjlj, gnatlib-zcx): Likewise.
4861 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
4863 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
4865 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
4867 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
4869 2011-08-05 Nicolas Roche <roche@adacore.com>
4871 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
4872 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
4874 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
4876 2011-08-05 Matthew Heaney <heaney@adacore.com>
4878 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
4879 subprogram bodies declared out-of-order.
4881 2011-08-05 Yannick Moy <moy@adacore.com>
4883 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
4884 entities directly in package Standard, otherwise skip the standard
4887 2011-08-05 Robert Dewar <dewar@adacore.com>
4889 * a-cbmutr.adb: Minor reformatting
4890 (Allocate_Node): refactor node allocation algorithm
4892 2011-08-05 Robert Dewar <dewar@adacore.com>
4894 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
4895 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
4897 (Analyze_Pragma, case Check_Policy): Ditto.
4898 * sem_prag.ads (Check_Disabled): New function
4899 * snames.ads-tmpl: Add Name_Disable.
4901 2011-08-05 Robert Dewar <dewar@adacore.com>
4903 * gnat_rm.texi: Document implementation-defined policy DISABLE for
4904 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
4906 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4908 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
4909 that appears in a generic formal part and applies to a formal
4912 2011-08-05 Robert Dewar <dewar@adacore.com>
4914 * a-cbmutr.ads: Minor reformatting.
4916 2011-08-05 Matthew Heaney <heaney@adacore.com>
4918 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
4919 to check count, check sign of value instead.
4920 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
4921 (Copy_Subtree): allocate copy of source element
4922 (Equal_Subtree): compare elements, not access objects
4924 2011-08-05 Vincent Celier <celier@adacore.com>
4926 * gnat_ugn.texi: Fix VMS alternative.
4928 2011-08-05 Thomas Quinot <quinot@adacore.com>
4930 * sem_ch11.adb: Add comment.
4932 2011-08-05 Robert Dewar <dewar@adacore.com>
4934 * exp_util.adb: Minor comment fix.
4936 2011-08-05 Robert Dewar <dewar@adacore.com>
4938 * scng.adb (Error_Unterminated_String): Improve flag position when
4941 2011-08-05 Matthew Heaney <heaney@adacore.com>
4943 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
4945 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
4946 multiway tree containers.
4948 2011-08-05 Robert Dewar <dewar@adacore.com>
4950 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
4951 * stylesw.adb: Implement -gnatyC to control comment spacing
4952 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
4954 * usage.adb: Add line for -gnatyC.
4956 2011-08-05 Robert Dewar <dewar@adacore.com>
4958 * gnat_ugn.texi: Document -gnatyC.
4959 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
4960 synonym for COMMENTS2).
4962 2011-08-05 Robert Dewar <dewar@adacore.com>
4964 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
4965 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
4966 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
4967 a-comutr.ads, lib-xref.adb: Minor reformatting.
4969 2011-08-05 Robert Dewar <dewar@adacore.com>
4971 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
4972 warning if there is an exception handler present.
4974 2011-08-05 Pascal Obry <obry@adacore.com>
4976 * a-iteint.ads: Fix copyright year.
4978 2011-08-05 Thomas Quinot <quinot@adacore.com>
4980 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
4981 statement SCO for a USE clause or a representation clause.
4983 2011-08-05 Yannick Moy <moy@adacore.com>
4985 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
4986 between body and spec for stub.
4987 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
4988 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
4989 pragma precondition or postcondition, for which the enclosing
4990 subprogram or package in the AST is not the desired one, return empty.
4992 2011-08-05 Thomas Quinot <quinot@adacore.com>
4994 * g-expect.adb: Minor reformatting.
4996 2011-08-05 Bob Duff <duff@adacore.com>
4998 * a-fihema.adb: Comment out OS_Lib.
5000 2011-08-05 Matthew Heaney <heaney@adacore.com>
5002 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5003 (unbounded multiway tree containers) and a-iteint.ads.
5004 * a-comutr.ads, a-comutr.adb:
5005 This is the new Ada 2012 unit for unbounded multiway tree containers
5006 * a-cimutr.ads, a-cimutr.adb
5007 This is the new Ada 2012 unit for indefinite multiway tree containers
5008 * a-iteint.ads: New file.
5010 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5012 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5014 2011-08-05 Bob Duff <duff@adacore.com>
5016 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5018 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5020 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5022 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5023 general indexing aspects of Ada2012. Called when analyzing indexed
5024 components when other interpretations fail.
5025 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5026 in an expression context where overloading is meaningful. This excludes
5027 the occurrence in an aspect specification (efficiency only).
5028 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5029 related to iterators can be set by an attribute specification, but
5031 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5032 Constant_Indexing and Variable_Indexing.
5033 (Check_Indexing_Functions): New procedure to perform legality checks.
5034 Additional semantic checks at end of declarations.
5036 2011-08-05 Sergey Rybin <rybin@adacore.com>
5038 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5039 order of calling Tree_Write/Tree_Read routines made for aspects.
5041 2011-08-05 Bob Duff <duff@adacore.com>
5043 * a-fihema.adb (Finalize): Fix race condition.
5045 2011-08-05 Yannick Moy <moy@adacore.com>
5047 * sem_ch12.adb (Analyze_Package_Instantiation,
5048 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5051 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5053 * sem_type.adb (Specific_Type): in an instance, the type-specific
5054 operand of an equality check that involves null may have a private
5055 type. Use full view to determine legality of construct.
5057 2011-08-05 Vincent Celier <celier@adacore.com>
5059 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5060 delete or close the file when the call to gnatmake was successful.
5062 2011-08-05 Yannick Moy <moy@adacore.com>
5064 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5065 Global_Discard_Names.
5067 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5069 * sinfo.ads: comments on use of entity field for aspect specifications.
5071 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5073 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5074 node is not itself an entity but a selected component, it is a
5075 rewritten parameterless call to an en enclosing synchronized operation,
5076 and this expansion will be performed again in the instance, so there is
5077 no global information to preserve.
5079 2011-08-05 Javier Miranda <miranda@adacore.com>
5081 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5082 for renamings of predefined primitives.
5083 (In_Predef_Prims_DT): New subprogram.
5085 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5087 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5088 possible interpretation of name is a reference type, add an
5089 interpretation that is the designated type of the reference
5090 discriminant of that type.
5091 * sem_res.adb (resolve): If the interpretation imposed by context is an
5092 implicit dereference, rewrite the node as the deference of the
5093 reference discriminant.
5094 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5095 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5096 parent type or base type.
5097 * sem_ch4.adb (Process_Indexed_Component,
5098 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5099 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5100 Check for implicit dereference.
5101 (List_Operand_Interps): Indicate when an implicit dereference is
5103 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5105 2011-08-05 Thomas Quinot <quinot@adacore.com>
5107 * scos.ads: Update documentation of SCO table. Pragma statements can now
5108 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5109 * par_sco.ads, par_sco.adb: Implement the above change.
5110 (Process_Decisions_Defer): Generate a P decision for the first parameter
5111 of a dyadic pragma Debug.
5112 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5114 * put_scos.adb: Code simplification based on above change.
5116 2011-08-05 Robert Dewar <dewar@adacore.com>
5118 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5119 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5120 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5121 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5123 2011-08-05 Bob Duff <duff@adacore.com>
5125 * a-stunau.ads, g-spipat.adb: Update comments.
5127 2011-08-05 Bob Duff <duff@adacore.com>
5129 * a-fihema.ads: Minor comment fix.
5130 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5132 (Attach, Detach): Remove some unnecessary code.
5133 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5135 2011-08-05 Bob Duff <duff@adacore.com>
5137 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5138 allocation for Objects component. This simplifies the code somewhat. It
5139 is also a little more efficient in the not-so-unusual case where there
5140 are no controlled objects allocated.
5141 Make Finalization_Started flag atomic.
5142 (Finalize): Avoid unnecessary detachment of items from the list.
5143 (pcol): Minor cleanup.
5145 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5147 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5148 package whose name is the same as that of the generic unit, or its
5151 2011-08-05 Bob Duff <duff@adacore.com>
5153 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5154 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5155 Minor comment fixes.
5157 2011-08-05 Arnaud Charlet <charlet@adacore.com>
5159 * make.adb (Linking_Phase): No longer need to set source search path
5160 before calling gnatlink in CodePeer mode.
5161 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5162 gcc in CodePeer mode, since the binder generated file no longer has a
5164 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5165 * switch-c.adb: Update comment.
5167 2011-08-05 Thomas Quinot <quinot@adacore.com>
5169 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5171 2011-08-05 Nicolas Roche <roche@adacore.com>
5173 * gnat_ugn.texi: Fix minor syntax error issue.
5175 2011-08-05 Vincent Celier <celier@adacore.com>
5177 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5178 delete or close the file when the call to gnatmake returns a non
5179 successful return code.
5181 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5183 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5184 check, indicate that the copy of the original node does not come from
5185 source, to prevent an infinite recursion of the expansion.
5187 2011-08-05 Johannes Kanig <kanig@adacore.com>
5189 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5190 VC generation for subprogram bodies.
5192 2011-08-05 Yannick Moy <moy@adacore.com>
5195 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5196 the base type with the smallest allowed base type.
5198 2011-08-05 Sergey Rybin <rybin@adacore.com>
5200 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5203 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5205 * sem_ch12.ads: minor comment updates.
5207 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5209 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5210 instantiation and a formal package the compiler generates a package
5211 renaming declaration so that the generic name within the declaration
5212 is interpreted as a renaming of the instance. At the end of a formal
5213 package declaration, this renaming must become invisible.
5215 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5217 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5218 comparison and rely on concrete entities instead.
5220 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5222 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5223 and discriminants, to indicate that the type has an access discriminant
5224 that supports implicit dereference.
5225 * snames.ads-tmpl: Add names of aspects and attributes related to
5226 Ada2012 iterators: constant_indexing, default_iterator,
5227 iterator_element, implicit_dereference, variable_indexing.
5228 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5229 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5230 iterator-related aspects.
5231 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5233 2011-08-05 Sergey Rybin <rybin@adacore.com>
5235 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5236 metrics in gnatmetric to cover new kinds of coupling mentrics.
5238 2011-08-05 Steve Baird <baird@adacore.com>
5240 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
5241 of calling the user-defined main subprogram.
5242 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5243 is set) Call_Main_Subprogram ahead of, as opposed to
5245 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5246 generation of a "with" of the user-defined main subprogram.
5247 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5248 (which is now called from Gen_Main instead).
5250 2011-08-05 Emmanuel Briot <briot@adacore.com>
5252 * projects.texi: Added reference to the Makefile package.
5254 2011-08-05 Thomas Quinot <quinot@adacore.com>
5256 * exp_ch7.adb: Minor comment rewording.
5258 2011-08-05 Ed Falis <falis@adacore.com>
5260 * env.c: Fix comment.
5262 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5264 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5265 character comparison and rely on concrete entities instead.
5267 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5269 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5270 suggested by AI95-0068.
5272 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5274 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5275 the two potential initialization calls. This accounts for any
5276 access-before-elaboration checks which may precede the initialization
5278 (Next_Suitable_Statement): New routine. Returns the next real statement
5279 after the input node while skipping generated checks.
5280 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5281 with comment on usage.
5282 Do not generate Elaborate_All when the trigger is a finalization call
5283 coming from a type init proc.
5284 (Check_Elab_Call): Propagate the initialization procedure context to
5285 subsequent calls to Check_A_Call.
5286 (Check_Internal_Call_Continue): Propagate the initialization procedure
5287 context to subsequent calls to Check_Elab_Call.
5288 (Is_Finalization_Procedure): New routine. Returns True if the input
5289 entity denotes a [Deep_]Finalize routine.
5290 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5291 along with comment on usage.
5293 2011-08-05 Vadim Godunko <godunko@adacore.com>
5295 * s-atocou.ads: Add list of supported platforms.
5297 2011-08-05 Yannick Moy <moy@adacore.com>
5299 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5301 * opt.ads (Disable_ALI_File): new Boolean flag
5302 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5304 2011-08-05 Ed Falis <falis@adacore.com>
5306 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5307 environ is properly defined.
5309 2011-08-05 Vincent Celier <celier@adacore.com>
5311 * make.adb (Compilation_Phase): Exit immediately when all objects have
5312 been found up to date, to avoid multiple exit messages.
5313 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5314 same project for languages with no compiler.
5315 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5317 2011-08-05 Robert Dewar <dewar@adacore.com>
5319 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5320 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5321 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5322 s-atocou-builtin.adb: Minor reformatting.
5324 2011-08-05 Yannick Moy <moy@adacore.com>
5326 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5327 if the node to wrap is a pragma check, this node and enclosed
5328 expression are not expanded, so do not apply any transformations here.
5329 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5330 introducing transient scopes.
5332 2011-08-05 Jose Ruiz <ruiz@adacore.com>
5334 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5335 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5336 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5337 routine is available, so we use the default implementation of these
5339 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5340 support for copying attributes on VxWorks 6.
5342 2011-08-05 Yannick Moy <moy@adacore.com>
5344 * debug.adb: Remove use of -gnatd.D.
5345 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5346 * opt.ads: Simplify variables for ALFA mode, to keep one only
5347 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5350 2011-08-05 Vincent Celier <celier@adacore.com>
5352 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5353 Builder'Default_Switches.
5355 2011-08-05 Vincent Celier <celier@adacore.com>
5357 * makeusg.adb: Add lines for --create-map-file switches.
5359 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5361 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5362 profile is incomplete and the full view is available, replace it with
5364 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5365 incomplete, freezing the subprogram is delayed until the full view is
5367 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5368 fixed-point multiplication operator and the predefined operator is
5369 resolved in favor of the user-defined one.
5371 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5373 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5376 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5378 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5379 whether a type lacks user-defined Read or Write operations, or has a
5380 component that lacks them.
5381 * sem_attr.adb (Check_Stream_Attribute): if restriction
5382 No_Default_Stream_Attributes is active, verify that all subcomponent
5383 types of the target have user-defined stream operations, and report
5385 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5386 * exp_strm.adb: Build_Elementary_Input_Call,
5387 Build_Elementary_Write_Call): remove checks for restriction
5388 No_Default_Stream_Attributes, now checked in semantics.
5390 2011-08-04 Vincent Celier <celier@adacore.com>
5392 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5393 switches on the command line, look for all valid --RTS switches in the
5394 Builder switches and for each language use the first runtime name found
5395 to invoke gprconfig.
5396 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5397 command line and there is no auto-configuration.
5398 (Runtime_Name_Set_For): New function.
5400 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5402 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5403 elaborate initialization expression for variable Abort when processing
5404 a package body or a declaration.
5405 (Create_Finalizer): Propagate the package context when creating the
5406 exception-related variables.
5407 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5408 For_Package along with usage comment.
5410 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5412 * gcc-interface/Makefile.in: Clean up targets.
5413 Enable new package for atomic counters and copy-on-write implementation
5414 of unbounded strings on x86 platforms.
5415 * gcc-interface/Make-lang.in: Update dependencies.
5417 2011-08-04 Robert Dewar <dewar@adacore.com>
5419 * exp_ch7.adb: Minor reformatting.
5421 2011-08-04 Robert Dewar <dewar@adacore.com>
5423 * exp_strm.adb: Minor reformatting.
5425 2011-08-04 Vadim Godunko <godunko@adacore.com>
5427 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5428 operations are not supported.
5429 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5430 * s-atocou-x86.adb: New file.
5431 * Makefile.rtl: Add s-atocou.o file
5433 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5435 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5436 (Compilation_Phase): ... here.
5437 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5439 2011-08-04 Thomas Quinot <quinot@adacore.com>
5441 * Make-generated.in: Fix minor typo in comment.
5443 2011-08-04 Thomas Quinot <quinot@adacore.com>
5445 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5448 2011-08-04 Robert Dewar <dewar@adacore.com>
5450 * a-coinho.adb: Minor reformatting.
5452 2011-08-04 Robert Dewar <dewar@adacore.com>
5454 * a-coinho.ads: Minor reformatting.
5456 2011-08-04 Vadim Godunko <godunko@adacore.com>
5458 * s-atocou.ads, s-atocou.adb: New files.
5459 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5460 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5461 direct use of GCC's atomic builtins and replace them by use of new
5462 atomic counter package.
5464 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5466 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5468 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5470 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5471 with a call to Get_External_Tag.
5472 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5473 subprogram usage. Remove the guard against package declarations and
5474 bodies since Build_Cleanup_Statements is no longer invoked in that
5476 (Build_Components): Initialize Tagged_Type_Stmts when the context
5477 contains at least one library-level tagged type.
5478 (Build_Finalizer): New local variables Has_Tagged_Types and
5479 Tagged_Type_Stmts along with associated comments on usage. Update the
5480 logic to include tagged type processing.
5481 (Create_Finalizer): Insert all library-level tagged type unregistration
5482 code before the jump block circuitry.
5483 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
5484 (Expand_N_Package_Declaration): Remove the call to
5485 Build_Cleanup_Statements.
5486 (Process_Tagged_Type_Declaration): New routine. Generate a call to
5487 unregister the external tag of a tagged type.
5488 (Processing_Actions): Reimplemented to handle tagged types.
5489 (Process_Declarations): Detect the declaration of a library-level
5490 tagged type and carry out the appropriate actions.
5491 (Unregister_Tagged_Types): Removed. The machinery has been directly
5492 merged with Build_Finalizer.
5494 2011-08-04 Robert Dewar <dewar@adacore.com>
5496 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
5497 gnatls.adb, exp_ch3.adb: Minor reformatting.
5499 2011-08-04 Marc Sango <sango@adacore.com>
5501 * sem_attr.adb (Analyze_Attribute): Replace the message
5502 "invisible attribute of}" of the spark restriction violation in
5503 attribute reference by the simple message "invisible attribute of type".
5504 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
5505 two insertion characters: '&' and '}'.
5507 2011-08-04 Vadim Godunko <godunko@adacore.com>
5509 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
5510 * a-coinho.ads, a-coinho.adb: New file.
5511 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
5513 2011-08-04 Nicolas Roche <roche@adacore.com>
5515 * alfa_test.adb: Not all ali files are containing alfa information even
5516 if compiled with -gnatd.F. So suppress warning about missing ALFA
5519 2011-08-04 Yannick Moy <moy@adacore.com>
5521 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
5523 * put_alfa.adb: Check that scope name is not empty.
5525 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5527 * exp_ch3.adb (Stream_Operation_Ok): new predicate
5528 Needs_Elementary_Stream_Operation, to determine whether user-defined
5529 Read and Write attributes are available for the elementary components
5530 of the given type. If only the predefined attributes are available,
5531 then when restriction No_Default_Stream_Attributes is active the
5532 predefined stream attributes for the composite type cannot be created.
5534 2011-08-04 Robert Dewar <dewar@adacore.com>
5536 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
5537 Put routines in alpha order
5539 2011-08-04 Jose Ruiz <ruiz@adacore.com>
5541 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
5542 * gcc-interface/Make-lang.in: Update dependencies.
5544 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5546 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
5547 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
5550 2011-08-04 Robert Dewar <dewar@adacore.com>
5552 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
5553 lib-xref-alfa.adb: Minor reformatting.
5555 2011-08-04 Marc Sango <sango@adacore.com>
5557 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
5558 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
5559 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
5562 2011-08-04 Tristan Gingold <gingold@adacore.com>
5564 * bindgen.adb (Gen_Adainit_C): Remove.
5565 (Gen_Adafinal_C): Ditto.
5566 (Gen_Elab_Externals_C): Ditto.
5567 (Gen_Elab_Calls_C): Ditto.
5568 (Gen_Elab_Order_C): Ditto.
5569 (Gen_Elab_Defs_C): Ditto.
5570 (Gen_Finalize_Library_C): Ditto.
5571 (Gen_Finalize_Library_Defs_C): Ditto.
5572 (Gen_Main_C): Ditto.
5573 (Gen_Output_File_C): Ditto.
5574 (Gen_Restrictions_C): Ditto.
5575 (Gen_Versions_C): Ditto.
5576 (Write_Info_Ada_C): Ditto.
5577 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
5578 (Gen_Output_File): Do not force Ada_Bind_File anymore.
5579 Always call Gen_Output_File_Ada.
5580 * gnatlink.adb (Begin_Info): Now a constant.
5582 (Ada_Bind_File): Remove
5583 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
5584 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
5585 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
5586 * opt.ads (Ada_Bind_File): Remove.
5588 2011-08-04 Thomas Quinot <quinot@adacore.com>
5590 * projects.texi: Document target-specific directory in default project
5593 2011-08-04 Thomas Quinot <quinot@adacore.com>
5595 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
5598 2011-08-04 Yannick Moy <moy@adacore.com>
5600 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
5601 opt.ads, lib-xref.ads: Code clean up.
5603 2011-08-04 Yannick Moy <moy@adacore.com>
5605 * gnat_rm.texi: Update description of Test_Case
5606 * gnat_ugn.texi: Typo.
5608 2011-08-04 Ed Falis <falis@adacore.com>
5610 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
5612 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5614 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
5615 it is of type Root_Controlled. This action eliminates fields Prev and
5616 Next from type equality.
5618 2011-08-04 Yannick Moy <moy@adacore.com>
5620 * lib-xref-alfa.adb: Correct typo.
5622 2011-08-04 Matthew Heaney <heaney@adacore.com>
5624 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
5627 2011-08-04 Yannick Moy <moy@adacore.com>
5629 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
5630 (Analyze_Pragma): allow static string expression for name of Test_Case,
5631 instead of simply string literals.
5632 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
5635 2011-08-04 Vincent Celier <celier@adacore.com>
5637 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
5638 case suffixes to find truncated main sources.
5640 2011-08-04 Tristan Gingold <gingold@adacore.com>
5642 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
5643 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
5644 (Compute_Current_Task): Ditto.
5646 2011-08-04 Tristan Gingold <gingold@adacore.com>
5648 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
5650 2011-08-04 Yannick Moy <moy@adacore.com>
5652 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
5653 library-level constant.
5654 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
5655 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
5656 used as selector of parameter association, in ALFA mode.
5658 2011-08-04 Robert Dewar <dewar@adacore.com>
5660 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
5661 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
5664 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5666 * make.adb (Linking_Phase): Set source search path before calling
5667 gnatlink in CodePeer mode.
5669 2011-08-04 Javier Miranda <miranda@adacore.com>
5671 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
5672 Remove code which takes care of building TSDs.
5673 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
5674 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
5675 the accessibility check in VM targets.
5676 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
5677 (Building_Static_DT): Now returns false for VM targets.
5678 (Build_VM_TSDs): Removed.
5679 (Expand_Interface_Conversion): Generate missing runtime check for
5680 conversions to interface types whose target type is unknown at compile
5682 (Make_VM_TSD): Add missing code to disable the generation of calls to
5683 Check_TSD if the tagged type is not defined at library level, or not
5684 has a representation clause specifying its external tag, or -gnatdQ is
5686 * exp_disp.ads (Build_VM_TSDs): Removed.
5687 (Make_VM_TSDs): Spec relocated from exp_disp.adb
5688 * sem_disp.adb (Check_Dispatching_Operation): No code required to
5689 register primitives in the dispatch tables in VM targets.
5690 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
5691 initialization of class-wide interface objects in VM targets.
5692 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
5695 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5697 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
5698 when dotnet-ld cannot be found.
5700 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5702 * bindgen.adb: Simplify significantly generation of binder body file in
5704 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
5705 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
5708 2011-08-04 Yannick Moy <moy@adacore.com>
5710 * sem_prag.adb, sem.ads: Code cleanup.
5712 2011-08-04 Tristan Gingold <gingold@adacore.com>
5714 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
5715 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
5716 results if possible.
5717 * s-stusta.adb (Print): Adjust after changes in s-stausa.
5718 * gnat_ugn.texi: Update dynamic stack usage section.
5720 2011-08-04 Steve Baird <baird@adacore.com>
5722 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
5723 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
5724 contains only a call to the user-defined main subprogram.
5725 (Gen_Main_Ada) - If CodePeer_Mode is set, then
5726 call the "wrapper" subprogram instead of directly
5727 calling the user-defined main subprogram.
5729 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5731 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
5732 alternatives of a case statement for controlled objects. Rename local
5733 variable A to Dead_Alt.
5734 (Expand_N_If_Statement): Check the then and else statements of an if
5735 statement for controlled objects. Check the then statements of all
5736 elsif parts of an if statement for controlled objects.
5737 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
5739 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
5740 detects a loop associated with the expansion of an array object.
5741 Augment the processing of the loop statements to account for a possible
5742 wrap done by Process_Statements_For_Controlled_Objects.
5743 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
5744 statements and abortable part of an asynchronous select for controlled
5746 (Expand_N_Conditional_Entry_Call): Check the else statements of a
5747 conditional entry call for controlled objects.
5748 (Expand_N_Selective_Accept): Check the alternatives of a selective
5749 accept for controlled objects.
5750 (Expand_N_Timed_Entry_Call): Check the entry call and delay
5751 alternatives of a timed entry call for controlled objects.
5752 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
5753 exception handler for controlled objects.
5754 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5755 Add formal parameter Nested_Constructs along with its associated
5757 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
5758 Requires_Cleanup_Actions.
5759 (Process_Statements_For_Controlled_Objects): New routine.
5760 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
5761 routine. Inspect a node which contains a non-handled sequence of
5762 statements for controlled objects. If such an object is found, the
5763 statements are wrapped in a block.
5765 2011-08-04 Bob Duff <duff@adacore.com>
5767 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
5768 need to compare with Class_Wide_Type (T2), in order to get at the
5769 original class-wide type node.
5770 * sem_type.ads (Covers): Improve the comment.
5771 * einfo.ads (Class_Wide_Type): Improve the comment.
5772 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
5773 the type of the Deref.
5775 2011-08-04 Yannick Moy <moy@adacore.com>
5777 * gnat_rm.texi: Document that Test_Case pragma can only appear on
5778 separate declarations.
5779 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
5780 check identifier of pragma argument.
5781 (Chain_TC): check that no other test case associated to the same entity
5782 share the same name.
5783 (Check_Test_Case): disallow test case inside subprogram body
5784 (Analyze_Pragma): correct call to check identifier and not argument
5785 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
5786 function gets name from test case pragma.
5788 2011-08-04 Yannick Moy <moy@adacore.com>
5790 * gnat_rm.texi: Document new pragma and aspect.
5791 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
5792 (No_Duplicates_Allowed): new constant array defining whether duplicates
5793 aspects of each kind can appear on the same declaration.
5794 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
5795 field, which points to a node holding the previous Spec_PPC_List.
5796 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
5797 through the indirection with Contract.
5798 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
5799 * par-prag.adb (Prag): do nothing on Test_Case pragma
5800 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
5802 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
5803 component Ensures of Test_Case.
5804 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
5805 (Analyze_Generic_Subprogram_Declaration,
5806 Analyze_Subprogram_Instantiation,
5807 Analyze_Abstract_Subprogram_Declaration,
5808 Analyze_Subprogram_Body_Helper,
5809 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
5810 insert contract in subprogram node at point of definition
5812 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
5813 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
5814 corresponding pragma
5815 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
5816 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
5817 similar to the analysis of pre/post
5818 (Derive_Subprogram): insert contract in subprogram node at point of
5820 * sem_prag.adb, sem_prag.ads
5821 (Check_Arg_Is_String_Literal, Check_Identifier):
5822 new checking procedures to be called in treatment of pragmas
5823 (Check_Test_Case): new procedure to check that a Test_Case aspect or
5824 pragma is well-formed. This does not check currently that 'Result is
5825 used only in the Ensures component of a Test_Case.
5826 (Analyze_Pragma): add case for Test_Case
5827 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
5828 components of a Test_Case.
5829 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
5830 expressions in the 3rd (and 4th if present) arguments of a Test_Case
5831 pragma, treated as spec expressions.
5832 (Sig_Flags): add value -1 for Test_Case.
5833 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
5834 Get_Requires_From_Test_Case_Pragma): getters for both expression
5835 components of a Test_Case.
5836 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
5837 indirection between an entry or [generic] subprogram entity and its
5838 pre/post + test-cases.
5839 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
5840 get/set for fields of an N_Contract node.
5841 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
5842 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
5843 names and pragma for Test_Case.
5844 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
5846 2011-08-04 Vincent Celier <celier@adacore.com>
5848 * gnat_ugn.texi: Improve documentation of gnatmake switch
5849 --source-info-file=.
5851 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5853 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
5854 type). Initialize Atyp to the appropriate type which is later checked
5855 for completion. Rewrite the assertion associated with private type
5858 2011-08-04 Ed Falis <falis@adacore.com>
5860 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
5861 initialize the number of CPUs.
5863 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5865 * sem_type.adb (Disambiguate): New subsidiary routine
5866 In_Same_Declaration_List, to implement AI05-0020: a user-defined
5867 equality on an anonymous access type whose designated type is private
5868 does not lead to an ambiguity with the universal access equality
5869 operator in the body or child units of the defining package. The same
5870 is true for a multiplication operator on a private type completed with
5873 2011-08-04 Javier Miranda <miranda@adacore.com>
5875 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
5876 (Normalize_Scalars_Config): Removed.
5878 (Register_Opt_Config_Switches): Remove registering config values of
5879 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
5880 (Restore_Opt_Config_Switches): Remove code which restores the values of
5881 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5882 Init_Or_Norm_Scalars.
5883 (Save_Opt_Config_Switches): Remove code which saves values of
5884 Init_Or_Norm_Scalars and Normalize_Scalars.
5885 (Set_Opt_Config_Switches): Remove code which restores config values of
5886 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5887 Init_Or_Norm_Scalars.
5889 2011-08-04 Yannick Moy <moy@adacore.com>
5891 * frontend.adb (Frontend): remove previous patch to avoid full
5892 qualification in ALFA mode.
5893 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
5894 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
5895 unique name for an entity, which could be used to identify the entity
5896 across compilation units.
5898 2011-08-04 Thomas Quinot <quinot@adacore.com>
5901 (Initialize_Default_Project_Path): Add target specific directory
5902 ($prefix/$target/lib/gnat) in front of project path in all cases
5903 (making gnatmake's behaviour consistent with gprbuild).
5904 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
5905 Pass target name from Sdefault to project subsystem.
5906 * gnatls.adb: Show new target specific default project directory.
5908 2011-08-04 Johannes Kanig <kanig@adacore.com>
5910 * cstand.adb: Add Information to Identifier in Standard
5911 (Identifer_For): Set Entity to the corresponding entity
5913 2011-08-04 Sergey Rybin <rybin@adacore.com>
5915 * gnat_ugn.texi: Update doc on gnatcheck.
5917 2011-08-04 Yannick Moy <moy@adacore.com>
5919 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
5922 2011-08-04 Yannick Moy <moy@adacore.com>
5924 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
5925 performing expansion.
5926 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
5927 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
5928 it is not called in ALFA mode.
5930 2011-08-04 Emmanuel Briot <briot@adacore.com>
5932 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
5933 after all, so removed.
5935 2011-08-04 Sergey Rybin <rybin@adacore.com>
5937 * vms_data.ads: Add missing VMS qualifiers.
5939 2011-08-04 Emmanuel Briot <briot@adacore.com>
5941 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
5942 the list of files on the command line after processing it through
5945 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5947 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
5948 processing for .NET/JVM. These targets can now benefit from
5949 Raise_From_Controlled_Operation and they share the same processing with
5951 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
5952 These targets need transient scopes in order to properly finalize short
5953 lived controlled objects.
5954 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
5955 NET/JVM. These targets can now benefit from
5956 Raise_From_Controlled_Operation and they share the same processing with
5959 2011-08-04 Geert Bosch <bosch@adacore.com>
5961 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
5963 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5965 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
5966 Expand_Record_Aggregate, to determine whether aggregate must be
5967 expanded into assignments. This is the case if the ancestor part is
5968 private, regarless of the setting of the flag Has_Private_Ancestor.
5970 2011-08-04 Ed Falis <falis@adacore.com>
5972 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
5974 2011-08-04 Bob Duff <duff@adacore.com>
5976 * sinfo.ads: Fix comment.
5978 2011-08-04 Steve Baird <baird@adacore.com>
5980 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
5981 choose a package name in much the same way as is
5982 done for JGNAT when VM_Target /= No_VM, except that
5983 a slightly more distinctive prefix string is used.
5985 2011-08-04 Emmanuel Briot <briot@adacore.com>
5987 * makeutl.adb (Complete_Mains): no longer accept unit names on the
5988 gnatmake command line.
5989 This behavior was never documented (and was supported only because of
5990 an early bug in the code). This case might lead to ambiguous cases
5991 (between unit names and truncated base names without suffixes).
5993 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5995 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
5996 Remove the external tag of a tagged type from the internal hash table.
5997 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
5998 expanded usage of the routine. Strenghten the check for Is_Master. Add
5999 processing for tagged types.
6000 (Build_Finalizer): Create all the necessary lists used in finalizer
6001 creation when the processed context is a package that may contain
6003 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6004 Requires_Cleanup_Actions.
6005 (Expand_N_Package_Body): Package bodies may need clean up code
6006 depending on whether they contain tagged types.
6007 (Expand_N_Package_Declaration): Package declarations may need clean up
6008 code depending on whether they contain tagged types.
6009 (Unregister_Tagged_Types): New routine. Search through a list of
6010 declarations or statements, looking for non-abstract Ada tagged types.
6011 For each such type, generate code to unregister the external tag.
6012 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6013 Requires_Cleanup_Actions.
6014 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6015 through a list of declarations or statements looking for non-abstract
6016 Ada tagged types or controlled objects.
6017 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6018 Requires_Cleanup_Actions.
6019 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6020 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6023 2011-08-04 Vincent Celier <celier@adacore.com>
6025 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6026 has Ada sources, not project Project, because if the root project
6027 Project has no sources of its own, all projects will be deemed without
6030 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6032 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6033 of the No_Param_Proc acc-to-subp type used for initialization of
6034 __gnat_finalize_library_objects so that it's declared at library level
6035 rather than nested inside of the adainit routine.
6037 2011-08-04 Javier Miranda <miranda@adacore.com>
6039 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6040 if the tagged type has a representation clause which specifies its
6043 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6045 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6046 Remove previous procedure with that name.
6047 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6049 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6050 subtype mark, the ancestor cannot have unknown discriminants.
6051 (Resolve_Record_Aggregate): if the type has invisible components
6052 because of a private ancestor, the aggregate is illegal.
6054 2011-08-04 Vincent Celier <celier@adacore.com>
6056 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6057 account switches -gnat2005, -gnat12 and -gnat2012.
6059 2011-08-04 Bob Duff <duff@adacore.com>
6061 * s-tasdeb.ads: Minor comment fix.
6063 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6065 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6067 * switch.ads, switch.adb (Is_Language_Switch): New function.
6069 2011-08-04 Vincent Celier <celier@adacore.com>
6071 * switch-c.adb: Minor comment addition.
6073 2011-08-04 Vincent Celier <celier@adacore.com>
6075 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6076 ending with '=' is followed by a space (missing file name).
6078 2011-08-04 Pascal Obry <obry@adacore.com>
6080 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6082 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6084 * sem_ch12.adb (Analyze_Associations): New routine
6085 Check_Overloaded_Formal_Subprogram to reject a formal package when
6086 there is a named association or a box initialisation for an overloaded
6087 formal subprogram of the corresponding generic.
6089 2011-08-04 Yannick Moy <moy@adacore.com>
6091 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6092 * get_alfa.adb, put_alfa.adb: Read and write new component of
6094 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6096 2011-08-04 Pascal Obry <obry@adacore.com>
6098 * urealp.adb: Minor reformatting.
6100 2011-08-04 Tristan Gingold <gingold@adacore.com>
6102 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6103 Handle the case when Cleanup_Protected_Object returns Empty.
6105 2011-08-04 Yannick Moy <moy@adacore.com>
6107 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6109 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6111 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6112 call, ignore functions.
6114 2011-08-04 Geert Bosch <bosch@adacore.com>
6116 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6119 2011-08-04 Emmanuel Briot <briot@adacore.com>
6121 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6122 as an index for Builder'Switches. This conforms to the documentation.
6123 * make.adb (Insert_Project_Sources): avoid duplicate code
6125 2011-08-04 Emmanuel Briot <briot@adacore.com>
6127 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6128 name on the command line (for instance "../dummy"), never assume it can
6131 2011-08-04 Tristan Gingold <gingold@adacore.com>
6133 * bindgen.adb: Remove code the reference or create the
6134 Break_Start/__gnat_break_start procedure.
6135 * s-stalib.adb (Break_Start): Removed.
6137 2011-08-04 Emmanuel Briot <briot@adacore.com>
6139 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6140 shared with gprbuild.
6142 2011-08-04 Yannick Moy <moy@adacore.com>
6144 * par-ch4.adb (P_Primary): preferentially issue an error message about
6145 a missing parenthesis arount a conditional or case expression in Ada
6146 2012 mode, if we detect that the alignment is not correct for a
6149 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6151 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6152 tag-to-class-wide conversion as needing finalization actions.
6153 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6154 a tag-to-class-wide conversion as needing finalization actions.
6155 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6156 conversion does not need finalization actions.
6157 (Is_Tag_To_CW_Conversion): New routine.
6158 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6159 whether an object is the result of a tag-to-class-wide conversion.
6161 2011-08-04 Yannick Moy <moy@adacore.com>
6163 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6164 the left-hand-side and right-hand-side of a conjunct are inserted when
6165 translating a pre- or postcondition
6166 * sem_ch6.adb: Correct typo in comment
6168 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6170 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6171 Unchecked_Conversion and Unchecked_Deallocation.
6173 2011-08-04 Thomas Quinot <quinot@adacore.com>
6175 * make.adb: Minor reformatting.
6177 2011-08-04 Emmanuel Briot <briot@adacore.com>
6179 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6180 sources in the project and its imported projects, but not in the whole
6183 2011-08-04 Emmanuel Briot <briot@adacore.com>
6185 * make.adb: Remove debug trace.
6187 2011-08-04 Vincent Celier <celier@adacore.com>
6189 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6190 path in canonical form, to be able to compare path names on platforms
6191 such as Windows or Darwin.
6193 2011-08-04 Thomas Quinot <quinot@adacore.com>
6195 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6196 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6197 * scos.ads: Update documentation accordingly.
6198 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6201 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6203 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6204 attribute only if prefix type is scalar.
6206 2011-08-04 Emmanuel Briot <briot@adacore.com>
6208 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6209 in gnatmake for specifying mains on the command line that do not belong
6210 to the main project. These mains must currently all belong to the same
6212 (Ultimate_Extension_Of): removed, since duplicated
6213 Ultimate_Extending_Project.
6215 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6217 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6219 (CodePeer_Mode_String): New.
6220 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6222 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6223 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6224 mode, since no useful elaboration subprogram is needed by CodePeer.
6225 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6226 In this mode, compile binder file with -gnatC and do stop after this
6229 2011-08-04 Vincent Celier <celier@adacore.com>
6231 * exp_ch7.adb: Minor comment fix.
6233 2011-08-04 Robert Dewar <dewar@adacore.com>
6235 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6236 exp_ch4.adb, makeutl.adb: Minor reformatting.
6238 2011-08-04 Emmanuel Briot <briot@adacore.com>
6240 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6241 Create several new subprograms to move code out of Make. This makes the
6242 code more readable, removes code duplication, and is a preparation work
6243 for adding support for aggregate projects.
6245 2011-08-04 Tristan Gingold <gingold@adacore.com>
6247 * s-po32gl.ads, s-po32gl.adb: New files.
6248 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6249 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6250 (Build_Finalization_Collection): Use it.
6251 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6252 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6254 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6255 * gcc-interface/Make-lang.in: Update dependencies.
6257 2011-08-04 Emmanuel Briot <briot@adacore.com>
6259 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6262 2011-08-04 Emmanuel Briot <briot@adacore.com>
6264 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6265 command line is not a file name, also check whether it could be a unit
6268 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6270 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6271 the header of the finalization routine.
6272 If the unit has no finalizer but is a body whose spec has one, then
6273 generate the decrement of the elaboration entity only.
6274 If the unit has a finalizer and is a spec, then do not generate the
6275 decrement of the elaboration entity.
6276 (Gen_Finalize_Library_C): Likewise.
6278 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6280 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6281 (Bounds_Size_Expression): Removed.
6282 (Double_Alignment_Of): New subsidiary routine.
6283 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6284 for a hole in the dope vector of unconstrained arrays due to different
6285 index and element alignments.
6287 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6289 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6290 raise program_error because body has not been seen yet.
6292 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6294 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6297 2011-08-04 Vincent Celier <celier@adacore.com>
6299 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6301 2011-08-04 Yannick Moy <moy@adacore.com>
6303 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6304 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6306 2011-08-04 Thomas Quinot <quinot@adacore.com>
6308 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6309 instantiation in RCI.
6311 2011-08-04 Emmanuel Briot <briot@adacore.com>
6313 * make.adb: Share more code with gprbuild
6315 2011-08-04 Emmanuel Briot <briot@adacore.com>
6317 * projects.texi: Added documentation for the IDE'Gnat project file
6320 2011-08-04 Nicolas Roche <roche@adacore.com>
6322 * gnat_rm.texi: Minor editing.
6324 2011-08-04 Javier Miranda <miranda@adacore.com>
6326 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6327 and the library case for VM targets.
6328 (Gen_Adainit_Ada): Likewise.
6330 2011-08-04 Robert Dewar <dewar@adacore.com>
6332 * g-altive.ads: Minor comment updates.
6333 * prj-nmsc.adb: Minor reformatting.
6335 2011-08-04 Javier Miranda <miranda@adacore.com>
6338 (Normalize_Scalars_Config): Value of the configuration switch set by
6339 pragma Normalize_Scalars when it appears in the gnat.adc file.
6340 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6341 to save and restore settings of this pragma.
6343 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6344 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6346 2011-08-04 Vincent Celier <celier@adacore.com>
6348 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6350 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6352 * makeutl.adb: Minor reformatting.
6354 2011-08-04 Olivier Hainque <hainque@adacore.com>
6356 * g-altive.ads: Update comments to reflect that only the soft
6357 binding is available today.
6359 2011-08-04 Robert Dewar <dewar@adacore.com>
6361 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6362 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6363 * gcc-interface/Make-lang.in: Update dependencies.
6365 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6367 * prj-env.adb: Remove local debug traces.
6369 2011-08-04 Yannick Moy <moy@adacore.com>
6371 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6372 was used instead of Hi_OK, which could cause a read of an uninitialized
6373 value later on. Detected while working on the new warning.
6374 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6376 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6377 in more cases, in order to detect more unreferenced values.
6378 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6379 object for expression, if any.
6381 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6383 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6384 the operand types instead of the Esize.
6386 2011-08-04 Steve Baird <baird@adacore.com>
6388 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6389 enable CodePeer_Mode.
6390 * bindusg.adb (Display): Add help message describing -P binder switch.
6391 * gnat_ugn.texi: Document -P binder switch.
6392 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6393 user-defined main program directly.
6394 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6395 user-defined main program in the context clause of the package body.
6397 2011-08-04 Yannick Moy <moy@adacore.com>
6399 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6400 duplicate of Defining_Entity
6401 (Get_Unique_Entity_For_Decl): rename function into
6402 Unique_Defining_Entity
6403 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6404 (Formal_Proof_On): remove synthesized flag
6405 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6406 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6407 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6408 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6409 Annotate (Formal_Proof)
6411 2011-08-04 Emmanuel Briot <briot@adacore.com>
6413 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6414 source files with non-standard naming schemes, in imported projects
6416 2011-08-04 Emmanuel Briot <briot@adacore.com>
6418 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6419 specified on the gprbuild command line, we need to compile all units
6420 within that file, not just the first one we find
6421 Fix error message for mains that are not found.
6423 2011-08-04 Thomas Quinot <quinot@adacore.com>
6425 * sem_ch6.adb: Update comment.
6426 * sem_ch12.adb: Minor reformatting.
6428 2011-08-04 Bob Duff <duff@adacore.com>
6430 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6431 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6432 race condition whose symptom is to fail to lock Parent. That, in turn,
6433 causes Parent.Awake_Count to be accessed without locking Parent, which
6434 causes another race condition whose symptom is that Parent.Awake_Count
6435 can be off by 1 (either too high or too low). The solution is to lock
6436 Parent unconditionally, and then lock Acceptor, before reading
6437 Acceptor.Terminate_Alternative.
6439 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6441 * debug.adb: Update comment.
6443 2011-08-04 Robert Dewar <dewar@adacore.com>
6445 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6446 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6447 exp_ch6.adb: Minor reformatting.
6449 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6451 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6454 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6456 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6458 2011-08-04 Thomas Quinot <quinot@adacore.com>
6460 * sinfo.ads: Minor reformatting.
6462 2011-08-04 Emmanuel Briot <briot@adacore.com>
6464 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6465 even if there is no location.
6467 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6469 * sem_res.adb, sem_ch4.adb: move check for restriction
6470 No_Task_Hierarchy to resolve_allocator.
6472 2011-08-04 Thomas Quinot <quinot@adacore.com>
6474 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6475 This flag of N_Pragma nodes is not used, remove it as well as all of
6476 the associated circuitry.
6478 2011-08-04 Javier Miranda <miranda@adacore.com>
6480 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6481 runtime check on duplicated externa tags
6482 * debug.adb Document switch -gnatdQ.
6484 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6486 * a-fihema.ads: Minor typo fix.
6488 2011-08-04 Yannick Moy <moy@adacore.com>
6490 * sem_ch10.adb: Minor comment update.
6492 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6494 * einfo.adb: Update the node field usage to reflect the renaming of
6495 Return_Flag to Return_ Flag_Or_Transient_Decl.
6496 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
6497 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
6498 (Write_Field15_Name): Change Return_Flag to
6499 Return_Flag_Or_Transient_Decl.
6500 * einfo.ads: Rename node field Return_Flag to
6501 Return_Flag_Or_Transient_Decl. Update the associated comment and all
6502 occurrences in entities.
6503 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
6504 associated Inline pragma.
6505 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
6506 associated Inline pragma.
6507 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
6509 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
6510 Return_Flag and Set_Return_Flag.
6511 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
6512 objects generated for controlled transients declared inside an
6513 Exception_With_Actions. Update the calls to Return_Flag.
6514 (Process_Object_Declaration): Add code to add a null guard for hook
6515 objects generated for controlled transients declared inside an
6516 Exception_With_Actions. Update related comment.
6517 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
6518 objects generated for controlled transients declared inside an
6519 Exception_With_Actions. Update the calls to Return_Flag.
6520 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
6522 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6524 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
6525 positional aggregate.
6527 2011-08-04 Vincent Celier <celier@adacore.com>
6529 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
6530 SLOC only for pragmas.
6532 2011-08-04 Emmanuel Briot <briot@adacore.com>
6534 * projects.texi: Minor typo fix.
6536 2011-08-04 Emmanuel Briot <briot@adacore.com>
6538 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
6539 on case-sensitive file systems.
6541 2011-08-04 Thomas Quinot <quinot@adacore.com>
6543 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
6544 nested in a disabled pragma.
6545 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
6546 enclosing pragma, if any, for X decisions.
6548 2011-08-04 Thomas Quinot <quinot@adacore.com>
6550 * sem_prag.adb: Minor reformatting.
6552 2011-08-04 Vincent Celier <celier@adacore.com>
6554 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
6555 allowed in no run time mode.
6557 2011-08-04 Vincent Celier <celier@adacore.com>
6559 * make.adb (Check): When -gnatc is used, check for the source file
6560 inside the ALI file with a canonical case file name.
6562 2011-08-04 Emmanuel Briot <briot@adacore.com>
6564 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
6565 overriding the separator.
6567 2011-08-04 Robert Dewar <dewar@adacore.com>
6569 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
6570 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
6572 2011-08-04 Robert Dewar <dewar@adacore.com>
6574 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
6576 2011-08-04 Yannick Moy <moy@adacore.com>
6578 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
6579 'Result only appears in postcondition of function.
6581 2011-08-04 Thomas Quinot <quinot@adacore.com>
6583 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
6584 external tag, include the value of the external tag in the exception
6587 2011-08-04 Yannick Moy <moy@adacore.com>
6589 * sem_attr.adb (Result): modify error message for misplaced 'Result
6591 2011-08-04 Sergey Rybin <rybin@adacore.com>
6593 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
6594 clear that the second argument must be an identifier.
6596 2011-08-04 Thomas Quinot <quinot@adacore.com>
6598 * exp_ch9.adb (Build_Barrier_Function): When compiling with
6599 -fpreserve-control-flow, insert an IF statement on the barrier
6600 condition to ensure that a conditional branch instruction is generated.
6602 2011-08-04 Emmanuel Briot <briot@adacore.com>
6604 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
6605 (Processing_Flags.Ignore_Missing_With): new flag.
6607 2011-08-04 Emmanuel Briot <briot@adacore.com>
6609 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
6610 Source_List_File on case-insensitive systems where the file is actually
6611 on a case-sensitive file system (NFS,...).
6613 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6615 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
6616 function return contains a controlled [extension] aggregate and the
6617 return statement is not part of a handled sequence of statements, wrap
6618 the return in a block. This ensures that all controlled temporaries
6619 generated during aggregate resolution will be picked up by the
6620 finalization machinery.
6622 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6624 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
6625 components, freeze type before resolution, to ensure that default
6626 initializations are present for all components.
6627 * sem_res.adb (Resolve_Actuals): the designated object of an
6628 accces-to-constant type is a legal actual in a call to an
6629 initialization procedure.
6631 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6633 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
6634 N_Unchecked_Type_Conversion to the possible containers of a renamed
6637 2011-08-04 Yannick Moy <moy@adacore.com>
6639 * par-ch13.adb (Aspect_Specifications_Present): recognize
6640 "with Identifier'Class =>" as an aspect, so that a meaningful warning
6641 is issued in Strict mode.
6642 * par.adb: Fix typos in comments.
6644 2011-08-04 Yannick Moy <moy@adacore.com>
6646 * sem_attr.adb (Result): modify error message to take into account Post
6647 aspect when compiling Ada 2012 (or newer) code.
6649 2011-08-04 Nicolas Roche <roche@adacore.com>
6651 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
6652 remove need for GCC exceptions.
6654 2011-08-04 Vincent Celier <celier@adacore.com>
6656 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
6657 project, not the source file name.
6658 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
6659 excluded, continue looking. This excluded source will only be returned
6660 if there is no other source with the same base name that is not locally
6663 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6665 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
6666 private and one of the operands is a real literal, use a qualified
6667 expression rather than a conversion which is not meaningful to the
6670 2011-08-04 Yannick Moy <moy@adacore.com>
6672 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
6673 corresponding aspect X'Class are allowed, proceed with analysis of the
6674 aspect instead of skipping it.
6676 2011-08-04 Tristan Gingold <gingold@adacore.com>
6678 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
6679 This will allow to have an Ada implementation for the subprogram.
6681 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6683 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
6684 completion and aspects are present, apply them to the entity for the
6685 type which is currently the partial view, but which is the one that
6687 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
6688 applies to a partial view, indicate that the full view has predicates
6689 and delayed aspects.
6690 (Replace_Type_Reference): Handle properly predicates that apply to the
6691 full view of a private completion.
6693 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6695 * layout.adb (Layout_Type): For composite types, do not set Esize.
6696 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
6698 (Size_Known): Look at the RM size of components instead of the Esize.
6699 (Freeze_Record_Type): Look at the RM size instead of the Esize to
6700 issue warning and activate Implicit_Packing.
6701 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
6702 if the Esize is not known.
6703 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
6704 for elementary types only.
6705 (Analyze_Record_Representation_Clause): Look at the RM size instead
6706 of the Esize to issue errors.
6707 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
6709 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
6711 Look at the RM size instead of the Esize for types if the latter is
6713 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
6715 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6717 * sem_type.adb: proper handling of equality not involving anonymous
6720 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6722 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
6723 Vis_Decls. When creating a library-level finalizer for a package spec,
6724 both the declaration and body of the finalizer are inserted either in
6725 the visible or private declarations of the package spec.
6727 2011-08-04 Javier Miranda <miranda@adacore.com>
6729 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
6730 use of the full-view of a type when invoking Is_Ancestor.
6731 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
6732 the full-view of private parents is requested, then use also the
6733 full-view of the parent of the first derivation.
6735 2011-08-04 Tristan Gingold <gingold@adacore.com>
6737 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
6738 instead of the locally imported procedure.
6739 * s-taprop-mingw.adb (Enter_Task): Ditto.
6740 * s-valrea.adb (Scan_Real): Ditto.
6741 * s-imgrea.adb (Set_Image_Real): Ditto.
6742 * s-flocon.ads: Make the package pure.
6744 2011-08-04 Thomas Quinot <quinot@adacore.com>
6746 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
6747 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
6748 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
6749 New subprogram, moved here from...
6750 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
6751 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
6752 rewriting of the last argument into a procedure call statement here...
6753 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
6756 2011-08-04 Thomas Quinot <quinot@adacore.com>
6758 * par_sco.adb: Minor reformatting.
6760 2011-08-04 Robert Dewar <dewar@adacore.com>
6762 * erroutc.adb: Minor reformatting.
6764 2011-08-04 Thomas Quinot <quinot@adacore.com>
6766 * par_sco.adb: Comment update.
6768 2011-08-04 Tristan Gingold <gingold@adacore.com>
6770 * s-flocon.ads: New file.
6771 * g-flocon.ads: Now a renaming of s-flocon.
6772 * Makefile.rtl: Add s-flocon.o
6774 2011-08-04 Javier Miranda <miranda@adacore.com>
6776 * exp_strm.adb (Build_Array_Input_Function): if the array type is
6777 constrained, do not attempt to build a subtype of it.
6779 2011-08-04 Yannick Moy <moy@adacore.com>
6781 * errout.ads Change comments: remove 'R'M as an example where quotes
6782 are needed; add ALFA as another case where quotes are not needed
6783 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
6784 case where quotes are not needed.
6785 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6786 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
6787 Remove all occurrences of 'A'L'F'A
6789 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6791 * sem_ch13.adb: check legality of invariant pragma.
6793 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6795 * bindgen.adb: Add comments.
6797 2011-08-04 Yannick Moy <moy@adacore.com>
6799 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
6801 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
6802 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
6804 2011-08-04 Robert Dewar <dewar@adacore.com>
6806 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
6807 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
6808 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
6810 2011-08-04 Thomas Quinot <quinot@adacore.com>
6812 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
6814 2011-08-04 Thomas Quinot <quinot@adacore.com>
6817 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
6820 2011-08-04 Robert Dewar <dewar@adacore.com>
6822 * einfo.ads, exp_ch4.adb: Minor reformatting.
6824 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6826 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
6828 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6830 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
6831 type in all cases to compute list of primitive operations, because full
6832 view may be an itype that is not attached to the list of declarations.
6834 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6836 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
6837 library has already been finalized.
6838 (Gen_Adafinal_C): Likewise.
6839 (Gen_Adainit_Ada): Generate an early return if the library has
6840 already been elaborated.
6841 (Gen_Adainit_C): Likewise.
6842 (Gen_Output_File_Ada): Generate an elaboration flag.
6843 (Gen_Output_File_C): Likewise.
6845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6847 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
6848 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
6849 built in the first place.
6850 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
6851 for CodePeer because Finalize_Address was not built to begin with.
6852 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
6854 2011-08-04 Pascal Obry <obry@adacore.com>
6856 * adaint.c (__gnat_tmp_name): Use current process id to create temp
6857 filenames, this ensures unicity of filenames across processes.
6859 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6861 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
6862 Raise_Controlled to Raise_From_Controlled_Operation. Update the
6863 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
6864 Add False as the actual to From_Abort in the generated call to
6865 Raise_From_Controlled_Operation.
6867 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6869 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
6870 so that the ali file name can be retrieved from outside of this package.
6871 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
6872 doing nothing in the general case, but used to update the object file
6873 timestamp if directly generated by the backend.
6874 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
6875 to a later time than the ali file one.
6877 2011-08-04 Yannick Moy <moy@adacore.com>
6879 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
6880 entities whose body contains an Annotate pragma which forces formal
6882 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6883 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
6884 Mark_Non_ALFA_Subprogram to pass in a message and node.
6885 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
6886 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
6887 surrounding subprogram.
6888 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
6889 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
6890 as not in ALFA is annotated with Formal_Proof being On, then an error
6891 is issued based on the additional parameters for message and node.
6892 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
6893 * gcc-interface/Make-lang.in: Update dependencies.
6895 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6897 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
6898 Finalize_Address when CodePeer is enabled.
6900 2011-08-04 Pascal Obry <obry@adacore.com>
6902 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
6903 the latter returns a pointer to a static buffer which is deallocated
6904 at the end of the routine.
6906 2011-08-04 Yannick Moy <moy@adacore.com>
6908 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
6909 after index creation; mark unconstrained base array type generated as
6910 being in/not in ALFA as well
6911 (Make_Index): mark subtype created as in/not in ALFA
6912 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
6913 over a loop as in/not in ALFA, depending on its type and form of loop
6916 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6918 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
6919 directly to False on .NET and JVM.
6921 2011-08-04 Yannick Moy <moy@adacore.com>
6923 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
6924 constraint that subtype must come from source code to be in ALFA, so
6925 that anonymous subtypes can be in ALFA too.
6927 2011-08-04 Yannick Moy <moy@adacore.com>
6929 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
6930 reference for ALFA mode.
6931 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
6932 procedure public so as to use it from formal verification back-end.
6934 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6936 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
6937 invalid checks of the Parameter, making Remove_Switch not working
6940 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6942 * targparm.ads: Update header: no run-time exception is needed on this
6945 2011-08-04 Vincent Celier <celier@adacore.com>
6947 * a-fihema.adb: Use System.IO instead of GNAT.IO
6949 2011-08-04 Thomas Quinot <quinot@adacore.com>
6951 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
6952 are forbidden in Compiler_Unit mode.
6954 2011-08-04 Robert Dewar <dewar@adacore.com>
6956 * sem_util.adb: Minor reformatting.
6958 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6960 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
6961 library-level finalizers.
6962 (Gen_Finalize_Library_C): Update the import string for library-level
6964 (Gen_Finalize_Library_Defs_C): Update the definition name of a
6965 library-level finalizer.
6966 * exp_ch7.adb: Remove with and use clauses for Stringt.
6967 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
6968 Spec_Decl. Add local variable Body_Id. The names of library-level
6969 finalizers are now manually fully qualified and are no longer external.
6970 A single name is now capable of servicing .NET, JVM and non-VM targets.
6971 Pragma Export is no longer required to provide visibility for the name.
6972 (Create_Finalizer_String): Removed.
6973 (New_Finalizer_Name): New routine which mimics New_..._Name.
6975 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6977 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
6978 elaboration counter to Standard_Short_Integer.
6979 * sem_util.adb (Build_Elaboration_Entity): Likewise.
6980 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
6981 (Gen_Elab_Externals_C): Likewise.
6983 2011-08-04 Ed Falis <falis@adacore.com>
6985 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
6986 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
6987 system-vxworks-mips.ads, system-vxworks-x86.ads
6988 (Always_Compatible_Rep): set to False for all VxWorks targets.
6990 2011-08-04 Robert Dewar <dewar@adacore.com>
6992 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
6993 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
6994 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
6995 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
6996 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
6997 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
6998 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
6999 Minor reformatting and code reorganization.
7001 2011-08-04 Emmanuel Briot <briot@adacore.com>
7003 * projects.texi: Added doc for aggregate projects.
7005 2011-08-04 Emmanuel Briot <briot@adacore.com>
7007 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7008 Add support for overriding the Project_Path in aggregate projects.
7010 2011-08-04 Robert Dewar <dewar@adacore.com>
7012 * a-cofove.ads: Minor reformatting.
7014 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7016 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7017 on the generated code.
7018 (Build_Finalize_Statements): Update the comment on the generated code.
7019 (Build_Initialize_Statements): Update the comment on the generated code.
7020 (Build_Object_Declarations): Add local variable Result. The object
7021 declarations are now built in sequence.
7022 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7025 2011-08-04 Robert Dewar <dewar@adacore.com>
7027 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7029 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7031 * einfo.ads (Elaboration_Entity): Document new definition and use.
7032 (Elaboration_Entity_Required): Adjust to above change.
7033 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7034 * exp_ch12.adb: And with and use for Snames.
7035 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7036 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7037 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7038 <Check_Unit_Name>: Deal with N_Expanded_Name.
7039 <Attribute_Elaborated>: Extend to all unit names.
7040 * sem_elab.adb: And with and use for Uintp.
7041 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7042 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7043 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7044 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7045 from Gen_Adainit_Ada.
7046 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7047 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7048 case, do not call System.Standard_Library.Adafinal; instead call
7049 finalize_library if needed.
7050 (Gen_Adafinal_C): Likewise.
7051 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7052 non-main program case.
7053 (Gen_Adainit_C): Generate a couple of external declarations here.
7054 In the main program case, set SSL.Finalize_Library_Objects.
7055 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7056 (Gen_Elab_Calls_C): Likewise.
7057 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7058 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7059 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7061 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7062 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7064 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7065 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7066 of external declarations. Call Gen_Finalize_Library_C.
7068 2011-08-04 Emmanuel Briot <briot@adacore.com>
7070 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7071 Compute_Compilation_Phases): new subprogram.
7072 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7073 The number of mains as well as the various compilation phases that
7074 need to be run are now project tree specific, since various
7075 aggregated trees might have different requirements. In particular,
7076 they do not all require bind or link phases.
7078 2011-08-04 Emmanuel Briot <briot@adacore.com>
7080 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7081 (Project_Tree_Appdata): New type.
7082 It is now possible to associate application-specific data to a project
7083 tree. In particular, this is used in the gprbuild builder to avoid a
7084 number of global tables and htables, especially now that there can be
7085 several project trees loaded at once because of aggregate projects.
7086 (Debug_Name): new procedure.
7087 * projects.texi: Clarify syntax of "**" for Source_Dirs
7089 2011-08-03 Emmanuel Briot <briot@adacore.com>
7091 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7092 the "roots" for a main.
7093 (Fill_From_Project): add support for aggregate projects. Main units
7094 in aggregated projects are now automatically added in the list of
7095 files to build (although this fails later on in gprbuild, because
7096 these files are not using the root proejct tree, so this needs
7098 * gcc-interface/Make-lang.in: Update dependencies.
7100 2011-08-03 Yannick Moy <moy@adacore.com>
7102 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7103 conditional expression in ALFA.
7104 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7105 expressions as not in ALFA.
7107 2011-08-03 Robert Dewar <dewar@adacore.com>
7109 * a-cofove.adb: Minor reformatting.
7111 2011-08-03 Emmanuel Briot <briot@adacore.com>
7113 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7114 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7116 These packages are more logically placed in the Queue package, since
7117 they manipulate the queue. It is also likely that they can be adapted
7118 for gnatmake, thus sharing more code.
7119 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7120 that we could move the above.
7122 2011-08-03 Emmanuel Briot <briot@adacore.com>
7124 * errutil.adb (Finalize): clean up the list of error messages on exit.
7125 Calling this subprogram multiple times will no longer show duplicate
7126 error messages on stderr.
7128 2011-08-03 Emmanuel Briot <briot@adacore.com>
7130 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7131 Getopt_Switches when we have already define a command line
7134 2011-08-03 Yannick Moy <moy@adacore.com>
7136 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7137 in ALFA. Instead, they are considered as assertions to prove.
7138 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7139 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7140 if they have no ELSE part, or if they occur in pre- and postconditions,
7141 where the Condition cannot have side-effects in ALFA
7142 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7143 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7144 Instead, include type conversion between scalar types in ALFA.
7145 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7146 if-and-only-if its type is in ALFA.
7148 2011-08-03 Thomas Quinot <quinot@adacore.com>
7150 * scos.adb, get_scos.adb, put_scos.adb
7151 New code letter for decisions: G (entry guard)
7153 (Traverse_Subprogram_Body): Rename to...
7154 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7155 (Traverse_Protected_Body): New subprogram
7156 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7157 protected bodies and entry bodies.
7159 2011-08-03 Yannick Moy <moy@adacore.com>
7161 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7162 entities with get/set subprograms, which is set on procedure entities
7163 generated by the compiler for a postcondition.
7164 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7165 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7166 entity for a declaration
7167 (Get_Unique_Entity_For_Decl): new function returning an entity which
7168 represents a declaration, so that matching spec and body have the same
7171 2011-08-03 Robert Dewar <dewar@adacore.com>
7173 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7174 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7176 2011-08-03 Yannick Moy <moy@adacore.com>
7178 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7179 library-level because retriction No_Implicit_Dynamic_Code in the
7180 front-end prevents its definition as a local subprogram
7181 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7182 for reuse in other contexts
7183 (Traverse_Declarations_Or_Statements,
7184 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7185 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7186 procedures take a callback parameter to be called on all declarations
7188 (Traverse_All_Compilation_Units): new generic function to traverse a
7189 compilation unit and call a callback parameter on all declarations
7191 2011-08-03 Javier Miranda <miranda@adacore.com>
7193 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7194 in Java since they are always enclosed in a namespace that
7195 differentiates them, and overloaded entities are supported by the VM.
7197 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7199 * checks.adb (Determine_Range): If a computed bound of an operation is
7200 outside the range of the base type of the expression, and overflow
7201 checks are enabled, the result is unknown and cannot be used for any
7202 subsequent constant folding.
7203 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7204 unknown, so is the result of the comparison.
7206 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7208 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7209 From_Abort. When finalization was triggered by an abort, propagate
7210 Standard'Abort_Signal rather than Program_Error.
7211 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7213 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7214 From_Abort. When finalization was triggered by an abort, propagate
7215 Standard'Abort_Signal rather than Program_Error.
7216 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7218 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7219 Abort_Id. Update the calls to Build_Object_Declarations and
7220 Build_Raise_Statement to include Abort_Id.
7221 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7222 calls to Build_Object_Declarations and Build_Raise_Statement to include
7224 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7225 calls to Build_Object_Declarations and Build_Raise_Statement to include
7227 (Build_Components): Create an entity for Abort_Id when exceptions are
7228 allowed on the target.
7229 (Build_Finalizer): New local variable Abort_Id.
7230 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7231 calls to Build_Object_Declarations and Build_Raise_Statement to include
7233 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7234 declaration of flag Abort_Id to preserve the original abort status
7235 before finalization code is executed.
7236 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7237 runtime routine Raise_From_Controlled_Operation.
7238 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7239 Abort_Id. Update the call to Build_Object_Declarations to include
7240 Abort_Id. Update the layout of the finalizer body.
7241 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7242 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7243 clunky code to create all flags and objects related to
7244 exception propagation and replace it with a call to
7245 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7247 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7248 Add new formal Abort_Id and associated comment on its use.
7249 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7251 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7252 Remove the clunky code to create all flags and objects related to
7253 exception propagation and replace it with a call to
7254 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7256 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7258 * s-tassta.adb: Fix minor typos.
7260 2011-08-03 Robert Dewar <dewar@adacore.com>
7262 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7263 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7265 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7267 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7268 to packages. This ensures that the finalizer body will not end up
7269 inside the freeze node.
7270 (Process_Declarations): Add code to detect whether a freeze node has a
7271 nested finalization collection.
7273 2011-08-03 Pascal Obry <obry@adacore.com>
7275 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7276 (Current_Session): Return a not null access to Session_Type.
7277 (Default_Session): Likewise.
7279 2011-08-03 Robert Dewar <dewar@adacore.com>
7281 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7282 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7284 2011-08-03 Pascal Obry <obry@adacore.com>
7286 * g-awk.ads: Minor comment fix.
7288 2011-08-03 Sergey Rybin <rybin@adacore.com>
7290 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7291 the tree structure related to discriminant constraints.
7292 Original_Discriminant cannot be used any more for computing the
7293 defining name for the reference to a discriminant.
7295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7297 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7298 function is not visibly tagged, this is not a dispatching call and
7299 therfore is not Tag_Indeterminate, even if the function is marked as
7300 dispatching on result.
7302 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7304 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7305 (Expand_N_Free_Statement): Add a guard to protect against run-times
7306 which do not support controlled types.
7307 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7308 against run-times which do not support controlled types.
7309 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7310 against run-times which do not support controlled types.
7311 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7312 against run-times which do not support controlled types.
7313 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7314 protect against run-times which do not support controlled types.
7316 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7318 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7319 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7321 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7323 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7324 modified in the source, to prevent spurious warnings when compiling
7327 2011-08-03 Thomas Quinot <quinot@adacore.com>
7329 * a-except-2005.adb: Minor reformatting.
7331 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7333 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7334 is a renaming declaration in the private part of a package, do not emit
7335 a warning that the with_clause could be moved because the renaming may
7336 be used in the body or in a child unit.
7338 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7340 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7341 Propagate the Comes_From_Source attribute from the original return
7342 object to the renaming.
7344 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7346 * exp_ch7.adb (Build_Raise_Statement): Do not call
7347 Raise_From_Controlled_Operation when this routine is not present in
7348 the run-time library.
7349 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7350 libraries (Ravenscar), tasks are non-terminating, and protected objects
7351 and tasks can only appear at library level, so we do not want
7352 finalization of protected objects nor tasks.
7353 * exp_intr.adb: Minor clarification in comment.
7354 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7355 Gen_Output_File_C): Remove references to finalization of library-level
7356 objects when using restricted run-time libraries.
7358 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7360 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7361 Original_Discriminant only if the parent type is a generic formal.
7363 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7365 * exp_ch13.adb: Add with and use clause for Targparm;
7366 (Expand_N_Free_Statement): Prevent the generation of a custom
7367 Deallocate on .NET/JVM targets since this requires pools and address
7369 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7370 .NET/JVM targets, attach the newly allocated object to the access
7371 type's finalization collection. Do not generate a call to
7372 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7373 exist in the runtime.
7374 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7375 create a custom Allocate for object that do not require initialization.
7376 Attach a newly allocated object to the access type's finalization
7377 collection on .NET/JVM.
7378 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7379 assignment of controlled types on .NET/JVM. The two hidden pointers
7380 Prev and Next and stored and later restored after the assignment takes
7382 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7383 kludge for .NET/JVM to recognize a particular piece of code coming from
7384 Heap_Management and change the call to Finalize into Deep_Finalize.
7385 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7386 finalization collections on .NET/JVM only for types derived from
7387 Controlled. Separate the association of storage pools with a collection
7388 and only allow it on non-.NET/JVM targets.
7389 (Make_Attach_Call): New routine.
7390 (Make_Detach_Call): New routine.
7391 (Process_Object_Declarations): Suppress the generation of
7392 build-in-place return object clean up code on .NET/JVM since it uses
7394 * exp_ch7.ads (Make_Attach_Call): New routine.
7395 (Make_Detach_Call): New routine.
7396 * exp_intr.adb Add with and use clause for Targparm.
7397 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7398 on .NET/JVM targets.
7399 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7400 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7401 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7402 names used in finalization.
7404 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7406 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7407 (Attach, Detach): Lock the current task when chaining an object onto a
7410 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7412 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7413 Rewritten to create the message strings when the exception is not
7414 raised by an abort during finalization.
7415 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7416 Raise_From_Controlled_Operation and update its associated comment.
7417 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7418 Ada.Finalization.Heap_Management provides key functionality
7419 associated with controlled objects on the heap, their creation,
7420 finalization and reclamation. Type Finalization_Collection is
7421 effectively a wrapper which sits ontop of a storage pool and performs
7422 all necessary bookkeeping for all the objects it contains. Each
7423 access-to-controlled or access-to-class-wide type receives a collection
7424 as part of its expansion. The compiler generates buffer code and
7425 invokes Allocate / Deallocate to create and destroy allocated
7427 * a-finali.adb ("="): Removed.
7428 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7429 fields Prev and Next.
7430 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7431 A library unit with at least one controlled object on the library level
7432 has a special finalizer which is invoked by the binder. To signal this,
7433 ali files carry field PF.
7434 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7435 associated comment on field usage.
7436 * a-tags.adb (Get_RC_Offset): Removed.
7437 (Needs_Finalization): New routine.
7438 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7439 Dispatch tables now carry field Needs_Finalization which provides
7440 runtime indication whether a type is controlled or has controlled
7441 components or both. Remove field RC_Offset.
7442 (Get_RC_Offset): Removed along with its associated pragma Export.
7443 Since tagged types with controlled components no longer carry hidden
7444 field _controller, the special mechanism to retrieve its location is no
7446 (Needs_Finalization): New routine.
7447 * atree.ads, atree.adb (Elist24): New routine.
7448 (Set_Elist24): New routine.
7449 * atree.h: Add a define clause for Elist24.
7450 * bindgen.adb New library-level variable Lib_Final_Built.
7451 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7452 presence of a VM target, the routine generates calls to the proper
7453 library finalization routine.
7454 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7455 targets. Set the correct library finalization routine depending on
7456 whether the library has controlled objects or this is a VM compilation.
7457 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7458 to library-level finalizers of compiled units in reverse order of
7459 elaboration. It also produces exception management code and reraises a
7460 potential exception after all units have been finalized.
7461 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7462 library-level finalizers of compiled units in reverse order of
7464 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7465 definitions of all library-level finalizers available to the compilation
7466 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7468 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7469 System.Standard_Library.Adafinal directly. If the library needs
7470 finalization actions, create the sequence of finalization calls.
7471 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7472 Generate a with clause for System.Soft_Links when compiling for a VM.
7473 Remove the code which imports System.Standard_Library.Adafinal as
7474 Do_Finalize. Generate the library finalization routine.
7475 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7476 If the library needs finalization actions, create all the definitions
7477 of library- level finalizers.
7478 (Has_Finalizer): New routine. Determines whether at least one compiled
7479 unit has a library-level finalizer.
7480 Add type Qualification_Mode.
7481 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7482 * einfo.adb: New usage of field 15 as Return_Flag.
7483 Remove Finalization_Chain_Entity from the usages of field 19.
7484 Remove Associated_Final_Chain from the usages of field 23.
7485 New usage of field 23 as Associated_Collection.
7486 New usage of field 24 as Finalizer.
7487 New usage of flag 252 as Is_Processed_Transient.
7488 (Associated_Final_Chain): Removed.
7489 (Associated_Collection): New routine.
7490 (Finalization_Chain_Entity): Removed.
7491 (Finalizer): New routine.
7492 (Is_Finalizer): New routine.
7493 (Is_Processed_Transient): New routine.
7494 (Return_Flag): New routine.
7495 (Set_Associated_Final_Chain): Removed.
7496 (Set_Associated_Collection): New routine.
7497 (Set_Finalization_Chain_Entity): Removed.
7498 (Set_Finalizer): New routine.
7499 (Set_Is_Processed_Transient): New routine.
7500 (Set_Return_Flag): New routine.
7501 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
7503 (Write_Field8_Name): Alphabetize the output.
7504 (Write_Field11_Name): Alphabetize the output.
7505 (Write_Field12_Name): Alphabetize the output.
7506 (Write_Field13_Name): Alphabetize the output.
7507 (Write_Field14_Name): Alphabetize the output.
7508 (Write_Field15_Name): Alphabetize the output.
7509 (Write_Field16_Name): Alphabetize the output.
7510 (Write_Field17_Name): Alphabetize the output.
7511 (Write_Field18_Name): Alphabetize the output.
7512 (Write_Field19_Name): Alphabetize the output. Remove the output of
7513 Finalization_Chain_Entity.
7514 (Write_Field20_Name): Alphabetize the output.
7515 (Write_Field21_Name): Alphabetize the output.
7516 (Write_Field22_Name): Alphabetize the output.
7517 (Write_Field23_Name): Alphabetize the output. Remove the output of
7518 Associated_Final_Chain. Add output for Associated_Collection.
7519 (Write_Field24_Name): Alphabetize the output.
7520 (Write_Field25_Name): Add output for Finalizer.
7521 (Write_Field26_Name): Alphabetize the output.
7522 (Write_Field27_Name): Alphabetize the output.
7523 (Write_Field28_Name): Alphabetize the output.
7524 * einfo.ads: Add new field description for Associated_Collection and
7526 Remove Associated_Final_Chain and its uses in nodes.
7527 Remove Finalization_Chain_Entity and its uses in nodes.
7528 Add new field description for Finalizer and its uses in nodes.
7529 Add new synthesized attribute Is_Finalizer.
7530 Add new flag description for Is_Processed_Transient and its uses in
7532 Add new field description for Return_Flag and its uses in nodes.
7533 (Associated_Final_Chain): Removed along with its pragma Inline.
7534 (Associated_Collection): New routine and pragma Inline.
7535 (Finalization_Chain_Entity): Removed along with its pragma Inline.
7536 (Finalizer): New routine and pragma Inline.
7537 (Is_Finalizer): New routine and pragma Inline.
7538 (Is_Processed_Transient): New routine and pragma Inline.
7539 (Return_Flag): New routine and pragma Inline.
7540 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
7541 (Set_Associated_Collection): New routine and pragma Inline.
7542 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
7543 (Set_Finalizer): New routine and pragma Inline.
7544 (Set_Is_Processed_Transient): New routine and pragma Inline.
7545 (Set_Return_Flag): New routine and pragma Inline.
7546 * exp_aggr.adb: Alphabetize subprograms.
7547 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
7548 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
7549 associated comments. Remove local variables External_Final_List and
7551 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
7552 Ancestor. Remove the retrieval of finalization lists. Update the call to
7554 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
7555 lists. Update the call to Late_Expansion.
7556 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
7557 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
7558 (Gen_Assign): Remove the retrieval of the finalization list used to
7559 build the assignment. Update the calls to Make_Init_Call and
7561 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
7562 Remove the mechanism to determine attachment levels and finalization
7563 list retrieval. Remove the processing for coextensions.
7564 (Init_Controller): Removed. Controllers no longer exist.
7565 (Late_Expansion): Remove formals Flist and Obj along with their
7566 associated comments. Update the calls to Build_Record_Aggr_Code and
7567 Build_Array_Aggr_Code.
7568 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
7569 (Expand_N_Freeze_Entity): Add special processing for finalizers which
7570 appear in entry bodies, protected subprograms and task bodies.
7571 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
7572 * exp_ch3.adb (Add_Final_Chain): Removed.
7573 (Build_Array_Init_Proc): Alphabetize local variables.
7574 (Build_Assignment): Alphabetize local variables. Update the call to
7576 (Build_Class_Wide_Master): Rename local variables to better reflect
7578 (Build_Discriminant_Assignments): Code reformatting.
7579 (Build_Init_Call_Thru): Code reformatting.
7580 (Build_Init_Procedure): Code reformatting. Generate a special version
7581 of Deep_Finalize which is capable of finalizing all initialized
7582 components and ignore the rest.
7583 (Build_Init_Statements): Rename local variables to better reflect their
7585 Reimplement the mechanism to include the creation and update of an index
7586 variable called a "counter". It is used as a bookmark for tracing
7587 initialized and non-initialized components.
7588 (Build_Initialization_Call): Remove local variable Controller_Typ.
7589 Alphabetize all local variables. Remove the initialization of the
7590 record controller and update the call to Make_Init_Call.
7591 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
7592 New local variable Counter.
7593 (Constrain_Array): Alphabetize.
7594 (Expand_Freeze_Array_Type): Create a collection instead of a
7596 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
7597 Finalize_Address which is used in conjunction with allocated controlled
7599 (Expand_N_Object_Declaration): Remove the creation of a finalization
7600 list for anonymous access types. Update the calls to Make_Init_Call and
7602 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
7603 retrieval of finalization lists. Remove the expansion of the record
7604 controller. Create TSS primitive Finalize_Address used in conjunction
7605 with controlled objects on the heap. Create finalization collections
7606 for access-to-controlled record components.
7607 (Expand_Record_Controller): Removed.
7608 (Freeze_Type): Remove the freezing of record controllers. Freezing of
7609 class-wide types now requires additional processing. Create
7610 finalization collections for access-to-controlled types.
7611 (Increment_Counter): New routine.
7612 (Make_Counter): New routine.
7613 (Make_Eq_If): Remove the mention of Name_uController.
7614 (Make_Predefined_Primitive_Specs): There is no longer need to skip
7615 types coming from System.Finalization_Root.
7616 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
7617 (Predefined_Primitive_Bodies): There is no longer need to skip types
7618 coming from System.Finalization_Root.
7619 (Stream_Operation_OK): Do not generate stream routines for
7620 type Ada.Finalization.Heap_Management.Finalization_Collection.
7621 * exp_ch3.ads: Alphabetize subprograms.
7622 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
7623 Add with and use clause for Lib.
7624 (Complete_Coextension_Finalization): Removed.
7625 (Complete_Controlled_Allocation): New routine. Create a finalization
7626 collection for anonymous access-to-controlled types. Create a custom
7627 Allocate which interfaces with the back end and the machinery in
7629 (Expand_Allocator_Expression): Add necessary calls to
7630 Complete_Controlled_Allocation. Remove the retrieval of finalization
7631 lists. Update the calls to Make_Adjust_Call. Generate a call to
7632 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7633 the associated collection.
7634 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
7635 Code clean up. Remove the retrieval of finalization lists and
7637 Update the call to Make_Init_Call. Generate a call to
7638 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7639 the associated collection.
7640 (Get_Allocator_Final_List): Removed. Finalization lists are not
7642 (Suitable_Element): Remove the mention of Name_uController.
7643 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
7644 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
7645 the left hand side, carry out the assignment and adjust the left hand
7647 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
7648 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
7649 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
7650 BIP_Collection and BIPcollection.
7651 (Build_Heap_Allocator): New routine used to allocate the return object
7652 of a build-in-place function onto a collection.
7653 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
7654 (Expand_Call): Do not replace direct calls to Deep routines with their
7656 (Expand_N_Extended_Return_Statement): Give all variables shorter names
7657 and update their occurrences. Add a special return flag to monitor the
7658 [ab]normal execution of the function. The flag is set right before the
7660 Rewrite the mechanism used to allocate a build-in-place return object
7661 on the heap or on a storage pool.
7662 (Is_Direct_Deep_Call): New routine.
7663 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
7664 build-in-place function call instead of a final list. Build a call to
7665 Set_Finalize_Address_Ptr to decorate the associated collection.
7666 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
7667 order to name the build-in-place function call's result for later
7668 finalization. Add a collection to a build-in-place function call
7669 instead of a final list.
7670 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
7671 build-in-place function call instead of a final list. Remove the code
7672 which moves one final list and transforms it into the actual in a
7673 nested build-in-place call.
7674 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
7675 build-in-place function call instead of a final list.
7676 (Move_Final_List): Removed.
7677 (Needs_BIP_Collection): New routine.
7678 (Needs_BIP_Final_List): Removed.
7679 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
7680 enumeration type BIP_Formal_Kind.
7681 Update the related comment.
7682 (Needs_BIP_Collection): New routine.
7683 (Needs_BIP_Final_List): Removed.
7684 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
7685 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
7686 majority of subprograms in this unit. Add Name_Finalize_Address to
7687 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
7688 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
7689 statements for an array type.
7690 (Build_Adjust_Statements): Create the adjust statements for a record
7692 (Build_Cleanup_Statements): New routine. A procedure which given any
7693 construct containing asynchronous calls, references to _master, or is a
7694 task body, a task allocation or a protected body produces the necessary
7695 runtime calls to clean up these constructs.
7696 (Build_Exception_Handler): New routine.
7697 (Build_Final_List): Removed.
7698 (Build_Finalization_Collection): New routine. A core procedure which
7699 creates a collection to service heap allocated controlled objects
7700 associated with an access-to-controlled type.
7701 (Build_Finalize_Statements): Create the finalization statements for a
7703 (Build_Finalizer): New routine. A core procedure which given any
7704 construct with declarations and/or statements detects all objects which
7705 need any type of clean up (controlled objects, protected objects) and
7706 generates all necessary code to clean up the said objects in the proper
7708 (Build_Finalizer_Call): New routine.
7709 (Build_Initialize_Statements): Create the initialization statements for
7710 an array type. The generated routine contains code to finalize partially
7712 (Build_Object_Declarations): New routine.
7713 (Build_Raise_Statement): New routine.
7714 (Clean_Simple_Protected_Objects): Removed.
7715 (Controller_Component): Removed.
7716 (Enclosing_Function): New routine.
7717 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
7718 either declarations or statements or both.
7719 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
7720 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
7722 (Find_Final_List): Removed.
7723 (Global_Flist_Ref): Removed.
7724 (In_Finalization_Root): Removed.
7725 (Insert_Actions_In_Scope_Around): Determine the range of the transient
7726 scope in terms of tree nodes. Process all transient variables within
7728 (Make_Adjust_Call): Rewritten. There is no longer an attach call
7729 generated after the adjust.
7730 (Make_Attach_Call): Removed.
7731 (Make_Call): New routine.
7732 (Make_Clean): Removed.
7733 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
7735 (Make_Deep_Proc): Rewritten to generate the new profile signature used
7737 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
7739 (Make_Final_Call): Modified to simply create a call to either
7740 Deep_Finalize or Finalize.
7741 (Make_Finalize_Address_Body): New routine.
7742 (Make_Finalize_Address_Stmts): New routine. A function which produces
7743 TSS primitive Finalize_Address used in conjunction with heap allocated
7745 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
7746 (Make_Init_Call): Rewritten. There is no longer an attach call
7747 generated after initialization.
7748 (Make_Local_Deep_Finalize): New routine.
7749 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7750 (Make_Transient_Block): Remove the finalization list retrieval and
7752 (Needs_Finalization): Moved to Exp_Util.
7753 (Parent_Field_Type): New routine.
7754 (Preprocess_Components): New routine.
7755 (Process_Transient_Objects): New routine.
7756 (Wrap_HSS_In_Block): New routine.
7757 (Wrap_Transient_Declaration): Remove finalization list management and
7758 controller insertion.
7759 (Wrap_Transient_Expression): Code reformatting.
7760 (Wrap_Transient_Statement): Code reformatting.
7761 * exp_ch7.ads (Build_Final_List): Removed.
7762 (Build_Finalization_Collection): New routine.
7763 (Build_Raise_Statement): New routine.
7764 (Controller_Component): Removed.
7765 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
7766 (Find_Final_List): Removed.
7767 (In_Finalization_Root): Removed.
7768 (Is_Simple_Protected_Type): Update related comment.
7769 (Make_Adjust_Call): New parameter profile and associated comments.
7770 (Make_Attach_Call): Removed.
7771 (Make_Final_Call): New parameter profile and associated comments.
7772 (Make_Finalize_Address_Body): New routine.
7773 (Make_Init_Call): New parameter profile and associated comments.
7774 (Make_Local_Deep_Finalize): New routine.
7775 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7776 (Needs_Finalization): Moved to Exp_Util.
7777 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
7778 (Expand_N_Protected_Body): Remove the handling of finalization lists.
7779 (Find_Protection_Type): Moved to Exp_Util.
7780 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
7781 (Make_DT): Update sequence of dispatch table initialization. Remove the
7782 initialization of field RC_Offset. Add initialization of field Needs_
7784 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
7785 Reimplement how an object is first finalized, then deallocated.
7786 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
7788 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
7789 Register TSS_Finalize_Address with type TSS_Names.
7790 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
7791 procedure provides the interface between an allocation / deallocation
7792 and the support machinery in Ada.Finalization.Heap_Management.
7793 (Find_Init_Call): Code reformatting.
7794 (Find_Init_Call_In_List): Code reformatting.
7795 (Find_Protection_Type): Moved from Exp_Ch9.
7796 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
7797 (Has_Controlled_Coextensions): Removed.
7798 (Has_Controlled_Objects): New routine.
7799 (In_Library_Level_Package_Body): New routine.
7800 (Insert_Action_After): New routine.
7801 (Is_Finalizable_Transient): New routine. This predicate determines
7802 whether an object declaration is one of the many variants of controlled
7804 (Is_Null_Access_BIP_Func_Call): New routine.
7805 (Is_Non_BIP_Func_Call): New routine.
7806 (Is_Related_To_Func_Return): New routine.
7807 (Needs_Finalization): Moved from Exp_Ch7.
7808 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
7809 (Find_Protection_Type): Moved from Exp_Ch9.
7810 (Has_Controlled_Coextensions): Removed.
7811 (Has_Controlled_Objects): New routine.
7812 (In_Library_Level_Package_Body): New routine.
7813 (Insert_Action_After): New routine.
7814 (Is_Finalizable_Transient): New routine.
7815 (Is_Null_Access_BIP_Func_Call): New routine.
7816 (Is_Non_BIP_Func_Call): New routine.
7817 (Is_Related_To_Func_Return): New routine.
7818 (Needs_Finalization): Moved from Exp_ch7.
7819 * expander.adb (Expand): Add a case for N_Free_Statement.
7820 * freeze.adb (Freeze_All): Replace the generation of a finalization
7821 list with a collection for access-to-controlled types.
7822 (Freeze_Entity): Code reformatting.
7823 (Freeze_Record_Type): Remove the freezing of a record controller
7825 (Freeze_Subprogram): Code reformatting.
7826 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
7828 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
7829 has a library-level finalizer.
7830 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
7831 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
7832 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
7833 files. Add a-fihema to the list of object files.
7835 Alphabetize the associations in type Is_Parameterless_Attribute.
7836 * rtsfind.ads: Ada.Finalization_List.Controller and
7837 System.Finalization_Implementation are no longer a GNAT unit.
7838 Update the range of type Ada_Finalization_Child. Remove the following
7839 recoverable entities:
7841 RE_Attach_To_Final_List
7845 RE_Finalizable_Ptr_Ptr
7846 RE_Global_Final_List
7847 RE_Limited_Record_Controller
7850 RE_Record_Controller
7851 RE_Simple_List_Controller
7853 Add the following recoverable entities:
7855 RE_Add_Offset_To_Address
7859 RE_Exception_Identity
7860 RE_Finalization_Collection
7861 RE_Finalization_Collection_Ptr
7862 RE_Needs_Finalization
7863 RE_Save_Library_Occurrence
7864 RE_Set_Finalize_Address_Ptr
7865 RE_Set_Storage_Pool_Ptr
7867 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
7869 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
7870 (First_Stored_Discriminant): Remove the mention of Name_uController.
7871 * sem_aux.ads: Comment reformatting.
7872 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
7873 to redecorate an already existing class-wide type.
7874 (Decorate_Tagged_Type): New parameter profile and associated comment.
7875 Create a "shadow class-wide type" for a shadow entity.
7876 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
7877 of the final chain along with the associated comment.
7878 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
7879 Full_Desig and set it to the full view of the designated type.
7880 Initialize the finalization collection to empty.
7881 (Build_Derived_Record_Type): Alphabetize local variables. Code
7883 (Collect_Fixed_Components): Remove the mention of Name_uController.
7884 (Create_Constrained_Components): Remove the mention of Name_uController.
7885 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
7886 class-wide type of a shadow entity.
7887 (Process_Full_View): Update the machinery which marks type
7888 Limited_Controlled's entity as limited.
7889 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
7890 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
7891 list, instead make a collection build-in-place formal.
7892 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
7893 a designated type in order to establish a match between the renaming
7894 and the renamed entity.
7895 (Find_Selected_Component): Add guard to prevent spurious exceptions
7896 from being raised on .NET/JVM.
7897 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
7898 to the list of primitive that need special processing. Update arrays
7899 C_Names and D_Names.
7900 (Replace_Types): Handle class-wide types.
7901 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
7902 different parameter profile, look at the first formal.
7903 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
7904 use clauses for Exp_Util.
7905 * sem_res.adb: Remove with and use clauses for Elists.
7906 (Propagate_Coextensions): Removed.
7907 (Resolve_Allocator): Do not propagate the list of coextensions from one
7908 allocator to another.
7909 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
7910 Deaccessed_T to Desig_Typ.
7911 (Enter_Name): Remove the mention of Name_uController.
7912 (Gather_Components): Remove the mention of Name_uController.
7913 (Incomplete_Or_Private_View): New routine.
7914 (Is_Coextension_Root): Removed.
7915 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
7916 * sem_util.ads (Incomplete_Or_Private_View): New routine.
7917 (Is_Coextension_Root): Removed.
7918 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
7919 Controlled types are now derived from a null tagged record. Remove
7920 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
7921 * sinfo.adb (Coextensions): Removed.
7922 (Set_Coextensions): Removed.
7923 * sinfo.ads: Remove Coextensions from the explanation of node fields
7924 and its uses in nodes.
7925 Update the field usage of N_Allocator.
7926 (Coextensions): Removed along with its pragma Inline.
7927 (Set_Coextensions): Removed along with its pragma Inline.
7928 * snames.ads-tmpl: Remove names
7933 Name_uLocal_Final_List
7934 Name_Finalization_Root
7941 Name_Finalize_Address
7942 * s-pooglo.adb (Allocate): Add overriding indicator.
7943 (Deallocate): Add overriding indicator.
7944 (Storage_Size): Add overriding indicator.
7945 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
7946 than Finalize_Global_List.
7947 (Null_Finalize_Global_List): Removed.
7948 (Save_Library_Occurrence): New routine.
7949 * s-soflin.ads: Remove variable Finalize_Global_List along with its
7950 initialization. Add variable Finalize_Library_Objects along with its
7951 pragma Export. Add variables Library_Exception and
7952 Library_Exception_Set along with their pragma Export.
7953 (Null_Finalize_Global_List): Removed.
7954 (Save_Library_Occurrence): New routine.
7955 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
7956 rather than Finalize_Global_List.
7957 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
7958 of the constructed node.
7960 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7962 * link.c: Include "auto-host.h" before system headers.
7964 2011-08-03 Vincent Celier <celier@adacore.com>
7966 * make.adb (Gnatmake): Add to table Library_Projs only library projects
7967 that are not extended. Do not check if a library project that is
7968 extended should be regenerated. Do not add to table Library_Paths the
7969 libraries that are in extended projects. Link only with libraries that
7970 are in libray projects that are not extended.
7971 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
7972 for a library project that is extended.
7974 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7976 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
7977 conforming subprogram renamings that appear to be completions if they
7978 are not fully conformant.
7979 Such renamings are homographs but not completions.
7980 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
7981 names in a subprogram renaming that appears in an instance.
7983 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7985 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
7986 not immutably limited, build actual subtype from expression to provide
7987 proper bounds to caller.
7989 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7991 * sem_ch8.adb: Minor comment correction.
7993 2011-08-03 Thomas Quinot <quinot@adacore.com>
7995 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
7996 returning a limited array, use an extended return statement.
7998 2011-08-03 Vincent Celier <celier@adacore.com>
8000 * make.adb (Initialize): If --subdirs= is used, but no project file is
8001 specified, attempt to create the specify subdir if it does not already
8002 exist and use it as the object directory as if -D had been specified.
8004 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8006 * s-tpopsp-vms.adb: New file.
8007 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8008 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8010 2011-08-03 Emmanuel Briot <briot@adacore.com>
8012 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8015 2011-08-03 Yannick Moy <moy@adacore.com>
8017 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8018 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8019 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8020 detect that an array has static bounds.
8022 2011-08-03 Thomas Quinot <quinot@adacore.com>
8024 * exp_dist.adb: Minor reformatting.
8026 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8028 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8029 (ATCB_Key): Removed, not always used.
8031 2011-08-03 Emmanuel Briot <briot@adacore.com>
8033 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8034 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8035 most remaining global variables.
8037 2011-08-03 Robert Dewar <dewar@adacore.com>
8039 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8040 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8043 2011-08-03 Javier Miranda <miranda@adacore.com>
8045 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8046 that must be passed by copy in VM targets.
8048 2011-08-03 Emmanuel Briot <briot@adacore.com>
8050 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8051 duplicates a similar htable now in the project tree.
8053 2011-08-03 Claire Dross <dross@adacore.com>
8055 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8056 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8057 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8058 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8059 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8060 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8061 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8064 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8066 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8067 (ATCB_Key): Removed, not always used.
8068 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8070 * s-tpopsp-tls.adb: New file.
8071 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8072 x86/x64/ia64/powerpc/sparc Linux.
8074 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8076 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8077 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8079 2011-08-03 Thomas Quinot <quinot@adacore.com>
8081 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8082 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8083 Fix type selection for mapping integer types to PolyORB types.
8085 2011-08-03 Bob Duff <duff@adacore.com>
8087 * sem_ch7.adb: Minor comment clarification.
8089 2011-08-03 Bob Duff <duff@adacore.com>
8091 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8092 an error analyzing a choice, skip further processing. Further
8093 processing could cause a crash or cascade errors.
8095 2011-08-03 Emmanuel Briot <briot@adacore.com>
8097 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8098 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8099 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8100 prj-env.ads (Shared_Project_Tree_Data): new type
8101 An aggregate project and its aggregated trees need to share the common
8102 data structures used for lists of strings, packages,... This makes the
8103 code simpler since otherwise we have to pass the root tree (also used
8104 for the configuration file data) in addition to the current project
8105 tree. This also avoids ambiguities as to which tree should be used.
8106 And finally this saves a bit of memory.
8107 (For_Every_Project_Imported): new parameter Tree.
8108 Since aggregated projects are using a different tree, we need to let
8109 the caller know which tree to use to manipulate the returned project.
8111 2011-08-03 Robert Dewar <dewar@adacore.com>
8113 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8114 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8115 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8116 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8118 2011-08-03 Javier Miranda <miranda@adacore.com>
8120 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8121 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8123 2011-08-03 Bob Duff <duff@adacore.com>
8125 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8128 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8130 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8131 g-sehash.ads: Fix typo. Update header.
8133 2011-08-03 Thomas Quinot <quinot@adacore.com>
8135 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8138 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8140 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8141 prefixes of private types along with records, since the selector may be
8143 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8144 private types along with records, since the selector may be a
8147 2011-08-03 Emmanuel Briot <briot@adacore.com>
8149 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
8151 2011-08-03 Javier Miranda <miranda@adacore.com>
8153 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8154 Tagged_Type_Expansion.
8156 2011-08-03 Yannick Moy <moy@adacore.com>
8158 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8159 violation when the argument of concatenation is the name of a
8162 2011-08-03 Emmanuel Briot <briot@adacore.com>
8164 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8165 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8166 (Process_Declarative_Items): new parameter Child_Env.
8168 2011-08-03 Yannick Moy <moy@adacore.com>
8170 * alfa.ads: Update format of ALFA section in ALI file in order to
8171 add a mapping from bodies to specs when both are present.
8172 (ALFA_Scope_Record): Add components for spec file/scope.
8173 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8175 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8176 collected, fill in the spec information when relevant.
8177 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
8180 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8182 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8183 code unit to decide whether to add internally generated subprograms.
8185 2011-08-03 Javier Miranda <miranda@adacore.com>
8187 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
8188 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8189 be handled by copy in VM targets.
8191 2011-08-03 Emmanuel Briot <briot@adacore.com>
8193 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
8194 code with Makeutl.Get_Switches.
8195 * prj-tree.adb: Update comment.
8197 2011-08-03 Thomas Quinot <quinot@adacore.com>
8199 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8200 subprogram with a limited formal that does not support external
8203 2011-08-03 Yannick Moy <moy@adacore.com>
8205 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8207 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8208 not from current unit in two phases, because it is not possible to
8209 change the table while iterating over its content.
8210 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8212 2011-08-03 Sergey Rybin <rybin@adacore.com>
8214 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8215 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8217 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8219 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8220 and the component type is composite, this is ambiguous for predefined
8221 concatenation, but if the node is not overloaded and the entity is a use
8222 -defined function its profile can be used to resolve that aggregate.
8224 2011-08-03 Robert Dewar <dewar@adacore.com>
8226 * exp_ch4.adb: Minor code cleanup.
8228 2011-08-03 Thomas Quinot <quinot@adacore.com>
8230 * exp_dist.adb: Do not generate distribution stubs if serious errors
8231 have been diagnosed.
8233 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8235 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8236 the first formal of a primitive operation, go to the base type to
8237 handle properly an access to a derived type with constrained
8239 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8240 user-defined function that is only use-visible.
8242 2011-08-03 Robert Dewar <dewar@adacore.com>
8244 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8245 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8246 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8247 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8248 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8249 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8250 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8251 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8253 2011-08-03 Robert Dewar <dewar@adacore.com>
8255 * repinfo.adb (List_Mechanism): Add handling of
8256 Convention_Ada_Pass_By_XXX.
8257 * sem_mech.adb (Set_Mechanism): Ditto.
8258 * sem_prag.adb (Process_Convention): Add entries for
8259 Convention_Ada_Pass_By_XXX.
8260 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8262 2011-08-03 Pascal Obry <obry@adacore.com>
8264 * makeutl.adb: Minor reformatting.
8266 2011-08-03 Vincent Celier <celier@adacore.com>
8269 (Get_File_Name) If the file cannot be found when there are no config
8270 pragmas file and May_Fail is True, return No_File instead of the file
8271 name, to be consistent.
8273 2011-08-03 Pascal Obry <obry@adacore.com>
8275 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8278 2011-08-03 Javier Miranda <miranda@adacore.com>
8281 (Same_Representation): In VM targets the representation of arrays with
8282 aliased components differs from arrays with non-aliased components.
8284 2011-08-03 Emmanuel Briot <briot@adacore.com>
8286 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8287 not systematically lower case attribute indexes that contain no "."
8288 Fix definition of several Naming attributes, which take
8289 a unit name as index and therefore should be case insensitive.
8290 Minor refactoring (reduce length of variable names).
8292 2011-08-03 Emmanuel Briot <briot@adacore.com>
8294 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8296 2011-08-03 Emmanuel Briot <briot@adacore.com>
8298 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8299 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8300 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8301 prj-tree.ads (Prj.Tree.Environment): new type.
8303 2011-08-03 Emmanuel Briot <briot@adacore.com>
8305 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8306 prj-tree.adb, prj-tree.ads (Environment): new type.
8308 2011-08-03 Emmanuel Briot <briot@adacore.com>
8310 * prj-tree.ads: Remove unused variable.
8312 2011-08-03 Yannick Moy <moy@adacore.com>
8314 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8315 issuing messages related to SPARK restriction violation.
8317 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8319 * sem_ch6.adb: guard against error nodes in return statements.
8321 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8323 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8324 a warning can only appear on a configuration file, so emit warning
8325 without further checks.
8327 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8329 * s-interr.ads: add overriding keyword.
8331 2011-08-03 Geert Bosch <bosch@adacore.com>
8333 * exp_attr.adb: Fix minor typo.
8335 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8337 * par-ch4.adb: improve error recovery.
8339 2011-08-03 Emmanuel Briot <briot@adacore.com>
8341 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8342 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8345 2011-08-03 Emmanuel Briot <briot@adacore.com>
8347 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8348 "external" as an attribute name in aggregate projects.
8350 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8352 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8353 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8354 from 0, so we need to adjust.
8356 2011-08-03 Emmanuel Briot <briot@adacore.com>
8358 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8359 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8361 2011-08-03 Yannick Moy <moy@adacore.com>
8363 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8364 restriction on overloaded entity if the entity is not an operator.
8366 2011-08-03 Yannick Moy <moy@adacore.com>
8368 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8369 restrict.ads: Rename remaining Check_Formal_Restriction* into
8370 Check_SPARK_Restriction*.
8372 2011-08-03 Emmanuel Briot <briot@adacore.com>
8374 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8375 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8377 (Project_Empty): removed
8378 (Empty_Project): new parameter Qualifier
8379 This is used to have fields specific to aggregate projects, cleaner
8380 New field to store the list of aggregated projects.
8381 (Check_Aggregate_Project): removed
8382 (Process_Aggregated_Projects, Free): new subprograms.
8384 2011-08-03 Olivier Hainque <hainque@adacore.com>
8386 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8388 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8390 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8391 explicit dereference of an unconstrained type, create a constrained
8392 subtype for it, as is done for function calls that return an
8395 2011-08-03 Thomas Quinot <quinot@adacore.com>
8397 * g-pehage.adb (Finalize): Avoid possible double-free.
8399 2011-08-03 Steve Baird <baird@adacore.com>
8401 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8402 Elab_Spec/Body attrs in CodePeer_Mode.
8404 2011-08-03 Javier Miranda <miranda@adacore.com>
8406 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8407 low bound is not known at compile time but they have no others choice.
8408 Done because in this case the bounds can be obtained directly from the
8411 2011-08-03 Ed Falis <falis@adacore.com>
8413 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8414 on VxWorks SMP. Remove unusable constant ANY_CPU.
8416 2011-08-03 Emmanuel Briot <briot@adacore.com>
8418 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8419 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8420 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8421 Prj.Env.Initialize_Empty): new subprograms
8422 (Get_Env, Find_Project): remove parameter Target_Name.
8424 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8426 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8427 as a condition for the delayed call to Derived_Subprograms done for the
8428 case of the rewriting of a derived type that constrains the
8429 discriminants of its parent type.
8430 Avoids redundant subprogram derivations for private subtype derivations.
8432 2011-08-03 Javier Miranda <miranda@adacore.com>
8434 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8435 Build_Record_Aggr_Code.
8436 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8437 discriminants in extension aggregates.
8439 2011-08-03 Emmanuel Briot <briot@adacore.com>
8441 * prj-pp.adb (Print): also output project qualifiers, since in
8442 particular "aggregate" is mandatory in an aggregate project.
8444 2011-08-03 Emmanuel Briot <briot@adacore.com>
8446 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8447 (Debug_Output): new function.
8449 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8451 * gnat_ugn.texi: Document -Wstack-usage.
8452 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8454 2011-08-03 Thomas Quinot <quinot@adacore.com>
8456 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8457 have keyword LIMITED.
8459 2011-08-03 Yannick Moy <moy@adacore.com>
8461 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8462 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8463 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8464 section (does not happen in compiler, only if code directly calls
8466 * get_alfa.adb, get_alfa.ads: New files.
8467 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8469 * lib-xref-alfa.adb: New file.
8470 * lib-xref.adb, lib-xref.ads
8471 (Xref_Entry): redefine information needed in cross-references for ALFA.
8472 Push ALFA treatments in separated local package.
8473 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8474 identifiers. Return entity of package body instead of spec. Return
8475 Empty for a scope with no location.
8476 (Generate_Reference): adapt to new components for ALFA information.
8477 Remove the need for D references on definitions.
8478 (Is_Local_Reference): moved to ALFA local package
8479 (Output_References): extract subfunction as Extract_Source_Name
8480 (Output_Local_References): remove procedure, replaced by filtering of
8481 cross-references in package ALFA and printing in Put_ALFA.
8482 (Write_Entity_Name): remove procedure
8483 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
8484 print exact name of entity as it appears in source file
8485 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
8486 * put_alfa.adb, put_alfa.ads: New files.
8487 * xref_lib.adb (Search_Xref): protect read of cross-references against
8488 reading other sections of the ALI file, in gnatxref
8489 (Search): protect read of cross-references against reading other
8490 sections of the ALI file, in gnatfind.
8491 * gcc-interface/Make-lang.in: Update dependencies.
8493 2011-08-03 Thomas Quinot <quinot@adacore.com>
8495 * sem_ch3.adb: Minor reformatting.
8497 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8499 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
8500 raising an exception.
8502 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8504 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
8505 type, always use 1 as the lower bound or string, even if lower bound of
8506 context is not static, to handle properly null strings in a non-static
8509 2011-08-03 Bob Duff <duff@adacore.com>
8511 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
8512 always legal on the right-hand side of an assignment statement; there
8513 is always an applicable index constraint in this case. Therefore, the
8514 check for Pkind = N_Assignment_Statement is now unconditional -- it
8515 doesn't depend on whether Is_Constrained (Typ).
8517 2011-08-03 Robert Dewar <dewar@adacore.com>
8519 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
8521 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8523 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
8524 for an itype created within a generic unit.
8526 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8528 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
8529 suppresses all inlining.
8531 2011-08-03 Robert Dewar <dewar@adacore.com>
8533 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
8534 exp_aggr.adb: Minor reformatting.
8536 2011-08-03 Thomas Quinot <quinot@adacore.com>
8538 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
8539 tagged assignment when discriminant checks are suppressed. This is
8540 useless and extremely costly in terms of static stack usage.
8542 2011-08-03 Bob Duff <duff@adacore.com>
8544 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
8545 of generics, because this leads to the wrong entity in the wrong scope,
8546 causing (e.g.) pragma Export_Procedure to get an error if the entity is
8548 (Process_Interface_Name): Follow Alias for instances of generics, to
8549 correct for the above change.
8551 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8553 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
8554 is an integer literal it is always safe to replace the reference. In
8555 addition, if the reference appears in the generated code for an object
8556 declaration it is necessary to copy because otherwise the reference
8557 might be to the uninitilized value of the discriminant of the object
8560 2011-08-03 Pascal Obry <obry@adacore.com>
8562 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
8563 ACL used, in this case we want to check for ending .exe, not .exe
8564 anywhere in the path.
8566 2011-08-03 Sergey Rybin <rybin@adacore.com>
8568 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8569 the tree structure (semantic decoration of references to record
8572 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8574 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
8575 choices of a named array aggregate, bail out when any choices are
8576 marked as Errors_Posted.
8578 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8580 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
8581 in which entity is frozen, to handle properly loop variables in
8584 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8586 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
8587 subtype is not static, compute the upper bound using attributes, to
8588 handle properly index types that are not integer types.
8590 2011-08-03 Bob Duff <duff@adacore.com>
8592 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
8593 Update copyright notice.
8595 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8597 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
8598 Original_Discriminant if within an instance.
8599 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
8601 2011-08-03 Thomas Quinot <quinot@adacore.com>
8603 * einfo.ads: Minor reformatting.
8605 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8607 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
8608 composite type with an unfrozen subcomponent, in the profile of a
8609 primitive operation.
8611 2011-08-03 Robert Dewar <dewar@adacore.com>
8613 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
8615 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8617 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
8618 unconstrained type with discriminants is initialized with an aggregate,
8619 use the constrained subtype of the aggregate as the type of the object,
8620 because it is immutable, and this allows the back-end to generate no
8621 code for the object declaration.
8623 2011-08-03 Robert Dewar <dewar@adacore.com>
8625 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
8626 comparison operand is variable, and turns out to be zero or negative.
8628 2011-08-03 Javier Miranda <miranda@adacore.com>
8631 (Expand_Dispatching_Constructor_Call): Disable expansion of
8632 code required for native targets. Done to avoid generating
8633 references to unavailable runtime entities in VM targets.
8635 (Expand_N_Object_Declaration): Add missing support to handle
8636 the explicit initialization of class-wide interface objects.
8639 2011-08-03 Matthew Heaney <heaney@adacore.com>
8641 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
8643 2011-08-03 Matthew Heaney <heaney@adacore.com>
8645 * a-cbdlli.adb (Splice): move source items from first to last
8647 2011-08-03 Yannick Moy <moy@adacore.com>
8649 * sem_util.ads: comment added.
8651 2011-08-03 Javier Miranda <miranda@adacore.com>
8654 (Expand_Record_Aggregate): In VM targets disable the expansion into
8655 assignments of aggregates whose type is not known at compile time.
8657 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8659 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
8660 protected entries and task entries, to build the proper renaming
8661 declaration for entry formals, used in debugging.
8662 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
8663 parameters in the same way.
8665 2011-08-02 Robert Dewar <dewar@adacore.com>
8667 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
8668 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
8669 code reorganization.
8671 2011-08-02 Robert Dewar <dewar@adacore.com>
8673 * debug.adb: Debug flag d.P to suppress length comparison optimization
8674 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
8675 comparison of Length by comparing First/Last instead.
8677 2011-08-02 Matthew Heaney <heaney@adacore.com>
8679 * a-cobove.ads: Code clean up.
8681 2011-08-02 Vincent Celier <celier@adacore.com>
8683 * adaint.c (file_names_case_sensitive_cache): New static int.
8684 (__gnat_get_file_names_case_sensitive): Cache the return value in
8685 file_names_case_sensitive_cache at the first invocation, to avoid
8686 multiple calls to getenv.
8688 2011-08-02 Bob Duff <duff@adacore.com>
8690 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
8692 2011-08-02 Yannick Moy <moy@adacore.com>
8694 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
8695 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
8696 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
8697 indicate that we are in a precondition or postcondition. This is used in
8698 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
8699 decide whether to flag the spec or body of the current subprogram as
8702 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
8704 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
8706 * a-extiin.ads: New file.
8708 2011-08-02 Bob Duff <duff@adacore.com>
8710 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
8711 now raises Name_Error instead of Use_Error in certain cases. The other
8712 parts of this AI were already implemented properly.
8714 2011-08-02 Vincent Celier <celier@adacore.com>
8716 * link.c: Only import "auto-host.h" when building the gnattools.
8718 2011-08-02 Yannick Moy <moy@adacore.com>
8720 * sem_util.adb: Inter-unit inlining does not work for a subprogram
8721 which calls a local subprogram, so extract subprogram
8722 from Mark_Non_ALFA_Subprogram_Body.
8724 2011-08-02 Javier Miranda <miranda@adacore.com>
8727 (Extract_Dispatching_Call): If the type of the dispatching object is an
8728 access type then return an explicit dereference in the Object out-mode
8731 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8733 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
8734 compatibility checks for all indexes of an array subtype, not just the
8735 first. Reset Has_Dynamic_Range_Check on the subtype before each
8736 potential check to ensure that Insert_Range_Checks will not elide any
8737 of the dynamic checks.
8739 2011-08-02 Yannick Moy <moy@adacore.com>
8741 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
8742 SPARK restriction at parsing time.
8743 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
8744 directive only if the SPARK restriction is set for this unit.
8746 2011-08-02 Yannick Moy <moy@adacore.com>
8748 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
8749 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
8750 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
8751 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
8752 Mark_Non_ALFA_Subprogram_Body.
8753 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
8756 2011-08-02 Yannick Moy <moy@adacore.com>
8758 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
8761 2011-08-02 Robert Dewar <dewar@adacore.com>
8763 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
8764 exp_ch3.adb: Minor reformatting.
8766 2011-08-02 Emmanuel Briot <briot@adacore.com>
8768 * adaint.c (__gnat_locate_exec_on_path): only returns executable
8769 files, not any regular file.
8770 (__gnat_locate_file_with_predicate): new subprogram.
8772 2011-08-02 Yannick Moy <moy@adacore.com>
8774 * sinfo.adb, sinfo.ads: Restrict the use of flags
8775 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
8776 nodes, plus N_Subtype_Declaration for the 2nd one.
8778 2011-08-02 Sergey Rybin <rybin@adacore.com>
8780 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8781 - fix bugs in the description of Source_Trace;
8782 - get rid of UNIT_NAME;
8784 2011-08-02 Javier Miranda <miranda@adacore.com>
8787 (Build_Dispatching_Requeue): Adding support for VM targets
8788 since we cannot directly reference the Tag entity.
8789 * exp_sel.adb (Build_K): Adding support for VM targets.
8790 (Build_S_Assignment): Adding support for VM targets.
8792 (Default_Prim_Op_Position): In VM targets do not restrict availability
8793 of predefined interface primitives to compiling in Ada 2005 mode.
8794 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8795 restricted to compiling in Ada 2005 mode.
8796 (Make_VM_TSD): Generate code that declares and initializes the OSD
8797 record. Needed to support dispatching calls through synchronized
8800 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8801 primitives associated with synchronized interfaces.
8802 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8803 primitives associated with synchronized interfaces.
8805 2011-08-02 Yannick Moy <moy@adacore.com>
8807 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8808 statements hidden in SPARK if preceded by the HIDE directive
8809 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8810 exception handlers as hidden in SPARK if preceded by the HIDE directive
8811 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8812 if starting with the HIDE directive
8813 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8814 starting with the HIDE directive; mark the declarations in a private
8815 part as hidden in SPARK if the private part starts with the HIDE
8817 * restrict.adb, restrict.ads
8818 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8819 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8820 argument node belongs to a part which is hidden in SPARK
8821 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8822 parts in SPARK; protect the possibly costly call to
8823 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8824 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8825 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8826 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8828 (Scan): recognize special comment starting with '#' and followed by
8829 SPARK keyword "hide" as a HIDE directive.
8831 2011-08-02 Yannick Moy <moy@adacore.com>
8833 * types.ads, erroutc.ads: Minor reformatting.
8835 2011-08-02 Vincent Celier <celier@adacore.com>
8837 * link.c: Add response file support for cross platforms.
8839 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8841 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8842 in an association, set parent field of copy before partial analysis.
8843 * sem_res.adb (Resolve_Slice): create reference to itype only when
8844 expansion is enabled.
8846 2011-08-02 Yannick Moy <moy@adacore.com>
8848 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8849 for new flag denoting which subprogram bodies are in ALFA
8850 * restrict.adb, sem_ch7.adb: Update comment
8851 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8852 sem_ch9.adb, sem_res.adb: Add calls to
8853 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8854 * sem_ch6.adb (Analyze_Function_Return): add calls to
8855 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8856 middle of the body, and extended return.
8857 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8858 False when missing return.
8859 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8860 to True for subprograms whose spec is in ALFA. Remove later on the flag
8861 on the entity used for a subprogram body when there exists a separate
8863 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8864 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8865 False, otherwise do nothing.
8867 2011-08-02 Robert Dewar <dewar@adacore.com>
8869 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8871 2011-08-02 Yannick Moy <moy@adacore.com>
8873 * sem_ch4.ads: minor formatting.
8875 2011-08-02 Yannick Moy <moy@adacore.com>
8877 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8878 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8879 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8880 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8881 opt.ads: cleanup of SPARK mode
8883 2011-08-02 Yannick Moy <moy@adacore.com>
8885 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8887 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8888 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8890 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8891 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8892 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8893 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8895 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8897 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8898 functions whose return type is not in ALFA.
8899 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8901 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8902 parameter's type is not in ALFA.
8903 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8906 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8908 * sem_ch6 (Analyze_Expression_Function): treat the function as
8909 Inline_Always, and introduce a subprogram declaration for it when it is
8911 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8912 expression functions, so that the back-end can determine whether they
8913 can in fact be inlined.
8914 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8915 a function body comes from an expression function.
8917 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8919 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8920 null exclusions to test Can_Never_Be_Null on the anonymous access types
8921 of the formals rather than testing the formals themselves. Exclude this
8922 check in cases where the Old_Formal is marked as a controlling formal,
8923 to avoid issuing spurious errors for bodies completing dispatching
8924 operations (due to the flag not getting set on controlling access
8925 formals in body specs).
8926 (Find_Corresponding_Spec): When checking full and subtype conformance of
8927 subprogram bodies in instances, pass Designated and E in that order, for
8928 consistency with the expected order of the formals (New_Id followed by
8931 2011-08-02 Robert Dewar <dewar@adacore.com>
8933 * sem_ch8.adb: Minor reformatting.
8935 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8937 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8938 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8939 primitive operations of class-wide actuals.
8941 2011-08-02 Javier Miranda <miranda@adacore.com>
8943 * exp_atag.ads, exp_atag.adb
8944 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8945 since its value is implicitly passed in argument Typ.
8946 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8947 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8948 Build_Common_Dispatching_Select_Statements.
8950 2011-08-02 Robert Dewar <dewar@adacore.com>
8952 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8953 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8956 2011-08-02 Robert Dewar <dewar@adacore.com>
8958 * sem_res.adb: Minor reformatting.
8959 * sem_prag.adb: Minor reformatting.
8961 2011-08-02 Javier Miranda <miranda@adacore.com>
8963 * exp_atag.adb, exp_atags.ads
8964 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8965 by the tagged type Entity. Required to use this routine in the VM
8966 targets since we do not have available the Tag entity in the VM
8969 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8970 Ada.Tags has not been previously loaded.
8972 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8973 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8975 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8976 view of enclosing scopes. Required to handle enclosing scopes that
8977 are synchronized types whose full view is a task type.
8979 (Build_VM_TSDs): Minor code improvement to avoid generating and
8980 analyzing lists with empty nodes.
8981 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8982 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8983 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8984 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8985 (Make_Select_Specific_Data_Table): Add support for VM targets.
8986 (Make_VM_TSD): Generate code to initialize the SSD structure of
8989 2011-08-02 Yannick Moy <moy@adacore.com>
8991 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8992 cross-references section in ALI.
8993 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8994 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8996 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8997 subprogram or package entity of a node
8998 (Is_Local_Reference_Type): new function returns True for references
8999 selected in local cross-references.
9000 (Lt): function extracted from Lt in Output_References
9001 (Write_Entity_Name): function extracted from Output_References
9002 (Generate_Definition): generate reference with type 'D' for definition
9003 of objects (object declaration and parameter specification), with
9004 appropriate locations and units, for use in local cross-references.
9005 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9006 references of type 'I' for initialization in object definition.
9007 (Output_References): move part of function Lt and procedure
9008 Write_Entity_Name outside of the body. Ignore references of types 'D'
9009 and 'I' introduced for local cross-references.
9010 (Output_Local_References): new procedure to output the local
9011 cross-references sections.
9012 (Lref_Entity_Status): new array defining whether an entity is a local
9013 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9014 with 'I' type when initialization expression is present.
9015 * get_scos.adb, get_scos.ads: Correct comments and typos
9017 2011-08-02 Javier Miranda <miranda@adacore.com>
9019 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9021 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9023 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9026 2011-08-02 Vincent Celier <celier@adacore.com>
9028 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9029 (No_Space_Img): New function
9030 (Find_Excluded_Sources): When reading from a file, record the file name
9031 and the line number for each excluded source.
9032 (Mark_Excluded_Sources): When reporting an error, if the excluded
9033 sources were read from a file, include file name and line number in
9036 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9038 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9040 2011-08-02 Robert Dewar <dewar@adacore.com>
9042 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9044 2011-08-02 Javier Miranda <miranda@adacore.com>
9046 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9047 generation of TSDs to the DOTNET compiler.
9048 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9049 generation of TSDs to the DOTNET compiler.
9051 2011-08-02 Javier Miranda <miranda@adacore.com>
9053 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9054 record of all the tagged types declared inside library level package
9055 declarations, library level package bodies or library level subprograms.
9056 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9057 associated with a given tagged type.
9058 (Build_VM_TSDs): New subprogram.
9059 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9060 compilation units that are subprograms.
9061 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9062 compilation units that are package bodies.
9063 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9064 units that are a package declaration or a package instantiation.
9065 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9066 reorganization to improve the error generated by the frontend when the
9067 function Ada.Tags.Secondary_Tag is not available.
9068 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9069 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9071 2011-08-02 Javier Miranda <miranda@adacore.com>
9073 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9075 2011-08-02 Robert Dewar <dewar@adacore.com>
9077 * s-imenne.ads: Minor reformatting.
9079 2011-08-02 Robert Dewar <dewar@adacore.com>
9081 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9082 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9083 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9085 2011-08-02 Robert Dewar <dewar@adacore.com>
9087 * einfo.ads (Materialize_Entity): Document this is only for renamings
9088 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9089 required debug information in the case where we transform the object
9090 declaration into a renaming declaration.
9091 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9093 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9096 2011-08-02 Robert Dewar <dewar@adacore.com>
9098 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9099 Suppress_Init_Procs.
9100 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9101 Suppress_Initialization/Initialization_Suppressed.
9102 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9103 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9104 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9105 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9107 2011-08-02 Robert Dewar <dewar@adacore.com>
9109 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9112 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9114 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9115 only have inheritable classwide pre/postconditions.
9117 2011-08-02 Javier Miranda <miranda@adacore.com>
9119 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9120 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9121 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9122 checks if the external tag of a type is the same as the external tag
9123 of some other declaration.
9125 2011-08-02 Thomas Quinot <quinot@adacore.com>
9127 * s-taskin.ads: Minor reformatting.
9129 2011-08-02 Emmanuel Briot <briot@adacore.com>
9131 * g-comlin.adb (Display_Help): swap the order in which it prints the
9132 short help and the general usage.
9134 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9136 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9137 the aspect declarations and attach them to the generic copy for
9138 subsequent analysis.
9139 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9140 declarations of the generic tree to the new subprogram declarations.
9141 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9142 conditions that apply to a subprogram instance.
9144 2011-08-02 Robert Dewar <dewar@adacore.com>
9146 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9148 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9150 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9151 private type with a tagged full view is not derived in the immediate
9152 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9154 2011-08-02 Robert Dewar <dewar@adacore.com>
9156 * exp_ch4.adb: Minor reformatting.
9158 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9160 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9161 Ada2012 iterator, the loop will be rewritten during expansion into a
9162 while loop with a cursor and an element declaration. Do not analyze the
9163 body in this case, because if the container is for indefinite types the
9164 actual subtype of the elements will only be determined when the cursor
9165 declaration is analyzed.
9167 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9169 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9170 size/alignment related attributes in CodePeer_Mode.
9172 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9174 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9175 Prepend_Element, since this can result in the operation getting the
9176 wrong slot in the full type's dispatch table if the full type has
9177 inherited operations. The incomplete type's operation will get added
9178 to the proper position in the full type's primitives
9179 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9180 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9181 dispatching operations, since there are cases where nonprimitive
9182 subprograms can get added to the list of incomplete dependents (such
9183 as subprograms in nested packages).
9184 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9185 private part when determining whether to add a primitive with a
9186 parameter of a tagged incomplete type to the Private_Dependents list.
9187 Such primitives can also occur in the visible part, and should not have
9188 been excluded from being private dependents.
9189 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9190 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9191 list of a Taft-amendment incomplete type is a primitive before issuing
9192 an error that the full type must appear in the same unit. There are
9193 cases where nonprimitives can be in the list (such as subprograms in
9195 * sem_disp.adb (Derives_From): Use correct condition for checking that
9196 a formal's type is derived from the type of the corresponding formal in
9197 the parent subprogram (the condition was completely wrong). Add
9198 checking that was missing for controlling result types being derived
9199 from the result type of the parent operation.
9201 2011-08-02 Yannick Moy <moy@adacore.com>
9203 * errout.adb (First_Node): minor renaming
9204 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9207 2011-08-02 Yannick Moy <moy@adacore.com>
9209 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9210 before accessing operands.
9211 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9212 decide whether an initialization expression respects SPARK rules, as
9213 the plain node is the expanded one. This allows for more valid warnings
9215 * gnat_rm.texi: Minor update.
9217 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9219 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9222 2011-08-02 Robert Dewar <dewar@adacore.com>
9224 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9226 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9228 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9229 loop statements and the element renaming declaration with a block when
9230 the element type is controlled.
9232 2011-08-02 Yannick Moy <moy@adacore.com>
9234 * sinfo.ads: Minor formatting.
9236 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9238 * sem_aggr.adb (Add_Association): if the association has a box and no
9239 expression, use the Sloc of the aggregate itself for the new
9241 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9244 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9246 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9247 When a container is provided via a function call, generate a renaming
9248 of the function result. This avoids the creation of a transient scope
9249 and the premature finalization of the container.
9250 * exp_ch7.adb (Is_Container_Cursor): Removed.
9251 (Wrap_Transient_Declaration): Remove the supression of the finalization
9252 of the list controller when the declaration denotes a container cursor,
9255 2011-08-02 Yannick Moy <moy@adacore.com>
9257 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9258 node is from source, instead of the original node being from source.
9260 (Resolve_Array_Aggregate): refine the check for a static expression, to
9261 recognize also static ranges
9262 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9263 Array_Type_Declaration): postpone the test for the type being a subtype
9264 mark after the type has been resolved, so that component-selection and
9265 expanded-name are discriminated.
9266 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9267 to distinguish the case of an iteration scheme, so that an error is
9268 issed on a non-static range in SPARK except in an iteration scheme.
9269 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9270 In_Iter_Schm = True.
9271 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9272 user-defined operators so that they are allowed in renaming
9274 (Find_Selected_Component): refine the check for prefixing of operators
9275 so that they are allowed in renaming. Move the checks for restrictions
9276 on selector name after analysis discriminated between
9277 component-selection and expanded-name.
9278 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9279 concatenation argument of string type if it is static.
9280 * sem_util.adb, sem_util.ads
9281 (Check_Later_Vs_Basic_Declarations): add a new function
9282 Is_Later_Declarative_Item to decice which declarations are allowed as
9283 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9284 mode, add that renamings are considered as later items.
9285 (Enclosing_Package): new function to return the enclosing package
9286 (Enter_Name): correct the rule for homonyms in SPARK
9287 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9288 from source (result of expansion) to avoid issuing wrong warnings.
9290 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9292 * errout.adb: On anything but an expression First_Node returns its
9295 2011-08-02 Pascal Obry <obry@adacore.com>
9297 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9299 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9301 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9302 Set the associated loop as the related expression of internally
9304 * exp_ch7.adb (Is_Container_Cursor): New routine.
9305 (Wrap_Transient_Declaration): Supress the finalization of the list
9306 controller when the declaration denotes a container cursor.
9308 2011-08-02 Yannick Moy <moy@adacore.com>
9310 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9312 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9313 expression is a simple expression. This check cannot be performed in
9314 the semantics, so just drop it.
9315 (P_Index_Or_Discriminant_Constraint): move check that the index or
9316 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9317 semantics. Other cases were previously checked in the semantics.
9318 * par-ch4.adb (P_Name): move checks that a selector name is not
9319 character literal or an operator symbol to Find_Selected_Component in
9321 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9322 declarations are not placed after later declarations in a separate
9323 procedure in Sem_Util (possibly not the best choice?), to be used both
9324 during parsing, for Ada 83 mode, and during semantic analysis, for
9326 * par-endh.adb (Check_End): move check that end label is not missing
9327 to Process_End_Label in the semantics
9328 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9329 the special case for SPARK restriction
9330 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9331 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9332 parameter Force to issue the error message even on internal node (used
9333 for generated end label). Call Check_Restriction to check when an error
9334 must be issued. In SPARK mode, issue an error message even if the
9335 restriction is not set.
9336 (Check_Restriction): new procedure with an additional out parameter to
9337 inform the caller that a message has been issued
9338 * sem_aggr.adb: Minor modification of message
9339 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9340 instead of issuing an error message directly
9341 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9342 declarations are not placed after later declarations, by calling
9343 Check_Later_Vs_Basic_Declarations
9344 (Analyze_Subtype_Declaration): move here the check that an index or
9345 discriminant constraint must be a subtype mark. Change the check that
9346 a subtype of String must start at one so that it works on subtype marks.
9347 * sem_ch4.adb (Analyze_Call): move here the check that a named
9348 association cannot follow a positional one in a call
9349 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9350 instead of issuing an error message directly
9351 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9352 selector name is not a character literal or an operator symbol. Move
9353 here the check that the prefix of an expanded name cannot be a
9354 subprogram or a loop statement.
9355 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9356 procedure called from parsing and semantics to check that basic
9357 declarations are not placed after later declarations
9358 (Process_End_Label): move here the check that end label is not missing
9360 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9362 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9363 representation clause in codepeer mode, since it confuses CodePeer and
9364 does not bring useful info.
9366 2011-08-02 Ed Falis <falis@adacore.com>
9368 * init.c: initialize fp hw on MILS.
9370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9372 * errout.adb (First_Node): for bodies, return the node itself (small
9373 optimization). For other nodes, do not check source_unit if the node
9374 comes from Standard.
9376 2011-08-02 Robert Dewar <dewar@adacore.com>
9378 * exp_ch3.adb: Minor comment additions.
9379 * sem_ch13.adb: Minor reformatting.
9381 2011-08-02 Pascal Obry <obry@adacore.com>
9383 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9385 2011-08-02 Robert Dewar <dewar@adacore.com>
9387 * sem_attr.adb: Minor reformatting.
9389 2011-08-02 Robert Dewar <dewar@adacore.com>
9391 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9392 (Has_Default_Component_Value): Removed
9393 * einfo.ads Comment updates
9394 (Has_Default_Aspect): Replaces Has_Default_Value
9395 (Has_Default_Component_Value): Removed
9397 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9399 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9400 (Get_Simple_Init_Val): Handle Default_Value aspect
9401 (Needs_Simple_Initialization): Handle Default_Value aspect
9402 * exp_ch3.ads: Needs_Simple_Initialization
9403 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9404 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9406 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9407 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9408 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9412 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9413 package containing iteration primitives.
9414 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9416 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9418 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9419 "of", pre-analyze expression in case it is a function call with
9420 finalization actions that must be placed ahead of the loop.
9421 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9422 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9424 2011-08-02 Geert Bosch <bosch@adacore.com>
9426 * cstand.adb (Create_Float_Types): Only consider C's long double for
9427 Long_Long_Float, in addition to double.
9429 2011-08-02 Robert Dewar <dewar@adacore.com>
9431 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9432 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9433 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9438 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9441 2011-08-02 Javier Miranda <miranda@adacore.com>
9443 * einfo.ads, einfo.adb
9444 (Original_Access_Type): Move this attribute to Node26 since there was
9445 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9446 which causes conflicts and breaks the generation of the .NET compiler.
9447 (Interface_Name): Add missing documentation on JGNAT only uses of
9450 2011-08-02 Geert Bosch <bosch@adacore.com>
9452 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9453 (Find_Back_End_Float_Type): Likewise
9454 (Create_Back_End_Float_Types): Likewise
9455 (Create_Float_Types): Likewise
9456 (Register_Float_Type): Likewise
9457 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9458 Nlist and split out type selection in new local Find_Base_Type function.
9459 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9461 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9463 2011-08-02 Robert Dewar <dewar@adacore.com>
9465 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9467 * opt.ads: Minor comment change.
9468 * sem_ch12.adb: Minor code reorganization.
9470 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9472 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9473 subtype's list of rep items to the list on the full subtype in the case
9474 where the lists are the same.
9476 2011-08-02 Geert Bosch <bosch@adacore.com>
9478 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9479 using the one from System.Strings, which also deallocates all strings.
9481 2011-08-02 Geert Bosch <bosch@adacore.com>
9483 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9485 * gcc-interface/Make-lang.in: Update dependencies.
9487 2011-08-02 Olivier Hainque <hainque@adacore.com>
9489 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9492 2011-08-02 Javier Miranda <miranda@adacore.com>
9494 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9495 associated with anonymous access to subprograms.
9497 2011-08-02 Geert Bosch <bosch@adacore.com>
9500 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9501 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9502 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9503 (Add_Symbol_Definition): Move to switch-c.adb
9504 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9505 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9506 (Add_Symbol_Definition): Move to switch-c.adb.
9507 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9509 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9511 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9512 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9514 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9515 (Add_Symbol_Definition): Moved from Prepcomp.
9516 * switch-c.ads: Update copyright notice. Use String_List instead of
9517 Argument_List, removing dependency on System.OS_Lib.
9519 2011-08-02 Yannick Moy <moy@adacore.com>
9521 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9522 mode on initialization expression which does not respect SPARK
9524 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9525 if the tree referenced by its argument represents an initialization
9526 expression in SPARK, suitable for initializing an object in an object
9529 2011-08-02 Javier Miranda <miranda@adacore.com>
9531 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9532 internally generated access to subprogram with its associated protected
9534 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9536 2011-08-02 Geert Bosch <bosch@adacore.com>
9538 * cstand.adb (Register_Float_Type): Print information about type to
9539 register, if the Debug_Flag_Dot_B is set.
9540 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9541 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9542 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9543 with a requested precision of more than Max_Digits digits and no more
9544 than Max_Base_Digits digits, if a range specification is present and the
9545 Predefined_Float_Types list has a suitable type to derive from.
9546 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9547 case of type completion with pragma Import
9549 (Process_Import_Predefined_Type): Processing to complete a type
9550 with pragma Import. Currently supports floating point types only.
9551 (Set_Convention_From_Pragma): Do nothing without underlying type.
9552 (Process_Convention): Guard against absence of underlying type,
9553 which may happen when importing incomplete types.
9554 (Process_Import_Or_Interface): Handle case of importing predefined
9555 types. Tweak error message.
9557 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9559 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9560 functions to previous change. Reorganize code slightly.
9562 2011-08-02 Geert Bosch <bosch@adacore.com>
9564 * back_end.ads (Register_Type_Proc): New call back procedure type for
9565 allowing the back end to provide information about available types.
9566 (Register_Back_End_Types): New procedure to register back end types.
9567 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9569 * cstand.adb (Back_End_Float_Types): New list for floating point types
9570 supported by the back end.
9571 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9572 (Copy_Float_Type): New procedure to make new copies of predefined types.
9573 (Register_Float_Type): New call back procedure to populate the BEFT list
9574 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9575 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9576 (Create_Float_Types): New procedure to create entities for floating
9577 point types predefined in Standard, and put these and any remaining
9578 BEFTs on the Predefined_Float_Types list.
9579 * stand.ads (Predefined_Float_Types): New list for predefined floating
9580 point types that do not have declarations in package Standard.
9582 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9584 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9585 entity node for the unit containing the parameter.
9586 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9587 (Add_Inlined_Subprogram): Likewise.
9588 * gcc-interface/Make-lang.in: Update dependencies.
9590 2011-08-02 Thomas Quinot <quinot@adacore.com>
9592 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9595 2011-08-02 Geert Bosch <bosch@adacore.com>
9597 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9599 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9601 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9602 computed value of Base_Type.
9604 2011-08-02 Yannick Moy <moy@adacore.com>
9606 * restrict.adb (Check_Restriction): issue an error for any use of
9607 class-wide, even if the No_Dispatch restriction is not set.
9608 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9609 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9610 when completing a private extension, the type named in the private part
9611 is not the same as that named in the visible part.
9612 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9613 of an inherited primitive operations of a tagged type or type extension
9614 that returns the tagged type.
9615 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9616 function which returns True for an implicit operation inherited by the
9617 derived type declaration for the argument type.
9618 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9623 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9624 Process_Bounds, to perform analysis with expansion of a range or an
9625 expression that is the iteration scheme for a loop.
9626 (Analyze_Iterator_Specification): If domain of iteration is given by a
9627 function call with a controlled result, as is the case if call returns
9628 a predefined container, ensure that finalization actions are properly
9630 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9632 2011-08-02 Javier Miranda <miranda@adacore.com>
9634 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9635 * gcc-interface/Make-lang.in: Update dependencies.
9637 2011-08-02 Javier Miranda <miranda@adacore.com>
9639 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9640 determine if the analysis is performed using N or Original_Node (N).
9641 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9642 functionality of routine Is_Variable avoids code duplication.
9643 * checks.adb (Determine_Range): Handle temporaries generated by
9644 Remove_Side_Effects.
9646 2011-08-02 Javier Miranda <miranda@adacore.com>
9648 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9649 expansion of the condition. Required since the previous analysis was
9650 done with expansion disabled (see Resolve_Quantified_Expression) and
9651 hence checks were not inserted and record comparisons have not been
9654 2011-08-02 Ed Falis <falis@adacore.com>
9656 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9659 2011-08-02 Bob Duff <duff@adacore.com>
9661 * opt.ads: Minor comment fix.
9663 2011-08-02 Bob Duff <duff@adacore.com>
9665 * sem_ch12.adb (Analyze_Package_Instantiation,
9666 Analyze_Subprogram_Instantiation): Turn off style checking while
9667 analyzing an instance. Whatever style checks that apply to the generic
9668 unit should apply, so it makes no sense to apply them in an instance.
9669 This was causing trouble when compiling an instance of a runtime
9670 unit that violates the -gnatyO switch.
9671 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9672 one of the two case statements, causing spurious errors.
9674 2011-08-02 Robert Dewar <dewar@adacore.com>
9676 * uname.adb: Minor reformatting.
9677 * gnatcmd.adb: Minor reformatting.
9678 * exp_attr.adb: Minor reformatting.
9680 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9682 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9683 No_Dispatching_Calls, do not look for the Assign primitive, because
9684 predefined primitives are not created in this case.
9686 2011-08-02 Bob Duff <duff@adacore.com>
9688 * stylesw.ads: Minor comment fixes.
9690 2011-08-02 Robert Dewar <dewar@adacore.com>
9692 * freeze.adb (Add_To_Result): New procedure.
9694 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9696 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9697 time, if the specific run-time routines for handling streams of strings
9698 are not available, use the default mechanism.
9700 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9702 * s-regpat.ads: Fix typo.
9704 2011-08-02 Vincent Celier <celier@adacore.com>
9706 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9707 not null, call it to create the in memory config project file without
9708 parsing an existing default config project file.
9710 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9712 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9714 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9716 * sem_elim.adb: an abstract subprogram does not need an eliminate
9717 pragma for its descendant to be eliminable.
9719 2011-08-02 Ed Falis <falis@adacore.com>
9721 * init.c: revert to handling before previous checkin for VxWorks
9722 * s-intman-vxworks.adb: delete unnecessary declarations related to
9723 using Ada interrupt facilities for handling signals.
9724 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9725 * s-intman-vxworks.ads: Import __gnat_install_handler as
9726 Initialize_Interrupts.
9727 * s-taprop-vxworks.adb: Delete Signal_Mask.
9728 (Abort_Handler): change construction of mask to unblock exception
9731 2011-08-02 Jerome Guitton <guitton@adacore.com>
9733 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9734 Debug_Raise_Exception before propagation starts.
9736 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9738 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9739 to Restriction_Check_Required.
9740 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9741 * sem_res.adb (Resolve_Call): Likewise.
9742 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9744 2011-08-02 Bob Duff <duff@adacore.com>
9746 * stylesw.ads: Update comment.
9747 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9748 * errout.ads: Remove obsolete comment.
9750 2011-08-02 Javier Miranda <miranda@adacore.com>
9752 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9753 (Set_Is_Safe_To_Reevaluate): new procedure.
9754 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9755 assignment is allowed on safe-to-reevaluate variables.
9756 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9757 temporary created to remove side effects in expressions that use
9758 the secondary stack as safe-to-reevaluate.
9759 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9760 variables that are not true constants.
9762 2011-08-02 Robert Dewar <dewar@adacore.com>
9764 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9765 sem_res.adb, sem_ch6.adb: Minor reformatting.
9767 2011-08-02 Jerome Guitton <guitton@adacore.com>
9769 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9771 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9773 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9774 not set Overridden_Operation if subprogram is an initialization
9777 2011-08-02 Yannick Moy <moy@adacore.com>
9779 * par-ch6.adb: Correct obsolete name in comments
9780 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9781 which takes two message arguments (existing function takes one), with
9782 second message used for continuation.
9783 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9784 block statements that originate from a source block statement, not
9785 generated block statements
9786 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9787 symmetry with procedure case
9788 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9789 function to issue an error in formal mode if a package specification
9790 contains more than one tagged type or type extension.
9791 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9792 parameters matching formals of tagged types are objects (or ancestor
9793 type conversions of objects), not general expressions. Issue an error
9794 on view conversions that are not involving ancestor conversion of an
9796 (Resolve_Type_Conversion): in formal mode, issue an error on the
9797 operand of an ancestor type conversion which is not an object
9798 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9799 procedure so that it works also for actuals of function calls
9800 (Is_Actual_Tagged_Parameter): new function which determines if its
9801 argument is an actual parameter of a formal of tagged type in a
9803 (Is_SPARK_Object_Reference): new function which determines if the tree
9804 referenced by its argument represents an object in SPARK
9806 2011-08-02 Robert Dewar <dewar@adacore.com>
9808 * sem_ch3.adb: Minor reformatting
9809 Minor comment addition
9810 Minor error msg text change
9812 2011-08-02 Javier Miranda <miranda@adacore.com>
9814 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9815 function. Used to be more precise when we generate a variable plus one
9816 assignment to remove side effects in the evaluation of the Bound
9818 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9819 of the bound expression to force its re-analysis and thus expand the
9820 associated transient scope (if required). Code cleanup replacing the
9821 previous code that declared the constant entity by an invocation to
9822 routine Force_Evaluation which centralizes this work in the frontend.
9824 2011-08-02 Robert Dewar <dewar@adacore.com>
9826 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9827 (Base_Type): Now uses improved Is_Base_Type function
9828 * einfo.ads (Base_Type): Inline this function
9830 2011-08-02 Robert Dewar <dewar@adacore.com>
9832 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9833 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9835 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9837 * gcc-interface/Make-lang.in: Update dependencies.
9838 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9841 2011-08-02 Yannick Moy <moy@adacore.com>
9843 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9844 non-simple expression used in delta constraint
9845 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9846 index constraint which is not a subtype mark
9847 * par.adb: With and use Restrict
9848 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9849 mode on component type which is not a subtype mark and default
9850 expression on component
9851 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9852 of string which does not have a lower index bound equal to 1
9853 (Array_Type_Declaration): issue an error in formal mode on index or
9854 component type which is not a subtype mark, and on aliased keyword on
9856 (Derived_Type_Declaration): issue an error in formal mode on interface,
9857 limited or abstract type
9858 (Record_Type_Declaration): issue an error in formal mode on interface
9859 (Record_Type_Definition): issue an error in formal mode on tagged types
9860 and type extensions not declared in the specification of a library unit
9861 package; on null non-tagged record; on variant part
9863 2011-08-02 Vincent Celier <celier@adacore.com>
9865 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9866 not declared for qualified library project when Library_Name is not
9867 declared, but Library_Dir is.
9869 2011-08-02 Robert Dewar <dewar@adacore.com>
9871 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9872 pragmas (affects aspects [Component_]Default_Value
9873 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9874 component type for the resolution
9876 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9878 * einfo.adb (Base_Type): Tune implementation for speed.
9880 2011-08-02 Robert Dewar <dewar@adacore.com>
9882 * freeze.adb: Minor reformatting.
9884 2011-08-02 Thomas Quinot <quinot@adacore.com>
9886 * scos.ads: Update comments.
9888 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9890 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9891 base type, because the parent may be a subtype of a private type whose
9892 convention is established in a private part.
9894 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9896 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9897 statement in a block when the expansion of the return expression has
9898 created a finalization chain.
9899 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9900 with the parent node.
9901 Add N_Extended_Return_Statement to handle the case where a transient
9902 object declaration appears in the Return_Object_Declarations list of
9903 an extended return statement.
9905 2011-08-02 Matthew Gingell <gingell@adacore.com>
9907 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9908 unused parameter 'name'.
9910 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9912 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9913 inherited operation, check whether its alias, which is the source
9914 operastion that it renames, has been marked eliminated.
9916 2011-08-02 Javier Miranda <miranda@adacore.com>
9918 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9919 in-mode parameter whose type is an access type since it can be used to
9920 modify its designated object. Enforce code that handles as safe an
9921 access type that is not access-to-constant but it is the result of a
9922 previous removal of side-effects.
9923 (Remove_Side_Effects): Minor code reorganization of cases which require
9924 no action. Done to incorporate documentation on new cases uncovered
9925 working in this ticket: no action needed if this routine was invoked
9926 too early and the nodes are not yet decorated.
9927 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9928 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9929 were issued with actuals that are implicitly provided by
9932 2011-08-02 Robert Dewar <dewar@adacore.com>
9934 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9936 2011-08-02 Yannick Moy <moy@adacore.com>
9938 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9939 to issue an error in formal mode on attribute not supported in this mode
9940 (Analyze_Attribute): issue errors on standard attributes not supported
9942 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9943 comment, and issue error in formal mode on modulus which is not a power
9945 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9947 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9949 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9950 operator on modular type (except 'not').
9952 2011-08-02 Robert Dewar <dewar@adacore.com>
9954 * gnat_rm.texi: Minor reformatting.
9956 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9958 * s-osinte-linux.ads: Minor comment update and reformatting.
9959 * i-cexten.ads: Make this unit pure, as for its parent.
9960 Will allow its usage in more contexts if needed.
9962 2011-08-02 Robert Dewar <dewar@adacore.com>
9964 * s-utf_32.ads: Minor comment fix.
9966 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9968 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9969 operation of a tagged synchronized type, handle the case where the
9970 controlling argument is overloaded.
9972 2011-08-02 Yannick Moy <moy@adacore.com>
9974 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9975 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9976 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9977 SPARK mode and formal verification mode on processing SPARK restriction
9978 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9979 requiring consistency checking.
9981 2011-08-02 Robert Dewar <dewar@adacore.com>
9983 * sem_res.adb: Minor reformatting.
9985 2011-08-02 Robert Dewar <dewar@adacore.com>
9987 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9988 a-cforse.ads: Remove unneeded with of Ada.Containers
9989 Remove commented out pragma Inline's
9990 Move specifications of new subprograms to the actual specs
9992 2011-08-02 Yannick Moy <moy@adacore.com>
9994 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9995 a-cforse.ads: Update comments.
9997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9999 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10001 2011-08-02 Robert Dewar <dewar@adacore.com>
10003 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10004 a-cforse.ads, a-cofove.ads: Minor reformatting.
10006 2011-08-02 Claire Dross <dross@adacore.com>
10008 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10009 a-cofove.ads: Add comments.
10011 2011-08-02 Yannick Moy <moy@adacore.com>
10013 * gnat_rm.texi: Document formal containers.
10015 2011-08-02 Emmanuel Briot <briot@adacore.com>
10017 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10018 are empty sections.
10020 2011-08-02 Robert Dewar <dewar@adacore.com>
10022 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10025 2011-08-02 Robert Dewar <dewar@adacore.com>
10027 * aspects.adb: New aspects Default_Value and Default_Component_Value
10028 New format of Aspect_Names table checks for omitted entries
10029 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10030 handling of boolean aspects for derived types.
10031 New aspects Default_Value and Default_Component_Value
10032 New format of Aspect_Names table checks for omitted entries
10033 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10034 (Has_Default_Value): New flag
10035 (Has_Default_Component_Value): New flag
10036 (Has_Default_Value): New flag
10037 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10039 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10040 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10041 Default_Value and Default_Component_Value
10042 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10043 New aspects Default_Value and Default_Component_Value
10044 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10045 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10047 2011-08-02 Vincent Celier <celier@adacore.com>
10049 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10050 inherit library kind.
10052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10054 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10055 Minor reformatting.
10057 2011-08-02 Robert Dewar <dewar@adacore.com>
10059 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10061 2011-08-02 Yannick Moy <moy@adacore.com>
10063 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10065 2011-08-02 Robert Dewar <dewar@adacore.com>
10067 * impunit.adb: Add comment.
10069 2011-08-02 Yannick Moy <moy@adacore.com>
10071 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10072 qualification of aggregates in formal mode
10073 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10075 (Resolve_Aggregate): complete the test that an aggregate is adequately
10076 qualified in formal mode
10078 2011-08-02 Pascal Obry <obry@adacore.com>
10080 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10081 * mlib-prj.adb: Supress warning when compiling binder generated file.
10082 (Build_Library): Supress all warnings when compiling the binder
10085 2011-08-02 Yannick Moy <moy@adacore.com>
10087 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10089 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10090 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10091 Add with/use clauses to make Check_Formal_Restriction visible
10093 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10095 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10096 in-parameters when type of the generic formal is private in the generic
10097 spec and non-private in the body.
10099 2011-08-02 Claire Dross <dross@adacore.com>
10101 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10102 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10103 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10104 * impunit.adb, Makefile.rtl: Take new files into account.
10106 2011-08-02 Robert Dewar <dewar@adacore.com>
10108 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10109 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10111 2011-08-02 Yannick Moy <moy@adacore.com>
10113 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10115 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10116 matching static array bounds, taking into account the special case of
10118 * sem_ch3.adb: Typo in comment.
10120 2011-08-02 Yannick Moy <moy@adacore.com>
10122 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10123 which issues an error in formal mode if its argument node is originally
10125 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10126 has a discriminant specification so that it does not include the case
10128 (Derived_Type_Declaration): move here the test that a derived type has a
10129 discriminant specification
10130 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10131 first element of a component association before accessing its choices
10132 (presence of component association is not enough)
10133 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10134 declaration is a library item before accessing the next element in a
10135 list, as library items are not member of lists
10136 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10137 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10138 Check_Formal_Restriction whenever possible.
10140 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10142 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10143 reference when needed.
10145 2011-08-02 Bob Duff <duff@adacore.com>
10147 * gnat_ugn.texi: Fix typo.
10149 2011-08-02 Vincent Celier <celier@adacore.com>
10151 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10152 archive file name. Do not use the full path name of archives for Open
10155 2011-08-02 Robert Dewar <dewar@adacore.com>
10157 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10158 Analyze_Aspect_Specifications
10160 (Analyze_Aspect_Specifications): New handling for boolean aspects
10161 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10162 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10163 sequence for Analyze_Aspect_Specifications
10164 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10165 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10167 2011-08-02 Robert Dewar <dewar@adacore.com>
10169 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10170 aspects, since these no longer exist.
10172 2011-08-02 Robert Dewar <dewar@adacore.com>
10174 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10175 semicolon, do not try to see if there are aspects following it.
10176 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10179 2011-08-02 Robert Dewar <dewar@adacore.com>
10181 * sem_ch8.adb, aspects.ads: Minor reformatting.
10183 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10185 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10186 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10188 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10190 2011-08-02 Yannick Moy <moy@adacore.com>
10192 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10193 mode on subprogram declaration outside of package specification, unless
10194 it is followed by a pragma Import
10195 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10196 Access_Type_Declaration): issue error in formal mode on access type
10197 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10199 (Analyze_Object_Declaration): issue error in formal mode on object
10200 declaration which does not respect SPARK restrictions
10201 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10202 declaration which does not respect SPARK restrictions
10203 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10204 error in formal mode on digits or delta constraint
10205 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10206 decimal fixed point type
10207 (Derived_Type_Declaration): issue error in formal mode on derived type
10208 other than type extensions of tagged record types
10209 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10210 with check on access definition
10211 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10212 mode on protected definition.
10213 (Analyze_Task_Definition): issue error in formal mode on task definition
10215 2011-08-02 Robert Dewar <dewar@adacore.com>
10217 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10219 2011-08-02 Javier Miranda <miranda@adacore.com>
10221 * sem_ch6.adb (Can_Override_Operator): New function.
10222 (Verify_Overriding_Indicator): Add missing code to check overriding
10223 indicator in operators. Fixes regression.
10224 (Check_Overriding_Indicator): Minor reformating after replacing the
10225 code that evaluates if the subprogram can override an operator by
10226 invocations to the above new function.
10228 (Write_Field26_Name): Add missing code to ensure that, following
10229 the documentation in einfo.ads, this field is not shown as attribute
10230 "Static_Initialization" on non-dispatching functions.
10232 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10234 * sem_res.adb (Resolve_Call): A call to
10235 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10236 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10237 i.e., when the second parameter is of type Time_Span.
10239 2011-08-02 Vincent Celier <celier@adacore.com>
10241 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10242 with an archive instead of -L<library dir> -l<library name>.
10244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10246 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10247 mark the base types In_Use in addition to making the operations
10250 2011-08-02 Ed Falis <falis@adacore.com>
10252 * init.c: add and setup __gnat_signal_mask for the exception signals
10253 * s-inmaop-vxworks.adb: new file.
10254 * s-intman-vxworks.adb: remove unnecessary initializations and
10256 * s-intman-vxworks.ads: remove unnecessary variable
10257 * s-taprop-vxworks.adb: simplify signal initialization
10259 2011-08-02 Robert Dewar <dewar@adacore.com>
10261 * sem_ch8.adb: Minor code reorganization, comment updates.
10263 2011-08-02 Robert Dewar <dewar@adacore.com>
10265 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10266 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10268 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10269 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10271 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10273 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10274 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10275 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10276 use_type_clauses, to handle more efficiently use_type and use_all_type
10278 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10279 Ada2012 Use_All_Type clause.
10280 (Use_Class_Wide_Operations): new procedure.
10282 2011-08-02 Robert Dewar <dewar@adacore.com>
10284 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10285 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10286 expression to expression function.
10288 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10290 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10291 if types are compatible.
10293 2011-08-02 Yannick Moy <moy@adacore.com>
10295 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10296 returns True if its argument array types have same dimension and same
10297 static bounds at each index.
10298 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10299 OUT or IN OUT paramaters which are not view conversions in SPARK.
10300 (Resolve_Arithmetic_Op): issue an error in formal mode on
10301 multiplication or division with operands of fixed point types which are
10302 not qualified or explicitly converted.
10303 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10304 Boolean or array type (except String) operands.
10305 (Resolve_Equality_Op): issue an error in formal mode on equality
10306 operators for array types other than String with non-matching static
10308 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10309 for array types with non-matching static bounds. Factorize the code in
10310 Matching_Static_Array_Bounds.
10311 (Resolve_Qualified_Expression): issue an error in formal mode on
10312 qualified expressions for array types with non-matching static bounds.
10313 (Resolve_Type_Conversion): issue an error in formal mode on type
10314 conversion for array types with non-matching static bounds
10316 2011-08-02 Robert Dewar <dewar@adacore.com>
10318 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10322 * par-ch9.adb: save location of entry for proper error message.
10324 2011-08-02 Javier Miranda <miranda@adacore.com>
10326 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10327 (Use_Full_View) which permits this routine to climb through the
10328 ancestors using the full-view of private parents.
10329 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10330 Use_Full_View to true in calls to Is_Ancestor.
10331 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10332 true in call to Is_Ancestor.
10333 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10334 Use_Full_View to true in call to Is_Ancestor.
10335 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10336 call to Is_Ancestor.
10337 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10338 Use_Full_View to true in calls to Is_Ancestor.
10339 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10340 Make_Select_Specific_Data_Table, Register_Primitive,
10341 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10342 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10343 to true in call to Is_Ancestor.
10344 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10345 Use_Full_View to true in calls to Is_Ancestor.
10347 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10348 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10350 2011-08-02 Robert Dewar <dewar@adacore.com>
10352 * gnat_rm.texi: Minor reformatting.
10353 * sem_prag.adb: Minor reformatting.
10355 2011-08-02 Tristan Gingold <gingold@adacore.com>
10357 * vms_data.ads: Add VMS qualifier for -gnateP.
10359 2011-08-02 Robert Dewar <dewar@adacore.com>
10361 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10362 * par-ch7.adb (P_Package): Proper placement of aspects for package
10363 decl/instantiation.
10364 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10365 (End_Statements): Add Is_Sloc parameterr
10366 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10367 (Check_End): Ad Is_Sloc parameter
10368 (End_Statements): Add Is_Sloc parameterr
10370 2011-08-02 Vincent Celier <celier@adacore.com>
10372 * ug_words: Add VMS qualifier equivalent to -gnateP:
10373 /SYMBOL_PREPROCESSING.
10375 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10377 * gnat-style.texi: For hexadecimal numeric literals the typical
10378 grouping of digits is 4 to represent 2 bytes.
10379 A procedure spec which is split into several lines is indented two
10382 2011-08-02 Yannick Moy <moy@adacore.com>
10384 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10385 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10386 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10388 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10389 choice in array aggregate
10390 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10392 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10393 positional and named aggregate for record, or others in record
10394 aggregate, or multiple choice in record aggregate
10395 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10396 array operands to logical operations AND, OR and XOR do not have the
10397 same static lower and higher bounds
10398 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10400 2011-08-01 Robert Dewar <dewar@adacore.com>
10402 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10403 Replaces Last_Source_Node_In_Sequence.
10404 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10405 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10406 parens and blank in string (this was inconsistently implemented).
10408 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10409 blank in string (this was inconsistently implemented).
10411 (Set_Global_Switches): Set formal mode switches appropriately
10412 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10414 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10415 call Set_Error_Msg_Lang to set "spark" as language name.
10416 * par.adb: Remove unnecessary call to set formal language for errout
10417 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10418 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10420 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10421 calls to it, moved after resolution so that types are known
10422 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10423 result of concatenation is not of type String
10424 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10425 concatenation is not properly restricted
10426 * gnat_rm.texi: Add doc on pragma Spark_95.
10427 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10428 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10429 * gcc-interface/Make-lang.in: Update dependencies.
10431 2011-08-01 Javier Miranda <miranda@adacore.com>
10433 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10434 condition that detects if the overridden operation must replace an
10437 2011-08-01 Javier Miranda <miranda@adacore.com>
10439 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10440 code declarations inserted by Insert_Actions in each alternative of the
10441 N_Case_Expression node.
10443 2011-08-01 Robert Dewar <dewar@adacore.com>
10445 * sem_ch6.adb: Minor code reorganization.
10446 * sem_util.adb: Minor reformatting.
10448 2011-08-01 Pascal Obry <obry@adacore.com>
10450 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10451 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10453 2011-08-01 Yannick Moy <moy@adacore.com>
10455 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10456 literal or operator symbol which is prefixed
10457 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10458 mode on access attributes.
10459 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10460 that concatenation operands are properly restricted in formal mode
10461 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10462 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10463 result of the concatenation has a type different from String.
10464 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10465 Analyze_Quantified_Expression, Analyze_Slice,
10466 Analyze_Null): issue an error in formal mode on unsupported constructs
10468 (Analyze_Block_Statement): only issue error on source block statement
10469 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10470 function which returns the last node in a list of nodes for which
10471 Comes_From_Source returns True, if any
10472 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10473 Last_Source_Node_In_Sequence
10474 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10475 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10476 mode on unsupported constructs
10477 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10478 rest of the actions may be needed later on since the error is marked as
10480 * sinfo.ads: Typos in comments.
10482 2011-08-01 Pascal Obry <obry@adacore.com>
10484 * projects.texi: Minor editing.
10486 2011-08-01 Yannick Moy <moy@adacore.com>
10488 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10489 insertion character ~~
10490 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10491 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10492 with insertion character ~~
10493 (Set_Msg_Text): treat insertion character ~~
10494 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10495 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10496 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10497 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10498 errors related to the formal language restriction not serious
10499 (insertion character |).
10500 * par.adb (Par): set formal language for error messages if needed
10501 * sem_ch6.adb (Check_Missing_Return): take into account possible
10502 generated statements at the end of the function
10503 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10504 enumeration value to define a new pragma SPARK_95
10505 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10506 SPARK_Version): new type and variables to store the SPARK version
10508 (SPARK_Mode): return True when SPARK_Version is set
10509 * par-prag.adb: Correct indentation
10510 (Prag): take Pragma_SPARK_95 into account
10511 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10514 2011-08-01 Robert Dewar <dewar@adacore.com>
10516 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10517 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10518 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10520 2011-08-01 Pascal Obry <obry@adacore.com>
10522 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10523 Target_Name to Get_Path call.
10524 (Parse_Single_Project): Likewise.
10525 (Post_Parse_Context_Clause): Likewise.
10526 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10527 Call Initialise_Project_Path with the proper Target_Name.
10528 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10530 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10531 with the proper Target_Name.
10532 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10533 Part.Parse routine.
10534 (Parse_Project_And_Apply_Config): Likewise.
10535 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10536 This is fine as this part of the code is supporting only native
10538 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10539 is fine as this part of the code is supporting only native compilation.
10541 2011-08-01 Yannick Moy <moy@adacore.com>
10543 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10544 of homonym, unless the homonym is one of the cases allowed in SPARK
10545 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10546 package declaration occurring after a body.
10548 2011-08-01 Robert Dewar <dewar@adacore.com>
10550 * checks.adb, exp_ch4.adb: Minor reformatting.
10552 2011-08-01 Javier Miranda <miranda@adacore.com>
10554 * einfo.ads (Access_Disp_Table): Fix documentation.
10555 (Dispatch_Table_Wrappers): Fix documentation.
10557 2011-08-01 Pascal Obry <obry@adacore.com>
10559 * prj-env.adb, prj-env.ads: Minor reformatting.
10561 2011-08-01 Yannick Moy <moy@adacore.com>
10563 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10564 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10565 procedures out of these packages.
10566 * errout.ads, errout.adb
10567 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10568 procedures in of this package
10569 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10570 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10571 on misplaced later vs initial declarations, like in Ada 83
10572 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10573 formal mode on attribute of private type whose full type declaration
10575 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10576 package declaration inside a package specification
10577 (Analyze_Full_Type_Declaration): issue error in formal mode on
10578 controlled type or discriminant type
10579 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10580 user-defined operator means that it should come from the source
10581 (New_Overloaded_Entity): issue error in formal mode on overloaded
10583 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10585 2011-08-01 Thomas Quinot <quinot@adacore.com>
10587 * atree.adb: Minor reformatting.
10588 * checks.adb: Minor reformatting.
10590 2011-08-01 Vincent Celier <celier@adacore.com>
10592 * s-parame-vms-ia64.ads: Fix typo in comment
10594 * s-parame-vms-restrict.ads: Removed, unused.
10596 2011-08-01 Javier Miranda <miranda@adacore.com>
10599 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10601 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10602 * sem_ch3.ads, sem_ch3.adb
10603 (Is_Constant_Bound): New extended version of the subprogram that was
10604 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10605 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10606 * sem_aux.ads (Constant_Value): Fix typo in comment.
10607 * checks.adb (Generate_Index_Checks): New implementation which, for
10608 array objects with constant bounds, generates the runtime check
10609 referencing the bounds of the array type. For other cases this routine
10610 provides its previous behavior obtaining such values from the array
10612 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10614 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10615 we cannot have semantic interpretations of the new node.
10617 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10619 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10622 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10624 * sem_ch8.adb: Minor code editing.
10625 * s-vxwext.adb: Remove trailing space.
10626 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10627 consistency with other files.
10629 2011-08-01 Thomas Quinot <quinot@adacore.com>
10631 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10633 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10635 * par-ch10.adb: reject parameterized expressions as compilation unit.
10636 * sem_ch4.adb: handle properly conditional expression with overloaded
10637 then_clause and no else_clause.
10639 2011-08-01 Tristan Gingold <gingold@adacore.com>
10641 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10642 like done by System.Aux_DEC.
10643 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10645 2011-08-01 Yannick Moy <moy@adacore.com>
10647 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10648 missing label at end of declaration (subprogram or package)
10649 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10650 of positional and named parameter association
10651 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10652 Error_Msg_SP which adds a prefix to the error message giving the name
10653 of the formal language analyzed
10654 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10655 access result type in subprogram, unconstrained array as result type,.
10656 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10658 * sem_ch8.adb: Code clean up.
10660 2011-08-01 Javier Miranda <miranda@adacore.com>
10662 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10663 * einfo.ads (Access_Disp_Table): Fix documentation.
10664 (Dispatch_Table_Wrappers): Fix documentation.
10665 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10666 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10667 to enforce the documentation of this attribute.
10668 (Set_Is_Interface): Cleanup the assertion.
10669 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10670 the Underlying_Type entity before reading attribute Access_Disp_Table.
10671 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10672 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10673 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10674 the Underlying_Type entity before reading attribute Access_Disp_Table.
10675 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10676 Locate the Underlying_Type entity before reading attribute
10679 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10681 * s-poosiz.ads: Additional overriding indicators.
10683 2011-08-01 Yannick Moy <moy@adacore.com>
10685 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10687 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10688 parameter specification does not include a subtype mark.
10689 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10690 formal mode on abstract subprogram.
10691 (Analyze_Subprogram_Specification): issue error in formal mode on
10692 user-defined operator.
10693 (Process_Formals): issue error in formal mode on access parameter and
10694 default expression.
10695 * sem_ch9.adb (Analyze_Abort_Statement,
10696 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10697 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10698 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10699 Analyze_Requeue, Analyze_Selective_Accept,
10700 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10701 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10702 issue error in formal mode on user-defined raise statement.
10704 2011-08-01 Thomas Quinot <quinot@adacore.com>
10706 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10707 declaration being hidden when overriding an implicit inherited
10709 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10710 (-gnats), do not complain about a source file that contains only a
10713 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10715 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10716 variable if already set.
10718 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10720 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10721 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10722 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10723 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10724 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10725 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10726 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10727 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10728 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10729 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10730 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10731 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10732 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10733 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10734 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10735 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10736 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10737 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10738 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10739 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10740 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10741 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10742 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10743 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10744 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10745 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10746 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10747 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10748 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10749 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10750 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10751 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10752 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10753 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10754 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10755 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10756 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10757 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10758 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10759 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10760 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10761 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10762 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10763 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10764 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10765 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10766 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10767 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10768 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10769 Use GNAT instead of GNARL.
10771 2011-08-01 Bob Duff <duff@adacore.com>
10773 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10774 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10775 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10778 2011-08-01 Yannick Moy <moy@adacore.com>
10780 * debug.adb (d.D) reverve flag for the SPARK mode
10781 (d.E) reverve flag for SPARK generation mode
10782 (d.F) reverve flag for Why generation mode
10783 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10784 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10785 functions which return True when the corresponding modes are set
10786 (Formal_Language): return "spark" or "alfa" when in formal verification
10788 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10789 Error_Msg to prefix the error message with a tag giving the formal
10791 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10792 message with a tag giving the formal language
10793 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10795 (Analyze_Case_Statement): issue error in formal mode on case statement
10796 with a single "others" case alternative
10797 (Analyze_Exit_Statement): issue errors in formal mode on exit
10798 statements which do not respect SPARK restrictions
10799 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10800 (Check_Unreachable_Code): always issue an error (not a warning) in
10801 formal mode on unreachable code (concerns both code after an infinite
10802 loop and after an unconditional jump, both not allowed in SPARK)
10803 * sem_ch6.adb (Analyze_Return_Statement): add call to
10804 Set_Return_Present for a procedure containing a return statement
10805 (already done for functions in Analyze_Function_Return)
10806 (Analyze_Function_Return): issue error in formal mode on extended
10807 return or if return is not last statement in function
10808 (Check_Missing_Return): issue error in formal mode if function does
10809 not end with return or if procedure contains a return
10810 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10811 function to detect if there is an inner scope of its parameter S which
10814 2011-08-01 Thomas Quinot <quinot@adacore.com>
10816 * sem_ch6.ads: Minor reformatting.
10818 2011-08-01 Javier Miranda <miranda@adacore.com>
10820 * sem_util.adb (Abstract_Interface_List): Complete condition when
10821 processing private type declarations to avoid reading unavailable
10823 (Is_Synchronized_Tagged_Type): Complete condition when processing
10824 private extension declaration nodes to avoid reading unavailable
10827 2011-08-01 Thomas Quinot <quinot@adacore.com>
10829 * sem_ch3.adb: Minor reformatting.
10831 2011-08-01 Thomas Quinot <quinot@adacore.com>
10833 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10834 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10835 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10836 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10837 for VMS, instead parametrize the common implementation with
10838 System.Parameters declarations.
10840 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10842 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10844 2011-08-01 Tristan Gingold <gingold@adacore.com>
10846 * seh_init.c: Fix SEH handler installation on win64.
10848 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10850 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10851 double analysis of an anonymous access to subprogram, because it can
10852 lead to improper sharing of profiles and a back-end crash.
10854 2011-08-01 Robert Dewar <dewar@adacore.com>
10856 * make.adb, sem_ch4.adb: Minor reformatting.
10857 * gcc-interface/Make-lang.in: Update dependencies.
10858 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10860 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10862 * gnat_rm.texi: Fix definition of Long_Integer.
10864 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10866 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10867 to prevent storage exhaustion.
10868 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10869 finalized is a function body, insert the cleanup code before the final
10870 return statement, to prevent spurious warnings.
10871 * s-pooglo.ads: add overriding indicator.
10873 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10875 * sem_ch4.adb (Operator_Check): improve error message when both a
10876 with_clause and a use_clause are needed to make operator usage legal.
10877 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10878 determine whether a compilation unit is visible within an other,
10879 either through a with_clause in the current unit, or a with_clause in
10880 its library unit or one one of its parents.
10882 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10884 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10885 over an arbitrary expression of an array or container type.
10886 * lib-xref.adb: clarify comment.
10888 2011-08-01 Bob Duff <duff@adacore.com>
10890 * einfo.ads: Minor reformatting.
10891 * debug.adb: Minor comment improvement.
10893 2011-08-01 Javier Miranda <miranda@adacore.com>
10895 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10896 consider hidden subprograms as valid candidates.
10898 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10900 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10902 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10904 * gnat_ugn.texi: Fix typo.
10906 2011-08-01 Robert Dewar <dewar@adacore.com>
10908 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10909 lib-xref.adb: Minor reformatting
10911 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10913 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10914 when to generate a call to Move_Final_List.
10915 (Has_Controlled_Parts): Remove this function.
10917 2011-08-01 Geert Bosch <bosch@adacore.com>
10919 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10920 "," in choice list.
10922 2011-08-01 Thomas Quinot <quinot@adacore.com>
10924 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10925 explicit raise of a predefined exception as Comes_From_Source if the
10926 original N_Raise_Statement comes from source.
10928 2011-08-01 Robert Dewar <dewar@adacore.com>
10930 * sinfo.ads: Add comment.
10931 * sem_ch6.adb: Minor reformatting.
10933 2011-08-01 Robert Dewar <dewar@adacore.com>
10935 * freeze.adb (Freeze_Entity): Refine check for bad component size
10936 clause to avoid rejecting confirming clause when atomic/aliased present.
10938 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10940 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10941 better determine whether an entity reference is a write.
10942 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10944 * lib-xref.adb (Output_References): Do no suppress a read reference at
10945 the same location as an immediately preceeding modify-reference, to
10946 handle properly in-out actuals.
10948 2011-08-01 Tristan Gingold <gingold@adacore.com>
10950 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10952 2011-08-01 Quentin Ochem <ochem@adacore.com>
10954 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10955 heap to compute the result.
10957 2011-08-01 Robert Dewar <dewar@adacore.com>
10959 * atree.ads: Minor reformatting.
10961 2011-08-01 Emmanuel Briot <briot@adacore.com>
10963 * g-expect.adb (Get_Command_Output): Fix memory leak.
10965 2011-08-01 Geert Bosch <bosch@adacore.com>
10967 * cstand.adb (P_Float_Type): New procedure to print the definition of
10968 predefined fpt types.
10969 (P_Mixed_Name): New procedure to print a name using mixed case
10970 (Print_Standard): Use P_Float_Type for printing floating point types
10971 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10972 precision IEEE float.
10974 2011-08-01 Thomas Quinot <quinot@adacore.com>
10976 * sem_ch3.adb: Minor reformatting.
10978 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10980 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10981 the completion of a generic function, insert the new body rather than
10982 rewriting the original.
10984 2011-08-01 Yannick Moy <moy@adacore.com>
10986 * sinfo.ads, errout.ads: Typos in comments.
10988 2011-08-01 Robert Dewar <dewar@adacore.com>
10990 * par-endh.adb: Minor reformatting.
10992 2011-08-01 Robert Dewar <dewar@adacore.com>
10994 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10995 (Pre_Post_Aspects): New subtype.
10996 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10997 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10998 * par-ch7.adb (P_Package): Remove Decl parameter
10999 (P_Package): Handle new syntax for aspects (before IS)
11000 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11002 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11003 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11004 (P_Package): Remove Decl parameter
11005 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11007 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11009 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11010 * sinfo.ads: Document new syntax for aspects in packages etc.
11011 * sprint.adb: Handle new syntax of aspects before IS in package
11013 2011-08-01 Thomas Quinot <quinot@adacore.com>
11015 * atree.ads: Minor reformatting.
11016 * sem_prag.adb: Minor reformatting.
11018 2011-08-01 Robert Dewar <dewar@adacore.com>
11020 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11021 case expr alternative.
11023 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11025 * sem_ch12.adb: Fix typo.
11027 2011-08-01 Geert Bosch <bosch@adacore.com>
11029 * sem_prag.adb (Check_No_Link_Name): New procedure.
11030 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11031 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11032 instead of Standard_Long_Long_Float_Size global. Preparation for
11033 eventual removal of per type constants.
11034 * exp_util.ads (Get_Stream_Size): New function returning the stream
11035 size value of subtype E.
11036 * exp_util.adb (Get_Stream_Size): Implement new function.
11037 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11039 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11041 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11043 2011-08-01 Geert Bosch <bosch@adacore.com>
11045 * cstand.adb: Fix comments.
11046 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11047 count of arguments.
11049 2011-08-01 Robert Dewar <dewar@adacore.com>
11051 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11053 2011-08-01 Geert Bosch <bosch@adacore.com>
11055 * atree.ads: Fix comment.
11057 2011-08-01 Robert Dewar <dewar@adacore.com>
11059 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11060 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11061 * par.adb: Add with for Namet.Sp.
11062 * par-tchk.adb: Minor reformatting.
11064 2011-08-01 Vincent Celier <celier@adacore.com>
11066 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11067 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11068 of the init procedure of a SAL.
11069 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11072 2011-08-01 Thomas Quinot <quinot@adacore.com>
11074 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11077 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11079 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11081 2011-08-01 Thomas Quinot <quinot@adacore.com>
11083 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11084 conformant with its spec (return True only for types that have
11085 an overriding Initialize primitive operation that prevents them from
11086 having preelaborable initialization).
11087 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11088 initialization for controlled types in Ada 2005 or later mode.
11090 2011-08-01 Robert Dewar <dewar@adacore.com>
11092 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11094 (Same_Aspect): New function.
11095 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11096 Type_Invariant, Precondition, Postcondition.
11097 * snames.ads-tmpl: Add Name_Type_Invariant.
11099 2011-08-01 Robert Dewar <dewar@adacore.com>
11101 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11103 (Freeze_All_Ent): Fix error in handling inherited aspects.
11104 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11105 already analyzed, but don't skip entire processing of a declaration,
11106 that's wrong in some cases of declarations being rewritten.
11107 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11108 Don't delay for integer, string literals
11109 Treat predicates in usual manner for delay, remove special case code,
11111 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11112 (Build_Predicate_Function): Update saved expression in aspect
11113 (Build_Invariant_Procedure): Update saved expression in aspect
11114 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11115 of replacement of discriminant references if the reference is simple.
11117 2011-08-01 Robert Dewar <dewar@adacore.com>
11119 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11120 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11121 Static_Predicate and Dynamic_Predicate.
11122 (Build_Predicate_Function): Add processing for Static_Predicate
11123 and Dynamic_Predicate.
11124 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11125 (From_Static_Predicate): New flag
11126 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11128 2011-08-01 Robert Dewar <dewar@adacore.com>
11130 * usage.adb: Documentation cleanup for Ada version modes in usage.
11131 * expander.adb: Minor reformatting.
11133 2011-08-01 Robert Dewar <dewar@adacore.com>
11135 * atree.ads: Minor comment fix.
11136 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11137 a-witeio.ads, sem_prag.adb: Minor reformatting.
11139 2011-08-01 Doug Rupp <rupp@adacore.com>
11141 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11142 pointers. Use descrip.h header file for convenience. Add some
11145 2011-08-01 Robert Dewar <dewar@adacore.com>
11147 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11148 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11149 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11151 (Check_Aspect_At_End_Of_Declarations): New procedure
11152 (Analye_Aspect_Specification): Minor changes for above procedures
11153 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11154 specification node as well.
11156 2011-08-01 Pascal Obry <obry@adacore.com>
11158 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11159 Windows files. Use GetFilesAttributes() in this case to check for file
11160 existence instead of returning with an error code.
11162 2011-08-01 Vincent Celier <celier@adacore.com>
11164 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11165 High is above Source length.
11167 2011-08-01 Robert Dewar <dewar@adacore.com>
11169 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11171 2011-08-01 Robert Dewar <dewar@adacore.com>
11173 * aspects.ads (Boolean_Aspects): New subtype.
11174 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11175 for derived types in cases where the parent type and derived type have
11177 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11178 with aspects when parent type also has aspects.
11179 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11180 boolean expression at this point).
11181 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11182 accordance with final decision on the Ada 2012 feature.
11183 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11185 2011-08-01 Matthew Heaney <heaney@adacore.com>
11187 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11189 2011-08-01 Pascal Obry <obry@adacore.com>
11191 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11192 Fix Replace_Slice when High is above current string size.
11193 (Replace_Slice): Fix DL computation when High is above current
11196 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11198 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11200 2011-08-01 Matthew Heaney <heaney@adacore.com>
11202 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11205 2011-08-01 Pascal Obry <obry@adacore.com>
11207 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11210 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11212 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11213 access to protected subprograms in generic bodies.
11214 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11215 protected type, indicate that the convention of the subprogram is
11216 Convention_Protected, because it may be used in subsequent declarations
11217 within the protected declaration.
11219 2011-08-01 Vincent Celier <celier@adacore.com>
11221 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11222 and "final" procedures when the name of the library is "ada", to avoid
11223 duplicate symbols "adainit" and "adafinal" in executables.
11225 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11227 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11228 quantified expression that appears within a postcondition and uses the
11229 Ada2012 'Result attribute.
11231 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11233 * init.c (__gnat_error_handler): Cast reason to int.
11234 (__gnat_install_handler): Explain sa_sigaction use.
11236 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11238 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11239 subprogram has copy-in copy-out parameters, try to promote the mode of
11240 the return type if it is passed in registers.
11242 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11244 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11245 left operand as addressable.
11247 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11249 * gcc-interface/gigi.h (build_function_stub): Remove.
11250 (build_return_expr): Likewise.
11251 (convert_vms_descriptor): Declare.
11252 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11253 (build_function_stub): Move to...
11254 * gcc-interface/utils2.c (build_return_expr): Move to...
11255 * gcc-interface/trans.c (build_function_stub): ...here.
11256 (build_return_expr): ...here.
11257 (Subprogram_Body_to_gnu): Add local variable for language_function.
11258 Disconnect the parameter attributes cache, if any, once done with it.
11259 Call end_subprog_body only after setting the end_locus.
11260 Build the stub associated with the function, if any, at the very end.
11261 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11262 variables and streamline control flow.
11264 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11267 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11268 g-trasym-dwarf.adb.
11270 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11273 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11274 Assign to act.sa_sigaction.
11275 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11276 current->return_address to char * before arithmetic.
11278 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11280 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11281 Correct argument types.
11282 Extract code from reason.
11283 (__gnat_install_handler): Assign to act.sa_sigaction.
11285 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11287 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11288 (GNAT1_OBJS): ...here.
11290 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11293 * g-socthi-mingw.adb (Fill): Fix formatting.
11295 * gcc-interface/gigi.h: Move around comment.
11297 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11300 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11302 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11305 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11307 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11309 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11310 range comparison if Pmode is SImode.
11312 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11313 Eric Botcazou <ebotcazou@adacore.com>
11315 * adadecode.c: Wrap up in extern "C" block.
11316 * adadecode.h: Likewise.
11317 * adaint.c: Likewise. Remove 'const' keyword.
11318 * adaint.h: Likewise.
11319 * argv.c: Likewise.
11320 * atree.h: Likewise.
11322 * cstreams.c: Likewise.
11324 * exit.c: Likewise.
11326 * final.c: Likewise.
11327 * init.c: Likewise.
11328 * initialize.c: Likewise.
11329 * link.c: Likewise.
11330 * namet.h: Likewise.
11331 * nlists.h: Likewise.
11332 * raise.c: Likewise.
11333 * raise.h: Likewise.
11334 * repinfo.h: Likewise.
11335 * seh_init.c: Likewise.
11336 * targext.c: Likewise.
11337 * tracebak.c: Likewise.
11338 * uintp.h: Likewise.
11339 * urealp.h: Likewise.
11340 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11341 * xsinfo.adb: Likewise.
11342 * xsnamest.adb: Likewise.
11343 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11344 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11345 * gcc-interface/misc.c: Likewise.
11346 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11347 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11348 ada/targext.o here...
11349 (GNAT_ADA_OBJS): ...and not here.
11350 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11351 (GNATBIND_OBJS): Reorder.
11353 2011-07-07 Richard Henderson <rth@redhat.com>
11355 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11356 dwarf2out_frame_init.
11358 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11360 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11362 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11365 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11367 2011-07-06 Richard Guenther <rguenther@suse.de>
11369 * gcc-interface/misc.c (gnat_init): Merge calls to
11370 build_common_tree_nodes and build_common_tree_nodes_2.
11371 Re-initialize boolean_false_node.
11373 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11374 Olivier Hainque <hainque@adacore.com>
11375 Nicolas Setton <setton@adacore.com>
11377 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11378 the type according to the ARTIFICIAL_P parameter.
11379 (create_type_decl): Likewise.
11380 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11382 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11384 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11385 (gnatbind): Likewise.
11387 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11389 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11391 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11393 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11394 local variable throughout. Remove useless call to Base_Type.
11395 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11396 Take it also into account for the volatileness of the field. Set the
11397 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11399 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11401 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11402 on a dereference built for a by-ref object if it has an address clause.
11404 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11406 * einfo.ads (Address_Taken): Document use for the second argument of
11407 Asm_Input and Asm_Output attributes.
11408 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11409 argument is an entity name, then set Address_Taken on it.
11410 <Attribute_Asm_Output>: Likewise.
11411 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11412 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11413 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11414 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11416 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11418 PR middle-end/46500
11419 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11421 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11423 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11424 (ada/utils.o): Update dependencies.
11425 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11426 ../../../libcpp/libcpp.a.
11427 * gcc-interface/utils.c: Include common/common-target.h.
11428 (process_attributes): Use targetm_common.have_named_sections.
11430 2011-06-07 Richard Guenther <rguenther@suse.de>
11432 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11435 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11437 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11438 TREE_THIS_NOTRAP flag.
11440 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11442 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11445 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11447 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11448 constants whose full view has discriminants specially.
11450 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11452 * gcc-interface/utils.c: Include diagnostic.h.
11453 (gnat_write_global_declarations): Output debug information for all
11454 global type declarations before finalizing the compilation unit.
11455 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11457 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11459 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11461 2011-05-25 Kai Tietz <ktietz@redhat.com>
11463 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11464 initialization instead of const/none-const pointer assignment.
11466 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11468 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11469 $(EXTRA_GNAT1_OBJS).
11470 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11471 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11472 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11473 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11474 libcommon-target.a instead of prefix.o.
11476 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11479 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11481 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11483 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11484 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11485 instead of version.o.
11487 2011-05-18 Kai Tietz <ktietz@redhat.com>
11489 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11490 boolean_false_node instead of integer_zero_node.
11491 (convert_with_check): Likewise.
11492 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11494 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11496 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11497 type of the parameter is an unconstrained array, convert the actual to
11498 the type of the formal in the In Out and Out cases as well.
11500 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11502 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11503 call build_function_type_array or build_varargs_function_type_array
11505 (create_subprog_type): Don't call build_function_type; call
11506 build_function_type_vec instead.
11508 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11510 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11511 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11512 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11514 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11516 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11518 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11519 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11521 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11523 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11525 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11527 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11528 instead of accessing TYPE_ARG_TYPES directly.
11529 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11531 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11534 * gcc-interface/gigi.h (get_variant_part): Declare.
11535 * gcc-interface/decl.c (get_variant_part): Make global.
11536 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11537 types have the same constant size, are record types and T1 has a
11538 variant part while T2 doesn't.
11540 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11542 * gcc-interface/utils.c (begin_subprog_body): Do not call
11544 (end_subprog_body): Likewise.
11546 2011-05-04 Richard Guenther <rguenther@suse.de>
11548 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11550 (pos_to_constructor): Likewise.
11552 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11553 Eric Botcazou <ebotcazou@adacore.com>
11555 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11556 of build_function_type. Adjust calls to...
11557 (build_raise_check): ...this. Do not take a void_tree parameter.
11558 Call build_function_type_list instead of build_function_type.
11559 Fix head comment and swap couple of conditional blocks.
11561 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11563 * gnatvsn.ads (Library_Version): Bump to 4.7.
11564 (Current_Year): Bump to 2011.
11566 2011-04-29 Michael Matz <matz@suse.de>
11568 * gcc-interface/misc.c (gnat_handle_option): Set
11569 warn_maybe_uninitialized.
11571 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11573 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11574 the Watson/McCabe paper.
11576 2011-04-23 Jim Meyering <meyering@redhat.com>
11578 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11580 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11582 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11585 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11587 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11589 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11590 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11591 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11592 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11593 <all>: Do not set flags on the reused DECL node coming from an alias.
11594 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11595 don't need debug info here...
11596 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11597 (gigi): Adjust calls to create_subprog_decl.
11598 (build_raise_check): Likewise.
11599 (establish_gnat_vms_condition_handler): Likewise.
11600 (Compilation_Unit_to_gnu): Likewise.
11601 (gnat_to_gnu): Likewise.
11603 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11605 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11606 (NO_REORDER_ADAFLAGS): New variable.
11607 (EXTRA_GNATTOOLS): Always define.
11608 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11609 Clean up and adjust list of files compiled with special options.
11610 * gcc-interface/Make-lang.in: Likewise.
11611 (ada/decl.o): Cosmetical change.
11612 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11614 2011-04-20 Jim Meyering <meyering@redhat.com>
11616 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11618 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11620 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11621 $(CFLAGS) on the link line.
11623 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11625 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11626 padded type built for the return type if it is unconstrained.
11628 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11630 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11632 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11634 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11635 before calling TREE_CHAIN.
11636 * gcc-interface/misc.c (gnat_init_ts): New function.
11637 (LANG_HOOKS_INIT_TS): Define.
11639 2011-04-12 Martin Jambor <mjambor@suse.cz>
11641 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11642 instead of cgraph_node.
11644 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11646 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11647 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11650 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11652 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11653 of aggregate types that contain a placeholder.
11655 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11657 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11659 (handle_type_generic_attribute): Likewise.
11661 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11664 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11666 2011-04-04 Kai Tietz <ktietz@redhat.com>
11669 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11672 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11674 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11675 type case, do not strip a padding type around the array type.
11677 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11679 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11682 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11684 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11685 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11686 code for -feliminate-unused-debug-types.
11687 (gnat_post_options): Likewise.
11689 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11691 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11692 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11695 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11697 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11698 DECL_ARTIFICIAL flag on enumeration types.
11700 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11702 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11703 fat pointer types artificial unconditionally.
11704 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11707 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11709 * gcc-interface/gigi.h (get_dummy_type): Declare.
11710 (build_dummy_unc_pointer_types): Likewise.
11711 (finish_fat_pointer_type): Likewise.
11712 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11713 fat pointer type has been built, complete it in place.
11714 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11715 and thin pointers. Remove useless variable.
11716 (finish_fat_pointer_type): Make global and move to...
11717 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11718 (get_dummy_type): New function.
11719 (build_dummy_unc_pointer_types): Likewise.
11720 (gnat_pushdecl): Propage the name to the anonymous variants only.
11721 (update_pointer_to): Only adjust the pointer types in the unconstrained
11724 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11726 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11727 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11728 if this is a Taft amendment type and the full declaration is available.
11729 * gcc-interface/trans.c (process_type): Likewise.
11730 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11731 (process_freeze_entity): Likewise.
11732 * gcc-interface/utils.c (dummy_global): New static variable.
11733 (gnat_write_global_declarations): If there are types declared as used
11734 at the global level, insert them in the global hash table.
11736 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11738 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11739 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11740 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11742 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11743 flag of the type accordingly.
11744 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11746 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11748 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11749 finalizing types when updating the pointers to the designated type.
11750 <all>: Finalize the deferred types even if we didn't defer processing
11751 of incomplete types in this invocation.
11753 2011-04-01 Olivier Hainque <hainque@adacore.com>
11754 Nicolas Setton <setton@adacore.com>
11755 Eric Botcazou <ebotcazou@adacore.com>
11757 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11758 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11760 2011-03-28 Kai Tietz <ktietz@redhat.com>
11762 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11764 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11765 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11767 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11769 2011-03-28 Tristan Gingold <gingold@adacore.com>
11772 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11773 Use ada output of gnatbind.
11774 (ada/b_gnatb.adb): Ditto.
11775 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11776 (ada.mostlyclean, ada.stage1)
11777 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11778 (ada.stagefeedback): Adjust.
11779 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11780 Use ada output of gnatbind.
11781 (b_gnatm.adb): Ditto.
11782 (b_gnatl.o, b_gnatm.o): New rules.
11784 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11786 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11787 for the padded type built to support a specified size or alignment.
11789 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11791 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11792 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11793 unconditionally to the end of the unit when the designated type is
11795 <all>: Rename local variable. Attempt to un-defer types only and do it
11796 for limited_with'ed types as well.
11797 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11798 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11799 consistently and remove redundant call to finalize_from_with_types.
11801 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11803 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11804 subprograms without a previous spec declared in the same unit.
11805 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11806 subprograms at the end of the unit instead of at the beginning.
11807 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11808 isn't public for the special handling of non-inline functions nested
11809 inside inline external functions.
11811 2011-03-25 Jeff Law <law@redhat.com>
11813 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11815 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11817 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11818 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11819 to compute Set_Size_Depends_On_Discriminant.
11820 (Layout_Type): Call it on array types in back-end layout mode.
11821 * sem_util.adb (Requires_Transient_Scope): Return true for array
11822 types only if the size depends on the value of discriminants.
11823 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11824 type if the RHS is a call to a function that returns an unconstrained
11825 type with default discriminant.
11827 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11829 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11830 non-conversion to the nominal result type at the end.
11832 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11834 * gcc-interface/trans.c (create_temporary): New function taken from...
11835 (create_init_temporary): ...here. Call it.
11836 (call_to_gnu): Create the temporary for the return value early, if any.
11837 Create it for a function with copy-in/copy-out parameters if there is
11838 no target; in other cases of copy-in/copy-out, use another temporary.
11839 Push the new binding level lazily. Add and rename local variables.
11841 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11843 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11845 (set_rm_size): Likewise.
11847 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11849 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11850 for the padded type built in order to support a specified alignment.
11851 Fix incorrect formatting.
11853 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11856 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11858 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11860 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11861 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11862 to the end of the list. Adjust recursive call. Rename local variable.
11863 If REORDER is true, reorder components of the record type.
11864 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11865 components_to_record and adjust the parameter list.
11867 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11869 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11870 disabled, use the variable for bounds of loop iteration scheme.
11872 2011-03-21 Kai Tietz <ktietz@redhat.com>
11875 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11877 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11879 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11880 out whether the expression is read-only. Short-circuit placeholder
11881 case and rename a couple of local variables.
11883 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11885 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11886 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11887 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11888 (convert): Deal with conversions from a smaller form type specially.
11890 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11892 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11893 its argument, except for the special -I- switch.
11895 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11897 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11900 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11902 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11904 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11906 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11908 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11909 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11910 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11911 Do not generate the check directly, instead instantiate the template
11912 check present in the descriptor.
11913 (make_descriptor_field): Move around.
11914 (build_vms_descriptor32): Build a template check in the POINTER field.
11915 (build_vms_descriptor): Remove useless suffixes.
11916 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11918 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11921 * targext.c: Include target files if IN_RTS is defined.
11923 2011-01-26 Richard Guenther <rguenther@suse.de>
11926 * targext.c: Include config.h.
11927 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11930 2011-01-04 Pascal Obry <obry@adacore.com>
11931 Eric Botcazou <ebotcazou@adacore.com>
11933 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11935 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11937 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11938 end-of-case on the end label and its associated gotos, if any.
11940 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11942 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11943 expressions of the parameter cache within the statement group of
11944 the CICO mechanism.
11946 2011-01-04 Olivier Hainque <hainque@adacore.com>
11947 Eric Botcazou <ebotcazou@adacore.com>
11949 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11950 (set_end_locus_from_node): New function.
11951 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11952 make and the function end_locus.
11953 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11954 for the elaboration subprogram.
11955 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11956 set the end_locus of the expression as well.
11958 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11961 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11962 variables that are referenced in exception handlers volatile.
11966 Copyright (C) 2011 Free Software Foundation, Inc.
11968 Copying and distribution of this file, with or without modification,
11969 are permitted in any medium without royalty provided the copyright
11970 notice and this notice are preserved.
11972 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11973 - fix bugs in the description of Source_Trace;
11974 - get rid of UNIT_NAME;
11976 2011-08-02 Javier Miranda <miranda@adacore.com>
11979 (Build_Dispatching_Requeue): Adding support for VM targets
11980 since we cannot directly reference the Tag entity.
11981 * exp_sel.adb (Build_K): Adding support for VM targets.
11982 (Build_S_Assignment): Adding support for VM targets.
11984 (Default_Prim_Op_Position): In VM targets do not restrict availability
11985 of predefined interface primitives to compiling in Ada 2005 mode.
11986 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11987 restricted to compiling in Ada 2005 mode.
11988 (Make_VM_TSD): Generate code that declares and initializes the OSD
11989 record. Needed to support dispatching calls through synchronized
11992 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11993 primitives associated with synchronized interfaces.
11994 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11995 primitives associated with synchronized interfaces.
11997 2011-08-02 Yannick Moy <moy@adacore.com>
11999 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12000 statements hidden in SPARK if preceded by the HIDE directive
12001 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12002 exception handlers as hidden in SPARK if preceded by the HIDE directive
12003 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12004 if starting with the HIDE directive
12005 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12006 starting with the HIDE directive; mark the declarations in a private
12007 part as hidden in SPARK if the private part starts with the HIDE
12009 * restrict.adb, restrict.ads
12010 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12011 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12012 argument node belongs to a part which is hidden in SPARK
12013 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12014 parts in SPARK; protect the possibly costly call to
12015 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12016 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12017 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12018 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12020 (Scan): recognize special comment starting with '#' and followed by
12021 SPARK keyword "hide" as a HIDE directive.
12023 2011-08-02 Yannick Moy <moy@adacore.com>
12025 * types.ads, erroutc.ads: Minor reformatting.
12027 2011-08-02 Vincent Celier <celier@adacore.com>
12029 * link.c: Add response file support for cross platforms.
12031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12033 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12034 in an association, set parent field of copy before partial analysis.
12035 * sem_res.adb (Resolve_Slice): create reference to itype only when
12036 expansion is enabled.
12038 2011-08-02 Yannick Moy <moy@adacore.com>
12040 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12041 for new flag denoting which subprogram bodies are in ALFA
12042 * restrict.adb, sem_ch7.adb: Update comment
12043 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12044 sem_ch9.adb, sem_res.adb: Add calls to
12045 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12046 * sem_ch6.adb (Analyze_Function_Return): add calls to
12047 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12048 middle of the body, and extended return.
12049 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12050 False when missing return.
12051 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12052 to True for subprograms whose spec is in ALFA. Remove later on the flag
12053 on the entity used for a subprogram body when there exists a separate
12055 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12056 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12057 False, otherwise do nothing.
12059 2011-08-02 Robert Dewar <dewar@adacore.com>
12061 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12063 2011-08-02 Yannick Moy <moy@adacore.com>
12065 * sem_ch4.ads: minor formatting.
12067 2011-08-02 Yannick Moy <moy@adacore.com>
12069 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12070 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12071 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12072 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12073 opt.ads: cleanup of SPARK mode
12075 2011-08-02 Yannick Moy <moy@adacore.com>
12077 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12079 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12080 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12082 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12083 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12084 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12085 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12087 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12089 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12090 functions whose return type is not in ALFA.
12091 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12093 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12094 parameter's type is not in ALFA.
12095 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12098 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12100 * sem_ch6 (Analyze_Expression_Function): treat the function as
12101 Inline_Always, and introduce a subprogram declaration for it when it is
12103 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12104 expression functions, so that the back-end can determine whether they
12105 can in fact be inlined.
12106 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12107 a function body comes from an expression function.
12109 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12111 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12112 null exclusions to test Can_Never_Be_Null on the anonymous access types
12113 of the formals rather than testing the formals themselves. Exclude this
12114 check in cases where the Old_Formal is marked as a controlling formal,
12115 to avoid issuing spurious errors for bodies completing dispatching
12116 operations (due to the flag not getting set on controlling access
12117 formals in body specs).
12118 (Find_Corresponding_Spec): When checking full and subtype conformance of
12119 subprogram bodies in instances, pass Designated and E in that order, for
12120 consistency with the expected order of the formals (New_Id followed by
12123 2011-08-02 Robert Dewar <dewar@adacore.com>
12125 * sem_ch8.adb: Minor reformatting.
12127 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12129 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12130 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12131 primitive operations of class-wide actuals.
12133 2011-08-02 Javier Miranda <miranda@adacore.com>
12135 * exp_atag.ads, exp_atag.adb
12136 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12137 since its value is implicitly passed in argument Typ.
12138 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12139 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12140 Build_Common_Dispatching_Select_Statements.
12142 2011-08-02 Robert Dewar <dewar@adacore.com>
12144 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12145 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12146 Minor reformatting.
12148 2011-08-02 Robert Dewar <dewar@adacore.com>
12150 * sem_res.adb: Minor reformatting.
12151 * sem_prag.adb: Minor reformatting.
12153 2011-08-02 Javier Miranda <miranda@adacore.com>
12155 * exp_atag.adb, exp_atags.ads
12156 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12157 by the tagged type Entity. Required to use this routine in the VM
12158 targets since we do not have available the Tag entity in the VM
12161 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12162 Ada.Tags has not been previously loaded.
12164 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12165 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12167 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12168 view of enclosing scopes. Required to handle enclosing scopes that
12169 are synchronized types whose full view is a task type.
12171 (Build_VM_TSDs): Minor code improvement to avoid generating and
12172 analyzing lists with empty nodes.
12173 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12174 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12175 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12176 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12177 (Make_Select_Specific_Data_Table): Add support for VM targets.
12178 (Make_VM_TSD): Generate code to initialize the SSD structure of
12181 2011-08-02 Yannick Moy <moy@adacore.com>
12183 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12184 cross-references section in ALI.
12185 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12186 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12188 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12189 subprogram or package entity of a node
12190 (Is_Local_Reference_Type): new function returns True for references
12191 selected in local cross-references.
12192 (Lt): function extracted from Lt in Output_References
12193 (Write_Entity_Name): function extracted from Output_References
12194 (Generate_Definition): generate reference with type 'D' for definition
12195 of objects (object declaration and parameter specification), with
12196 appropriate locations and units, for use in local cross-references.
12197 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12198 references of type 'I' for initialization in object definition.
12199 (Output_References): move part of function Lt and procedure
12200 Write_Entity_Name outside of the body. Ignore references of types 'D'
12201 and 'I' introduced for local cross-references.
12202 (Output_Local_References): new procedure to output the local
12203 cross-references sections.
12204 (Lref_Entity_Status): new array defining whether an entity is a local
12205 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12206 with 'I' type when initialization expression is present.
12207 * get_scos.adb, get_scos.ads: Correct comments and typos
12209 2011-08-02 Javier Miranda <miranda@adacore.com>
12211 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12213 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12215 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12218 2011-08-02 Vincent Celier <celier@adacore.com>
12220 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12221 (No_Space_Img): New function
12222 (Find_Excluded_Sources): When reading from a file, record the file name
12223 and the line number for each excluded source.
12224 (Mark_Excluded_Sources): When reporting an error, if the excluded
12225 sources were read from a file, include file name and line number in
12228 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12230 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12232 2011-08-02 Robert Dewar <dewar@adacore.com>
12234 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12236 2011-08-02 Javier Miranda <miranda@adacore.com>
12238 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12239 generation of TSDs to the DOTNET compiler.
12240 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12241 generation of TSDs to the DOTNET compiler.
12243 2011-08-02 Javier Miranda <miranda@adacore.com>
12245 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12246 record of all the tagged types declared inside library level package
12247 declarations, library level package bodies or library level subprograms.
12248 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12249 associated with a given tagged type.
12250 (Build_VM_TSDs): New subprogram.
12251 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12252 compilation units that are subprograms.
12253 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12254 compilation units that are package bodies.
12255 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12256 units that are a package declaration or a package instantiation.
12257 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12258 reorganization to improve the error generated by the frontend when the
12259 function Ada.Tags.Secondary_Tag is not available.
12260 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12261 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12263 2011-08-02 Javier Miranda <miranda@adacore.com>
12265 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12267 2011-08-02 Robert Dewar <dewar@adacore.com>
12269 * s-imenne.ads: Minor reformatting.
12271 2011-08-02 Robert Dewar <dewar@adacore.com>
12273 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12274 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12275 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12277 2011-08-02 Robert Dewar <dewar@adacore.com>
12279 * einfo.ads (Materialize_Entity): Document this is only for renamings
12280 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12281 required debug information in the case where we transform the object
12282 declaration into a renaming declaration.
12283 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12285 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12286 Materialize_Entity.
12288 2011-08-02 Robert Dewar <dewar@adacore.com>
12290 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12291 Suppress_Init_Procs.
12292 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12293 Suppress_Initialization/Initialization_Suppressed.
12294 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12295 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12296 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12297 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12299 2011-08-02 Robert Dewar <dewar@adacore.com>
12301 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12302 Minor reformatting.
12304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12306 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12307 only have inheritable classwide pre/postconditions.
12309 2011-08-02 Javier Miranda <miranda@adacore.com>
12311 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12312 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12313 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12314 checks if the external tag of a type is the same as the external tag
12315 of some other declaration.
12317 2011-08-02 Thomas Quinot <quinot@adacore.com>
12319 * s-taskin.ads: Minor reformatting.
12321 2011-08-02 Emmanuel Briot <briot@adacore.com>
12323 * g-comlin.adb (Display_Help): swap the order in which it prints the
12324 short help and the general usage.
12326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12328 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12329 the aspect declarations and attach them to the generic copy for
12330 subsequent analysis.
12331 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12332 declarations of the generic tree to the new subprogram declarations.
12333 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12334 conditions that apply to a subprogram instance.
12336 2011-08-02 Robert Dewar <dewar@adacore.com>
12338 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12340 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12342 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12343 private type with a tagged full view is not derived in the immediate
12344 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12346 2011-08-02 Robert Dewar <dewar@adacore.com>
12348 * exp_ch4.adb: Minor reformatting.
12350 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12352 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12353 Ada2012 iterator, the loop will be rewritten during expansion into a
12354 while loop with a cursor and an element declaration. Do not analyze the
12355 body in this case, because if the container is for indefinite types the
12356 actual subtype of the elements will only be determined when the cursor
12357 declaration is analyzed.
12359 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12361 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12362 size/alignment related attributes in CodePeer_Mode.
12364 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12366 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12367 Prepend_Element, since this can result in the operation getting the
12368 wrong slot in the full type's dispatch table if the full type has
12369 inherited operations. The incomplete type's operation will get added
12370 to the proper position in the full type's primitives
12371 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12372 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12373 dispatching operations, since there are cases where nonprimitive
12374 subprograms can get added to the list of incomplete dependents (such
12375 as subprograms in nested packages).
12376 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12377 private part when determining whether to add a primitive with a
12378 parameter of a tagged incomplete type to the Private_Dependents list.
12379 Such primitives can also occur in the visible part, and should not have
12380 been excluded from being private dependents.
12381 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12382 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12383 list of a Taft-amendment incomplete type is a primitive before issuing
12384 an error that the full type must appear in the same unit. There are
12385 cases where nonprimitives can be in the list (such as subprograms in
12387 * sem_disp.adb (Derives_From): Use correct condition for checking that
12388 a formal's type is derived from the type of the corresponding formal in
12389 the parent subprogram (the condition was completely wrong). Add
12390 checking that was missing for controlling result types being derived
12391 from the result type of the parent operation.
12393 2011-08-02 Yannick Moy <moy@adacore.com>
12395 * errout.adb (First_Node): minor renaming
12396 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12399 2011-08-02 Yannick Moy <moy@adacore.com>
12401 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12402 before accessing operands.
12403 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12404 decide whether an initialization expression respects SPARK rules, as
12405 the plain node is the expanded one. This allows for more valid warnings
12407 * gnat_rm.texi: Minor update.
12409 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12411 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12414 2011-08-02 Robert Dewar <dewar@adacore.com>
12416 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12418 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12420 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12421 loop statements and the element renaming declaration with a block when
12422 the element type is controlled.
12424 2011-08-02 Yannick Moy <moy@adacore.com>
12426 * sinfo.ads: Minor formatting.
12428 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12430 * sem_aggr.adb (Add_Association): if the association has a box and no
12431 expression, use the Sloc of the aggregate itself for the new
12433 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12436 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12438 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12439 When a container is provided via a function call, generate a renaming
12440 of the function result. This avoids the creation of a transient scope
12441 and the premature finalization of the container.
12442 * exp_ch7.adb (Is_Container_Cursor): Removed.
12443 (Wrap_Transient_Declaration): Remove the supression of the finalization
12444 of the list controller when the declaration denotes a container cursor,
12447 2011-08-02 Yannick Moy <moy@adacore.com>
12449 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12450 node is from source, instead of the original node being from source.
12452 (Resolve_Array_Aggregate): refine the check for a static expression, to
12453 recognize also static ranges
12454 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12455 Array_Type_Declaration): postpone the test for the type being a subtype
12456 mark after the type has been resolved, so that component-selection and
12457 expanded-name are discriminated.
12458 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12459 to distinguish the case of an iteration scheme, so that an error is
12460 issed on a non-static range in SPARK except in an iteration scheme.
12461 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12462 In_Iter_Schm = True.
12463 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12464 user-defined operators so that they are allowed in renaming
12466 (Find_Selected_Component): refine the check for prefixing of operators
12467 so that they are allowed in renaming. Move the checks for restrictions
12468 on selector name after analysis discriminated between
12469 component-selection and expanded-name.
12470 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12471 concatenation argument of string type if it is static.
12472 * sem_util.adb, sem_util.ads
12473 (Check_Later_Vs_Basic_Declarations): add a new function
12474 Is_Later_Declarative_Item to decice which declarations are allowed as
12475 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12476 mode, add that renamings are considered as later items.
12477 (Enclosing_Package): new function to return the enclosing package
12478 (Enter_Name): correct the rule for homonyms in SPARK
12479 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12480 from source (result of expansion) to avoid issuing wrong warnings.
12482 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12484 * errout.adb: On anything but an expression First_Node returns its
12487 2011-08-02 Pascal Obry <obry@adacore.com>
12489 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12491 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12493 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12494 Set the associated loop as the related expression of internally
12496 * exp_ch7.adb (Is_Container_Cursor): New routine.
12497 (Wrap_Transient_Declaration): Supress the finalization of the list
12498 controller when the declaration denotes a container cursor.
12500 2011-08-02 Yannick Moy <moy@adacore.com>
12502 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12504 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12505 expression is a simple expression. This check cannot be performed in
12506 the semantics, so just drop it.
12507 (P_Index_Or_Discriminant_Constraint): move check that the index or
12508 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12509 semantics. Other cases were previously checked in the semantics.
12510 * par-ch4.adb (P_Name): move checks that a selector name is not
12511 character literal or an operator symbol to Find_Selected_Component in
12513 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12514 declarations are not placed after later declarations in a separate
12515 procedure in Sem_Util (possibly not the best choice?), to be used both
12516 during parsing, for Ada 83 mode, and during semantic analysis, for
12518 * par-endh.adb (Check_End): move check that end label is not missing
12519 to Process_End_Label in the semantics
12520 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12521 the special case for SPARK restriction
12522 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12523 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12524 parameter Force to issue the error message even on internal node (used
12525 for generated end label). Call Check_Restriction to check when an error
12526 must be issued. In SPARK mode, issue an error message even if the
12527 restriction is not set.
12528 (Check_Restriction): new procedure with an additional out parameter to
12529 inform the caller that a message has been issued
12530 * sem_aggr.adb: Minor modification of message
12531 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12532 instead of issuing an error message directly
12533 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12534 declarations are not placed after later declarations, by calling
12535 Check_Later_Vs_Basic_Declarations
12536 (Analyze_Subtype_Declaration): move here the check that an index or
12537 discriminant constraint must be a subtype mark. Change the check that
12538 a subtype of String must start at one so that it works on subtype marks.
12539 * sem_ch4.adb (Analyze_Call): move here the check that a named
12540 association cannot follow a positional one in a call
12541 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12542 instead of issuing an error message directly
12543 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12544 selector name is not a character literal or an operator symbol. Move
12545 here the check that the prefix of an expanded name cannot be a
12546 subprogram or a loop statement.
12547 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12548 procedure called from parsing and semantics to check that basic
12549 declarations are not placed after later declarations
12550 (Process_End_Label): move here the check that end label is not missing
12552 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12554 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12555 representation clause in codepeer mode, since it confuses CodePeer and
12556 does not bring useful info.
12558 2011-08-02 Ed Falis <falis@adacore.com>
12560 * init.c: initialize fp hw on MILS.
12562 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12564 * errout.adb (First_Node): for bodies, return the node itself (small
12565 optimization). For other nodes, do not check source_unit if the node
12566 comes from Standard.
12568 2011-08-02 Robert Dewar <dewar@adacore.com>
12570 * exp_ch3.adb: Minor comment additions.
12571 * sem_ch13.adb: Minor reformatting.
12573 2011-08-02 Pascal Obry <obry@adacore.com>
12575 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12577 2011-08-02 Robert Dewar <dewar@adacore.com>
12579 * sem_attr.adb: Minor reformatting.
12581 2011-08-02 Robert Dewar <dewar@adacore.com>
12583 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12584 (Has_Default_Component_Value): Removed
12585 * einfo.ads Comment updates
12586 (Has_Default_Aspect): Replaces Has_Default_Value
12587 (Has_Default_Component_Value): Removed
12589 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12591 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12592 (Get_Simple_Init_Val): Handle Default_Value aspect
12593 (Needs_Simple_Initialization): Handle Default_Value aspect
12594 * exp_ch3.ads: Needs_Simple_Initialization
12595 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12596 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12598 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12599 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12600 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12602 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12604 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12605 package containing iteration primitives.
12606 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12608 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12610 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12611 "of", pre-analyze expression in case it is a function call with
12612 finalization actions that must be placed ahead of the loop.
12613 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12614 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12616 2011-08-02 Geert Bosch <bosch@adacore.com>
12618 * cstand.adb (Create_Float_Types): Only consider C's long double for
12619 Long_Long_Float, in addition to double.
12621 2011-08-02 Robert Dewar <dewar@adacore.com>
12623 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12624 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12625 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12626 Minor reformatting.
12628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12630 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12633 2011-08-02 Javier Miranda <miranda@adacore.com>
12635 * einfo.ads, einfo.adb
12636 (Original_Access_Type): Move this attribute to Node26 since there was
12637 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12638 which causes conflicts and breaks the generation of the .NET compiler.
12639 (Interface_Name): Add missing documentation on JGNAT only uses of
12642 2011-08-02 Geert Bosch <bosch@adacore.com>
12644 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12645 (Find_Back_End_Float_Type): Likewise
12646 (Create_Back_End_Float_Types): Likewise
12647 (Create_Float_Types): Likewise
12648 (Register_Float_Type): Likewise
12649 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12650 Nlist and split out type selection in new local Find_Base_Type function.
12651 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12653 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12655 2011-08-02 Robert Dewar <dewar@adacore.com>
12657 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12659 * opt.ads: Minor comment change.
12660 * sem_ch12.adb: Minor code reorganization.
12662 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12664 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12665 subtype's list of rep items to the list on the full subtype in the case
12666 where the lists are the same.
12668 2011-08-02 Geert Bosch <bosch@adacore.com>
12670 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12671 using the one from System.Strings, which also deallocates all strings.
12673 2011-08-02 Geert Bosch <bosch@adacore.com>
12675 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12677 * gcc-interface/Make-lang.in: Update dependencies.
12679 2011-08-02 Olivier Hainque <hainque@adacore.com>
12681 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12684 2011-08-02 Javier Miranda <miranda@adacore.com>
12686 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12687 associated with anonymous access to subprograms.
12689 2011-08-02 Geert Bosch <bosch@adacore.com>
12692 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12693 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12694 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12695 (Add_Symbol_Definition): Move to switch-c.adb
12696 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12697 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12698 (Add_Symbol_Definition): Move to switch-c.adb.
12699 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12701 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12702 Move to warnsw.adb.
12703 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12704 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12705 Move to warnsw.adb.
12706 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12707 (Add_Symbol_Definition): Moved from Prepcomp.
12708 * switch-c.ads: Update copyright notice. Use String_List instead of
12709 Argument_List, removing dependency on System.OS_Lib.
12711 2011-08-02 Yannick Moy <moy@adacore.com>
12713 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12714 mode on initialization expression which does not respect SPARK
12716 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12717 if the tree referenced by its argument represents an initialization
12718 expression in SPARK, suitable for initializing an object in an object
12721 2011-08-02 Javier Miranda <miranda@adacore.com>
12723 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12724 internally generated access to subprogram with its associated protected
12726 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12728 2011-08-02 Geert Bosch <bosch@adacore.com>
12730 * cstand.adb (Register_Float_Type): Print information about type to
12731 register, if the Debug_Flag_Dot_B is set.
12732 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12733 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12734 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12735 with a requested precision of more than Max_Digits digits and no more
12736 than Max_Base_Digits digits, if a range specification is present and the
12737 Predefined_Float_Types list has a suitable type to derive from.
12738 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12739 case of type completion with pragma Import
12741 (Process_Import_Predefined_Type): Processing to complete a type
12742 with pragma Import. Currently supports floating point types only.
12743 (Set_Convention_From_Pragma): Do nothing without underlying type.
12744 (Process_Convention): Guard against absence of underlying type,
12745 which may happen when importing incomplete types.
12746 (Process_Import_Or_Interface): Handle case of importing predefined
12747 types. Tweak error message.
12749 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12751 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12752 functions to previous change. Reorganize code slightly.
12754 2011-08-02 Geert Bosch <bosch@adacore.com>
12756 * back_end.ads (Register_Type_Proc): New call back procedure type for
12757 allowing the back end to provide information about available types.
12758 (Register_Back_End_Types): New procedure to register back end types.
12759 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12761 * cstand.adb (Back_End_Float_Types): New list for floating point types
12762 supported by the back end.
12763 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12764 (Copy_Float_Type): New procedure to make new copies of predefined types.
12765 (Register_Float_Type): New call back procedure to populate the BEFT list
12766 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12767 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12768 (Create_Float_Types): New procedure to create entities for floating
12769 point types predefined in Standard, and put these and any remaining
12770 BEFTs on the Predefined_Float_Types list.
12771 * stand.ads (Predefined_Float_Types): New list for predefined floating
12772 point types that do not have declarations in package Standard.
12774 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12776 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12777 entity node for the unit containing the parameter.
12778 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12779 (Add_Inlined_Subprogram): Likewise.
12780 * gcc-interface/Make-lang.in: Update dependencies.
12782 2011-08-02 Thomas Quinot <quinot@adacore.com>
12784 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12787 2011-08-02 Geert Bosch <bosch@adacore.com>
12789 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12791 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12793 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12794 computed value of Base_Type.
12796 2011-08-02 Yannick Moy <moy@adacore.com>
12798 * restrict.adb (Check_Restriction): issue an error for any use of
12799 class-wide, even if the No_Dispatch restriction is not set.
12800 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12801 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12802 when completing a private extension, the type named in the private part
12803 is not the same as that named in the visible part.
12804 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12805 of an inherited primitive operations of a tagged type or type extension
12806 that returns the tagged type.
12807 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12808 function which returns True for an implicit operation inherited by the
12809 derived type declaration for the argument type.
12810 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12815 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12816 Process_Bounds, to perform analysis with expansion of a range or an
12817 expression that is the iteration scheme for a loop.
12818 (Analyze_Iterator_Specification): If domain of iteration is given by a
12819 function call with a controlled result, as is the case if call returns
12820 a predefined container, ensure that finalization actions are properly
12822 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12824 2011-08-02 Javier Miranda <miranda@adacore.com>
12826 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12827 * gcc-interface/Make-lang.in: Update dependencies.
12829 2011-08-02 Javier Miranda <miranda@adacore.com>
12831 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12832 determine if the analysis is performed using N or Original_Node (N).
12833 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12834 functionality of routine Is_Variable avoids code duplication.
12835 * checks.adb (Determine_Range): Handle temporaries generated by
12836 Remove_Side_Effects.
12838 2011-08-02 Javier Miranda <miranda@adacore.com>
12840 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12841 expansion of the condition. Required since the previous analysis was
12842 done with expansion disabled (see Resolve_Quantified_Expression) and
12843 hence checks were not inserted and record comparisons have not been
12846 2011-08-02 Ed Falis <falis@adacore.com>
12848 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12851 2011-08-02 Bob Duff <duff@adacore.com>
12853 * opt.ads: Minor comment fix.
12855 2011-08-02 Bob Duff <duff@adacore.com>
12857 * sem_ch12.adb (Analyze_Package_Instantiation,
12858 Analyze_Subprogram_Instantiation): Turn off style checking while
12859 analyzing an instance. Whatever style checks that apply to the generic
12860 unit should apply, so it makes no sense to apply them in an instance.
12861 This was causing trouble when compiling an instance of a runtime
12862 unit that violates the -gnatyO switch.
12863 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12864 one of the two case statements, causing spurious errors.
12866 2011-08-02 Robert Dewar <dewar@adacore.com>
12868 * uname.adb: Minor reformatting.
12869 * gnatcmd.adb: Minor reformatting.
12870 * exp_attr.adb: Minor reformatting.
12872 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12874 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12875 No_Dispatching_Calls, do not look for the Assign primitive, because
12876 predefined primitives are not created in this case.
12878 2011-08-02 Bob Duff <duff@adacore.com>
12880 * stylesw.ads: Minor comment fixes.
12882 2011-08-02 Robert Dewar <dewar@adacore.com>
12884 * freeze.adb (Add_To_Result): New procedure.
12886 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12888 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12889 time, if the specific run-time routines for handling streams of strings
12890 are not available, use the default mechanism.
12892 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12894 * s-regpat.ads: Fix typo.
12896 2011-08-02 Vincent Celier <celier@adacore.com>
12898 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12899 not null, call it to create the in memory config project file without
12900 parsing an existing default config project file.
12902 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12904 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12906 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12908 * sem_elim.adb: an abstract subprogram does not need an eliminate
12909 pragma for its descendant to be eliminable.
12911 2011-08-02 Ed Falis <falis@adacore.com>
12913 * init.c: revert to handling before previous checkin for VxWorks
12914 * s-intman-vxworks.adb: delete unnecessary declarations related to
12915 using Ada interrupt facilities for handling signals.
12916 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12917 * s-intman-vxworks.ads: Import __gnat_install_handler as
12918 Initialize_Interrupts.
12919 * s-taprop-vxworks.adb: Delete Signal_Mask.
12920 (Abort_Handler): change construction of mask to unblock exception
12923 2011-08-02 Jerome Guitton <guitton@adacore.com>
12925 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12926 Debug_Raise_Exception before propagation starts.
12928 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12930 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12931 to Restriction_Check_Required.
12932 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12933 * sem_res.adb (Resolve_Call): Likewise.
12934 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12936 2011-08-02 Bob Duff <duff@adacore.com>
12938 * stylesw.ads: Update comment.
12939 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12940 * errout.ads: Remove obsolete comment.
12942 2011-08-02 Javier Miranda <miranda@adacore.com>
12944 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12945 (Set_Is_Safe_To_Reevaluate): new procedure.
12946 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12947 assignment is allowed on safe-to-reevaluate variables.
12948 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12949 temporary created to remove side effects in expressions that use
12950 the secondary stack as safe-to-reevaluate.
12951 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12952 variables that are not true constants.
12954 2011-08-02 Robert Dewar <dewar@adacore.com>
12956 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12957 sem_res.adb, sem_ch6.adb: Minor reformatting.
12959 2011-08-02 Jerome Guitton <guitton@adacore.com>
12961 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12963 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12965 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12966 not set Overridden_Operation if subprogram is an initialization
12969 2011-08-02 Yannick Moy <moy@adacore.com>
12971 * par-ch6.adb: Correct obsolete name in comments
12972 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12973 which takes two message arguments (existing function takes one), with
12974 second message used for continuation.
12975 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12976 block statements that originate from a source block statement, not
12977 generated block statements
12978 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12979 symmetry with procedure case
12980 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12981 function to issue an error in formal mode if a package specification
12982 contains more than one tagged type or type extension.
12983 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12984 parameters matching formals of tagged types are objects (or ancestor
12985 type conversions of objects), not general expressions. Issue an error
12986 on view conversions that are not involving ancestor conversion of an
12988 (Resolve_Type_Conversion): in formal mode, issue an error on the
12989 operand of an ancestor type conversion which is not an object
12990 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12991 procedure so that it works also for actuals of function calls
12992 (Is_Actual_Tagged_Parameter): new function which determines if its
12993 argument is an actual parameter of a formal of tagged type in a
12995 (Is_SPARK_Object_Reference): new function which determines if the tree
12996 referenced by its argument represents an object in SPARK
12998 2011-08-02 Robert Dewar <dewar@adacore.com>
13000 * sem_ch3.adb: Minor reformatting
13001 Minor comment addition
13002 Minor error msg text change
13004 2011-08-02 Javier Miranda <miranda@adacore.com>
13006 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13007 function. Used to be more precise when we generate a variable plus one
13008 assignment to remove side effects in the evaluation of the Bound
13010 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13011 of the bound expression to force its re-analysis and thus expand the
13012 associated transient scope (if required). Code cleanup replacing the
13013 previous code that declared the constant entity by an invocation to
13014 routine Force_Evaluation which centralizes this work in the frontend.
13016 2011-08-02 Robert Dewar <dewar@adacore.com>
13018 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13019 (Base_Type): Now uses improved Is_Base_Type function
13020 * einfo.ads (Base_Type): Inline this function
13022 2011-08-02 Robert Dewar <dewar@adacore.com>
13024 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13025 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13027 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13029 * gcc-interface/Make-lang.in: Update dependencies.
13030 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13033 2011-08-02 Yannick Moy <moy@adacore.com>
13035 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13036 non-simple expression used in delta constraint
13037 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13038 index constraint which is not a subtype mark
13039 * par.adb: With and use Restrict
13040 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13041 mode on component type which is not a subtype mark and default
13042 expression on component
13043 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13044 of string which does not have a lower index bound equal to 1
13045 (Array_Type_Declaration): issue an error in formal mode on index or
13046 component type which is not a subtype mark, and on aliased keyword on
13048 (Derived_Type_Declaration): issue an error in formal mode on interface,
13049 limited or abstract type
13050 (Record_Type_Declaration): issue an error in formal mode on interface
13051 (Record_Type_Definition): issue an error in formal mode on tagged types
13052 and type extensions not declared in the specification of a library unit
13053 package; on null non-tagged record; on variant part
13055 2011-08-02 Vincent Celier <celier@adacore.com>
13057 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13058 not declared for qualified library project when Library_Name is not
13059 declared, but Library_Dir is.
13061 2011-08-02 Robert Dewar <dewar@adacore.com>
13063 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13064 pragmas (affects aspects [Component_]Default_Value
13065 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13066 component type for the resolution
13068 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13070 * einfo.adb (Base_Type): Tune implementation for speed.
13072 2011-08-02 Robert Dewar <dewar@adacore.com>
13074 * freeze.adb: Minor reformatting.
13076 2011-08-02 Thomas Quinot <quinot@adacore.com>
13078 * scos.ads: Update comments.
13080 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13082 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13083 base type, because the parent may be a subtype of a private type whose
13084 convention is established in a private part.
13086 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13088 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13089 statement in a block when the expansion of the return expression has
13090 created a finalization chain.
13091 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13092 with the parent node.
13093 Add N_Extended_Return_Statement to handle the case where a transient
13094 object declaration appears in the Return_Object_Declarations list of
13095 an extended return statement.
13097 2011-08-02 Matthew Gingell <gingell@adacore.com>
13099 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13100 unused parameter 'name'.
13102 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13104 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13105 inherited operation, check whether its alias, which is the source
13106 operastion that it renames, has been marked eliminated.
13108 2011-08-02 Javier Miranda <miranda@adacore.com>
13110 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13111 in-mode parameter whose type is an access type since it can be used to
13112 modify its designated object. Enforce code that handles as safe an
13113 access type that is not access-to-constant but it is the result of a
13114 previous removal of side-effects.
13115 (Remove_Side_Effects): Minor code reorganization of cases which require
13116 no action. Done to incorporate documentation on new cases uncovered
13117 working in this ticket: no action needed if this routine was invoked
13118 too early and the nodes are not yet decorated.
13119 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13120 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13121 were issued with actuals that are implicitly provided by
13124 2011-08-02 Robert Dewar <dewar@adacore.com>
13126 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13128 2011-08-02 Yannick Moy <moy@adacore.com>
13130 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13131 to issue an error in formal mode on attribute not supported in this mode
13132 (Analyze_Attribute): issue errors on standard attributes not supported
13134 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13135 comment, and issue error in formal mode on modulus which is not a power
13137 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13139 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13141 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13142 operator on modular type (except 'not').
13144 2011-08-02 Robert Dewar <dewar@adacore.com>
13146 * gnat_rm.texi: Minor reformatting.
13148 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13150 * s-osinte-linux.ads: Minor comment update and reformatting.
13151 * i-cexten.ads: Make this unit pure, as for its parent.
13152 Will allow its usage in more contexts if needed.
13154 2011-08-02 Robert Dewar <dewar@adacore.com>
13156 * s-utf_32.ads: Minor comment fix.
13158 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13160 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13161 operation of a tagged synchronized type, handle the case where the
13162 controlling argument is overloaded.
13164 2011-08-02 Yannick Moy <moy@adacore.com>
13166 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13167 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13168 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13169 SPARK mode and formal verification mode on processing SPARK restriction
13170 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13171 requiring consistency checking.
13173 2011-08-02 Robert Dewar <dewar@adacore.com>
13175 * sem_res.adb: Minor reformatting.
13177 2011-08-02 Robert Dewar <dewar@adacore.com>
13179 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13180 a-cforse.ads: Remove unneeded with of Ada.Containers
13181 Remove commented out pragma Inline's
13182 Move specifications of new subprograms to the actual specs
13184 2011-08-02 Yannick Moy <moy@adacore.com>
13186 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13187 a-cforse.ads: Update comments.
13189 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13191 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13193 2011-08-02 Robert Dewar <dewar@adacore.com>
13195 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13196 a-cforse.ads, a-cofove.ads: Minor reformatting.
13198 2011-08-02 Claire Dross <dross@adacore.com>
13200 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13201 a-cofove.ads: Add comments.
13203 2011-08-02 Yannick Moy <moy@adacore.com>
13205 * gnat_rm.texi: Document formal containers.
13207 2011-08-02 Emmanuel Briot <briot@adacore.com>
13209 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13210 are empty sections.
13212 2011-08-02 Robert Dewar <dewar@adacore.com>
13214 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13217 2011-08-02 Robert Dewar <dewar@adacore.com>
13219 * aspects.adb: New aspects Default_Value and Default_Component_Value
13220 New format of Aspect_Names table checks for omitted entries
13221 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13222 handling of boolean aspects for derived types.
13223 New aspects Default_Value and Default_Component_Value
13224 New format of Aspect_Names table checks for omitted entries
13225 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13226 (Has_Default_Value): New flag
13227 (Has_Default_Component_Value): New flag
13228 (Has_Default_Value): New flag
13229 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13231 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13232 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13233 Default_Value and Default_Component_Value
13234 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13235 New aspects Default_Value and Default_Component_Value
13236 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13237 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13239 2011-08-02 Vincent Celier <celier@adacore.com>
13241 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13242 inherit library kind.
13244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13246 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13247 Minor reformatting.
13249 2011-08-02 Robert Dewar <dewar@adacore.com>
13251 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13253 2011-08-02 Yannick Moy <moy@adacore.com>
13255 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13257 2011-08-02 Robert Dewar <dewar@adacore.com>
13259 * impunit.adb: Add comment.
13261 2011-08-02 Yannick Moy <moy@adacore.com>
13263 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13264 qualification of aggregates in formal mode
13265 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13267 (Resolve_Aggregate): complete the test that an aggregate is adequately
13268 qualified in formal mode
13270 2011-08-02 Pascal Obry <obry@adacore.com>
13272 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13273 * mlib-prj.adb: Supress warning when compiling binder generated file.
13274 (Build_Library): Supress all warnings when compiling the binder
13277 2011-08-02 Yannick Moy <moy@adacore.com>
13279 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13281 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13282 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13283 Add with/use clauses to make Check_Formal_Restriction visible
13285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13287 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13288 in-parameters when type of the generic formal is private in the generic
13289 spec and non-private in the body.
13291 2011-08-02 Claire Dross <dross@adacore.com>
13293 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13294 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13295 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13296 * impunit.adb, Makefile.rtl: Take new files into account.
13298 2011-08-02 Robert Dewar <dewar@adacore.com>
13300 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13301 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13303 2011-08-02 Yannick Moy <moy@adacore.com>
13305 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13307 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13308 matching static array bounds, taking into account the special case of
13310 * sem_ch3.adb: Typo in comment.
13312 2011-08-02 Yannick Moy <moy@adacore.com>
13314 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13315 which issues an error in formal mode if its argument node is originally
13317 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13318 has a discriminant specification so that it does not include the case
13320 (Derived_Type_Declaration): move here the test that a derived type has a
13321 discriminant specification
13322 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13323 first element of a component association before accessing its choices
13324 (presence of component association is not enough)
13325 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13326 declaration is a library item before accessing the next element in a
13327 list, as library items are not member of lists
13328 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13329 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13330 Check_Formal_Restriction whenever possible.
13332 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13334 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13335 reference when needed.
13337 2011-08-02 Bob Duff <duff@adacore.com>
13339 * gnat_ugn.texi: Fix typo.
13341 2011-08-02 Vincent Celier <celier@adacore.com>
13343 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13344 archive file name. Do not use the full path name of archives for Open
13347 2011-08-02 Robert Dewar <dewar@adacore.com>
13349 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13350 Analyze_Aspect_Specifications
13352 (Analyze_Aspect_Specifications): New handling for boolean aspects
13353 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13354 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13355 sequence for Analyze_Aspect_Specifications
13356 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13357 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13359 2011-08-02 Robert Dewar <dewar@adacore.com>
13361 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13362 aspects, since these no longer exist.
13364 2011-08-02 Robert Dewar <dewar@adacore.com>
13366 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13367 semicolon, do not try to see if there are aspects following it.
13368 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13371 2011-08-02 Robert Dewar <dewar@adacore.com>
13373 * sem_ch8.adb, aspects.ads: Minor reformatting.
13375 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13377 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13378 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13380 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13382 2011-08-02 Yannick Moy <moy@adacore.com>
13384 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13385 mode on subprogram declaration outside of package specification, unless
13386 it is followed by a pragma Import
13387 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13388 Access_Type_Declaration): issue error in formal mode on access type
13389 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13391 (Analyze_Object_Declaration): issue error in formal mode on object
13392 declaration which does not respect SPARK restrictions
13393 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13394 declaration which does not respect SPARK restrictions
13395 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13396 error in formal mode on digits or delta constraint
13397 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13398 decimal fixed point type
13399 (Derived_Type_Declaration): issue error in formal mode on derived type
13400 other than type extensions of tagged record types
13401 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13402 with check on access definition
13403 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13404 mode on protected definition.
13405 (Analyze_Task_Definition): issue error in formal mode on task definition
13407 2011-08-02 Robert Dewar <dewar@adacore.com>
13409 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13411 2011-08-02 Javier Miranda <miranda@adacore.com>
13413 * sem_ch6.adb (Can_Override_Operator): New function.
13414 (Verify_Overriding_Indicator): Add missing code to check overriding
13415 indicator in operators. Fixes regression.
13416 (Check_Overriding_Indicator): Minor reformating after replacing the
13417 code that evaluates if the subprogram can override an operator by
13418 invocations to the above new function.
13420 (Write_Field26_Name): Add missing code to ensure that, following
13421 the documentation in einfo.ads, this field is not shown as attribute
13422 "Static_Initialization" on non-dispatching functions.
13424 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13426 * sem_res.adb (Resolve_Call): A call to
13427 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13428 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13429 i.e., when the second parameter is of type Time_Span.
13431 2011-08-02 Vincent Celier <celier@adacore.com>
13433 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13434 with an archive instead of -L<library dir> -l<library name>.
13436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13438 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13439 mark the base types In_Use in addition to making the operations
13442 2011-08-02 Ed Falis <falis@adacore.com>
13444 * init.c: add and setup __gnat_signal_mask for the exception signals
13445 * s-inmaop-vxworks.adb: new file.
13446 * s-intman-vxworks.adb: remove unnecessary initializations and
13448 * s-intman-vxworks.ads: remove unnecessary variable
13449 * s-taprop-vxworks.adb: simplify signal initialization
13451 2011-08-02 Robert Dewar <dewar@adacore.com>
13453 * sem_ch8.adb: Minor code reorganization, comment updates.
13455 2011-08-02 Robert Dewar <dewar@adacore.com>
13457 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13458 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13460 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13461 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13463 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13465 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13466 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13467 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13468 use_type_clauses, to handle more efficiently use_type and use_all_type
13470 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13471 Ada2012 Use_All_Type clause.
13472 (Use_Class_Wide_Operations): new procedure.
13474 2011-08-02 Robert Dewar <dewar@adacore.com>
13476 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13477 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13478 expression to expression function.
13480 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13482 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13483 if types are compatible.
13485 2011-08-02 Yannick Moy <moy@adacore.com>
13487 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13488 returns True if its argument array types have same dimension and same
13489 static bounds at each index.
13490 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13491 OUT or IN OUT paramaters which are not view conversions in SPARK.
13492 (Resolve_Arithmetic_Op): issue an error in formal mode on
13493 multiplication or division with operands of fixed point types which are
13494 not qualified or explicitly converted.
13495 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13496 Boolean or array type (except String) operands.
13497 (Resolve_Equality_Op): issue an error in formal mode on equality
13498 operators for array types other than String with non-matching static
13500 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13501 for array types with non-matching static bounds. Factorize the code in
13502 Matching_Static_Array_Bounds.
13503 (Resolve_Qualified_Expression): issue an error in formal mode on
13504 qualified expressions for array types with non-matching static bounds.
13505 (Resolve_Type_Conversion): issue an error in formal mode on type
13506 conversion for array types with non-matching static bounds
13508 2011-08-02 Robert Dewar <dewar@adacore.com>
13510 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13512 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13514 * par-ch9.adb: save location of entry for proper error message.
13516 2011-08-02 Javier Miranda <miranda@adacore.com>
13518 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13519 (Use_Full_View) which permits this routine to climb through the
13520 ancestors using the full-view of private parents.
13521 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13522 Use_Full_View to true in calls to Is_Ancestor.
13523 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13524 true in call to Is_Ancestor.
13525 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13526 Use_Full_View to true in call to Is_Ancestor.
13527 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13528 call to Is_Ancestor.
13529 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13530 Use_Full_View to true in calls to Is_Ancestor.
13531 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13532 Make_Select_Specific_Data_Table, Register_Primitive,
13533 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13534 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13535 to true in call to Is_Ancestor.
13536 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13537 Use_Full_View to true in calls to Is_Ancestor.
13539 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13540 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13542 2011-08-02 Robert Dewar <dewar@adacore.com>
13544 * gnat_rm.texi: Minor reformatting.
13545 * sem_prag.adb: Minor reformatting.
13547 2011-08-02 Tristan Gingold <gingold@adacore.com>
13549 * vms_data.ads: Add VMS qualifier for -gnateP.
13551 2011-08-02 Robert Dewar <dewar@adacore.com>
13553 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13554 * par-ch7.adb (P_Package): Proper placement of aspects for package
13555 decl/instantiation.
13556 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13557 (End_Statements): Add Is_Sloc parameterr
13558 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13559 (Check_End): Ad Is_Sloc parameter
13560 (End_Statements): Add Is_Sloc parameterr
13562 2011-08-02 Vincent Celier <celier@adacore.com>
13564 * ug_words: Add VMS qualifier equivalent to -gnateP:
13565 /SYMBOL_PREPROCESSING.
13567 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13569 * gnat-style.texi: For hexadecimal numeric literals the typical
13570 grouping of digits is 4 to represent 2 bytes.
13571 A procedure spec which is split into several lines is indented two
13574 2011-08-02 Yannick Moy <moy@adacore.com>
13576 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13577 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13578 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13580 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13581 choice in array aggregate
13582 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13584 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13585 positional and named aggregate for record, or others in record
13586 aggregate, or multiple choice in record aggregate
13587 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13588 array operands to logical operations AND, OR and XOR do not have the
13589 same static lower and higher bounds
13590 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13592 2011-08-01 Robert Dewar <dewar@adacore.com>
13594 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13595 Replaces Last_Source_Node_In_Sequence.
13596 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13597 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13598 parens and blank in string (this was inconsistently implemented).
13600 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13601 blank in string (this was inconsistently implemented).
13603 (Set_Global_Switches): Set formal mode switches appropriately
13604 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13606 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13607 call Set_Error_Msg_Lang to set "spark" as language name.
13608 * par.adb: Remove unnecessary call to set formal language for errout
13609 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13610 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13612 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13613 calls to it, moved after resolution so that types are known
13614 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13615 result of concatenation is not of type String
13616 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13617 concatenation is not properly restricted
13618 * gnat_rm.texi: Add doc on pragma Spark_95.
13619 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13620 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13621 * gcc-interface/Make-lang.in: Update dependencies.
13623 2011-08-01 Javier Miranda <miranda@adacore.com>
13625 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13626 condition that detects if the overridden operation must replace an
13629 2011-08-01 Javier Miranda <miranda@adacore.com>
13631 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13632 code declarations inserted by Insert_Actions in each alternative of the
13633 N_Case_Expression node.
13635 2011-08-01 Robert Dewar <dewar@adacore.com>
13637 * sem_ch6.adb: Minor code reorganization.
13638 * sem_util.adb: Minor reformatting.
13640 2011-08-01 Pascal Obry <obry@adacore.com>
13642 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13643 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13645 2011-08-01 Yannick Moy <moy@adacore.com>
13647 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13648 literal or operator symbol which is prefixed
13649 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13650 mode on access attributes.
13651 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13652 that concatenation operands are properly restricted in formal mode
13653 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13654 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13655 result of the concatenation has a type different from String.
13656 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13657 Analyze_Quantified_Expression, Analyze_Slice,
13658 Analyze_Null): issue an error in formal mode on unsupported constructs
13660 (Analyze_Block_Statement): only issue error on source block statement
13661 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13662 function which returns the last node in a list of nodes for which
13663 Comes_From_Source returns True, if any
13664 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13665 Last_Source_Node_In_Sequence
13666 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13667 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13668 mode on unsupported constructs
13669 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13670 rest of the actions may be needed later on since the error is marked as
13672 * sinfo.ads: Typos in comments.
13674 2011-08-01 Pascal Obry <obry@adacore.com>
13676 * projects.texi: Minor editing.
13678 2011-08-01 Yannick Moy <moy@adacore.com>
13680 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13681 insertion character ~~
13682 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13683 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13684 with insertion character ~~
13685 (Set_Msg_Text): treat insertion character ~~
13686 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13687 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13688 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13689 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13690 errors related to the formal language restriction not serious
13691 (insertion character |).
13692 * par.adb (Par): set formal language for error messages if needed
13693 * sem_ch6.adb (Check_Missing_Return): take into account possible
13694 generated statements at the end of the function
13695 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13696 enumeration value to define a new pragma SPARK_95
13697 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13698 SPARK_Version): new type and variables to store the SPARK version
13700 (SPARK_Mode): return True when SPARK_Version is set
13701 * par-prag.adb: Correct indentation
13702 (Prag): take Pragma_SPARK_95 into account
13703 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13706 2011-08-01 Robert Dewar <dewar@adacore.com>
13708 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13709 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13710 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13712 2011-08-01 Pascal Obry <obry@adacore.com>
13714 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13715 Target_Name to Get_Path call.
13716 (Parse_Single_Project): Likewise.
13717 (Post_Parse_Context_Clause): Likewise.
13718 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13719 Call Initialise_Project_Path with the proper Target_Name.
13720 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13722 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13723 with the proper Target_Name.
13724 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13725 Part.Parse routine.
13726 (Parse_Project_And_Apply_Config): Likewise.
13727 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13728 This is fine as this part of the code is supporting only native
13730 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13731 is fine as this part of the code is supporting only native compilation.
13733 2011-08-01 Yannick Moy <moy@adacore.com>
13735 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13736 of homonym, unless the homonym is one of the cases allowed in SPARK
13737 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13738 package declaration occurring after a body.
13740 2011-08-01 Robert Dewar <dewar@adacore.com>
13742 * checks.adb, exp_ch4.adb: Minor reformatting.
13744 2011-08-01 Javier Miranda <miranda@adacore.com>
13746 * einfo.ads (Access_Disp_Table): Fix documentation.
13747 (Dispatch_Table_Wrappers): Fix documentation.
13749 2011-08-01 Pascal Obry <obry@adacore.com>
13751 * prj-env.adb, prj-env.ads: Minor reformatting.
13753 2011-08-01 Yannick Moy <moy@adacore.com>
13755 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13756 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13757 procedures out of these packages.
13758 * errout.ads, errout.adb
13759 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13760 procedures in of this package
13761 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13762 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13763 on misplaced later vs initial declarations, like in Ada 83
13764 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13765 formal mode on attribute of private type whose full type declaration
13767 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13768 package declaration inside a package specification
13769 (Analyze_Full_Type_Declaration): issue error in formal mode on
13770 controlled type or discriminant type
13771 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13772 user-defined operator means that it should come from the source
13773 (New_Overloaded_Entity): issue error in formal mode on overloaded
13775 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13777 2011-08-01 Thomas Quinot <quinot@adacore.com>
13779 * atree.adb: Minor reformatting.
13780 * checks.adb: Minor reformatting.
13782 2011-08-01 Vincent Celier <celier@adacore.com>
13784 * s-parame-vms-ia64.ads: Fix typo in comment
13786 * s-parame-vms-restrict.ads: Removed, unused.
13788 2011-08-01 Javier Miranda <miranda@adacore.com>
13791 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13793 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13794 * sem_ch3.ads, sem_ch3.adb
13795 (Is_Constant_Bound): New extended version of the subprogram that was
13796 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13797 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13798 * sem_aux.ads (Constant_Value): Fix typo in comment.
13799 * checks.adb (Generate_Index_Checks): New implementation which, for
13800 array objects with constant bounds, generates the runtime check
13801 referencing the bounds of the array type. For other cases this routine
13802 provides its previous behavior obtaining such values from the array
13804 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13806 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13807 we cannot have semantic interpretations of the new node.
13809 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13811 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13814 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13816 * sem_ch8.adb: Minor code editing.
13817 * s-vxwext.adb: Remove trailing space.
13818 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13819 consistency with other files.
13821 2011-08-01 Thomas Quinot <quinot@adacore.com>
13823 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13825 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13827 * par-ch10.adb: reject parameterized expressions as compilation unit.
13828 * sem_ch4.adb: handle properly conditional expression with overloaded
13829 then_clause and no else_clause.
13831 2011-08-01 Tristan Gingold <gingold@adacore.com>
13833 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13834 like done by System.Aux_DEC.
13835 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13837 2011-08-01 Yannick Moy <moy@adacore.com>
13839 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13840 missing label at end of declaration (subprogram or package)
13841 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13842 of positional and named parameter association
13843 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13844 Error_Msg_SP which adds a prefix to the error message giving the name
13845 of the formal language analyzed
13846 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13847 access result type in subprogram, unconstrained array as result type,.
13848 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13850 * sem_ch8.adb: Code clean up.
13852 2011-08-01 Javier Miranda <miranda@adacore.com>
13854 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13855 * einfo.ads (Access_Disp_Table): Fix documentation.
13856 (Dispatch_Table_Wrappers): Fix documentation.
13857 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13858 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13859 to enforce the documentation of this attribute.
13860 (Set_Is_Interface): Cleanup the assertion.
13861 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13862 the Underlying_Type entity before reading attribute Access_Disp_Table.
13863 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13864 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13865 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13866 the Underlying_Type entity before reading attribute Access_Disp_Table.
13867 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13868 Locate the Underlying_Type entity before reading attribute
13871 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13873 * s-poosiz.ads: Additional overriding indicators.
13875 2011-08-01 Yannick Moy <moy@adacore.com>
13877 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13879 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13880 parameter specification does not include a subtype mark.
13881 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13882 formal mode on abstract subprogram.
13883 (Analyze_Subprogram_Specification): issue error in formal mode on
13884 user-defined operator.
13885 (Process_Formals): issue error in formal mode on access parameter and
13886 default expression.
13887 * sem_ch9.adb (Analyze_Abort_Statement,
13888 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13889 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13890 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13891 Analyze_Requeue, Analyze_Selective_Accept,
13892 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13893 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13894 issue error in formal mode on user-defined raise statement.
13896 2011-08-01 Thomas Quinot <quinot@adacore.com>
13898 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13899 declaration being hidden when overriding an implicit inherited
13901 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13902 (-gnats), do not complain about a source file that contains only a
13905 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13907 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13908 variable if already set.
13910 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13912 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13913 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13914 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13915 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13916 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13917 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13918 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13919 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13920 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13921 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13922 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13923 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13924 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13925 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13926 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13927 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13928 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13929 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13930 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13931 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13932 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13933 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13934 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13935 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13936 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13937 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13938 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13939 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13940 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13941 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13942 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13943 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13944 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13945 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13946 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13947 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13948 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13949 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13950 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13951 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13952 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13953 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13954 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13955 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13956 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13957 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13958 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13959 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13960 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13961 Use GNAT instead of GNARL.
13963 2011-08-01 Bob Duff <duff@adacore.com>
13965 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13966 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13967 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13970 2011-08-01 Yannick Moy <moy@adacore.com>
13972 * debug.adb (d.D) reverve flag for the SPARK mode
13973 (d.E) reverve flag for SPARK generation mode
13974 (d.F) reverve flag for Why generation mode
13975 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13976 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13977 functions which return True when the corresponding modes are set
13978 (Formal_Language): return "spark" or "alfa" when in formal verification
13980 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13981 Error_Msg to prefix the error message with a tag giving the formal
13983 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13984 message with a tag giving the formal language
13985 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13987 (Analyze_Case_Statement): issue error in formal mode on case statement
13988 with a single "others" case alternative
13989 (Analyze_Exit_Statement): issue errors in formal mode on exit
13990 statements which do not respect SPARK restrictions
13991 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13992 (Check_Unreachable_Code): always issue an error (not a warning) in
13993 formal mode on unreachable code (concerns both code after an infinite
13994 loop and after an unconditional jump, both not allowed in SPARK)
13995 * sem_ch6.adb (Analyze_Return_Statement): add call to
13996 Set_Return_Present for a procedure containing a return statement
13997 (already done for functions in Analyze_Function_Return)
13998 (Analyze_Function_Return): issue error in formal mode on extended
13999 return or if return is not last statement in function
14000 (Check_Missing_Return): issue error in formal mode if function does
14001 not end with return or if procedure contains a return
14002 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14003 function to detect if there is an inner scope of its parameter S which
14006 2011-08-01 Thomas Quinot <quinot@adacore.com>
14008 * sem_ch6.ads: Minor reformatting.
14010 2011-08-01 Javier Miranda <miranda@adacore.com>
14012 * sem_util.adb (Abstract_Interface_List): Complete condition when
14013 processing private type declarations to avoid reading unavailable
14015 (Is_Synchronized_Tagged_Type): Complete condition when processing
14016 private extension declaration nodes to avoid reading unavailable
14019 2011-08-01 Thomas Quinot <quinot@adacore.com>
14021 * sem_ch3.adb: Minor reformatting.
14023 2011-08-01 Thomas Quinot <quinot@adacore.com>
14025 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14026 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14027 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14028 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14029 for VMS, instead parametrize the common implementation with
14030 System.Parameters declarations.
14032 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14034 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14036 2011-08-01 Tristan Gingold <gingold@adacore.com>
14038 * seh_init.c: Fix SEH handler installation on win64.
14040 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14042 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14043 double analysis of an anonymous access to subprogram, because it can
14044 lead to improper sharing of profiles and a back-end crash.
14046 2011-08-01 Robert Dewar <dewar@adacore.com>
14048 * make.adb, sem_ch4.adb: Minor reformatting.
14049 * gcc-interface/Make-lang.in: Update dependencies.
14050 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14052 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14054 * gnat_rm.texi: Fix definition of Long_Integer.
14056 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14058 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14059 to prevent storage exhaustion.
14060 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14061 finalized is a function body, insert the cleanup code before the final
14062 return statement, to prevent spurious warnings.
14063 * s-pooglo.ads: add overriding indicator.
14065 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14067 * sem_ch4.adb (Operator_Check): improve error message when both a
14068 with_clause and a use_clause are needed to make operator usage legal.
14069 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14070 determine whether a compilation unit is visible within an other,
14071 either through a with_clause in the current unit, or a with_clause in
14072 its library unit or one one of its parents.
14074 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14076 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14077 over an arbitrary expression of an array or container type.
14078 * lib-xref.adb: clarify comment.
14080 2011-08-01 Bob Duff <duff@adacore.com>
14082 * einfo.ads: Minor reformatting.
14083 * debug.adb: Minor comment improvement.
14085 2011-08-01 Javier Miranda <miranda@adacore.com>
14087 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14088 consider hidden subprograms as valid candidates.
14090 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14092 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14094 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14096 * gnat_ugn.texi: Fix typo.
14098 2011-08-01 Robert Dewar <dewar@adacore.com>
14100 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14101 lib-xref.adb: Minor reformatting
14103 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14105 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14106 when to generate a call to Move_Final_List.
14107 (Has_Controlled_Parts): Remove this function.
14109 2011-08-01 Geert Bosch <bosch@adacore.com>
14111 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14112 "," in choice list.
14114 2011-08-01 Thomas Quinot <quinot@adacore.com>
14116 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14117 explicit raise of a predefined exception as Comes_From_Source if the
14118 original N_Raise_Statement comes from source.
14120 2011-08-01 Robert Dewar <dewar@adacore.com>
14122 * sinfo.ads: Add comment.
14123 * sem_ch6.adb: Minor reformatting.
14125 2011-08-01 Robert Dewar <dewar@adacore.com>
14127 * freeze.adb (Freeze_Entity): Refine check for bad component size
14128 clause to avoid rejecting confirming clause when atomic/aliased present.
14130 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14132 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14133 better determine whether an entity reference is a write.
14134 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14136 * lib-xref.adb (Output_References): Do no suppress a read reference at
14137 the same location as an immediately preceeding modify-reference, to
14138 handle properly in-out actuals.
14140 2011-08-01 Tristan Gingold <gingold@adacore.com>
14142 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14144 2011-08-01 Quentin Ochem <ochem@adacore.com>
14146 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14147 heap to compute the result.
14149 2011-08-01 Robert Dewar <dewar@adacore.com>
14151 * atree.ads: Minor reformatting.
14153 2011-08-01 Emmanuel Briot <briot@adacore.com>
14155 * g-expect.adb (Get_Command_Output): Fix memory leak.
14157 2011-08-01 Geert Bosch <bosch@adacore.com>
14159 * cstand.adb (P_Float_Type): New procedure to print the definition of
14160 predefined fpt types.
14161 (P_Mixed_Name): New procedure to print a name using mixed case
14162 (Print_Standard): Use P_Float_Type for printing floating point types
14163 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14164 precision IEEE float.
14166 2011-08-01 Thomas Quinot <quinot@adacore.com>
14168 * sem_ch3.adb: Minor reformatting.
14170 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14172 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14173 the completion of a generic function, insert the new body rather than
14174 rewriting the original.
14176 2011-08-01 Yannick Moy <moy@adacore.com>
14178 * sinfo.ads, errout.ads: Typos in comments.
14180 2011-08-01 Robert Dewar <dewar@adacore.com>
14182 * par-endh.adb: Minor reformatting.
14184 2011-08-01 Robert Dewar <dewar@adacore.com>
14186 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14187 (Pre_Post_Aspects): New subtype.
14188 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14189 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14190 * par-ch7.adb (P_Package): Remove Decl parameter
14191 (P_Package): Handle new syntax for aspects (before IS)
14192 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14194 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14195 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14196 (P_Package): Remove Decl parameter
14197 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14199 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14201 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14202 * sinfo.ads: Document new syntax for aspects in packages etc.
14203 * sprint.adb: Handle new syntax of aspects before IS in package
14205 2011-08-01 Thomas Quinot <quinot@adacore.com>
14207 * atree.ads: Minor reformatting.
14208 * sem_prag.adb: Minor reformatting.
14210 2011-08-01 Robert Dewar <dewar@adacore.com>
14212 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14213 case expr alternative.
14215 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14217 * sem_ch12.adb: Fix typo.
14219 2011-08-01 Geert Bosch <bosch@adacore.com>
14221 * sem_prag.adb (Check_No_Link_Name): New procedure.
14222 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14223 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14224 instead of Standard_Long_Long_Float_Size global. Preparation for
14225 eventual removal of per type constants.
14226 * exp_util.ads (Get_Stream_Size): New function returning the stream
14227 size value of subtype E.
14228 * exp_util.adb (Get_Stream_Size): Implement new function.
14229 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14231 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14233 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14235 2011-08-01 Geert Bosch <bosch@adacore.com>
14237 * cstand.adb: Fix comments.
14238 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14239 count of arguments.
14241 2011-08-01 Robert Dewar <dewar@adacore.com>
14243 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14245 2011-08-01 Geert Bosch <bosch@adacore.com>
14247 * atree.ads: Fix comment.
14249 2011-08-01 Robert Dewar <dewar@adacore.com>
14251 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14252 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14253 * par.adb: Add with for Namet.Sp.
14254 * par-tchk.adb: Minor reformatting.
14256 2011-08-01 Vincent Celier <celier@adacore.com>
14258 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14259 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14260 of the init procedure of a SAL.
14261 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14264 2011-08-01 Thomas Quinot <quinot@adacore.com>
14266 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14269 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14271 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14273 2011-08-01 Thomas Quinot <quinot@adacore.com>
14275 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14276 conformant with its spec (return True only for types that have
14277 an overriding Initialize primitive operation that prevents them from
14278 having preelaborable initialization).
14279 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14280 initialization for controlled types in Ada 2005 or later mode.
14282 2011-08-01 Robert Dewar <dewar@adacore.com>
14284 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14286 (Same_Aspect): New function.
14287 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14288 Type_Invariant, Precondition, Postcondition.
14289 * snames.ads-tmpl: Add Name_Type_Invariant.
14291 2011-08-01 Robert Dewar <dewar@adacore.com>
14293 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14295 (Freeze_All_Ent): Fix error in handling inherited aspects.
14296 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14297 already analyzed, but don't skip entire processing of a declaration,
14298 that's wrong in some cases of declarations being rewritten.
14299 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14300 Don't delay for integer, string literals
14301 Treat predicates in usual manner for delay, remove special case code,
14303 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14304 (Build_Predicate_Function): Update saved expression in aspect
14305 (Build_Invariant_Procedure): Update saved expression in aspect
14306 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14307 of replacement of discriminant references if the reference is simple.
14309 2011-08-01 Robert Dewar <dewar@adacore.com>
14311 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14312 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14313 Static_Predicate and Dynamic_Predicate.
14314 (Build_Predicate_Function): Add processing for Static_Predicate
14315 and Dynamic_Predicate.
14316 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14317 (From_Static_Predicate): New flag
14318 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14320 2011-08-01 Robert Dewar <dewar@adacore.com>
14322 * usage.adb: Documentation cleanup for Ada version modes in usage.
14323 * expander.adb: Minor reformatting.
14325 2011-08-01 Robert Dewar <dewar@adacore.com>
14327 * atree.ads: Minor comment fix.
14328 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14329 a-witeio.ads, sem_prag.adb: Minor reformatting.
14331 2011-08-01 Doug Rupp <rupp@adacore.com>
14333 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14334 pointers. Use descrip.h header file for convenience. Add some
14337 2011-08-01 Robert Dewar <dewar@adacore.com>
14339 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14340 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14341 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14343 (Check_Aspect_At_End_Of_Declarations): New procedure
14344 (Analye_Aspect_Specification): Minor changes for above procedures
14345 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14346 specification node as well.
14348 2011-08-01 Pascal Obry <obry@adacore.com>
14350 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14351 Windows files. Use GetFilesAttributes() in this case to check for file
14352 existence instead of returning with an error code.
14354 2011-08-01 Vincent Celier <celier@adacore.com>
14356 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14357 High is above Source length.
14359 2011-08-01 Robert Dewar <dewar@adacore.com>
14361 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14363 2011-08-01 Robert Dewar <dewar@adacore.com>
14365 * aspects.ads (Boolean_Aspects): New subtype.
14366 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14367 for derived types in cases where the parent type and derived type have
14369 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14370 with aspects when parent type also has aspects.
14371 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14372 boolean expression at this point).
14373 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14374 accordance with final decision on the Ada 2012 feature.
14375 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14377 2011-08-01 Matthew Heaney <heaney@adacore.com>
14379 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14381 2011-08-01 Pascal Obry <obry@adacore.com>
14383 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14384 Fix Replace_Slice when High is above current string size.
14385 (Replace_Slice): Fix DL computation when High is above current
14388 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14390 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14392 2011-08-01 Matthew Heaney <heaney@adacore.com>
14394 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14397 2011-08-01 Pascal Obry <obry@adacore.com>
14399 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14402 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14404 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14405 access to protected subprograms in generic bodies.
14406 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14407 protected type, indicate that the convention of the subprogram is
14408 Convention_Protected, because it may be used in subsequent declarations
14409 within the protected declaration.
14411 2011-08-01 Vincent Celier <celier@adacore.com>
14413 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14414 and "final" procedures when the name of the library is "ada", to avoid
14415 duplicate symbols "adainit" and "adafinal" in executables.
14417 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14419 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14420 quantified expression that appears within a postcondition and uses the
14421 Ada2012 'Result attribute.
14423 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14425 * init.c (__gnat_error_handler): Cast reason to int.
14426 (__gnat_install_handler): Explain sa_sigaction use.
14428 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14430 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14431 subprogram has copy-in copy-out parameters, try to promote the mode of
14432 the return type if it is passed in registers.
14434 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14436 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14437 left operand as addressable.
14439 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14441 * gcc-interface/gigi.h (build_function_stub): Remove.
14442 (build_return_expr): Likewise.
14443 (convert_vms_descriptor): Declare.
14444 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14445 (build_function_stub): Move to...
14446 * gcc-interface/utils2.c (build_return_expr): Move to...
14447 * gcc-interface/trans.c (build_function_stub): ...here.
14448 (build_return_expr): ...here.
14449 (Subprogram_Body_to_gnu): Add local variable for language_function.
14450 Disconnect the parameter attributes cache, if any, once done with it.
14451 Call end_subprog_body only after setting the end_locus.
14452 Build the stub associated with the function, if any, at the very end.
14453 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14454 variables and streamline control flow.
14456 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14459 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14460 g-trasym-dwarf.adb.
14462 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14465 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14466 Assign to act.sa_sigaction.
14467 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14468 current->return_address to char * before arithmetic.
14470 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14472 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14473 Correct argument types.
14474 Extract code from reason.
14475 (__gnat_install_handler): Assign to act.sa_sigaction.
14477 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14479 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14480 (GNAT1_OBJS): ...here.
14482 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14485 * g-socthi-mingw.adb (Fill): Fix formatting.
14487 * gcc-interface/gigi.h: Move around comment.
14489 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14492 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14494 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14497 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14499 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14501 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14502 range comparison if Pmode is SImode.
14504 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14505 Eric Botcazou <ebotcazou@adacore.com>
14507 * adadecode.c: Wrap up in extern "C" block.
14508 * adadecode.h: Likewise.
14509 * adaint.c: Likewise. Remove 'const' keyword.
14510 * adaint.h: Likewise.
14511 * argv.c: Likewise.
14512 * atree.h: Likewise.
14514 * cstreams.c: Likewise.
14516 * exit.c: Likewise.
14518 * final.c: Likewise.
14519 * init.c: Likewise.
14520 * initialize.c: Likewise.
14521 * link.c: Likewise.
14522 * namet.h: Likewise.
14523 * nlists.h: Likewise.
14524 * raise.c: Likewise.
14525 * raise.h: Likewise.
14526 * repinfo.h: Likewise.
14527 * seh_init.c: Likewise.
14528 * targext.c: Likewise.
14529 * tracebak.c: Likewise.
14530 * uintp.h: Likewise.
14531 * urealp.h: Likewise.
14532 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14533 * xsinfo.adb: Likewise.
14534 * xsnamest.adb: Likewise.
14535 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14536 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14537 * gcc-interface/misc.c: Likewise.
14538 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14539 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14540 ada/targext.o here...
14541 (GNAT_ADA_OBJS): ...and not here.
14542 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14543 (GNATBIND_OBJS): Reorder.
14545 2011-07-07 Richard Henderson <rth@redhat.com>
14547 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14548 dwarf2out_frame_init.
14550 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14552 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14554 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14557 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14559 2011-07-06 Richard Guenther <rguenther@suse.de>
14561 * gcc-interface/misc.c (gnat_init): Merge calls to
14562 build_common_tree_nodes and build_common_tree_nodes_2.
14563 Re-initialize boolean_false_node.
14565 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14566 Olivier Hainque <hainque@adacore.com>
14567 Nicolas Setton <setton@adacore.com>
14569 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14570 the type according to the ARTIFICIAL_P parameter.
14571 (create_type_decl): Likewise.
14572 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14574 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14576 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14577 (gnatbind): Likewise.
14579 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14581 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14583 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14585 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14586 local variable throughout. Remove useless call to Base_Type.
14587 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14588 Take it also into account for the volatileness of the field. Set the
14589 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14591 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14593 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14594 on a dereference built for a by-ref object if it has an address clause.
14596 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14598 * einfo.ads (Address_Taken): Document use for the second argument of
14599 Asm_Input and Asm_Output attributes.
14600 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14601 argument is an entity name, then set Address_Taken on it.
14602 <Attribute_Asm_Output>: Likewise.
14603 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14604 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14605 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14606 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14608 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14610 PR middle-end/46500
14611 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14613 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14615 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14616 (ada/utils.o): Update dependencies.
14617 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14618 ../../../libcpp/libcpp.a.
14619 * gcc-interface/utils.c: Include common/common-target.h.
14620 (process_attributes): Use targetm_common.have_named_sections.
14622 2011-06-07 Richard Guenther <rguenther@suse.de>
14624 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14627 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14629 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14630 TREE_THIS_NOTRAP flag.
14632 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14634 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14637 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14639 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14640 constants whose full view has discriminants specially.
14642 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14644 * gcc-interface/utils.c: Include diagnostic.h.
14645 (gnat_write_global_declarations): Output debug information for all
14646 global type declarations before finalizing the compilation unit.
14647 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14649 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14651 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14653 2011-05-25 Kai Tietz <ktietz@redhat.com>
14655 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14656 initialization instead of const/none-const pointer assignment.
14658 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14660 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14661 $(EXTRA_GNAT1_OBJS).
14662 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14663 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14664 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14665 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14666 libcommon-target.a instead of prefix.o.
14668 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14671 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14673 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14675 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14676 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14677 instead of version.o.
14679 2011-05-18 Kai Tietz <ktietz@redhat.com>
14681 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14682 boolean_false_node instead of integer_zero_node.
14683 (convert_with_check): Likewise.
14684 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14686 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14688 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14689 type of the parameter is an unconstrained array, convert the actual to
14690 the type of the formal in the In Out and Out cases as well.
14692 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14694 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14695 call build_function_type_array or build_varargs_function_type_array
14697 (create_subprog_type): Don't call build_function_type; call
14698 build_function_type_vec instead.
14700 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14702 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14703 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14704 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14706 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14708 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14710 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14711 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14713 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14715 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14717 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14719 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14720 instead of accessing TYPE_ARG_TYPES directly.
14721 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14723 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14726 * gcc-interface/gigi.h (get_variant_part): Declare.
14727 * gcc-interface/decl.c (get_variant_part): Make global.
14728 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14729 types have the same constant size, are record types and T1 has a
14730 variant part while T2 doesn't.
14732 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14734 * gcc-interface/utils.c (begin_subprog_body): Do not call
14736 (end_subprog_body): Likewise.
14738 2011-05-04 Richard Guenther <rguenther@suse.de>
14740 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14742 (pos_to_constructor): Likewise.
14744 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14745 Eric Botcazou <ebotcazou@adacore.com>
14747 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14748 of build_function_type. Adjust calls to...
14749 (build_raise_check): ...this. Do not take a void_tree parameter.
14750 Call build_function_type_list instead of build_function_type.
14751 Fix head comment and swap couple of conditional blocks.
14753 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14755 * gnatvsn.ads (Library_Version): Bump to 4.7.
14756 (Current_Year): Bump to 2011.
14758 2011-04-29 Michael Matz <matz@suse.de>
14760 * gcc-interface/misc.c (gnat_handle_option): Set
14761 warn_maybe_uninitialized.
14763 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14765 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14766 the Watson/McCabe paper.
14768 2011-04-23 Jim Meyering <meyering@redhat.com>
14770 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14772 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14774 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14777 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14779 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14781 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14782 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14783 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14784 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14785 <all>: Do not set flags on the reused DECL node coming from an alias.
14786 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14787 don't need debug info here...
14788 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14789 (gigi): Adjust calls to create_subprog_decl.
14790 (build_raise_check): Likewise.
14791 (establish_gnat_vms_condition_handler): Likewise.
14792 (Compilation_Unit_to_gnu): Likewise.
14793 (gnat_to_gnu): Likewise.
14795 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14797 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14798 (NO_REORDER_ADAFLAGS): New variable.
14799 (EXTRA_GNATTOOLS): Always define.
14800 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14801 Clean up and adjust list of files compiled with special options.
14802 * gcc-interface/Make-lang.in: Likewise.
14803 (ada/decl.o): Cosmetical change.
14804 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14806 2011-04-20 Jim Meyering <meyering@redhat.com>
14808 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14810 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14812 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14813 $(CFLAGS) on the link line.
14815 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14817 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14818 padded type built for the return type if it is unconstrained.
14820 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14822 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14824 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14826 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14827 before calling TREE_CHAIN.
14828 * gcc-interface/misc.c (gnat_init_ts): New function.
14829 (LANG_HOOKS_INIT_TS): Define.
14831 2011-04-12 Martin Jambor <mjambor@suse.cz>
14833 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14834 instead of cgraph_node.
14836 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14838 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14839 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14842 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14844 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14845 of aggregate types that contain a placeholder.
14847 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14849 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14851 (handle_type_generic_attribute): Likewise.
14853 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14856 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14858 2011-04-04 Kai Tietz <ktietz@redhat.com>
14861 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14864 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14866 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14867 type case, do not strip a padding type around the array type.
14869 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14871 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14874 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14876 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14877 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14878 code for -feliminate-unused-debug-types.
14879 (gnat_post_options): Likewise.
14881 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14883 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14884 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14887 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14889 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14890 DECL_ARTIFICIAL flag on enumeration types.
14892 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14894 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14895 fat pointer types artificial unconditionally.
14896 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14899 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14901 * gcc-interface/gigi.h (get_dummy_type): Declare.
14902 (build_dummy_unc_pointer_types): Likewise.
14903 (finish_fat_pointer_type): Likewise.
14904 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14905 fat pointer type has been built, complete it in place.
14906 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14907 and thin pointers. Remove useless variable.
14908 (finish_fat_pointer_type): Make global and move to...
14909 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14910 (get_dummy_type): New function.
14911 (build_dummy_unc_pointer_types): Likewise.
14912 (gnat_pushdecl): Propage the name to the anonymous variants only.
14913 (update_pointer_to): Only adjust the pointer types in the unconstrained
14916 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14918 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14919 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14920 if this is a Taft amendment type and the full declaration is available.
14921 * gcc-interface/trans.c (process_type): Likewise.
14922 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14923 (process_freeze_entity): Likewise.
14924 * gcc-interface/utils.c (dummy_global): New static variable.
14925 (gnat_write_global_declarations): If there are types declared as used
14926 at the global level, insert them in the global hash table.
14928 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14930 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14931 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14932 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14934 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14935 flag of the type accordingly.
14936 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14938 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14940 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14941 finalizing types when updating the pointers to the designated type.
14942 <all>: Finalize the deferred types even if we didn't defer processing
14943 of incomplete types in this invocation.
14945 2011-04-01 Olivier Hainque <hainque@adacore.com>
14946 Nicolas Setton <setton@adacore.com>
14947 Eric Botcazou <ebotcazou@adacore.com>
14949 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14950 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14952 2011-03-28 Kai Tietz <ktietz@redhat.com>
14954 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14956 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14957 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14959 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14961 2011-03-28 Tristan Gingold <gingold@adacore.com>
14964 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14965 Use ada output of gnatbind.
14966 (ada/b_gnatb.adb): Ditto.
14967 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14968 (ada.mostlyclean, ada.stage1)
14969 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14970 (ada.stagefeedback): Adjust.
14971 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14972 Use ada output of gnatbind.
14973 (b_gnatm.adb): Ditto.
14974 (b_gnatl.o, b_gnatm.o): New rules.
14976 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14978 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14979 for the padded type built to support a specified size or alignment.
14981 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14983 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14984 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14985 unconditionally to the end of the unit when the designated type is
14987 <all>: Rename local variable. Attempt to un-defer types only and do it
14988 for limited_with'ed types as well.
14989 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14990 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14991 consistently and remove redundant call to finalize_from_with_types.
14993 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14995 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14996 subprograms without a previous spec declared in the same unit.
14997 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14998 subprograms at the end of the unit instead of at the beginning.
14999 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15000 isn't public for the special handling of non-inline functions nested
15001 inside inline external functions.
15003 2011-03-25 Jeff Law <law@redhat.com>
15005 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15007 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15009 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15010 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15011 to compute Set_Size_Depends_On_Discriminant.
15012 (Layout_Type): Call it on array types in back-end layout mode.
15013 * sem_util.adb (Requires_Transient_Scope): Return true for array
15014 types only if the size depends on the value of discriminants.
15015 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15016 type if the RHS is a call to a function that returns an unconstrained
15017 type with default discriminant.
15019 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15021 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15022 non-conversion to the nominal result type at the end.
15024 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15026 * gcc-interface/trans.c (create_temporary): New function taken from...
15027 (create_init_temporary): ...here. Call it.
15028 (call_to_gnu): Create the temporary for the return value early, if any.
15029 Create it for a function with copy-in/copy-out parameters if there is
15030 no target; in other cases of copy-in/copy-out, use another temporary.
15031 Push the new binding level lazily. Add and rename local variables.
15033 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15035 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15037 (set_rm_size): Likewise.
15039 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15041 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15042 for the padded type built in order to support a specified alignment.
15043 Fix incorrect formatting.
15045 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15048 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15050 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15052 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15053 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15054 to the end of the list. Adjust recursive call. Rename local variable.
15055 If REORDER is true, reorder components of the record type.
15056 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15057 components_to_record and adjust the parameter list.
15059 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15061 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15062 disabled, use the variable for bounds of loop iteration scheme.
15064 2011-03-21 Kai Tietz <ktietz@redhat.com>
15067 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15069 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15071 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15072 out whether the expression is read-only. Short-circuit placeholder
15073 case and rename a couple of local variables.
15075 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15077 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15078 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15079 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15080 (convert): Deal with conversions from a smaller form type specially.
15082 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15084 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15085 its argument, except for the special -I- switch.
15087 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15089 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15092 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15094 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15096 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15098 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15100 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15101 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15102 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15103 Do not generate the check directly, instead instantiate the template
15104 check present in the descriptor.
15105 (make_descriptor_field): Move around.
15106 (build_vms_descriptor32): Build a template check in the POINTER field.
15107 (build_vms_descriptor): Remove useless suffixes.
15108 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15110 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15113 * targext.c: Include target files if IN_RTS is defined.
15115 2011-01-26 Richard Guenther <rguenther@suse.de>
15118 * targext.c: Include config.h.
15119 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15122 2011-01-04 Pascal Obry <obry@adacore.com>
15123 Eric Botcazou <ebotcazou@adacore.com>
15125 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15127 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15129 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15130 end-of-case on the end label and its associated gotos, if any.
15132 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15134 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15135 expressions of the parameter cache within the statement group of
15136 the CICO mechanism.
15138 2011-01-04 Olivier Hainque <hainque@adacore.com>
15139 Eric Botcazou <ebotcazou@adacore.com>
15141 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15142 (set_end_locus_from_node): New function.
15143 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15144 make and the function end_locus.
15145 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15146 for the elaboration subprogram.
15147 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15148 set the end_locus of the expression as well.
15150 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15153 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15154 variables that are referenced in exception handlers volatile.
15158 Copyright (C) 2011 Free Software Foundation, Inc.
15160 Copying and distribution of this file, with or without modification,
15161 are permitted in any medium without royalty provided the copyright
15162 notice and this notice are preserved.